pynhd.nhdplus_derived#

Access NLDI and WaterData databases.

Module Contents#

pynhd.nhdplus_derived.enhd_attrs(parquet_path=None)#

Get updated NHDPlus attributes from ENHD.

Notes

This downloads a 160 MB parquet file from here . Although this dataframe does not include geometry, it can be linked to other geospatial NHDPlus dataframes through ComIDs.

Parameters

parquet_path (str or ~Path, optional) – Path to a file with .parquet extension for storing the file, defaults to ./cache/enhd_attrs.parquet.

Returns

pandas.DataFrame – A dataframe that includes ComID-level attributes for 2.7 million NHDPlus flowlines.

pynhd.nhdplus_derived.nhd_fcode()#

Get all the NHDPlus FCodes.

pynhd.nhdplus_derived.nhdplus_attrs(name=None, parquet_path=None)#

Access NHDPlus V2.1 Attributes from ScienceBase over CONUS.

More info can be found here.

Parameters
  • name (str, optional) – Name of the NHDPlus attribute, defaults to None which returns a dataframe containing metadata of all the available attributes in the database.

  • parquet_path (str or ~Path, optional) – Path to a file with .parquet extension for saving the processed to disk for later use. Defaults to ./cache/nhdplus_attrs.parquet.

Returns

pandas.DataFrame – Either a dataframe containing the database metadata or the requested attribute over CONUS.

pynhd.nhdplus_derived.nhdplus_vaa(parquet_path=None)#

Get NHDPlus Value Added Attributes with ComID-level roughness and slope values.

Notes

This function downloads a 245 MB parquet file from here . Although this dataframe does not include geometry, it can be linked to other geospatial NHDPlus dataframes through ComIDs.

Parameters

parquet_path (str or ~Path, optional) – Path to a file with .parquet extension for storing the file, defaults to ./cache/nldplus_vaa.parquet.

Returns

pandas.DataFrame – A dataframe that includes ComID-level attributes for 2.7 million NHDPlus flowlines.

Examples

>>> vaa = nhdplus_vaa() 
>>> print(vaa.slope.max()) 
4.6