metbril / pyluchtmeetnet Goto Github PK
View Code? Open in Web Editor NEWA python package to use the Luchtmeetnet 2020 OpenAPI.
Home Page: https://pypi.org/project/pyluchtmeetnet/
License: MIT License
A python package to use the Luchtmeetnet 2020 OpenAPI.
Home Page: https://pypi.org/project/pyluchtmeetnet/
License: MIT License
Add some logic or documentation to be able to test (with CI/CD) which versions are supported and working
https://devguide.python.org/versions/
The library should at least support any supported Python version (with security fixes) and possible the next prerelease (to see in advance if any modifications are required).
actions/checkout --> 2.4.0
actions/setup-python --> 2.3.1
Useful for dependabot
In #16 I discovered that the get_latest_station_measurements
method does return all measurements instead of just the latest. The method should return only the most recent measurement for each component.
Describe the bug
When using pyluchtmeetnet to obtain the data from my location, connecting to station NL54004, I receive an error.
When debugging your code, I can see that this station provides data on the following components: ['FN', 'NO', 'NO2', 'PM10']
But when collecting the related data, only data for FN and PM10 are returned.
Your present code:
data = []
for component in components:
json_component = [
meas for meas in measurements if meas["formula"] == component
]
element = {
component: json_component[0]["value"],
"timestamp": json_component[0]["timestamp_measured"],
}
data.append(element)
fails on this returned data.
When I change to code to this:
data = []
for component in components:
for meas in measurements:
if meas["formula"] == component:
json_component = [meas]
element = {
component: json_component[0]["value"],
"timestamp": json_component[0]["timestamp_measured"],
}
data.append(element)
it works on the returned data.
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.