Skip to content

PolicyEngine/blank-slate-ubi-in-the-us

Repository files navigation

Blank Slate UBI in the US

This project analyzes the impact of a Blank Slate Universal Basic Income (UBI) in the United States using PolicyEngine.

Prerequisites

Setup Instructions

  1. Fork the repository:

  2. Clone your forked repository using VS Code:

    • Open VS Code
    • Press Cmd+Shift+P to open the Command Palette
    • Type "Git: Clone" and select it
    • Paste the URL of your forked repository
    • Choose a local directory to clone into
  3. Install Python 3.11 using Homebrew:

    brew update
    brew install [email protected]
  4. Add Python 3.11 to your PATH by adding these lines to your ~/.zshrc file:

    export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
    alias python3.11="/opt/homebrew/opt/[email protected]/bin/python3.11"
  5. Apply the changes:

    source ~/.zshrc
  6. Open a terminal in VS Code (Terminal > New Terminal) and run:

    make

    This command will:

    • Check for Python 3.11
    • Create a virtual environment
    • Install all required packages
    • Set up a Jupyter kernel
    • Execute both notebooks in sequence: blank_slate_ubi.ipynb and charts.ipynb

Project Structure

  • blank_slate_ubi.ipynb: Main analysis notebook
  • charts.ipynb: Notebook for generating charts based on the analysis
  • requirements.txt: List of Python package dependencies
  • Makefile: Automates the setup and execution process
  • ubi_amounts.csv: Contains UBI amounts data
  • optimisation_results.csv: Contains optimization results
  • json_data.json: Contains JSON data for analysis

Additional Commands

  • To only set up the environment without running the notebooks:

    make setup
  • To run the notebooks after setup:

    make run
  • To clean up the environment and generated files:

    make clean

Troubleshooting

If you encounter any issues:

  1. Ensure Python 3.11 is installed and active:

    python3.11 --version
  2. If you're having issues with pip or package installations, try:

    make clean
    make
  3. If you encounter an "externally-managed-environment" error, ensure you're using the virtual environment:

    source policyengine_env/bin/activate

    Then run pip commands within this environment.

  4. For any other issues, please check the error messages in the console output. The Makefile includes verbose output to help identify where problems occur.

Contributing

If you make changes to the project dependencies, please update the requirements.txt file:

policyengine_env/bin/pip freeze > requirements.txt

Contact

For questions or issues, please open an issue on the GitHub repository.

About

blank-slate-ubi-in-the-us

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published