[This data is published under an Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license]
As natural disasters worsen, President Biden is directing FEMA to shift more of its efforts to preventing them. This work was always a small part of the agency’s role, but now Biden has committed an unprecedented $5 billion in new funding to minimize future disasters, and Congress designated several billion dollars more in its recently passed infrastructure bill.
The analysis done by The Post can be reproduced using FEMA's Hazard Mitigation Assistance Projects open data and joined with with FEMA's Disaster Declarations Summaries data to determine which designated disasters occurred between three time periods
-
declared disaster date and approval date
-
approval date and closed date and
-
declared disaster date and closed date or October 1, 2021 if the project was still open.
The data for the purpose of sharing methodology was pulled from OpenFEMA.
-
data/raw_data - Downloaded data from the OpenFEMA
-
scripts/import - Scripts to prepare FEMA data and exploratory analysis
-
outputs/findings - Exploratory notebook
-
outputs/summaries - Summarized county-level data and enhanced FEMA data to join to FEMA's original projects data set
- Analysis - Methodology and analysis for story
To run the app, you must have R version 3.5 or later installed first.
Via terminal
After you've installed R, In the terminal, run
R -e "install.packages('shiny', repos='https://cran.rstudio.com/')"
R -e "shiny::runGitHub('fema_hazard_mitigation_2021', 'wpinvestigative', ref="main", launch.browser=TRUE)"
Via RStudio
The application can be run locally with the following command in R Studio:
install.packages("shiny", repos="https://cran.rstudio.com/")
shiny::runGitHub("fema_hazard_mitigation_2021", "wpinvestigative", ref="main")
troubleshooting
If you have connectivity issues, you may need to preinstall some packages:
# run these lines in RStudio console
packages <- c("tidyverse", "shiny", "shinyWidgets", "lubridate", "shinythemes", "DT")
if (length(setdiff(packages, rownames(installed.packages()))) > 0) {
install.packages(setdiff(packages, rownames(installed.packages())), repos = "https://cran.us.r-project.org")
}