Leverages past work in mbk-streamline to develop a query system for Sacramento County's ALERT system (Rainfall and Stream Level Information System), at https://www.sacflood.org/
Site queries are implemented using requests, with a new utils.get_session_response function.
see also
alert.SENSORS: dictionary of sensor IDs and names
alert._ustrip: strips whitespace from strings, including the unicode non-breaking space
alert.get_sites: returns a dataframe or dict of ALERT sites matching datatype, or all sites
alert.get_sites_from_list: returns a dataframe or dict of all ALERT sites
alert.get_site_notes: return the content of the "Notes" card on the site metadata page
alert.get_site_location: return the site's latitude, longitude and elevation
alert.get_site_sensors: return all valid sensors for a site, optionally limited by a list of device_ids
alert.get_query_url: construct the timeseries query URL to export the desired content as CSV
alert.get_device_series: get the timeseries for a specified site, device, start, and end times
alert.get_data: returns site metadata and timeseries for the specified range of dates
Leverages past work in mbk-streamline to develop a query system for Sacramento County's ALERT system (Rainfall and Stream Level Information System), at https://www.sacflood.org/
Site queries are implemented using requests, with a new
utils.get_session_response
function.see also alert.SENSORS: dictionary of sensor IDs and names alert._ustrip: strips whitespace from strings, including the unicode non-breaking space alert.get_sites: returns a dataframe or dict of ALERT sites matching datatype, or all sites alert.get_sites_from_list: returns a dataframe or dict of all ALERT sites alert.get_site_notes: return the content of the "Notes" card on the site metadata page alert.get_site_location: return the site's latitude, longitude and elevation alert.get_site_sensors: return all valid sensors for a site, optionally limited by a list of device_ids alert.get_query_url: construct the timeseries query URL to export the desired content as CSV alert.get_device_series: get the timeseries for a specified site, device, start, and end times alert.get_data: returns site metadata and timeseries for the specified range of dates