data("historic_co2")unique(historic_co2$source) #Shows what sources that data was recorded from
[1] "Mauna Loa" "Ice Cores"
clean_co2 <- historic_co2 %>%filter(!is.na(co2)) %>%filter(year >=1760& year <=2018)# Represents the data starting at the beginning of the Industrial Revolution until 2018
ggplot(clean_co2, aes(x = year, y = co2, color = source)) +geom_point(alpha =0.5, size =2) +geom_line(alpha =0.8) +labs(title ="CO2 Concentration (1760–2018)", subtitle ="CO2 Measurements from the Industrial Revolution to Modern Day", x ="Year", y ="CO2 Concentration", color ="Source") +theme_get() +theme(plot.title =element_text(size =15, face ="bold", hjust =0.5),plot.subtitle =element_text(size =10, hjust =0.5),axis.title =element_text(size =12),legend.title =element_text(size =10, face ="bold")) +scale_color_manual(values =c("Ice Cores"="#FFC300", "Mauna Loa"="#FF5733"))
Paragraph
I used the historic_co2 data set within dslabs because I was interested in the increased rate of atmospheric co2 throughout the recorded samples that date back 800,000 years. There are 3 variables and 694 observations recorded that include measurements of co2 using two methods (Ice Cores and the Mauna Loa Observatory in Hawaii). Ice cores are cylinders of ice drilled from glaciers that show the trapped levels of co2 that can then be dated back to a certain period of time. The Mauna Observatory was created in 1959 which collects co2 samples from the volcano that help track global co2 levels. After removing NAs and then filtering for the years 1760 to 2018 I created a scatter plot. The observatory was created in 1959 so it overlaps the ice core data samples which aren’t used for modern carbon measurements (reason why it ends).