Many people around the globe would like to immigrate to Canada as a Skilled Worker. These candidates must prove language proficiency in French and English, at least 2 years of working experience after graduation, and more. But, many immigrants that arrive in canada face unemployment rates sometimes even higher than in their original countries. So, the choice of the province to settle in is very important for those wishing to have economic success. With these exercises we will use R to analyze some immigration open data from Canadian government.
Answers to the exercises are available here.
Download and read into R a data set from Labour force survey estimates (LFS), by immigrant status, age group, Canada, regions, provinces and Montreal, Toronto, Vancouver census metropolitan areas, 3-month moving average, unadjusted for seasonality.. Then take a look at it using
Load libraries to manipulate data like dplyr. Turn Ref_Date into a Date type variable. (Tip: use as.Date)
Transform the variable “Value” to a numeric format.
- Learn indepth how to work with dplyr
- Get a full introduction to the data.table package
- And much more
Create a numeric vector that contains this column indices 1,2,4,5,6, and 9. And create a new data frame to store this data.
Create a text vector that contains the province names. Create a new data frame to store only lines with valid province names.
We are interested in comparing unemployment rate between people born in canada and recent immigrants. Exclude lines related to other kinds of status.
Skilled worker immigrants usually need to have a university degree and at least 2 year of professional experience. So, exclude lines in the “agegroup” variable with “15 years and over”, and remove this column.
Take a look at the summary information of the unemployment rate.
Use the summarize this data grouping then by status and province. Please, take the mean of the unemployment rate as the table content.
Use qplot from ggplot2 to create a plot and find the best province in terms of difference at unemployment rate between local people and recent immigrants.