haywardpeirce / influx-weather Goto Github PK
View Code? Open in Web Editor NEWA script for pulling current weather data into InfluxDB from a range of sources
A script for pulling current weather data into InfluxDB from a range of sources
The Openweathermap API currently records cloud percentage as "0" for my location (a frequent occurrence in Australia), the openweathermap.py script and is not creating the clouds_all measurement in InfluxDB - presumably because the data is zero?
This is a problem as I cant create a grafana graph because the measurement doesnt exist in the database. I care about clouds as I am correlating it with solar output.
Output:
[stephen influx-weather]$ python3.6 ./weather.py
True
<class 'list'>
Written To Influx: [{'measurement': 'openweathermap', 'tags': {'city': 'Sunbury', 'location_id': 2147914}, 'fields': {'coord_lon': 144.73, 'coord_lat': -37.58, 'weather_id': 800, 'weather_main': 'Clear', 'weather_description': 'clear sky', 'main_temp': 5.97, 'main_pressure': 102.2, 'main_humidity': 81.0, 'main_temp_min': 5.0, 'main_temp_max': 7.0, 'visibility': 10000.0, 'wind_speed': 4.6, 'wind_deg': 360.0, 'dt': 1535029200, 'sys_country': 'AU', 'sys_sunrise': 1534971303, 'sys_sunset': 1535010768}}]
InfluxDB:
show field keys
name: openweathermap
fieldKey fieldType
coord_lat float
coord_lon float
dt integer
main_humidity float
main_pressure float
main_temp float
main_temp_max float
main_temp_min float
sys_country string
sys_sunrise integer
sys_sunset integer
visibility float
weather_description string
weather_id integer
weather_main string
wind_deg float
wind_speed float
Gday Hayward,
Im not good at coding at all, but was wondering if you could give a view on what an influx python import script might look like for Australian Bureau of Meteorology json files?
The data is published 20 minutes after the event, the most recent data is always published at observations/data/0, every 30 minutes
The actual time of the observation (and should be the time series key) is in these 3 parameters:
local_date_time | "23/08:30pm"
local_date_time_full | "20180823203000"
aifstime_utc | "20180823103000"
Melbourne Airport:
http://reg.bom.gov.au/fwo/IDV60901/IDV60901.94866.json
PS: Weather Undergound has stopped its API program thanks to IBM
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.