Description Usage Arguments Value Author(s) References Examples
This function enables users to extract job flows from Residence Areas (Origin Areas) to Workplace areas (Destination Areas) for a chosen state and a chosen year. The function grabs the OD data, merges with a lookup of census block geographies and processes the dataset. The output dataframe contains a "Total_Jobs" column which indicates the total estimated job flows from a residence area to a workplace area. These dataframes are bigger than those obtained by get_wac_data or get_rac_data as they contain multiple rows of data for each residence area, corresponding to the various workplace areas that job flows occur between.
1 | get_od_data(state_name, year, main = T)
|
state_name |
Users need to give the lowercase abbreviated state name of any US state, to enable the function to grab OD data for that state. |
year |
Users need to give a year between 2002-2017, to enable the function to grab the OD data for that year, and for the state identified with the state_name argument. |
main |
As default, main is set to 'T', which means the function is grabbing OD flows where residence and workplace areas are in the same state. Setting main to 'F' will give OD data where the workplace areas are in the chosen state, but the residence areas are outside the state. |
Function returns a cleaned OD dataset for the chosen state and chosen year.
Ballantyne, Patrick
LODES data available to download manually from: https://lehd.ces.census.gov/data/lodes/LODES7/
1 2 3 4 5 | ## Get OD data for Illinois, from 2014
df <- get_od_data("il", "2014", main = T)
## Get OD data for Illinois, from 2014, but where residence areas are outside Illinois state
df2 <- get_od_data("il", "2014", main = F)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.