library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.2.1 ✔ readr 2.2.0
## ✔ forcats 1.0.1 ✔ stringr 1.6.0
## ✔ ggplot2 4.0.3 ✔ tibble 3.3.1
## ✔ lubridate 1.9.5 ✔ tidyr 1.3.2
## ✔ purrr 1.2.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(readxl)
Increased_Telework<-read_excel("Increased Telework.xlsx")
data1<-Increased_Telework %>% select(State,`Number of establishments 4`,`Employment in establishments 8`)
summary(data1)
## State Number of establishments 4 Employment in establishments 8
## Length :64 Min. : 5050 Min. : 68056
## N.unique :64 1st Qu.: 13792 1st Qu.: 303635
## N.blank : 0 Median : 32873 Median : 794023
## Min.nchar: 4 Mean : 98529 Mean : 2586811
## Max.nchar:89 3rd Qu.: 69220 3rd Qu.: 1745460
## Max. :2611007 Max. :68550503
## NAs :11 NAs :11
data2<-data1 %>% na.omit()
summary(data2)
## State Number of establishments 4 Employment in establishments 8
## Length :53 Min. : 5050 Min. : 68056
## N.unique :53 1st Qu.: 13792 1st Qu.: 303635
## N.blank : 0 Median : 32873 Median : 794023
## Min.nchar: 4 Mean : 98529 Mean : 2586811
## Max.nchar:29 3rd Qu.: 69220 3rd Qu.: 1745460
## Max. :2611007 Max. :68550503
hist(data2$`Employment in establishments 8`)
plot(data2$`Employment in establishments 8`,data2$`Number of establishments 4`)
cor(data2$`Number of establishments 4`,data2$`Employment in establishments 8`)
## [1] 0.9996304
I believe there is a weak correalation between the number of establishments that increased telework during COVID-19 and the number of employees in these establishments.