Employer H-1B Petition Activity in Public Administration
employer_data<-read_csv("PublicAdminEmp.csv",show_col_types = FALSE)
nrow(employer_data)
## [1] 248
print(paste("There was a total of", nrow(employer_data), "employer petitions in 2026."))
## [1] "There was a total of 248 employer petitions in 2026."
length(unique(na.omit(employer_data$`Employer (Petitioner) Name`)))
## [1] 232
print(paste("A total of", length(unique(na.omit(employer_data$`Employer (Petitioner) Name`))), "Unique employers that petition in 2026"))
## [1] "A total of 232 Unique employers that petition in 2026"
Total New Employment Petition Approvals and Denials
total_approvals <- sum(employer_data$`New Employment Approval`, na.rm = TRUE)
total_denials <- sum(employer_data$`New Employment Denial`, na.rm = TRUE)
print(paste("The total number of new employment approvals was", total_approvals))
## [1] "The total number of new employment approvals was 217"
print(paste("The total number of new employment denials was", total_denials))
## [1] "The total number of new employment denials was 7"
Summary of Employer Petition for New Employment Approvals and
Denials
summary(employer_data$`New Employment Approval`)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.000 0.000 1.000 0.875 1.000 9.000
print(paste("The maximum number of new employment approvals for a single employer in the dataset was", max(employer_data$`New Employment Approval`,na.rm = TRUE)))
## [1] "The maximum number of new employment approvals for a single employer in the dataset was 9"
summary(employer_data$`New Employment Denial`)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.00000 0.00000 0.00000 0.02823 0.00000 1.00000
print(paste("The maximum number of new employment denials for a single employer in the dataset was", max(employer_data$`New Employment Denial`,na.rm = TRUE)))
## [1] "The maximum number of new employment denials for a single employer in the dataset was 1"
employer_approved <- employer_data %>% group_by(`Employer (Petitioner) Name`) %>% summarise(total_approvals = sum(`New Employment Approval`, na.rm = TRUE))
employer_approved[order(employer_approved$total_approvals, decreasing = TRUE), ] %>%
head(5)
States with the Highest Number of New Employer Approved
Petitions
state_approved <- employer_data %>%
group_by(`Petitioner State`) %>%
summarise(total_approvals = sum(`New Employment Approval`, na.rm = TRUE))
print(paste("This total includes",nrow(state_approved),"states."))
## [1] "This total includes 40 states."
#Top states with the highest new employer approvals.
head(state_approved[order(state_approved$total_approvals, decreasing = TRUE), ], 5)