All graphs should be created with ggplot2.

Upload a data frame from file demography.csv. It contains data on population of Belgorodskaya and Kaluzhskaya oblasts (districts) in 2016 (taken from Russian State Statistics Service).

Variables:

Problem 1

Create the following columns in a data set:

Hint: you can add three columns at once via mutate() from dplyr.

Problem 2

Plot a histogram for work_share. Change its fill color and add rugs. Add a vertical line that corresponds to the median value of work_share.

Hint: add one more layer to the graph: geom_vline(xintercept = ) and put the median value after =.

Problem 3

Create two smoothed density plots for work_age by regions in the same graph (in one window). Change fill colors from default blue and pink to any you want. Fix transparency of graphs if needed.

Problem 4

Create a scatterplot for young_share and old_share. Interpret the graph you obtained. Change the color of points and their type.

Problem 5

Create a scatterplot for young_share and old_share by regions in two separate windows (facets).