Replication Package The this repository includes code to replicate all figures in the paper "Berkeley Unified Numident Mortality Database: Public administrative records for individual-level mortality research." 1. Download the BUNMD file from the CenSoc Project Download Page (https://censoc-download.demog.berkeley.edu/), unzip the data file, and move it to the top level of the 'data' subfolder. 2. Run the 00_run_all.Rmd script, which will run all code (or run scripts 01 and 02 individually) 3. Look in the 'data' subfolder Additional details: /data directory * cuyahoga_county_shapefile.rda — shape-file for cuyahoga county, home of Cleveland * hmd_deaths_1x1_usa.csv — HMD deaths 1x1 for USA. Downloaded from https://www.mortality.org/ * oasdi_zip05_combined_new.csv — ZIP Code level data average social security benefits ————————————— /code directory * 00_run_all.Rmd - this script runs all scripts. Alternatively, researchers can run the following files individually in order: * 01_descriptive_figures.Rmd - this R notebook contains code to replicate the following figures in the paper: — Figure 1 — Figure 2 — Figure 3 — Figure A-2 — Figure A-3 * 02_case_studies.Rmd - this R notebook runs code to replicate the two case studies and the following figures in the paper: — Figure 4 — Figure 5 Note: Figure A-1 is a manually constructed flow-chart. * helper_functions.R - this script contains custom helper functions. * weights/ Contains a script to replicate the weights in the BUNMD. The R function allows users to recalculate weights for custom user-generated sub-samples. ————————————— \figures directory Contains all Figures in the directory. ————————————— Authors * Casey Breen (caseybreen@berkeley.edu) * Joshua Goldstein ———————————————— All analyses were conducted in R: R version 4.1.1 (2021-08-10) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Monterey 12.0.1 Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] lubridate_1.8.0 broom_0.7.12 sf_1.0-3 [4] choroplethr_3.7.0 acs_2.1.4 XML_3.99-0.8 [7] choroplethrZip_1.5.0 stargazer_5.2.2 fixest_0.10.0 [10] gt_0.3.1 cowplot_1.1.1 ggpubr_0.4.0 [13] gridExtra_2.3 HMDHFDplus_1.9.13 here_1.0.1 [16] memisc_0.99.30.7 MASS_7.3-54 lattice_0.20-44 [19] data.table_1.14.2 forcats_0.5.1 stringr_1.4.0 [22] dplyr_1.0.9 purrr_0.3.4 readr_2.1.2 [25] tidyr_1.2.0 tibble_3.1.6 ggplot2_3.3.5 [28] tidyverse_1.3.1 loaded via a namespace (and not attached): [1] WDI_2.7.4 colorspace_2.0-3 rjson_0.2.21 ggsignif_0.6.3 [5] class_7.3-19 ellipsis_0.3.2 rgdal_1.5-28 rprojroot_2.0.2 [9] htmlTable_2.4.0 base64enc_0.1-3 fs_1.5.2 proxy_0.4-26 [13] rstudioapi_0.13 fansi_1.0.3 xml2_1.3.3 splines_4.1.1 [17] knitr_1.37 Formula_1.2-4 jsonlite_1.8.0 cluster_2.1.2 [21] dbplyr_2.1.1 png_0.1-7 compiler_4.1.1 httr_1.4.2 [25] tictoc_1.0.1 backports_1.4.1 assertthat_0.2.1 Matrix_1.3-4 [29] fastmap_1.1.0 cli_3.3.0 htmltools_0.5.2 tools_4.1.1 [33] ggmap_3.0.0 gtable_0.3.0 glue_1.6.2 dreamerr_1.2.3 [37] rappdirs_0.3.3 Rcpp_1.0.8.3 carData_3.0-4 cellranger_1.1.0 [41] RJSONIO_1.3-1.6 vctrs_0.4.1 nlme_3.1-152 tigris_1.5 [45] xfun_0.30 rvest_1.0.2 lifecycle_1.0.1 rstatix_0.7.0 [49] zoo_1.8-9 scales_1.2.0 hms_1.1.1 sandwich_3.0-1 [53] RColorBrewer_1.1-3 yaml_2.3.5 rpart_4.1-15 latticeExtra_0.6-29 [57] stringi_1.7.6 maptools_1.1-2 e1071_1.7-9 checkmate_2.0.0 [61] repr_1.1.4 RgoogleMaps_1.4.5.3 rlang_1.0.2 pkgconfig_2.0.3 [65] bitops_1.0-7 evaluate_0.15 htmlwidgets_1.5.4 tidyselect_1.1.2 [69] plyr_1.8.7 magrittr_2.0.3 R6_2.5.1 generics_0.1.2 [73] Hmisc_4.6-0 DBI_1.1.2 pillar_1.7.0 haven_2.4.3 [77] foreign_0.8-81 withr_2.5.0 units_0.7-2 survival_3.2-11 [81] abind_1.4-5 RCurl_1.98-1.5 sp_1.4-5 nnet_7.3-16 [85] modelr_0.1.8 crayon_1.5.1 car_3.0-12 tidycensus_1.1 [89] uuid_1.0-4 KernSmooth_2.23-20 utf8_1.2.2 tzdb_0.2.0 [93] rmarkdown_2.13 jpeg_0.1-9 grid_4.1.1 readxl_1.3.1 [97] classInt_0.4-3 reprex_2.0.1 digest_0.6.29 numDeriv_2016.8-1.1 [101] munsell_0.5.0