If you want to see a comprehensive list of what
each occupation code represents in the visualizations (e.g. MGR, BUS),
take a look at the column SOCP_desc of the file data/metadata/mapping.csv
- Download zip from ACS 2019 per-person data
- Extract the zip to the
data/datasetfolder - Run
create_data.pyand find the output csv indata/output
- Run
preprocess_data.pyand find the preprocessed csv indata/output
- Enter
data/datasetfolder - Run bash script
./create_test_data.sh 100, where 100 the number of samples - Alternatively, run
./create_test_data_random.shto get a random 0.1% subset of the rows
The sparse and holistic regression frameworks are written in Sparsity.jl, but for demonstration purposes you can use Sparsity.ipynb. It was tested on Julia 1.6.3. Create and preprocess the data first.
- Open
Sparsity.ipynbnotebook. - Run all (Will take up to 15-20 minutes)
In order to run the prescriptive part
of the project, first run the
create_data.py and the preprocess_data.py
scripts.
Then, you can run the prescriptive.py
file to create and visualize the prescriptions.
Note that the file has a lot of python requirements,
such as numpy, seaborn, XGBoost, plotly, pandas.