Skip to content
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

AirNow metadata options and other updates #146

Draft
wants to merge 33 commits into
base: stable
Choose a base branch
from

Conversation

zmoon
Copy link
Member

@zmoon zmoon commented Oct 30, 2023

Resolves #129 and makes some progress towards #111.

zmoon added 5 commits October 30, 2023 16:46
that can take date arg

and defaults to s3 URI,
which is faster (700 ms vs 400 ms ish on my laptop)
@zmoon zmoon added this to the v0.3 milestone Oct 30, 2023
@zmoon zmoon changed the title AirNow metadata options AirNow metadata options and other updates Nov 1, 2023
zmoon added 4 commits November 1, 2023 15:41
so codes and such are string
mainly for my current testing/development, but could be useful
@zmoon
Copy link
Member Author

zmoon commented Nov 8, 2023

Current test failure is openaq-fetches denying access ("PermissionError: Access Denied").

- merging of AirNow, with lat/lon if new site IDs
- correct airnow_flag
- drop site ID dupe rows
- express columns to keep instead of columns to drop
@zmoon
Copy link
Member Author

zmoon commented Dec 8, 2023

Need to conserve more info when duplicate-dropping for AQS. For example, currently only get some of the full set of unique networks options (below).

['BORDER GRANT',
 'BORDER GRANT; CSN STN',
 'BORDER GRANT; NEAR ROAD',
 'CASTNET',
 'CASTNET; NCORE',
 'CSN STN',
 'CSN STN; NCORE',
 'CSN STN; NCORE; PAMS',
 'CSN SUPPLEMENTAL',
 'CSN SUPPLEMENTAL; NCORE',
 'IMPROVE',
 'IMPROVE; NCORE',
 'NATTS',
 'NATTS; NCORE',
 'NATTS; UNOFFICIAL PAMS',
 'NCORE',
 'NCORE; PAMS',
 'NCORE; PAMS; UNOFFICIAL PAMS',
 'NCORE; PROPOSED NCORE',
 'NCORE; UNOFFICIAL PAMS',
 'NEAR ROAD',
 'PAMS',
 'PAMS; UNOFFICIAL PAMS',
 'PROPOSED NCORE',
 'PSD',
 'SCHOOL AIR TOXICS',
 'UNOFFICIAL PAMS',
 'VOL SCHOOL AT']

@zmoon
Copy link
Member Author

zmoon commented Dec 8, 2023

Should use the CSV parameter list to translate code for ones we don't have custom names for. And/or to construct a new in-code translation table.

@zmoon zmoon mentioned this pull request Sep 19, 2024
else:
raise ValueError("Could not determine if file is daily or hourly")

dtype = {"siteid": str, "obs": float}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to ensure MSA code and such are read as str, not int/float. cmsa_name and msa_code seem to need this or they get convert to float64 (in order to represent missing with NaN).

@zmoon
Copy link
Member Author

zmoon commented Oct 10, 2024

Note that this PR fixes UTC offset to be float (integer conversion floors the few that are non-integer, making them incorrect).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The "today" AirNow site meta file
1 participant