Git Product home page Git Product logo

dmcgurn1 / weather-averager Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 26 KB

This is a python project that collects weather data (for the current hour) from the 4 following sources: OpenWeather API, MetOffice Weather API, BBC Weather website, yrno website, (as well as the moon phase from timeanddate.com). The variables are collected and put into numpy arrays and then at the end they are averaged.

Python 100.00%
metoffice openweather python weather-app yrno bbcweather metofficeweather python-weatherapp weather-aggregator weather-average

weather-averager's Introduction

weather-averager

This is a Python project that collects weather data for the current hour from the 4 following sources:

OpenWeather API, MetOffice Weather API, BBC Weather website, yrno website, (as well as the moon phase from timeanddate.com)

The variables are collected and put into numpy arrays and then at the end they are averaged.

The output is either an average of the weather variables, if available, or a singular element from one of the sources -> (e.g. current temperature comes from all 4 sources and then averaged, rain chance comes from 2 sources and then averaged, but gust speed is only present on the MetOffice API so it is not an average)

IMPORTANT: You will require your own API key for OpenWeather, as well as your own API 'id' and 'secret' for MetOffice

main.py uses the other .py files to create the variables and give the output

MetOffice weather uses the 'significantweathercodes.json' and 'uv index codes.json'

(BEFORE RUNNING): There will be errors when you run the code as I have taken out my API codes and left other variables needing to be assigned a value before the code is operational:

In main.py:

line 20 asks the user for their name as an input and then functions.py uses this input to assign the latitude, longitude, BBC weather url, and the yrno url

line 38 requires your OpenWeather API key

line 125 is where the url for the moon phase is located, by default it is 'london', but this can be changed to other cities (e.g. 'https://www.timeanddate.com/moon/phases/france/paris')

In functions.py:

line 14-18 is where you must configure your name, latitude, longitude, BBC weather url for the location you want, and the yrno url for the location you want. This will be then be used by main.py

In MetOffice.py:

line 16 and 17 is where you enter your MetOffice id and secret

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.