Debt in America
Dashboard showing Americans' level of debt by different categories (auto debt, medical debt, student debt, and overall). The data can be explored at the county, state, and national levels.
How to update
Data inputs
The researchers will share 12 excel files.
Data processing
The R script data-prep.R, inside source, cleans the data of the original excel files –it mostly changes the column names and reorder the columns– and merges the national and state files. The outputs are 8 CSV files.
With every update, create a new folder in data naming it as YYYYMMDD-update. Move the new CSV files to that folder and change the route in the variable pathFiles in the first line of main.js –within js.
DISCLOSURE
- Original files built by the researchers might be named differently with every new update. Double-check the files' names and change, if necessary, in
data-prep.R. data-prep.Rwas originally written to be run within an R project and using a folder structure with three folders:
data-in, it should include the original data sent by the research team.scripts, it should includedata-prep.R.data-out, it should include the eight files generated bydata-prep.R.
You can replicate that folder structure and create an R project –or use the here package instead. You can also rewrite the paths to make it work following whatever system you prefer.
Hosting the staging version
For clarity and order, host the staging code inside the features/tpm/debt-in-america-updates folder. There, create a new folder YYYYMM and clone the repo.