-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev air quality agent #227
Conversation
…a for visualisation
…formation from API (not time series data itself)
…and retrieve_timeseries_information_from_api
… pollutant reading as individual time series
…readings at the same station where several pollutant readings for same pollutant are provided; continued functionality to add time series data
…es data and create files for visualisation
…d Docker compose files
It looks like a difference in the encoding Unicode vs UTF-8, see https://en.wikipedia.org/wiki/Mu_(letter)#Character_encodings |
I tried several things now, and "simply" changing the encoding doesn't seem to help. I debugged a little and figured out that the error likely occurs when writing the unit symbol |
Not sure how helpful this is but I think it's probably relevant https://github.com/blazegraph/database/wiki/Unicode. |
…ts mapping dict from dataframe
…e. geometry information missing for some stations)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming what I said in my comment is correct then this looks fine. If you don't already, I would suggest you open this in VSCode with the sonarlint linter enabled as there are a few minor suggestions mainly regarding exceptions that might make the code a little bit nicer.
if __name__ == '__main__': | ||
|
||
# Create station and time series output files | ||
create_json_output_files('C:\TheWorldAvatar-git\Agents\AirQualityAgent\output') | ||
|
||
# create_json_output_files('C:\TheWorldAvatar-git\Agents\AirQualityAgent\output', | ||
# observation_types=['PM10Concentration']) | ||
|
||
# Data retrieval with geospatial search require a geospatially-enabled | ||
# Blazegraph namespace to work successfully | ||
# create_json_output_files('C:\TheWorldAvatar-git\Agents\AirQualityAgent\output', | ||
# circle_center='52.75#0.4', circle_radius='100') | ||
|
||
# create_json_output_files('C:\TheWorldAvatar-git\Agents\AirQualityAgent\output', | ||
# circle_center='52.75#0.4', circle_radius='100', | ||
# observation_types=['PM10Concentration']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this block is just for debugging/manual testing, is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this code is only reached when executed as main script (i.e. called manually)
@gpeb2: As this agent in its current design is not working with/within the stack, will the FeatureInfoAgent still be able to visualise and extract the data? Or shall the agent be re-factored to work within the same stack as all other agents? |
Agent to continuously instantiate/update latest air quality data across the UK and create output files for DTVF. Current updating frequency once per day, but can easily be increased/amended by different frequency of job scheduler within Docker container.
More frequent instantiation or output file creation also to be trigger by HTTP requests when needed.
One remaining observed issue is the correct display of the respective units in the time series panel, i.e. µg/m3.
When creating the output files outside of Docker (i.e. locally run script or locally deployed agent) the units get displayed correctly. In case the output files are created from within Docker, the units get messed up.
Created outside Docker:
unit representation in timeseries json file:
"units": [ "\u03bcg/m3" ]
Created from within Docker:
unit representation in timeseries json file:
"units": [ "\u00ce\u00bcg/m3" ]