An interactive web application built with Gradio that visualizes auto businesses and population data across Tennessee. This dashboard provides maps, charts, and data tables to explore the distribution of auto-related businesses and demographic information by county.
- Interactive Maps: Visualize the locations of various auto businesses across Tennessee with options to filter by zip code and business type.
- Population Charts: View bar charts displaying population distribution by county for the years 2010 and 2020.
- Isochrone Maps: Generate isochrone maps around AutoZone locations to visualize areas reachable within a specified driving time.
- Data Tables: Explore a curated list of auto repair and parts locations sourced from Yellowbook.
- Python 3.11 or higher
- An OpenRouteService API key (for isochrone map generation)
git clone https://github.com/LNshuti/tn-autos.git
cd tn-autos
python -m venv venv
pip install -r requirements.txt
Requirements.txt
branca
folium
geopandas
gradio
numpy
openrouteservice
pandas
plotly
- Business Locations: Custom dataset containing locations of auto businesses in Tennessee.
- Population Data: U.S. Census Bureau datasets for county-level population statistics.
- Geographic Data: Shapefiles for Tennessee counties to render geographic boundaries on maps.
python app.py
The application will launch and provide a local URL http://127.0.0.1:7860
to interact with the dashboard.
-
Overview Tab:
- Tennessee Population 2010: Displays a bar chart of the 2010 population by county.
- Auto Repair/Parts in Tennessee: Shows a data table of selected auto businesses.
- Map Output: Interactive map displaying business locations with markers color-coded by business type.
-
Tennessee Businesses by County Tab:
- Filters: Dropdown menus to select a specific zip code and business type.
- Map Output: Updates interactively based on selected filters to display relevant businesses on the map.
To enable isochrone map functionality, you need an API key from OpenRouteService.
-
Obtain an API Key: Sign up at OpenRouteService and obtain an API key.
-
Set the API Key as an Environment Variable:
export ORS_API_KEY='your-api-key-here' # On Windows, use `set ORS_API_KEY=your-api-key-here`
Alternatively, you can create a
.env
file in the project root:ORS_API_KEY=your-api-key-here
- Default Location: The map centers on Tennessee coordinates
[35.8601, -86.6602]
with a default zoom level of 8. You can adjust these settings in thecreate_map
function withinapp.py
.
Contributions are welcome! Please follow these steps:
-
Fork the Repository
-
Create a Feature Branch
git checkout -b feature/YourFeature
-
Commit Your Changes
git commit -m 'Add YourFeature'
-
Push to the Branch
git push origin feature/YourFeature
-
Open a Pull Request
- OpenRouteService to create 30 minutes isochrone.
- Gradio for the interactive web interface.
- Folium and GeoPandas for map rendering.
- Plotly for data visualization.
- U.S. Census Bureau for population data.
For any questions or suggestions, please open an issue or contact nshutl0@sewanee.edu.
This project is licensed under the MIT License.