Intro: My data set topic is on Maryland’s monthly employment and labor rates through the years of 2007 to 2018. The three variables I included were Maryland’s employment rate, unemployment rate, and labor force participation rate. The employment rate is every adult that has a job, the unemployment rate is everyone working age adult who doesn’t have a job (excluding retirees and disabled people), and Labor force participation measures the percentage of Americans who are eligible to work. My data source: https://opendata.maryland.gov/Business-and-Economy/Employment-Unemployment-and-Labor-Force-Data/ub9y-b3wy/about_data
Downloading the dataset onto r from my Data110 folder
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.5.1 ✔ tibble 3.2.1
✔ lubridate 1.9.3 ✔ tidyr 1.3.1
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Rows: 152 Columns: 11
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (3): Date, Month, Date Label
dbl (8): Year, Civilian Non-institutional Population, Civilian Labor Force, ...
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Filtering the the dataset to “EmpMD” so that it doesn’t include year’s 2007 & 2019 as they were incomplete
Created a bar chart using ggplot. Incorporated the values Employment Rate, Unemployment Rate,Labor Force Participation Rate and then used the scal_fill_manual command to differentiate the values by color.
ggplot(EmpMD, aes(Year)) +geom_bar(aes(y =`Labor Force Participation Rate`, fill ="Labor Force Participation Rate"),position ="dodge", stat ="identity") +geom_bar(aes(y =`Employment Rate`, fill ="Employment Rate"), position ="dodge", stat ="identity") +geom_bar(aes(y =`Unemployment Rate`, fill ="Unemployment Rate"), position ="dodge", stat ="identity") +labs(y ="Rate", fill ="Rate Type") +labs(title =" Comparying Maryland Employment From 2008-2018") +theme_minimal() +scale_fill_manual(values =c("Labor Force Participation Rate"="orange","Unemployment Rate"="darkred","Employment Rate"="tan"))