Skip to content

Commit 473a07c

Browse files
thodson-usgsclaude
andauthored
docs(waterdata): point get_samples to get_codes, not nonexistent *_lookup() (#303)
The get_samples docstring told users 8 times to "Check the `activityMediaName_lookup()` / `characteristicGroup_lookup()` / ... function in this module" — but no such functions exist, so following the docs raises AttributeError. The actual code-table mechanism is get_codes(code_service). Repointed each parameter to the right service (all verified against the live API): activityMediaName -> samplemedia, characteristicGroup -> characteristicgroup, characteristic -> characteristics, usgsPCode -> characteristics (the parameterCode column), stateFips -> states, countyFips -> counties, siteTypeCode/siteTypeName -> sitetype. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 06bf0d0 commit 473a07c

1 file changed

Lines changed: 12 additions & 17 deletions

File tree

dataretrieval/waterdata/api.py

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2218,8 +2218,7 @@ def get_samples(
22182218
organizations - "organization", "count"
22192219
activityMediaName : string or iterable of strings, optional
22202220
Name or code indicating environmental medium in which sample was taken.
2221-
Check the `activityMediaName_lookup()` function in this module for all
2222-
possible inputs.
2221+
Call ``get_codes("samplemedia")`` for the valid inputs.
22232222
Example: "Water".
22242223
activityStartDateLower : string, optional
22252224
The start date if using a date range. Takes the format YYYY-MM-DD.
@@ -2236,13 +2235,12 @@ def get_samples(
22362235
Example: "Sample-Routine, regular".
22372236
characteristicGroup : string or iterable of strings, optional
22382237
Characteristic group is a broad category of characteristics
2239-
describing one or more results. Check the `characteristicGroup_lookup()`
2240-
function in this module for all possible inputs.
2238+
describing one or more results. Call ``get_codes("characteristicgroup")``
2239+
for the valid inputs.
22412240
Example: "Organics, PFAS"
22422241
characteristic : string or iterable of strings, optional
22432242
Characteristic is a specific category describing one or more results.
2244-
Check the `characteristic_lookup()` function in this module for all
2245-
possible inputs.
2243+
Call ``get_codes("characteristics")`` for the valid inputs.
22462244
Example: "Suspended Sediment Discharge"
22472245
characteristicUserSupplied : string or iterable of strings, optional
22482246
A user supplied characteristic name describing one or more results.
@@ -2263,27 +2261,24 @@ def get_samples(
22632261
countryFips : string or iterable of strings, optional
22642262
Example: "US" (United States)
22652263
stateFips : string or iterable of strings, optional
2266-
Check the `stateFips_lookup()` function in this module for all
2267-
possible inputs.
2264+
Call ``get_codes("states")`` for the valid inputs.
22682265
Example: "US:15" (United States: Hawaii)
22692266
countyFips : string or iterable of strings, optional
2270-
Check the `countyFips_lookup()` function in this module for all
2271-
possible inputs.
2267+
Call ``get_codes("counties")`` for the valid inputs.
22722268
Example: "US:15:001" (United States: Hawaii, Hawaii County)
22732269
siteTypeCode : string or iterable of strings, optional
2274-
An abbreviation for a certain site type. Check the `siteType_lookup()`
2275-
function in this module for all possible inputs.
2270+
An abbreviation for a certain site type. Call ``get_codes("sitetype")``
2271+
for the valid inputs.
22762272
Example: "GW" (Groundwater site)
22772273
siteTypeName : string or iterable of strings, optional
2278-
A full name for a certain site type. Check the `siteType_lookup()`
2279-
function in this module for all possible inputs.
2274+
A full name for a certain site type. Call ``get_codes("sitetype")``
2275+
for the valid inputs.
22802276
Example: "Well"
22812277
usgsPCode : string or iterable of strings, optional
22822278
5-digit number used in the US Geological Survey computerized
22832279
data system, National Water Information System (NWIS), to
2284-
uniquely identify a specific constituent. Check the
2285-
`characteristic_lookup()` function in this module for all possible
2286-
inputs.
2280+
uniquely identify a specific constituent (the ``parameterCode`` column
2281+
of ``get_codes("characteristics")``).
22872282
Example: "00060" (Discharge, cubic feet per second)
22882283
hydrologicUnit : string or iterable of strings, optional
22892284
Max 12-digit number used to describe a hydrologic unit.

0 commit comments

Comments
 (0)