Analysis toolkit for forecasting the revenue impact of COVID-19 on the City of Philadelphia's finances.
Read the reports:
- "Analysis of the Continued Impact of COVID-19 on the City of Philadelphia’s Tax Revenues" (March 2021)
- "Estimates of the Impact of COVID-19 on the City of Philadelphia’s Tax Revenues" (April 2020)
The following commands should be run from the command line, e.g., the Terminal app on MacOS or Command Prompt on Windows.
Step 1: Make sure you have the poetry tool installed.
Installation instructions are available on the poetry documentation.
From the command line:
# Clone the repository
git clone https://github.com/PhiladelphiaController/covid19-forecaster.git
# Change to the new folder
cd covid19-forecaster
We will poetry
to install the necessary dependencies into their own virtual environment.
From the covid19-forecaster
folder, run:
poetry install
This will install all dependencies (as well as the development dependencies).
From the command line, the March 2021 forecast can be run using the following command:
poetry run covid19-forecaster results/
This will save data from the forecast to the results/
folder.
You can run the software in an interactive environment using Jupyter lab by running:
poetry run jupyter lab
This should launch a Jupyter window on your browser, at which point you can create a new notebook file (.ipynb
file).
To run the software from the notebook, first import the March 2021 model (denoted as "v2"). From within a cell, run:
# Import the March 2021 version of the forecast (v2)
from covid19_forecaster.v2 import *
Now, you can examine the forecasts for individual taxes. For example, for the Wage Tax model:
# Load the wage tax model
wage = WageTaxForecast()
Examine the 'moderate' scenario:
wage.run_forecast("moderate")
wage.plot()
Examine the 'severe' scenario:
wage.run_forecast("severe")
wage.plot()