---- Compiling #TidyTuesday Information for 2024-05-21 ----
--- There is 1 file available ---
── Downloading files ───────────────────────────────────────────────────────────
1 of 1: "emissions.csv"
df<- df$emissions
Explore the data
First few rows
head(df)
# A tibble: 6 × 7
year parent_entity parent_type commodity production_value production_unit
<dbl> <chr> <chr> <chr> <dbl> <chr>
1 1962 Abu Dhabi Nation… State-owne… Oil & NGL 0.913 Million bbl/yr
2 1962 Abu Dhabi Nation… State-owne… Natural … 1.84 Bcf/yr
3 1963 Abu Dhabi Nation… State-owne… Oil & NGL 1.83 Million bbl/yr
4 1963 Abu Dhabi Nation… State-owne… Natural … 4.42 Bcf/yr
5 1964 Abu Dhabi Nation… State-owne… Oil & NGL 7.3 Million bbl/yr
6 1964 Abu Dhabi Nation… State-owne… Natural … 17.3 Bcf/yr
# ℹ 1 more variable: total_emissions_MtCO2e <dbl>
df1 <- df |>#To make the column names more clearer and concise.rename("year"=year,"company"=parent_entity,"owner_type"=parent_type,"commodity"=commodity,"quantity"=production_value,"unit"=production_unit,"emissions"=total_emissions_MtCO2e)glimpse(df1)
Change the quantity and emissions to two decimal places
df3<-df2# To enhance the readability, facilitating comprehension and analysis. df3$emissions <-round(df3$emissions, 2) df3$quantity<-round(df3$quantity,2)glimpse(df3)