Open cmora1es opened 1 year ago
@cmora1es here's my pseudo-code notes from our meeting:
def get_monthly_report_data_for_reservoir(reservoir, year, month):
"""
description (omit the totals)
Arguments:
reservoir (str):
year (int):
month (??): as a number or as a string?
Returns:
"""
# use helper function to lookup the columns as long as it's reliable for the reservoir
# for the whole period of record
return {'data': df, # date-indexed dataframe
'info': {'url': ,
'date_published':
'date_retrieved': dt.datetime.now(),
'raw': the plain text}}
def get_por_monthly_report_data_for_reservoir(reservoir, start, end):
frames = []
# list of months between start and end
for month in list:
frames.append(get_monthly_report_data_for_reservoir(reservoir, year, month)['data'])
df = pd.concat(frames, axis=0)
return {'data': df,
'info': {
'urls': [],
'dates_published': [],
'date_retrieved': dt.datetime.now(),
}}
Client Code: 2496.14
Data Source
Pull Daily Operation Monthly Reports from US Army Corps of Engineers Sacramento District Website - Water Control Data System: URL to be used = https://www.spk-wc.usace.army.mil/fcgi-bin/monthly.py?month=feb&year=2023&project=frm Where "month=", "year=" and "project=" are inputs to a function.
Sample Code:
Use Case
This URL will be an alternative source to pull data starting 1990 as opposed to starting 1995 when collecting from Corps and Section 7 Projects in California - Hourly/Daily Data and Plots
This feature will be added in ".../collect/collect/usace/wcds.py"
Breaking Changes
Unknown
Priority
Low