Skip to content

Commit c326643

Browse files
committed
add more documentation, an example
1 parent cc6f5c2 commit c326643

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

dataretrieval/waterdata/api.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,27 @@ def get_reference_table(
14191419
allowable limit is 50000. It may be beneficial to set this number lower
14201420
if your internet connection is spotty. The default (None) will set the
14211421
limit to the maximum allowable limit for the service.
1422+
1423+
Returns
1424+
-------
1425+
df : ``pandas.DataFrame`` or ``geopandas.GeoDataFrame``
1426+
Formatted data returned from the API query. The primary metadata
1427+
of each reference table will show up in the first column, where
1428+
the name of the column is the singular form of the collection name,
1429+
separated by underscores (e.g. the "medium-codes" reference table
1430+
has a column called "medium_code", which contains all possible
1431+
medium code values).
1432+
md: :obj:`dataretrieval.utils.Metadata`
1433+
A custom metadata object including the URL request and query time.
1434+
1435+
Examples
1436+
--------
1437+
.. code::
1438+
1439+
>>> # Get table of USGS parameter codes
1440+
>>> ref, md = dataretrieval.waterdata.get_reference_table(
1441+
... collection="parameter-codes
1442+
... )
14221443
"""
14231444
valid_code_services = get_args(METADATA_COLLECTIONS)
14241445
if collection not in valid_code_services:

0 commit comments

Comments
 (0)