pyBegin / projects / skycast

SkyCast 🌤️

SkyCast is a Python application that allows users to retrieve weather information for a specific location. It provides two main features: Today's W…

212 lines🖥 Desktop only

SkyCast 🌤️

SkyCast is a Python application that allows users to retrieve weather information for a specific location. It provides two main features: Today's Weather and Forecast Weather. Users can enter a city name, and based on their selection, they will get either the current weather or a weather forecast for the chosen location.

You can check this webapp on https://skycast.streamlit.app/

Features

1. Today's Weather

2. Forecast Weather

Example

  1. Run streamlit run skycast.py. The SkyCast web app opens in your browser.
  2. In the sidebar, select "Today's Weather", type London in the city name field, and click Submit.
  3. The main panel shows current conditions for London, GB — temperature, wind speed, cloud coverage, visibility, weather description, wind direction, UV index, and dew point.
  4. Switch the sidebar option to "Forecast Weather", enter Tokyo, set days to 3, and click Submit.
  5. The app displays per-day forecast cards for three days and renders a line chart of temperature (min/max/average) over those dates.

Installation

  1. Clone the repository:

    git clone https://github.com/Mrinank-Bhowmick/python-beginner-projects.git
    
  2. Change the directory to the project folder:

    cd python-beginner-projects/projects/Skycast
    
  3. Obtain an API key from Weatherbit.

  4. Open the skycast.py file and replace your_api_key_here with your Weatherbit API key:

    self.api_key = "your_api_key_here"
    
  5. Install the required Python libraries using pip:

    pip install -r requirements.txt
    
  6. Run the SkyCast app:

    streamlit run skycast.py
    

By following these steps, you'll be able to use SkyCast with your own Weatherbit API key.

How to Use

  1. Choose the weather option from the sidebar: "Today's Weather" or "Forecast Weather."

  2. Enter the name of the city for which you want to retrieve weather information.

  3. If you select "Today's Weather," you will get the current weather details for the chosen city.

  4. If you select "Forecast Weather," specify the number of days for the weather forecast and view the forecasted data.

Contributing

Contributions to SkyCast are welcome! Here are some ways you can contribute:

Thank you for your contributions to SkyCast! 🌤️