A capstone project for UChicago's CAPP122 where abortion related data is taken from multiple sources and used to create intuitive visuals.
- Poetry
- An API key from Abortion Policy API stored as an environment variable called
ABORTION_POLICY_API_KEY
.- To get access to an API key for Abortion Policy API, please go to this link and fill out the form.
- The developers of this project stored the API key in their
.zshrc
file.
- You will also need abortion location data from ANSIRH, which you can request from their website.
- Please update the
FILE_NAME_ANSIRH_BASE_DATA
variable in the./reproductive_rights_project/data/util/constants.py
file with the name of your ANSIRH file name.
- Please update the
- Any modules should be added via the
poetry add [module]
command.- Example:
poetry add pytest
- Example:
- Data from external sources is saved in JSON format in the
./reproductive_rights_project/data
folder. It will have to be pulled by each dev individually as various data sources required for this project cannot be saved in a public repository, as per our agreements.
make format
: Formats the python files within the project using the Python formatter Blackmake lint
: Runsruff
on the codebasemake test
: Runs test cases in thetest
directorymake api
: Runs theapi
portion of the codebasemake parse-data
: Parses the data output of theapi
layermake visualize
: Takes the data produced from theparse-data
layer and creates the project's visualizationsmake run
: Runs the whole application by runningmake api
,make parse-data
, andmake visualize
in serial
There are two ways that you can run this application, one of them is to run all components of it at once and the other is to run each component individually. I will give you the instructions for both methods below.
- After you have installed Poetry, run the command from the base repository directory:
poetry shell
- Run the
poetry install
command to install the package dependencies within the project. - Run the
make run
command to run the application. This will spin up a web page you can access via the URLlocalhost:8005
.
- After you have installed Poetry, run the command from the base repository directory:
poetry shell
- Run the command
poetry install
to install the package dependencies within the project. - Run the
make api
command to get the data from the Abortion Policy API. - Run the
make parse-data
command to parse the data so that we can have our data in the format needed for the visualizations. - Run the
make visualize
command to start the Flask server, accessible via the URLlocalhost:8005
, so that we can visualize the data we have pulled and parsed!- For the
make visualize
command, you must have called the two commands that are referenced before it for it to run successfully.- Without the data from
make api
andmake parse-data
,make visualize
has nothing to act on.
- Without the data from
- For the
- Abortion Policy API: https://www.abortionpolicyapi.com/
- ANSIRH Abortion Facility Database: https://abortionfacilitydatabase-ucsf.hub.arcgis.com/
- i need an a: https://www.ineedana.com/
- If you or someone you love needs an abortion, you can find up-to-date help at ineedana.com. ❤️
- The data was given to us by ineedana.com on 2/7/2023.
- United States Census Bureau: https://data.census.gov/
- OpenDataSE: https://github.com/OpenDataDE/State-zip-code-GeoJSON