@@ -1421,6 +1421,7 @@ def get_field_measurements(
14211421def get_reference_table (
14221422 collection : str ,
14231423 limit : Optional [int ] = None ,
1424+ query : Optional [dict ] = {},
14241425 ) -> Tuple [pd .DataFrame , BaseMetadata ]:
14251426 """Get metadata reference tables for the USGS Water Data API.
14261427
@@ -1442,7 +1443,10 @@ def get_reference_table(
14421443 allowable limit is 50000. It may be beneficial to set this number lower
14431444 if your internet connection is spotty. The default (None) will set the
14441445 limit to the maximum allowable limit for the service.
1445-
1446+ query: dictionary, optional
1447+ The optional args parameter can be used to pass a dictionary of
1448+ query parameters to the collection API call.
1449+
14461450 Returns
14471451 -------
14481452 df : ``pandas.DataFrame`` or ``geopandas.GeoDataFrame``
@@ -1463,6 +1467,12 @@ def get_reference_table(
14631467 >>> ref, md = dataretrieval.waterdata.get_reference_table(
14641468 ... collection="parameter-codes"
14651469 ... )
1470+
1471+ >>> # Get table of selected USGS parameter codes
1472+ >>> ref, md = dataretrieval.waterdata.get_reference_table(
1473+ ... collection="parameter-codes"
1474+ ... query={'id': '00001,00002'}
1475+ ... )
14661476 """
14671477 valid_code_services = get_args (METADATA_COLLECTIONS )
14681478 if collection not in valid_code_services :
@@ -1480,7 +1490,7 @@ def get_reference_table(
14801490 output_id = f"{ collection .replace ('-' , '_' )} "
14811491
14821492 return get_ogc_data (
1483- args = {} ,
1493+ args = query ,
14841494 output_id = output_id ,
14851495 service = collection
14861496 )
0 commit comments