MatheusJacob / blz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BLZ - US Congress Visibility App

https://blz.herokuapp.com

Python  JavaScript  Git  HTML5  CSS3  Visual Studio Code  AXIOS  Heroku  Postgres  Bootstrap  FontAwesome  jQuery  Flask  WTForms  SQLAlchemy

Table of Contents

About

Did you know that every year US Congress introduces an average of 11,000 bills? [1,2]


........


🔍 How many have you read?

........


It can be difficult to keep on top of all national legislation, but BLZ makes it easier. With the BLZ app, you can access a dashboard which shows you all your state's senators and representatives, so you can see what legislation they have sponsored recently. You can also browse legislation by policy area and specify a date range that you would like to search by. You can easily save bills to your dashboard so you can keep tabs on them, and quickly access information about their most recent updates. You can also move from any bill on the app, to the bill's page on the official congress website so you can learn more.

Installation

Before You Begin

You will need python3 and pip3 installed for this project. You will also need to setup a Postgres Database for the app.

Installation Instructions

  1. Get a free API key from ProPublica

    https://www.propublica.org/datastore/api/propublica-congress-api
  2. Clone the repo.

    https://github.com/erikamanning/capstone1.git
  3. Create a virtual environment in the project directory.

    $ python3 -m venv venv
  4. Start the virtual environment.

    $ source venv/bin/activate
  5. Install required packages.

    $ pip3 install requirements.txt
  6. Open the secrets.py file and add your API key and Flask Secret Key in the fields specified below. Make sure to add secrets.py tp your .gitignore so your personal API key doesn't get shared accidentally.

    In secrets.py

    API_SECRET_KEY = os.environ.get('SECRET_API_KEY', '##NOT A KEY##')
    FLASK_SECRET_KEY = os.environ.get('SECRET_KEY', '##NOT A KEY##')

You will need to set up a postgres database for this application. Once that is done you can move to the next step.


  1. Initialize the database.

    $ flask init_app
  2. Set the environment to development mode.

    $ export FLASK_ENV=development 
  3. Run the app (dev or production mode?)

    $ flask run
  4. Open web browser and run the app on the port for your server.

User Flows

Landing Page

Landing Page


User Flow: View State Legislators and Sponsored Bills

User Flow 3


User Flow: Browse and Save Bills to Dashboard.

User Flow 1

API

This project owes much to ProPublica's Congress API. All congressional data was obtained through the ProPublica Congress API.

ProPublica Logo

About


Languages

Language:Python 56.8%Language:HTML 40.8%Language:JavaScript 2.2%Language:CSS 0.1%