DEV Community

Cover image for WEATHER DASHBOARD
Oluwaseun Olaleye
Oluwaseun Olaleye

Posted on

3

WEATHER DASHBOARD

USE CASE
My manager tasked me with creating a weather dashboard and storing it in an s3 bucket using weather API and python.

PREREQUISITES

  • Linux commands

  • Ubuntu server

  • AWS free tier account.

  • AWS CLI

Let's dive into it.

Firstly, I commenced by cloning a GitHub repository from https://github.com/ShaeInTheCloud/30days-weather-dashboard. This step enabled me to obtain a local copy of the repository's codebase.
Image description

Next. I installed all dependencies including Python. Then, I activated a virtual environment to isolate the project dependencies. With the virtual environment activated, i proceeded to install pip, Python package installer to facilitate the installation of additional project dependencies.

Image description

Image description

Image description

Image description

AWS Command Line Interface
Next, I installed the AWS CLI on my ubuntu server https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html. Additionally, I created a new IAM user and generated access keys for that user. I then utilized those credentials to configure the AWS CLI.

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Next, I used the Weather API to retrieve current weather conditions and forecasts. After retrieving the weather data, I processed it into a JSON format and stored it in a python dictionary. I then used the boto3 library to upload the data to an S3 bucket.

Image description

Image description

Image description

After executing the code, I verified the creation of the S3 bucket and confirmed that it had been successfully established.

Image description

Image description

CONCLUSION
I successfully created a weather dashboard utilizing python and the Weather API , and subsequently stored the weather forecast data to amazon S3 bucket.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay