Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Your instructions are: Download the most recent (September 2022) public use micro data from the Labour Force Survey (LFS) in .csv format from (https://www150.statcan.gc.ca/n1/pub/71m0001x/71m0001x2021001-eng.htm )
Your instructions are:
- Download the most recent (September 2022) public use micro data from the Labour Force Survey (LFS) in .csv format from (https://www150.statcan.gc.ca/n1/pub/71m0001x/71m0001x2021001-eng.htm )Note that the file you download will be a compressed .zip file. When you uncompress the .zip file, you should find a folder containing three files. The file called pub0922.csv contains the data in .csv format. The file called LFS_PUMF_EPA_FGMD_variables.csv contains a list of all variables in the file, along with a bit of information about each of them. The easiest way to view that list of variables is to open LFS_PUMF_EPA_FGMD_variables.csv in aspreadsheet like Excel.
- 1) Load the tidyverse library.
- 2) Read the LFS data into R.
- 3) Use the codes for the LFSSTAT variable described inLFS_PUMF_EPA_FGMD_variables.csvto create a new variableLFStatusthat describes the labor force status of each individual using words(e.g., the values of this variable should be "Employed, at work", "Employed, absent from work", etc.). Irecommend using theif_else()function
- 4) Create a bar chart that depicts theproportionof observations in each labor force status category; (see Data Visualization ( https://socviz.co/ ) Fig 4.8 for an example). The proportions should sum to one, and the categories should be labeled properly (e.g., "Employed, at work", "Employed, absent from work", etc.), just like yourLFStatusvariable. Don't forget to label your axes and give the plot an informative title.Write a few sentences comparing the number of observations in each category; do the results surprise you?
- 5) Create a new variable that describes each individual's immigrant type using words (e.g., "Immigrant, landed 10 or less years earlier", "Immigrant, landed more than 10 years earlier" or "Non-Immigrant"). Once again, you'll want to use the codes for the IMMIG variable described inLFS_PUMF_EPA_FGMD_variables.csvto do this. Then,create a stacked bar chart (like Fig 4.11 ofData Visualization (socviz.co))ora dodged bar plot (like 4.13 ofData Visualization ( https://socviz.co/ )) that shows the proportion of observations in each labour force status for each immigrant type. That is, for each immigrant type, the proportion of observations in each labor force status category should sum to one.Write a few sentences describing anysimilarities/differences you see in the distribution of labor force status of the immigrant types.Note: make sure your category labels are easy to read! Youmight find it helpful to usecoord_flip(), or rotate the axis labels usingtheme(axis.text.x = element_text())
- 6) Now filter the data to keep only individuals who are "employed, at work", and then filter again to retain onlysome subgroup of employed individuals that are of interest to you (e.g., could be a particular gender, province, age, occupation, industry, ... any combination of things). Justify the subgroup you are interested in. For your chosen subgroup, visualize the distribution of some continuous work variable (could be work hours, earnings, unemployment duration, .... many other options) through (a) a histogram, (b) a density plot, and (c) a box plot. Discuss what you see and learn from each.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started