Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is the 'Dashboard Project' for MUSA 6110 (Fall 2024)
25 changes: 25 additions & 0 deletions Krystal Won - Workforce Training Providers in the US/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

var config = {
style: "mapbox://styles/mapbox/dark-v11",
accessToken: "pk.eyJ1IjoiZGFsaXZhbnBpY2Fzc29udW0yIiwiYSI6ImNtMTg0MGwzcTBxZnoybHB3dGsxOGs3N3MifQ.ubimGmdKCe9GNuSwkk5T6g",
markerColor: "#3FB1CE",
theme: "light",
use3dTerrain: false,
mapSettings: {
center: [-107.13038, 40.22634],
zoom: 3.74,
pitch: 0,
bearing: 0
}
};

mapboxgl.accessToken = config.accessToken;

var map = new mapboxgl.Map({
container: 'map',
style: config.style,
center: config.mapSettings.center,
zoom: config.mapSettings.zoom,
pitch: config.mapSettings.pitch,
bearing: config.mapSettings.bearing
});
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
---
title: "01-data cleaning"
author: "Krystal Won"
date: "2024-10-23"
output: html_document
---

```{r}
library(readr)
library(tidycensus)
library(dplyr)
```


```{r setup}
acs_data <- read_csv("/Users/k.w./Desktop/acs_data_final.csv")

acs_data <- acs_data %>%
select(-AQPKE001, -AQPKE022, -AQPKE023, -AQPKE024, -AQPKE025, -`...4`) %>%
mutate(`Unemployment rate` = paste0(`Unemployment rate`, "%")) %>%
mutate(`Per Capita Personal Income` = ifelse(`Per Capita Personal Income` >= 1000000, paste0(round(`Per Capita Personal Income` / 1000000, 1), "M"), paste0(round(`Per Capita Personal Income` / 1000, 1), "k")))


write_csv(acs_data, "/Users/k.w./Documents/MUSA 6110/dashboard project/data/acs_data_cleaned.csv")
```


```{r}

workforce_data <- read_csv("/Users/k.w./Documents/MUSA 6110/dashboard project/data/workforce_training_ori.csv")

workforce_data <- workforce_data %>%
mutate(
`Organization Type` = case_when(
(in_ipeds == TRUE & in_rapids == TRUE) |
(in_ipeds == TRUE & in_tpr == TRUE) |
(in_ipeds == TRUE & in_irs == TRUE) |
(in_rapids == TRUE & in_tpr == TRUE) |
(in_rapids == TRUE & in_irs == TRUE) |
(in_tpr == TRUE & in_irs == TRUE) ~ "Multiple types",

# Higher education institution
in_ipeds == TRUE ~ "Higher education institution",

# Registered apprenticeship
in_rapids == TRUE ~ "Registered apprenticeship",

# WIOA-eligible
in_tpr == TRUE ~ "WIOA-eligible",

# Non-profit organization
in_irs == TRUE ~ "Non-profit organization",

# If none of the above conditions are met, leave the type as NA
TRUE ~ NA_character_
),

`Subtype` = case_when(
# Highest degree certificate
org_subtype_ipeds == "Nondegree-granting, sub-baccalaureate" ~ "Highest degree certificate",

# Highest degree associate’s
org_subtype_ipeds == "Degree-granting, Associate's and certificates" ~ "Highest degree associate’s",

# Highest degree bachelor’s+
org_subtype_ipeds == "Degree-granting, not primarily baccalaureate or above" ~ "Highest degree bachelor’s+",

# Other higher education institution
org_subtype_ipeds == 0 & org_subtype_irs == "Community or Junior Colleges" ~ "Other higher education institution",
org_subtype_ipeds == 0 & org_subtype_tpr == "Higher Ed*" ~ "Other higher education institution",
org_subtype_ipeds == 0 & org_subtype_rapids == "Community College/University" ~ "Other higher education institution",

# Private for-profit
org_subtype_tpr == "Private for profit" ~ "Private for-profit",

# Apprenticeship sponsor / labor/union
org_subtype_rapids == "Apprenticeship –Labor/Union" ~ "Apprenticeship sponsor / labor/union",

# Apprenticeship – business association
org_subtype_rapids == "Apprenticeship – Business Association" ~ "Apprenticeship – business association",

# Apprenticeship sponsor / employer
org_subtype_rapids == "Apprenticeship – Employer" ~ "Apprenticeship sponsor / employer",

# Apprenticeship sponsor / intermediary
org_subtype_rapids == "Apprenticeship – Intermediary" ~ "Apprenticeship sponsor / intermediary",

# Apprenticeship sponsor / government
org_subtype_rapids %in% c("Apprenticeship – Federal Agency", "Apprenticeship – City/County Agency", "Apprenticeship – State Agency") ~ "Apprenticeship sponsor / government",

# Apprenticeship sponsor / workforce investment board
org_subtype_rapids == "Apprenticeship – Workforce Investment Board" ~ "Apprenticeship sponsor / workforce investment board",

# Apprenticeship sponsor / foundation
org_subtype_rapids == "Apprenticeship – Foundation" ~ "Apprenticeship sponsor / foundation",

# Apprenticeship sponsor / other
org_subtype_rapids %in% c("Apprenticeship – Other", "Apprenticeship – None", "Apprenticeship – Unknown") ~ "Apprenticeship sponsor / other",
org_subtype_tpr == "National Apprenticeship" ~ "Apprenticeship sponsor / other",

# Job training non-profit
org_subtype_irs %in% c("Vocational, Technical Schools", "Employment Procurement Assistance, Job Training", "Vocational Counseling, Guidance and Testing", "Vocational Training", "Vocational Rehabilitation", "Goodwill Industries", "Sheltered Remunerative Employment, Work Activity Center N.E.C.") ~ "Job training non-profit",
org_subtype_tpr == "private non-profit" ~ "Job training non-profit",
org_subtype_rapids == "community based organization" ~ "Job training non-profit",

# If no subtype matches, leave as NA
TRUE ~ NA_character_
)
) %>%
select(
-org_subtype_tpr, -org_subtype_highest_degree_bachelors_plus, -org_subtype_highest_degree_associates,
-org_subtype_highest_degree_certificate, -org_subtype_other_higher_ed_institution,
-org_subtype_private_for_profit, -org_subtype_apprenticeship_business_association,
-org_subtype_apprenticeship_employer, -org_subtype_apprenticeship_intermediary,
-org_subtype_apprenticeship_gov, -org_subtype_apprenticeship_wib,
-org_subtype_apprenticeship_foundation, -org_subtype_apprenticeship_other,
-org_subtype_apprenticeship_union_labor, -org_subtype_job_training_non_profits, -std_street, -std_city, -std_zip, -county, -metro, -in_ipeds, -in_rapids, -in_irs, -in_tpr, -org_subtype_ipeds, -org_subtype_rapids, -org_subtype_irs, -num_data_sources, -last_updated
)


```


```{r}
state_name_lookup <- c(
"AL" = "Alabama", "AK" = "Alaska", "AZ" = "Arizona", "AR" = "Arkansas", "CA" = "California",
"CO" = "Colorado", "CT" = "Connecticut", "DE" = "Delaware", "FL" = "Florida", "GA" = "Georgia",
"HI" = "Hawaii", "ID" = "Idaho", "IL" = "Illinois", "IN" = "Indiana", "IA" = "Iowa",
"KS" = "Kansas", "KY" = "Kentucky", "LA" = "Louisiana", "ME" = "Maine", "MD" = "Maryland",
"MA" = "Massachusetts", "MI" = "Michigan", "MN" = "Minnesota", "MS" = "Mississippi",
"MO" = "Missouri", "MT" = "Montana", "NE" = "Nebraska", "NV" = "Nevada", "NH" = "New Hampshire",
"NJ" = "New Jersey", "NM" = "New Mexico", "NY" = "New York", "NC" = "North Carolina",
"ND" = "North Dakota", "OH" = "Ohio", "OK" = "Oklahoma", "OR" = "Oregon", "PA" = "Pennsylvania",
"RI" = "Rhode Island", "SC" = "South Carolina", "SD" = "South Dakota", "TN" = "Tennessee",
"TX" = "Texas", "UT" = "Utah", "VT" = "Vermont", "VA" = "Virginia", "WA" = "Washington",
"WV" = "West Virginia", "WI" = "Wisconsin", "WY" = "Wyoming"
)


workforce_data <- workforce_data %>%
mutate(state = state_name_lookup[std_state])
```


```{r}
write_csv(workforce_data, "/Users/k.w./Documents/MUSA 6110/dashboard project/data/workforce_training_cleaned.csv")
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
State,Unemployment rate,Poverty rate,Population identified as POC,Total population,Population with less than Bachelor's degree,Per Capita Personal Income
Alabama,2.5%,15.70%,35.50%,5.0M,27.21%,54k
Alaska,4.2%,10.50%,42.30%,734.8k,30.75%,71.6k
Arizona,3.8%,13.10%,48.20%,7.2M,31.80%,62.5k
Arkansas,3.2%,16.20%,32.30%,3.0M,24.71%,57.6k
California,4.3%,12.10%,66.30%,39.4M,35.86%,81.3k
Colorado,3.1%,9.60%,35.00%,5.8M,43.73%,80.1k
Connecticut,4.1%,10.10%,38.00%,3.6M,41.38%,89.9k
Delaware,4.3%,11.10%,41.00%,993.6k,34.46%,66.8k
District of Columbia,4.7%,15.10%,63.70%,670.6k,62.64%,106.8k
Florida,3%,12.90%,49.20%,21.6M,32.33%,68.7k
Georgia,3.1%,13.50%,50.20%,10.7M,33.63%,59.9k
Hawaii,3.3%,9.60%,80.50%,1.5M,34.72%,66.2k
Idaho,2.8%,11.00%,20.70%,1.9M,30.21%,59.4k
Illinois,4.6%,11.80%,41.50%,12.8M,36.67%,72.2k
Indiana,3.1%,12.30%,23.90%,6.8M,28.24%,61.2k
Iowa,2.8%,11.10%,17.10%,3.2M,30.28%,62.8k
Kansas,2.6%,11.60%,26.70%,2.9M,34.69%,66.1k
Kentucky,4%,16.10%,17.50%,4.5M,26.47%,55.4k
Louisiana,3.7%,18.70%,42.90%,4.6M,26.13%,58.5k
Maine,2.8%,10.90%,9.50%,1.4M,34.12%,65.1k
Maryland,3%,9.30%,52.80%,6.2M,42.22%,75.4k
Massachusetts,3.7%,9.90%,32.70%,7.0M,45.91%,91k
Michigan,4.1%,13.10%,27.10%,10.1M,31.14%,61.1k
Minnesota,2.6%,9.30%,23.70%,5.7M,38.20%,72.6k
Mississippi,3.8%,19.20%,44.30%,3.0M,23.88%,49.7k
Missouri,2.6%,12.80%,23.10%,6.2M,31.19%,62.6k
Montana,2.7%,12.40%,16.20%,1.1M,33.98%,65k
Nebraska,2.2%,10.40%,24.10%,2.0M,33.46%,71.3k
Nevada,5.2%,12.70%,55.60%,3.1M,26.55%,66.2k
New Hampshire,2.3%,7.30%,13.30%,1.4M,39.05%,78.5k
New Jersey,3.9%,9.70%,48.50%,9.2M,42.25%,82.1k
New Mexico,4.1%,18.30%,65.30%,2.1M,29.07%,55.3k
New York,4.3%,13.60%,47.00%,20.0M,38.79%,82.3k
North Carolina,3.7%,13.30%,39.10%,10.5M,33.87%,61.8k
North Dakota,2%,10.80%,17.20%,776.9k,31.43%,72k
Ohio,4%,13.30%,23.70%,11.8M,30.37%,61.5k
Oklahoma,3.1%,15.20%,37.20%,4.0M,27.27%,60.5k
Oregon,3.9%,11.90%,28.20%,4.2M,35.48%,67.8k
Pennsylvania,4.1%,11.80%,26.70%,13.0M,33.76%,68.5k
Rhode Island,3.2%,11.20%,32.00%,1.1M,36.28%,67.6k
South Carolina,3.2%,14.40%,37.20%,5.1M,30.64%,57.3k
South Dakota,2%,12.30%,19.90%,890.3k,30.37%,72.5k
Tennessee,3.4%,14.00%,27.90%,6.9M,29.71%,62.2k
Texas,3.9%,13.90%,61.10%,29.2M,32.27%,66.3k
Utah,2.4%,8.50%,24.40%,3.3M,36.13%,64.2k
Vermont,2.3%,10.40%,9.60%,643.8k,41.72%,66.9k
Virginia,2.8%,10.00%,41.10%,8.6M,40.97%,73.8k
Washington,4.1%,9.90%,36.40%,7.7M,37.95%,80.9k
West Virginia,3.9%,16.80%,9.60%,1.8M,22.71%,52.8k
Wisconsin,2.9%,10.70%,20.90%,5.9M,32.02%,65k
Wyoming,3.4%,10.70%,18.10%,577.9k,28.99%,82.1k
Loading