Description Usage Arguments Value Author(s) References Examples
This function allows users to subset the output dataframe of get_wac_data to focus on one specific job sector. This will be useful for those using RAC data to perform analysis on the geography of specific job types.
1 | get_jobsector_rac(df, job_code, job_proportion = T)
|
df |
The input for this function is the output dataframe from get_rac_data. |
job_code |
Here the user can select a specific job code from the output dataframe of get_rac_data, which enables the function to drop all other job sectors, but keep total jobs and the chosen job sector. Users should use colnames(df) to obtain a list of all available job codes. |
job_proportion |
This argument enables users to calculate the proportion of the chosen job sector in relation to the total number of jobs in each census block. By default the argument is 'T', so will calculate a job_proportion column unless set to 'F'. |
A dataframe of cleaned RAC data, focusing on a specific job sector. If job_proportion = T then the dataframe will also contain an additional column where the proportion of total jobs that the chosen job sector occupies is calculated.
Ballantyne, Patrick
LODES data available to download manually from: https://lehd.ces.census.gov/data/lodes/LODES7/
1 2 3 4 5 6 7 | ## Users need to use the get_rac_data function first:
df <- get_rac_data("nj", "2008")
## Get a list of all available job sectors
colnames(df)
## Use the get_jobsector_rac function to extract retail trade jobs, and calculate the proportion of retail trade jobs
df2 <- get_jobsector_rac(df, job_code = "Retail_Trade", job_proportion = T)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.