-
Notifications
You must be signed in to change notification settings - Fork 31
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
CLI: initial AQS support #249
Conversation
melodies_monet/_cli.py
Outdated
"By default, the hourly data is fetched." | ||
) | ||
), | ||
param: List[str] = typer.Option(["SPEC", "PM2.5", "PM10", "VOC"], "-p", "--params", help=( |
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.
@rschwant @bbakernoaa what do you think defaults should be?
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.
@rschwant suggested default could be O3, PM2.5, PM10
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, I agree. I'm testing this out right now too.
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.
Updated in e54849f , with some additional help text.
@zmoon, how would you use this code to download the daily data? I tried this: |
@rschwant The daily option currently needs a fix from the monetio side. Did you try without --daily? |
Yes, without daily works, but I want to try to pull the daily averaged data from IMPROVE. |
Ok, I can do a monetio hotfix for it. |
CI failure is related to the NCDC website the ISH files are on failing. Update: working again |
with my fix/aqs branch of monetio
@rschwant daily option should be working with this branch of monetio: noaa-oar-arl/monetio#163 I'll also comment here when it has been released via conda-forge (hopefully soon). |
The daily option works with your updates now. Thanks for updating. Would it be possible to extend the default meta data to include some additional options for both daily and non-daily include the following: method_code, method_name, networks, monitor_type, measurement_scale, measurement_scale_definition, land_use, & epa_region. People may want to filter and group on these options in the future. |
@rschwant method code and name are available without the AQS metadata loading, but not currently usable, since the long-to-wide format transformation doesn't (currently) create separate columns for them for each parameter, so currently I am skipping them: MELODIES-MONET/melodies_monet/_cli.py Line 1058 in 7b9406b
The others will come from the AQS metadata files, once that is fixed. So, in the future, after more monetio work, we should be able to get all of those that you mentioned. But we might as well get this PR in first, since it at least gets the data. However, I could add land-use now though, since I am already loading the sites metadata file in order to get UTC offset, and that is included. So is state name, so I could assign EPA region from that. >>> list(pd.read_csv("https://aqs.epa.gov/aqsweb/airdata/aqs_sites.zip"))
['State Code',
'County Code',
'Site Number',
'Latitude',
'Longitude',
'Datum',
'Elevation',
'Land Use',
'Location Setting',
'Site Established Date',
'Site Closed Date',
'Met Site State Code',
'Met Site County Code',
'Met Site Site Number',
'Met Site Type',
'Met Site Distance',
'Met Site Direction',
'GMT Offset',
'Owning Agency',
'Local Site Name',
'Address',
'Zip Code',
'State Name',
'County Name',
'City Name',
'CBSA Name',
'Tribe Name',
'Extraction Date'] |
Sounds we can add this later then. Let me know when this is ready to go in then and I can approve. |
@rschwant final look? |
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.
Looks great, I approve!
Some things in monetio are not working currently, like network selection and other aspects involving the separate metadata. But getting hourly and daily data seem to be working ok here.