This project implements a Prefect workflow that:
- Fetches the public IP address of the device using ipify.org
- Gets geo-location data for the IP address using ip-api.com
- Retrieves weather forecast data for the location using Open-Meteo API
- Displays the data in a dashboard with tables and trend graphs
- Runs every 15 minutes via Prefect scheduling
- Caches API responses to respect rate limits
- Creates Prefect artifacts for data visualization
- Provides a Dash-based dashboard for viewing weather data
ip_weather_flow.py- Main Prefect workflow implementationweather_dashboard.py- Dash application for visualizing weather datadeploy_flow.py- Script to deploy the workflow with schedulingrequirements.txt- Project dependencies
-
Install dependencies:
pip install -r requirements.txt -
Start the Prefect server:
prefect server start -
Deploy the flow:
python deploy_flow.py -
Start the dashboard:
python weather_dashboard.py -
Access the dashboard at http://localhost:8050
- The workflow uses caching to avoid exceeding API rate limits
- Weather data is displayed for the current day and the next few days
- The dashboard automatically refreshes every minute