Giter Site home page Giter Site logo

philacontroller / covid19-forecaster Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 7.28 MB

Forecasting the revenue impact of COVID-19 on the City of Philadelphia's finances

Home Page: https://controller.phila.gov/philadelphia-audits/covid19-fiscal-impact-mar-2021/

License: MIT License

Python 100.00%
covid-19 philadelphia python

covid19-forecaster's Introduction

covid19-forecaster

Analysis toolkit for forecasting the revenue impact of COVID-19 on the City of Philadelphia's finances.

Read the reports:

Installation

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.

Step 2: Clone the repository

From the command line:

# Clone the repository
git clone https://github.com/PhiladelphiaController/covid19-forecaster.git

# Change to the new folder
cd covid19-forecaster

Step 3: Install the dependencies

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).

Running the forecasts

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.

Working in an interactive environment

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()

The Moderate Forecast for the Wage Tax

Examine the 'severe' scenario:

wage.run_forecast("severe")
wage.plot()

The Severe Forecast for the Wage Tax

covid19-forecaster's People

Contributors

nickhand avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.