# install.packages("highcharter")
# install.packages ("dslabs") # These are data science labs
library("dslabs")
list.files (system.file("script", package ="dslabs"))
## [1] "make-admissions.R"
## [2] "make-brca.R"
## [3] "make-brexit_polls.R"
## [4] "make-death_prob.R"
## [5] "make-divorce_margarine.R"
## [6] "make-gapminder-rdas.R"
## [7] "make-greenhouse_gases.R"
## [8] "make-historic_co2.R"
## [9] "make-mnist_27.R"
## [10] "make-movielens.R"
## [11] "make-murders-rda.R"
## [12] "make-na_example-rda.R"
## [13] "make-nyc_regents_scores.R"
## [14] "make-olive.R"
## [15] "make-outlier_example.R"
## [16] "make-polls_2008.R"
## [17] "make-polls_us_election_2016.R"
## [18] "make-reported_heights-rda.R"
## [19] "make-research_funding_rates.R"
## [20] "make-stars.R"
## [21] "make-temp_carbon.R"
## [22] "make-tissue-gene-expression.R"
## [23] "make-trump_tweets.R"
## [24] "make-weekly_us_contagious_diseases.R"
## [25] "save-gapminder-example-csv.R"
My topic for this assignment concerns the 2000 Years of Greenhouse Gas Concentrations.
library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.2 --
## v ggplot2 3.3.6 v purrr 0.3.4
## v tibble 3.1.8 v dplyr 1.0.10
## v tidyr 1.2.1 v stringr 1.4.1
## v readr 2.1.2 v forcats 0.5.2
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library(readr)
library(ggplot2)
library(dplyr)
library(ggfortify)
library(RColorBrewer)
library(plotly)
##
## Attaching package: 'plotly'
##
## The following object is masked from 'package:ggplot2':
##
## last_plot
##
## The following object is masked from 'package:stats':
##
## filter
##
## The following object is masked from 'package:graphics':
##
## layout
library(htmltools)
library(scales)
##
## Attaching package: 'scales'
##
## The following object is masked from 'package:purrr':
##
## discard
##
## The following object is masked from 'package:readr':
##
## col_factor
data(greenhouse_gases)
Through my plot, I will show three important long-lived greenhouse gases and their evolution over a period of 2000 years in order to see their variation over time.
ggplot(greenhouse_gases, aes(x=year, y=concentration, color=gas))+
geom_point(size = 1.2)+
geom_line() +
theme_bw() +
scale_color_brewer(palette = "Set2") +
labs(x= "year", y= "concentration") +ggtitle("2000 Years of Greenhouse gases concentrations")
My plot shows that the atmospheric concentrations of naturally occuring greenhouses gases CO2,CH4 and N2O have varied over the past 650 millennia as the Earth has cooled and warmed periods several times.We can see that our long-lived greenhouse gases have increased substantially since about 1750 and these increases are largely attributable to human activities since the Industrial Revolution in 1800.The increases and current atmospheric levels are due to the competition between sources ( the emissions of these gases from human activities )and sinks (we have more and more convertion of gases to different chimical compounds).