Skip to content

pranay-code/streamlit-weather-forecast-health-advisor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌦️ Streamlit Weather & Health Advisory

An interactive web application built with Streamlit that provides 3-day weather forecasts and generates AI-powered health recommendations for user-selected locations.

Features

  • Dynamic Site Management: Users can select from a predefined list of locations (loaded from sites.json), add new sites during their session, and persistently edit the coordinates for existing sites.
  • Interactive Map View: Displays the selected location on a map for easy visualization and context.
  • Dual Forecast Views: Toggle between a high-level Daily Summary and a detailed 3-Hourly Forecast for the next 72 hours.
  • AI-Powered Health Advice: Leverages the Google Gemini API to analyze the weather summary and generate crucial, structured health recommendations for different demographic groups (Adults, Children & Elderly, People with Morbidities).
  • Data Export: Download both the raw forecast data and the generated health recommendations as CSV files for offline analysis.
  • Cache Management: Includes an option to clear the cache for health recommendations to fetch fresh advice.

Technologies Used

  • Frontend: Streamlit
  • Data Processing: Pandas
  • Weather Data: Open-Meteo API
  • AI Recommendations: Google Gemini API
  • Version Control: Git & GitHub

How to Run Locally

  1. Clone the repository:
    git clone https://github.com/pranay-code/streamlit-weather-forecast-health-advisor.git
    cd YOUR_REPO_NAME

  2. Create and activate a Conda environment:
    conda create --name weather_app python=3.9 -y
    conda activate weather_app

  3. Install the required libraries:
    pip install -r requirements.txt

  4. Set up your API Key:

    • Create a file named .streamlit/secrets.toml.
    • Add your Google Gemini API key to this file:
      GOOGLE_API_KEY = "YOUR_API_KEY_HERE"
  5. Run the application:
    streamlit run app.py

About

An interactive Streamlit web app providing 3-day weather forecasts and AI-generated health advisories. Users can select, add, or edit locations, view them on a map, and download forecast data and recommendations as CSV files. Powered by Open-Meteo and Google Gemini.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages