Skip to content

Commit

Permalink
MNT: Update APIs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Taher Chegini committed Apr 25, 2024
1 parent 9f42fa7 commit b2268fa
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 22 deletions.
4 changes: 2 additions & 2 deletions docs/source/autoapi/py3dep/py3dep/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,10 @@ Module Contents
>>> bbox = (-69.77, 45.07, -69.31, 45.45)
>>> src = py3dep.query_3dep_sources(bbox)
>>> src.groupby("dem_res")["OBJECTID"].count().to_dict()
{'10m': 8, '1m': 3, '30m': 8}
{'10m': 8, '1m': 2, '30m': 8}
>>> src = py3dep.query_3dep_sources(bbox, res="1m")
>>> src.groupby("dem_res")["OBJECTID"].count().to_dict()
{'1m': 3}
{'1m': 2}


.. py:function:: static_3dep_dem(geometry, crs, resolution = 10)
Expand Down
2 changes: 1 addition & 1 deletion docs/source/autoapi/pygeohydro/helpers/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Module Contents
- https://www.mrlc.gov/data/legends/national-land-cover-database-2016-nlcd2016-legend
- https://doi.org/10.1111/jfr3.12347

:returns: :class:`dict` -- Years where data is available and cover classes and categories, and roughness estimations.
:returns: :class:`dict` -- Years when data is available and cover classes and categories, and roughness estimations.


.. py:function:: nwis_errors()
Expand Down
2 changes: 1 addition & 1 deletion docs/source/autoapi/pygeohydro/nfhl/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Module Contents
.. method:: bysql(sql_clause, return_m=False, return_geom=True)

Get features using a valid SQL 92 WHERE clause.


.. py:property:: valid_services
:type: dict[str, str]
Expand Down
4 changes: 2 additions & 2 deletions docs/source/autoapi/pygeohydro/nlcd/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Module Contents
and impervious areas. So, ``urban = developed + impervious`` and always
``natural + urban = natural + developed + impervious = 100``.

:Parameters: * **geometry** (:class:`geopandas.GeoDataFrame` or :class:`geopandas.GeoSeries`) -- A GeoDataFrame or GeoSeries with the geometry to query. The indices are used
:Parameters: * **geo_df** (:class:`geopandas.GeoDataFrame` or :class:`geopandas.GeoSeries`) -- A GeoDataFrame or GeoSeries with the geometry to query. The indices are used
as keys in the output dictionary.
* **year** (:class:`int`, *optional*) -- Year of the NLCD data, defaults to 2019. Available years are 2021, 2019, 2016,
2013, 2011, 2008, 2006, 2004, and 2001.
Expand All @@ -45,7 +45,7 @@ Module Contents
:returns: :class:`pandas.DataFrame` -- A dataframe with the same index as input ``geo_df`` and columns are the area
percentages of the natural, developed, impervious, and urban
(sum of developed and impervious) areas. Sum of urban and natural percentages
is always 100, as well as the sume of natural, developed, and impervious
is always 100, as well as the sum of natural, developed, and impervious
percentages.


Expand Down
2 changes: 1 addition & 1 deletion docs/source/autoapi/pygeohydro/nwis/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Module Contents
per year. Missing data in the remaining stations, are filled with
day-of-year average over the entire dataset.

:Parameters: * **discharge** (:class:`xarray.DataArray` or :class:`pandas.DataFrame` or :class:`pandas.Series`) -- Daily streamflow observations with at least 10 years of daily data.
:Parameters: * **streamflow** (:class:`xarray.DataArray` or :class:`pandas.DataFrame` or :class:`pandas.Series`) -- Daily streamflow observations with at least 10 years of daily data.
* **missing_max** (:class:`int`) -- Maximum allowed number of missing daily data per year for filling,
defaults to 5.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/autoapi/pygeohydro/pygeohydro/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Module Contents
.. method:: bysql(sql_clause, return_m=False, return_geom=True)

Get features using a valid SQL 92 WHERE clause.


:Parameters: **data_type** (:class:`str`, *optional*) -- Type of the survey data to retrieve, defaults to ``points``.
Note that the ``points`` data type gets the best available point
Expand Down
6 changes: 3 additions & 3 deletions docs/source/autoapi/pygeohydro/stnfloodevents/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Module Contents

:meth:`~get_all_data`
Retrieves all data for a given data type.

:meth:`~get_filtered_data`
Retrieves filtered data for a given data type.

Expand Down Expand Up @@ -153,7 +153,7 @@ Module Contents

:meth:`~get_filtered_data`
Retrieves filtered data for a given data type.

:meth:`~data_dictionary`
Retrieves the data dictionary for a given data type.

Expand Down Expand Up @@ -217,7 +217,7 @@ Module Contents

:meth:`~get_all_data`
Retrieves all data for a given data type.

:meth:`~data_dictionary`
Retrieves the data dictionary for a given data type.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/autoapi/pygeohydro/waterdata/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Module Contents
For example:
``properties/monitoringLocationType eq 'Stream' and ...``
* **expand** (:class:`dict` of :class:`dict`, *optional*) -- Expand the properties of the selected columns, defaults to ``None``.
Note that the expand should have the form of
Note that the ``expand`` should have the form of
``{Property: {func: value, ...}}``. For example: ``{"Locations":
{"select": "location", "filter": "ObservedProperty/@iot.id eq '00060'"}}``
* **max_count** (:class:`int`, *optional*) -- Maximum number of items to be returned, defaults to ``None``.
Expand Down
18 changes: 10 additions & 8 deletions docs/source/autoapi/pynhd/pynhd/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ Module Contents
non-conus areas, i.e., Alaska, Hawaii, Puerto Rico, the Virgin Islands , and
the Pacific Islands. Valid layers are:

- ``hydrolocation``
- ``flowline``
- ``waterbody``
- ``drainage_area``
- ``catchment``
- ``hydrolocation_waterbody`` for Sink, Spring, Waterbody Outlet
- ``hydrolocation_flowline`` for Headwater, Terminus, Divergence, Confluence, Catchment Outlet
- ``hydrolocation_reach`` for Reach Code, External Connection
- ``flowline`` for river flowlines
- ``waterbody`` for waterbodies
- ``drainage_area`` for drainage areas
- ``catchment`` for catchments
* **outfields** (:class:`str` or :class:`list`, *optional*) -- Target field name(s), default to "*" i.e., all the fields.
* **crs** (:class:`str`, :class:`int`, or :class:`pyproj.CRS`, *optional*) -- Target spatial reference, default to ``EPSG:4326``.

Expand All @@ -47,7 +49,7 @@ Module Contents
.. method:: bysql(sql_clause, return_m=False, return_geom=True)

Get features using a valid SQL 92 WHERE clause.



.. py:class:: NHD(layer, outfields = '*', crs = 4326)
Expand Down Expand Up @@ -93,7 +95,7 @@ Module Contents
.. method:: bysql(sql_clause, return_m=False, return_geom=True)

Get features using a valid SQL 92 WHERE clause.



.. py:class:: NHDPlusHR(layer, outfields = '*', crs = 4326)
Expand Down Expand Up @@ -136,7 +138,7 @@ Module Contents
.. method:: bysql(sql_clause, return_m=False, return_geom=True)

Get features using a valid SQL 92 WHERE clause.



.. py:class:: NLDI
Expand Down
4 changes: 4 additions & 0 deletions docs/source/gallery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
thumbnail: _static/thumbnails/dam_impact.png
title: Geospatial Hydrologic Data with Web Services

- path: examples/notebooks/ridges.html
thumbnail: _static/thumbnails/ridge_map.png
title: Ridge Map

- path: examples/notebooks/hwms.html
thumbnail: _static/thumbnails/hwms.png
title: High Water Marks using STN
Expand Down
2 changes: 1 addition & 1 deletion docs/source/readme/async-retriever.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ AsyncRetriever: Asynchronous requests with persistent caching
:alt: Python Versions

.. image:: https://static.pepy.tech/badge/async-retriever
:target: https://pepy.tech/project/pyasync-retriever3dep
:target: https://pepy.tech/project/async-retriever
:alt: Downloads

|
Expand Down

0 comments on commit b2268fa

Please sign in to comment.