Skip to content

A capstone project for UChicago's CAPP122 where abortion related data is taken from multiple sources and used to create intuitive visuals and searchable spreadsheets.

Notifications You must be signed in to change notification settings

necabotheking/reproductive-rights-data-project

 
 

Repository files navigation

Reproductive Rights Data Project

A capstone project for UChicago's CAPP122 where abortion related data is taken from multiple sources and used to create intuitive visuals.

Project Requirements

  • Poetry
  • An API key from Abortion Policy API stored as an environment variable called ABORTION_POLICY_API_KEY.
  • 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.

Technical Notes

  • Any modules should be added via the poetry add [module] command.
    • Example: poetry add pytest
  • 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.

Standard Commands

  • make format: Formats the python files within the project using the Python formatter Black
  • make lint: Runs ruff on the codebase
  • make test: Runs test cases in the test directory
  • make api: Runs the api portion of the codebase
  • make parse-data: Parses the data output of the api layer
  • make visualize: Takes the data produced from the parse-data layer and creates the project's visualizations
  • make run: Runs the whole application by running make api, make parse-data, and make visualize in serial

How do we run this thing?

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.

Run with one command

  1. After you have installed Poetry, run the command from the base repository directory: poetry shell
  2. Run the poetry install command to install the package dependencies within the project.
  3. Run the make run command to run the application. This will spin up a web page you can access via the URL localhost:8005.

Run each package individually

  1. After you have installed Poetry, run the command from the base repository directory: poetry shell
  2. Run the command poetry install to install the package dependencies within the project.
  3. Run the make api command to get the data from the Abortion Policy API.
  4. Run the make parse-data command to parse the data so that we can have our data in the format needed for the visualizations.
  5. Run the make visualize command to start the Flask server, accessible via the URL localhost: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 and make parse-data, make visualize has nothing to act on.

We would like to thank the following organizations for providing our reference data:

About

A capstone project for UChicago's CAPP122 where abortion related data is taken from multiple sources and used to create intuitive visuals and searchable spreadsheets.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.2%
  • Makefile 0.8%