pygeohydro.helpers#

Some helper function for PyGeoHydro.

Module Contents#

pygeohydro.helpers.get_us_states(subset_key=None)#

Get US states as a GeoDataFrame from Census’ TIGERLine 2022 database.

Parameters

subset_key (str, optional) – Key to subset the geometries instead of returning all states, by default all states are returned. Valid keys are:

  • contiguous

  • continental

  • commonwealths

  • territories

  • Two letter state codes, e.g., ["TX", "CA", "FL", ...]

Returns

geopandas.GeoDataFrame – GeoDataFrame of requested US states.

pygeohydro.helpers.nlcd_helper()#

Get legends and properties of the NLCD cover dataset.

Notes

The following references have been used:
Returns

dict – Years where data is available and cover classes and categories, and roughness estimations.

pygeohydro.helpers.nwis_errors()#

Get error code lookup table for USGS sites that have daily values.

pygeohydro.helpers.states_lookup_table()#

Get codes and names of US states and their counties.

Notes

This function is based on a file prepared by developers of an R package called dataRetrieval.

Returns

pandas.DataFrame – State codes and name as a dataframe.