Final project for BDAT 1004
pip install -r requirements.txt
This project creates a web dashboard to visualize economic data fetched from the Federal Reserve Economic Data (FRED) API and stored in a MongoDB database. It allows users to explore different economic indicators like GDP, unemployment rate, and inflation rate, and provides an interactive way to understand economic trends.
Technologies:
- Python
- Flask
- pymongo
- Dash
- plotly.express
- MongoDB
Installation and Setup:
- Install the required dependencies:
pip install Flask pymongo requests dash dash-daq plotly pandas
-
Clone the repository and configure MongoDB connection details in
fred_api.py
andeconomic_dashboard.py
. -
Run the
update_data.py
script to fetch and store initial data. -
Run the Flask app with:
python economic_dashboard.py
Using the Dashboard:
- Open http://localhost:5000 in your web browser.
- Choose an economic indicator from the dropdown menu.
- The interactive line chart will display the selected indicator's data over time.
Features:
- Fetch and store economic data from the FRED API using a dedicated function.
- Update data periodically to maintain freshness.
- Interactive dashboard with a dropdown menu for selecting indicators.
- Plotly chart visualization with configurable axes and title.
Future Work:
- Implement additional filtering options like date range selection.
- Add features like comparison charts for multiple indicators.
- Explore integration with other data sources beyond FRED.
Resources:
- FRED API Documentation: https://fred.stlouisfed.org/docs/api/fred/
- Dash Tutorial: https://dash.plotly.com/tutorial
- MongoDB Documentation: https://www.mongodb.com/docs/
Contributing:
We welcome contributions to this project! Feel free to fork the repository, propose improvements, and submit pull requests.