Skip to content

pubdata/usnationaldebtchartgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

usnationaldebtchartgen

U.S. National Public Debt - Chart Generator

Synopsis

Generate chart image, pdf, or SVG of the U.S. National Public Debt from data scraped from the U.S. Treasury website.

The output for the chart is generated by the open source Highcharts export server.

The chart is best viewed in a browser thanks to another project: pubdata.github.io/usnationaldebtchart

Installation

This is a Flask app (Python3).

$ cd [your workspace]
$ git clone https://github.com/pubdata/usnationaldebtchartgen.git
$ cd usnationaldebtchartgen
$ virtualenv -p python3 venv
$ source venv/bin/activate
$ pip install -r requirements.txt

Further deploy instructions will vary based on production system requirements.

For testing, use gunicorn:

$ gunicorn usnationaldebtchartgen:app

From a browser, access the app using: http://localhost:8000/chart

Optionally, you can specify the filename and file extension (.png, .jpg, .pdf, or .svg) to access a specific output format. For images and PDFs, you can also specify the image width (e.g., bob-1200.jpg for a 1200 pixel wide JPEG image with a personalized filename).

Example

License

MIT

About

U.S. National Debt - Chart Generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published