Skip to content

MLGlobalHealth/BrazilOrphanhood

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Estimating orphanhood in Brazil during the COVID-19 pandemic

Code to reproduce the results in "Regional and national estimates of children affected by all-cause and COVID-19-associated orphanhood and caregiver death in Brazil, by age and family circumstance."

The primary analysis is performed in two steps:

  1. We generate samples of excess mortality and fertility, and then of orphanhood
  2. These samples are processed into the results

Generating the samples of fertility and orphanhood can be computationally expensive, particularly when estimating across many groups (such as by region and child-age, for example). We encourage you to leverage pre-generated samples available in the /samples/ folder for any downstream-analysis.

Structure of this repository

This repo contains the following scripts and folders:

  • generate_samples.R: Calls sampling functions from the /R/ folder. Corresponding scripts *_hpc.R and *_hpc_array.R are included for running on HPC services. If re-running these scripts from scratch, they should be run in the order presented, as later scripts may depend on the output of earlier scripts.
  • /data/: Raw data (where available) and scripts to process them into consistent formats.
  • /outputs/: Figures from the paper and supplementary material
  • /paper/: R scripts to generate tables and figures for the paper
  • /R/: Functions to generate samples of excess mortality, fertility, and orphanhood
  • /samples/: Pre-generated samples of excess mortality, fertility, and orphanhood

Flowchart. For a higher quality version, see the pdf. A flowchart of the core workflow to produce the samples of orphanhood. A higher quality .pdf version is available here.

Required packages

The code in this repository requires the following R packages:

  • tidyverse: Standard data manipulation and visualisation packages
  • zoo: Working with time series data
  • foreach: Parallel processing
  • doParallel: Parallel processing
  • survey: Survey data analysis
  • progress: Progress bars for long-running operations
  • cowplot: Combining ggplot2 plots
  • viridis: Color palettes for ggplot2
  • clipr: Clipboard operations for copying data to clipboard
  • DescTools: Descriptive statistics and data manipulation
  • DemoTools: Demographic tools for R
  • PNSIBGE: Functions for working with the Brazilian National Health Survey (PNS) data
  • geobr: Functions for working with Brazilian geographic data

Most of these packages are standard R packages. In-text citations are provided in the manuscript and supplementary material where appropriate.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages