Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Latest commit

 

History

History
41 lines (27 loc) · 1.13 KB

CS_15.md

File metadata and controls

41 lines (27 loc) · 1.13 KB
title week type
Final Challenge
12
Case Study

Write a short script to perform the following steps

  1. Import the data on atmospheric $CO_2$ from the link below into R
data_url="http://scrippsco2.ucsd.edu/assets/data/atmospheric/stations/in_situ_co2/monthly/monthly_in_situ_co2_mlo.csv"
  1. Remove the header of the file to retain only the data
  2. Filter out missing data (-99.99)
  3. Update the column names using the colnames vector below
colnames=c("year","month","excel","decimal_year","co2","co2_seasonal","co2_fit","co2_seasonalfit","co2_filled","co2_seasonalfilled")
  1. Calculate the mean $CO_2$ for each year from the co2 column
  2. plot a simple ggplot line graph of mean annual $CO_2$ concentration each year as shown below
## Response [https://scrippsco2.ucsd.edu/assets/data/atmospheric/stations/in_situ_co2/monthly/monthly_in_situ_co2_mlo.csv]
##   Date: 2020-12-10 14:50
##   Status: 200
##   Content-Type: text/csv
##   Size: 75.7 kB
## <ON DISK>  /var/folders/fh/g_hk6yxx4cj5c83096lj3g4r0000gn/T//RtmpwSlW1s/filee0af4f9efac8