|
5 | 5 | <head> |
6 | 6 | <meta charset="utf-8" /> |
7 | 7 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
8 | | - <title>dataretrieval.waterdata.api — dataretrieval 0.1.dev1+g1c857e579 documentation</title> |
| 8 | + <title>dataretrieval.waterdata.api — dataretrieval 0.1.dev1+g092f1b02c documentation</title> |
9 | 9 | <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=b86133f3" /> |
10 | 10 | <link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=9edc463e" /> |
11 | 11 |
|
12 | 12 |
|
13 | 13 | <script src="../../../_static/jquery.js?v=5d32c60e"></script> |
14 | 14 | <script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> |
15 | | - <script src="../../../_static/documentation_options.js?v=0faa8457"></script> |
| 15 | + <script src="../../../_static/documentation_options.js?v=b4b04f32"></script> |
16 | 16 | <script src="../../../_static/doctools.js?v=fd6eb6e6"></script> |
17 | 17 | <script src="../../../_static/sphinx_highlight.js?v=6ffebe34"></script> |
18 | 18 | <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script> |
@@ -191,7 +191,7 @@ <h1>Source code for dataretrieval.waterdata.api</h1><div class="highlight"><pre> |
191 | 191 | <span class="sd"> data are released on the condition that neither the USGS nor the United</span> |
192 | 192 | <span class="sd"> States Government may be held liable for any damages resulting from its</span> |
193 | 193 | <span class="sd"> use. This field reflects the approval status of each record, and is either</span> |
194 | | -<span class="sd"> "Approved", meaining processing review has been completed and the data is</span> |
| 194 | +<span class="sd"> "Approved", meaning processing review has been completed and the data is</span> |
195 | 195 | <span class="sd"> approved for publication, or "Provisional" and subject to revision. For</span> |
196 | 196 | <span class="sd"> more information about provisional data, go to:</span> |
197 | 197 | <span class="sd"> https://waterdata.usgs.gov/provisional-data-statement/.</span> |
@@ -308,6 +308,21 @@ <h1>Source code for dataretrieval.waterdata.api</h1><div class="highlight"><pre> |
308 | 308 | <span class="sd"> ... parameter_code="00060",</span> |
309 | 309 | <span class="sd"> ... last_modified="P7D",</span> |
310 | 310 | <span class="sd"> ... )</span> |
| 311 | + |
| 312 | +<span class="sd"> >>> # Chain queries: pull all stream sites in a state, then their</span> |
| 313 | +<span class="sd"> >>> # daily discharge for the last week. The site list can be hundreds</span> |
| 314 | +<span class="sd"> >>> # of values long — the request is transparently chunked across</span> |
| 315 | +<span class="sd"> >>> # multiple sub-requests so the URL stays under the server's byte</span> |
| 316 | +<span class="sd"> >>> # limit. Combined output looks like a single query.</span> |
| 317 | +<span class="sd"> >>> sites_df, _ = dataretrieval.waterdata.get_monitoring_locations(</span> |
| 318 | +<span class="sd"> ... state_name="Ohio",</span> |
| 319 | +<span class="sd"> ... site_type="Stream",</span> |
| 320 | +<span class="sd"> ... )</span> |
| 321 | +<span class="sd"> >>> df, md = dataretrieval.waterdata.get_daily(</span> |
| 322 | +<span class="sd"> ... monitoring_location_id=sites_df["monitoring_location_id"].tolist(),</span> |
| 323 | +<span class="sd"> ... parameter_code="00060",</span> |
| 324 | +<span class="sd"> ... time="P7D",</span> |
| 325 | +<span class="sd"> ... )</span> |
311 | 326 | <span class="sd"> """</span> |
312 | 327 | <span class="n">service</span> <span class="o">=</span> <span class="s2">"daily"</span> |
313 | 328 | <span class="n">output_id</span> <span class="o">=</span> <span class="s2">"daily_id"</span> |
@@ -340,7 +355,7 @@ <h1>Source code for dataretrieval.waterdata.api</h1><div class="highlight"><pre> |
340 | 355 | <span class="n">convert_type</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span> |
341 | 356 | <span class="p">)</span> <span class="o">-></span> <span class="nb">tuple</span><span class="p">[</span><span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">,</span> <span class="n">BaseMetadata</span><span class="p">]:</span> |
342 | 357 | <span class="w"> </span><span class="sd">"""</span> |
343 | | -<span class="sd"> Continuous data provide instantanous water conditions.</span> |
| 358 | +<span class="sd"> Continuous data provide instantaneous water conditions.</span> |
344 | 359 |
|
345 | 360 | <span class="sd"> This is an early version of the continuous endpoint that is feature-complete</span> |
346 | 361 | <span class="sd"> and is being made available for limited use. Geometries are not included</span> |
@@ -401,7 +416,7 @@ <h1>Source code for dataretrieval.waterdata.api</h1><div class="highlight"><pre> |
401 | 416 | <span class="sd"> data are released on the condition that neither the USGS nor the United</span> |
402 | 417 | <span class="sd"> States Government may be held liable for any damages resulting from its</span> |
403 | 418 | <span class="sd"> use. This field reflects the approval status of each record, and is either</span> |
404 | | -<span class="sd"> "Approved", meaining processing review has been completed and the data is</span> |
| 419 | +<span class="sd"> "Approved", meaning processing review has been completed and the data is</span> |
405 | 420 | <span class="sd"> approved for publication, or "Provisional" and subject to revision. For</span> |
406 | 421 | <span class="sd"> more information about provisional data, go to:</span> |
407 | 422 | <span class="sd"> https://waterdata.usgs.gov/provisional-data-statement/.</span> |
@@ -1347,7 +1362,7 @@ <h1>Source code for dataretrieval.waterdata.api</h1><div class="highlight"><pre> |
1347 | 1362 | <span class="sd"> data are released on the condition that neither the USGS nor the United</span> |
1348 | 1363 | <span class="sd"> States Government may be held liable for any damages resulting from its</span> |
1349 | 1364 | <span class="sd"> use. This field reflects the approval status of each record, and is either</span> |
1350 | | -<span class="sd"> "Approved", meaining processing review has been completed and the data is</span> |
| 1365 | +<span class="sd"> "Approved", meaning processing review has been completed and the data is</span> |
1351 | 1366 | <span class="sd"> approved for publication, or "Provisional" and subject to revision. For</span> |
1352 | 1367 | <span class="sd"> more information about provisional data, go to:</span> |
1353 | 1368 | <span class="sd"> https://waterdata.usgs.gov/provisional-data-statement/.</span> |
@@ -1547,7 +1562,7 @@ <h1>Source code for dataretrieval.waterdata.api</h1><div class="highlight"><pre> |
1547 | 1562 | <span class="sd"> data are released on the condition that neither the USGS nor the United</span> |
1548 | 1563 | <span class="sd"> States Government may be held liable for any damages resulting from its</span> |
1549 | 1564 | <span class="sd"> use. This field reflects the approval status of each record, and is either</span> |
1550 | | -<span class="sd"> "Approved", meaining processing review has been completed and the data is</span> |
| 1565 | +<span class="sd"> "Approved", meaning processing review has been completed and the data is</span> |
1551 | 1566 | <span class="sd"> approved for publication, or "Provisional" and subject to revision. For</span> |
1552 | 1567 | <span class="sd"> more information about provisional data, go to:</span> |
1553 | 1568 | <span class="sd"> https://waterdata.usgs.gov/provisional-data-statement/.</span> |
@@ -1732,7 +1747,7 @@ <h1>Source code for dataretrieval.waterdata.api</h1><div class="highlight"><pre> |
1732 | 1747 | <span class="sd"> data are released on the condition that neither the USGS nor the United</span> |
1733 | 1748 | <span class="sd"> States Government may be held liable for any damages resulting from its</span> |
1734 | 1749 | <span class="sd"> use. This field reflects the approval status of each record, and is either</span> |
1735 | | -<span class="sd"> "Approved", meaining processing review has been completed and the data is</span> |
| 1750 | +<span class="sd"> "Approved", meaning processing review has been completed and the data is</span> |
1736 | 1751 | <span class="sd"> approved for publication, or "Provisional" and subject to revision. For</span> |
1737 | 1752 | <span class="sd"> more information about provisional data, go to:</span> |
1738 | 1753 | <span class="sd"> https://waterdata.usgs.gov/provisional-data-statement/.</span> |
|
0 commit comments