Skip to content

Repository with workshop materials for climate data and multilevel modeling workshop with AAH in Nairobi, 2024

Notifications You must be signed in to change notification settings

IPUMS-Global-Health/umn-nairobi-2024

Repository files navigation

UMN Multilevel Modeling + Climate Data Workshop

Using R to understand climate and population health

Welcome!

Welcome to the home page for the 2024 UMN Multilevel Modeling and Climate Data workshop.

This GitHub repository contains presentation slides and other materials that will be used in the workshop.

Below we describe some setup work that can be completed before the workshop itself. Please follow the instructions in advance of the workshop. If you have trouble, we may be able to use some time at the beginning of the workshop to assist in some of these steps. However, some steps (i.e. registering for access to IPUMS DHS) require some waiting time, so it will be best if you can complete them in advance.

All data and software used in the workshop are available free of charge.

Setup: Please complete prior to workshop!

1. Log into IPUMS DHS

To obtain access to IPUMS DHS, you must first register for data access through the DHS Program itself.

Once you have a valid DHS account, you can log into IPUMS DHS using your DHS username and password. 🔑

2. Build an IPUMS DHS extract

You can generate a data extract containing the same samples and variables that are used in this workshop through your own IPUMS DHS account.

If you’re new to IPUMS DHS, click here for instructions on building an IPUMS DHS data extract.

  1. To reproduce the data used in this workshop, select the following samples and variables:
    • Sample: Kenya 2014 🇰🇪
    • Variables:
      • BIRTHWT
      • HEIGHTFEM
      • KIDSEX
      • KIDDOBCMC
      • BIRTHWTREF
      • FLOOR
      • TOILETTYPE
      • DRINKWTR
      • HWHAZWHO
      • FEVRECENT
      • DIARRECENT
  2. Submit your extract request through the IPUMS DHS interface.
  3. When the it has finished processing, download the completed data extract.
    • You will need to download two files (.dat.gz and .xml). See the download instructions for information about how to obtain each.
    • Save both files into this project’s data sub-directory

3. Install R + RStudio

If you do not already have R and RStudio installed:

  • Install R by clicking the appropriate link(s) for the operating system you’re running.
  • Install RStudio by clicking the Download RStudio Desktop button.

4. Download workshop files

There are 2 options for downloading the files used in this workshop:

  1. Download the workshop files manually
    • 📂 Open the downloaded zip file
    • 🚨 Windows users may also need to download decompression software (e.g. 7-Zip) to decompress the zip file.
  2. Otherwise, if you’re comfortable with Git, run the following code in your terminal to clone this repository into the local directory of your choice:
git clone https://github.com/IPUMS-Global-Health/umn-nairobi-2024.git

5. Launch the workshop’s RStudio Project

Open the file umn-nairobi-2024.Rproj found in this project folder.

This will launch the workshop project in a new RStudio environment. 🚀

6. Install necessary R packages

Copy the following code into the Console in RStudio, then press Enter.

# Install necessary packages if not already installed 
pkgs <- c("tidyverse", "ipumsr", "sf", "terra", 
          "ggspatial", "patchwork", "lubridate", "lme4")

for (pkg in pkgs) {
  if (!require(pkg, quietly = TRUE, character.only = TRUE)) {
    install.packages(pkg)
  }
}

It may take a few minutes to install the packages needed for this workshop ⌛

  • If prompted to update dependency packages, please do so by pressing 1.
  • If asked Do you want to install from sources the package which needs compilation?, reply No
  • Restart R at least once before the workshop begins. Do so by clicking Session > Restart R in the header toolbar.

That’s it!

You should now be ready to follow along with the workshop!

Slides and Source Code

Workshop slides were built with Quarto and Revealjs.

About

Repository with workshop materials for climate data and multilevel modeling workshop with AAH in Nairobi, 2024

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages