Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 1.38 KB

README.md

File metadata and controls

32 lines (21 loc) · 1.38 KB

UK Weather Patterns

All weather data is grabbed from the met office and inspiration for the graphs are from Nigel Marriot's blog.

This was purely an exercise to practice AWS microservices.

Check out the streamlit app here.

Read more about how this was made on my portfolio site.

Flow

  1. On the 1st of each month an EventBridge schedule triggers a Lambda Function.
  2. Lambda function starts an EC2 instance
  3. A bash script is triggered on startup:
    • CD's to the project folder
    • activates the virtual environment
    • runs a python script
  4. The script then:
    • pulls weather data from the met office site for Rainfall, sunshine, max temp, min temp, and mean temp.
    • Saves this raw data to an S3 bucket.
  5. 30 minutes after the Lambda function triggered the EC2 startup, another EventBridge schedule triggers a second lambda function to stop the EC2 instance.

We now have monthly updated weather data saved to an S3 bucket.

Meanwhile, hosted on Streamlit, the data is pulled from S3, transformed, and plotted on interactive charts with Plotly.

About the data