Comments (2)
import requests
import pandas as pd
import numpy as np
aq_fields = {
'fmisid': np.int32,
'time': np.datetime64,
'AQINDEX_PT1H_avg': np.float64,
'PM10_PT1H_avg': np.float64,
'PM25_PT1H_avg': np.float64,
'O3_PT1H_avg': np.float64,
'CO_PT1H_avg': np.float64,
'SO2_PT1H_avg': np.float64,
'NO2_PT1H_avg': np.float64,
'TRSC_PT1H_avg': np.float64,
}
url = 'https://opendata.fmi.fi/timeseries'
params = {
'format': 'json',
'precision': 'double',
'groupareas': '0',
'producer': 'airquality_urban',
'area': 'Uusimaa',
'param': ','.join(aq_fields.keys()),
'starttime': '-7d',
'endtime': '-1m',
'tz': 'UTC',
}
data = requests.get(url, params=params).json()
df = pd.DataFrame(data).astype(aq_fields)
#df = df.set_index(['fmisid', 'time'])
from fmiopendata.
Never mind, they cut down access to the data through this endpoint, to seven previous days.
from fmiopendata.
Related Issues (20)
- How to parse netcdf to use forecast::enfuser::airquality? HOT 2
- download_stored_query & timeseries - KeyError HOT 3
- Non-timeseries data & HTTP Error 400: Bad Request HOT 4
- Possible bug when fetching data before January 1st 1970 HOT 1
- Possible bug when fetching data before January 1st 1970 HOT 2
- dropsonde data ei tule? HOT 1
- Forecast data download - ModuleNotFoundError: No module named 'eccodes' " HOT 6
- Use GitHub Actions instead of Travis for unit tests
- Fix deprecation warnings in WFS XML handling HOT 1
- Mast data parsing doesn't work
- Add more details to WFS html listing HOT 1
- requests module to "install_requires" HOT 1
- Available parameters for fmiopendata.wfs download_stored_query HOT 1
- half an hour time shift? HOT 1
- example does not work? HOT 2
- grid data fails due to "AttributeError: module 'eccodes' has no attribute 'GribFile'" HOT 4
- Re-run examples and update README accordingly
- Download and calibrate latest radar reflectivity (dBZ) composite fails HOT 2
- TypeError in downloading and parsing the lightning data HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fmiopendata.