Skip to content

Repository files navigation

EM-DAT R Tutorials

R counterparts of the EM-DAT Python Tutorials.

Note: The Tutorials are also available on the EM-DAT Documentation Website

Setting up

1. Install R

These tutorials were written with R 4.5.3. Download R from CRAN.

2. Install the R packages

Rscript install_packages.R

This installs readxl, dplyr, tidyr, ggplot2, sf, jsonlite, scales, and IRkernel.

3. Register the R kernel with Jupyter

The tutorials are Jupyter notebooks running an R kernel. Register it once:

Rscript -e "IRkernel::installspec()"

Then start the notebook server:

jupyter notebook

Select the R kernel when opening a notebook.

Data

The tutorials rely on data that is not included in this repository. Place downloaded files in a data/ folder (git-ignored), or adjust the paths in the notebooks.

File Used by Source
*_emdat_archive.xlsx Tutorials 1 & 2 EM-DAT Archive on Dataverse — or the latest release from public.emdat.be (registration required, see Data Accessibility)
ne_110m_admin_0_countries/ Tutorial 2 Natural Earth 1:110m Admin 0 – Countries
gadm41_JPN.gpkg Tutorial 2 GADM 4.1 – Japan geopackage (~33 MB)

Note on administrative units: these tutorials use the GADM Admin Units column and GADM 4.1 geometries. The legacy Admin Units column refers to GAUL, which is no longer supported.

License

MIT — see LICENSE.

About

R counterparts of the EM-DAT Python tutorials: basic operations, plotting, and mapping with the EM-DAT data

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages