Skip to content

Commit

Permalink
Fixes #39
Browse files Browse the repository at this point in the history
* fix rdb column parsing

* fix url typo
  • Loading branch information
jsta authored Apr 11, 2022
1 parent e70c2f5 commit 1e0560a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dataretrieval/nwis.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,8 @@ def _read_rdb(rdb):
else:
break

fields = re.split("[,\t]", rdb.splitlines()[count])
fields = re.split("[\t]", rdb.splitlines()[count])
fields = [field.replace(",", "") for field in fields]
dtypes = {'site_no': str, 'dec_long_va': float, 'dec_lat_va': float}

df = pd.read_csv(StringIO(rdb), delimiter='\t', skiprows=count + 2,
Expand Down
2 changes: 1 addition & 1 deletion dataretrieval/waterwatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_flood_stage(sites: List[str] = None, fmt: str= "DF") -> Union[pd.DataFra
07144101 None None None None
50057000 16 20 24 30
"""
res = requests.get(url + 'floodstage', params={"format": ResponseFormat})
res = requests.get(waterwatch_url + 'floodstage', params={"format": ResponseFormat})

if res.ok:
json_res = res.json()
Expand Down

0 comments on commit 1e0560a

Please sign in to comment.