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.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
.rds
mapboxtoken_setup.R
Binary file added Images/.DS_Store
Binary file not shown.
Binary file added Images/green-job-mapping-logo-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/green-job-mapping-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,39 @@
README
README: CCRC Green Job Mapping
================

![Green Job Mapping logo](images/green-job-mapping-logo-small.png)

## Overview

docs for Mapbox GL JS : <https://docs.mapbox.com/mapbox-gl-js/api/>

This app built for Hover function for demand side, we will use the US
county population to have a try!



---

## Data used for the app

data folder, private:
<https://liveutk-my.sharepoint.com/personal/csublet1_utk_edu/_layouts/15/onedrive.aspx?e=5%3A0b3e911b6a2f48f28fe9b3e7d0c53f70&sharingv2=true&fromShare=true&at=9&CID=882de04e%2D35af%2D4440%2Dad6e%2Db77fea949e96&id=%2Fpersonal%2Fcsublet1%5Futk%5Fedu%2FDocuments%2FResearch%2FGreenJobs&FolderCTID=0x01200008BE93ABE0F3EF43905625E5D5D49057&view=0>

Downlaod the data folder,rename it as raw-data.



---

## Raw data used to create the data used for the app

`pre-county-population.R` is used to create fake “demand” side data,
which is US county level population data from tidycensus package.



---

## Wei update the app on Feb 18th.

UI_app.R and www/mapbox-script.JS are main files for the app.
Expand All @@ -28,4 +42,9 @@ APP website:https://ed-analytics.shinyapps.io/CCRC_Mapping_JS/

To run this app locally, set up the map token as a source file.

The hover UI: ![Hover UI](Images/Hover.png)

---

## The hover UI

![Hover UI](images/hover.png)
140 changes: 0 additions & 140 deletions UI_app.R

This file was deleted.

132 changes: 0 additions & 132 deletions app.R

This file was deleted.

Binary file added data/counties_sf_processed.rds
Binary file not shown.
Binary file added data/hdallyears.rds
Binary file not shown.
Binary file added data/ipeds_green_summed.rds
Binary file not shown.
19 changes: 10 additions & 9 deletions pre-county-population.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ library(tidyverse)
library(haven)
library(tidycensus)

county_population <- get_acs(
geography = "county",
variables = "B01003_001E", # Total population variable
year = 2021,
survey = "acs5" # 5-year data
)
county_population <-
get_acs(
geography = "county",
variables = "B01003_001E", # Total population variable
year = 2021,
survey = "acs5" # 5-year data
)

head(county_population)

Expand Down Expand Up @@ -46,7 +47,7 @@ counties_sf_size2 <- st_transform(counties_sf_size1, crs = 4326)
#counties_sf_size2 <- counties_sf_size2 %>%
#as_mapbox_source()

counties_sf_size2 %>% write_rds("counties_sf_processed.rds")
counties_sf_size2 %>% write_rds("data/counties_sf_processed.rds")



Expand All @@ -62,7 +63,7 @@ ipeds_green_summed <- ipeds_green %>%
ipeds_green_summed <- ipeds_green_summed %>%
pivot_longer(-unitid, names_to = "greencat", values_to = "size")

write_rds(ipeds_green_summed, "ipeds_green_summed.rds")
write_rds(ipeds_green_summed, "data/ipeds_green_summed.rds")



Expand All @@ -71,4 +72,4 @@ hdallyears <- read_dta("raw-data/hdallyears.dta")
hdallyears <- hdallyears %>%
filter(year == 2020)

write_rds(hdallyears, "hdallyears.rds")
write_rds(hdallyears, "data/hdallyears.rds")
Loading