Skip to content

Commit

Permalink
docs: fix all occurences of AdmXXX
Browse files Browse the repository at this point in the history
  • Loading branch information
12rambau committed Dec 22, 2023
1 parent c4f5e53 commit b2c77c0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ and then request area of interest from their name or GADM Id:
import pygaul
gdf = pygaul.AdmItems(name="Singapore", content_level=1)
gdf = pygaul.Items(name="Singapore", content_level=1)
Credits
-------
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ and then request area of interest from their name or GADM Id:
import pygaul
gdf = pygaul.AdmItems(name="Singapore", content_level=1)
gdf = pygaul.Items(name="Singapore", content_level=1)
Documentation contents
----------------------
Expand Down
24 changes: 12 additions & 12 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The PyGAUL lib can be used to extract information from the FAO GAUL dataset as :
Countries
^^^^^^^^^

Using the :code:`AdmItems` class, you can access an administrative area using either its name or its GAUL identification code.
Using the :code:`Items` class, you can access an administrative area using either its name or its GAUL identification code.

For example to extract the France geometry you can use the following code:

Expand All @@ -30,7 +30,7 @@ For example to extract the France geometry you can use the following code:

ee.Initialize()

fc = pygaul.AdmItems(name="France")
fc = pygaul.Items(name="France")

# display it in a map
m = Map(zoom=5, center=[46.21, 2.21])
Expand All @@ -47,7 +47,7 @@ If you know the code of the area you try to use, you can use the GADM code inste

ee.Initialize()

fc = pygaul.AdmItems(admin="85")
fc = pygaul.Items(admin="85")

# display it in a map
m = Map(zoom=5, center=[46.21, 2.21])
Expand All @@ -67,7 +67,7 @@ One is not bind to only request a country, any level can be accessed using both

ee.Initialize()

fc = pygaul.AdmItems(name="Corse-du-Sud")
fc = pygaul.Items(name="Corse-du-Sud")

# display it in a map
m = Map(zoom=8, center=[41.86, 8.97])
Expand All @@ -91,7 +91,7 @@ Using the :code:`content_level` option, one can require smaller administrative l

ee.Initialize()

fc = pygaul.AdmItems(admin="85", content_level=2)
fc = pygaul.Items(admin="85", content_level=2)

# display it in a map
m = Map(zoom=5, center=[46.21, 2.21])
Expand All @@ -111,7 +111,7 @@ To perform regional analysis that aggregate multiple boundaries, you can now req

ee.Initialize()

fc = pygaul.AdmItems(name=["France", "Germany"], content_level=1)
fc = pygaul.Items(name=["France", "Germany"], content_level=1)

# display it in a map
m = Map(zoom=5, center=[48.83, 5.17])
Expand Down Expand Up @@ -139,7 +139,7 @@ It's possible to request all countries from one single continent using one of th

ee.Initialize()

fc = pygaul.AdmItems(name="europe")
fc = pygaul.Items(name="europe")

# display it in a map
m = Map(zoom=4, center = [49.38237278700955, 31.464843750000004])
Expand All @@ -149,15 +149,15 @@ It's possible to request all countries from one single continent using one of th
Find administrative names
-------------------------

To get the available name and GAUL code in a administrative layer you can use the :code:`AdmNames` class with the same parameters. Use then these names in a :code:`AdmItems` request to get the geometry.
To get the available name and GAUL code in a administrative layer you can use the :code:`Names` class with the same parameters. Use then these names in a :code:`Items` request to get the geometry.

For example to get the names and codes of all the departments in France you can run:

.. jupyter-execute::

import pygaul

pygaul.AdmNames(admin="85", content_level=2)
pygaul.Names(admin="85", content_level=2)

.. note::

Expand All @@ -167,15 +167,15 @@ For example to get the names and codes of all the departments in France you can

import pygaul

pygaul.AdmNames(admin="1270", content_level=2, complete=True)
pygaul.Names(admin="1270", content_level=2, complete=True)

.. note::

You can also get the list of all the country names by omitting admin and name parameters. If a level is not provided the table will only show country names but other parameters remain availables.

.. code-block:: python
pygaul.AdmNames()
pygaul.Names()
Suggestion
Expand All @@ -192,5 +192,5 @@ If you make an error when writing the name of your input, the error message will

ee.Initialize()

fc = pygaul.AdmItems(name="Franc")
fc = pygaul.Items(name="Franc")

0 comments on commit b2c77c0

Please sign in to comment.