temperature <-read_csv("01_data_cleaning/Annual_Surface_Temperature_Change.csv")
Rows: 225 Columns: 72
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (9): Country, ISO2, ISO3, Indicator, Unit, Source, CTS_Code, CTS_Name, ...
dbl (63): ObjectId, F1961, F1962, F1963, F1964, F1965, F1966, F1967, F1968, ...
ℹ 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.
temperature_mean |>ggplot(aes(x=year,y=avg_temperature))+geom_line() +scale_x_continuous(breaks =c(1960,1980,2000,2020)) +xlab("Year") +ylab("Mean Surface Temperature Change") +ggtitle("Annual Surface Mean Temperature Change Over Time")
Visualization 2
Natural Disasters
disasters_frequency <-read_csv("01_data_cleaning/Climate-related_Disasters_Frequency.csv") |>select(Country, Indicator, F1980:F2022) |>filter(Indicator!="Climate related disasters frequency, Number of Disasters: TOTAL")
Rows: 970 Columns: 53
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (9): Country, ISO2, ISO3, Indicator, Unit, Source, CTS_Code, CTS_Name, ...
dbl (44): ObjectId, F1980, F1981, F1982, F1983, F1984, F1985, F1986, F1987, ...
ℹ 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.
disasters_frequency$Indicator <-gsub("Climate related disasters frequency, Number of Disasters:", "", disasters_frequency$Indicator)disasters_frequency
# A tibble: 755 × 45
Country Indic…¹ F1980 F1981 F1982 F1983 F1984 F1985 F1986 F1987 F1988 F1989
<chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 Afghanis… " Drou… NA NA NA NA NA NA NA NA NA NA
2 Afghanis… " Extr… NA NA NA NA NA NA NA NA NA NA
3 Afghanis… " Floo… 1 NA NA NA NA NA NA NA 1 NA
4 Afghanis… " Land… NA NA NA NA NA NA NA 1 NA NA
5 Afghanis… " Stor… NA NA NA NA NA NA NA NA NA NA
6 Afghanis… " Wild… NA NA NA NA NA NA NA NA NA NA
7 Albania " Drou… NA NA NA NA NA NA NA NA NA 1
8 Albania " Extr… NA NA NA NA NA 1 NA NA NA NA
9 Albania " Floo… NA NA NA NA NA NA NA NA NA NA
10 Albania " Land… NA NA NA NA NA 1 NA NA NA NA
# … with 745 more rows, 33 more variables: F1990 <dbl>, F1991 <dbl>,
# F1992 <dbl>, F1993 <dbl>, F1994 <dbl>, F1995 <dbl>, F1996 <dbl>,
# F1997 <dbl>, F1998 <dbl>, F1999 <dbl>, F2000 <dbl>, F2001 <dbl>,
# F2002 <dbl>, F2003 <dbl>, F2004 <dbl>, F2005 <dbl>, F2006 <dbl>,
# F2007 <dbl>, F2008 <dbl>, F2009 <dbl>, F2010 <dbl>, F2011 <dbl>,
# F2012 <dbl>, F2013 <dbl>, F2014 <dbl>, F2015 <dbl>, F2016 <dbl>,
# F2017 <dbl>, F2018 <dbl>, F2019 <dbl>, F2020 <dbl>, F2021 <dbl>, …
yearly_disasters |>group_by(year) |>ggplot(aes(x=year,y=totalDisaster,fill=Indicator)) +geom_bar(stat="identity", position ="stack") +labs(fill="Types of Disasters") +xlab("Year") +ylab("Number of Natural Disasters") +ggtitle("Frequency of Natural Disasters")
Rows: 764 Columns: 20
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (9): Country, ISO2, ISO3, Indicator, Unit, Source, CTS_Code, CTS_Name, ...
dbl (11): ObjectId, F2013, F2014, F2015, F2016, F2017, F2018, F2019, F2020, ...
ℹ 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.
climate_risk_2022
# A tibble: 188 × 4
Country ISO3 Indicator F2022
<chr> <chr> <chr> <dbl>
1 Afghanistan, Islamic Rep. of AFG Climate-driven INFORM Risk Indicator 7.3
2 Albania ALB Climate-driven INFORM Risk Indicator 3.2
3 Algeria DZA Climate-driven INFORM Risk Indicator 3.3
4 Angola AGO Climate-driven INFORM Risk Indicator 4.8
5 Antigua and Barbuda ATG Climate-driven INFORM Risk Indicator 2.9
6 Argentina ARG Climate-driven INFORM Risk Indicator 3.5
7 Armenia, Rep. of ARM Climate-driven INFORM Risk Indicator 3.4
8 Australia AUS Climate-driven INFORM Risk Indicator 2.9
9 Austria AUT Climate-driven INFORM Risk Indicator 2.3
10 Azerbaijan, Rep. of AZE Climate-driven INFORM Risk Indicator 4.4
# … with 178 more rows
Warning: There was 1 warning in `mutate()`.
ℹ In argument: `ISO3 = country_name_regex_to_iso3c(region)`.
Caused by warning in `countrycode_convert()`:
! Some values were not matched unambiguously: Ascension Island, Azores, Barbuda, Bonaire, Canary Islands, Chagos Archipelago, Grenadines, Heard Island, Kosovo, Madeira Islands, Micronesia, Saba, Saint Martin, Siachen Glacier, Sint Eustatius, Virgin Islands
Rows: 202 Columns: 11
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (9): Country, ISO2, ISO3, Indicator, Unit, Source, CTS_Code, CTS_Name, C...
dbl (2): ObjectId, F2019
ℹ 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.
transition_preparedness
# A tibble: 101 × 4
Country ISO3 Exposure Resilience
<chr> <chr> <dbl> <dbl>
1 Albania ALB 0.265 0.717
2 Algeria DZA 0.605 0.800
3 Angola AGO 0.417 0.970
4 Argentina ARG 0.321 0.713
5 Australia AUS 0.353 0.330
6 Austria AUT 0.259 0.309
7 Azerbaijan, Rep. of AZE 0.683 0.650
8 Bangladesh BGD 0.349 0.823
9 Belgium BEL 0.206 0.357
10 Bolivia BOL 0.423 0.795
# … with 91 more rows
New names:
Rows: 265 Columns: 6
── Column specification
──────────────────────────────────────────────────────── Delimiter: "," chr
(5): Country Code, Region, IncomeGroup, SpecialNotes, TableName lgl (1): ...6
ℹ 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.
• `` -> `...6`
country_region
# A tibble: 265 × 3
ISO3 Region IncomeGroup
<chr> <chr> <chr>
1 ABW Latin America & Caribbean High income
2 AFE <NA> <NA>
3 AFG South Asia Low income
4 AFW <NA> <NA>
5 AGO Sub-Saharan Africa Lower middle income
6 ALB Europe & Central Asia Upper middle income
7 AND Europe & Central Asia High income
8 ARB <NA> <NA>
9 ARE Middle East & North Africa High income
10 ARG Latin America & Caribbean Upper middle income
# … with 255 more rows
exposure_resilience <-left_join(transition_preparedness, country_region, by="ISO3") exposure_resilience |>ggplot(aes(x=Resilience, y=Exposure, color=IncomeGroup)) +geom_point(alpha=0.8,size=2) +geom_text(aes(label=ISO3),size=2,color="grey25") +labs(fill="Income Group") +ggtitle("Exposure and Resilience to Low-Carbon Economy Transition") +xlab("Resilience from 0 (high resilience) to 1 (low resilience)") +ylab("Exposure from 0 (low exposure) to 1 (high exposure)") +theme(axis.title.x =element_text(size =8),axis.title.y =element_text(size =8),title =element_text(size =10))