/texas_congress

Dash APP for TX Congressional Info

Primary LanguageJupyter Notebook

texas_congress

Dash APP for TX Congressional Info Note: This app is built using Dash 2.0 and dash-bootstrap-components 1.0 [currently in prerelease]

Files

  • README.md = this file that documents the application
  • app.py - Dash application python file
  • environment.yml - file to create virtual environment in Conda
  • requirements.txt = file to create virtual environment with pip
  • Procfile - required file for deploying application to Heroku
  • assets folder - dash application natively looks here for resources such as css
    • Texas_Congress.ipynb - Jupyter notebook with data processing steps (for reference)
  • data folder - directory to store local data files

Data preprocessing

Congressional geometries

import geopandas as gpd
congress = 'data/tl_2021_us_cd116.json'
gdf = gpd.read_file(congress)
texas = gdf[gdf.STATEFP == '48']
texas.reset_index(inplace=True)
texas.to_file('texas_congress.geojson', driver='GeoJSON')

US Congress Districts

Future Plans

Member info links