Skip to content

Commit

Permalink
Correct the usage of get in its docstring (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
asinghvi17 authored May 14, 2024
1 parent 8a95f81 commit 2f36af1
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/GADM.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const API_VERSIONS = ("4.1", "4.0", "3.6", "2.8")
Downloads data for `country` using DataDeps.jl and returns path.
The data is provided by the API of the [GADM](https://gadm.org) project.
It is possible to choose the API version by passing it to the
`version` keyword argument as string.
The available API versions are: 4.1 (default), 4.0, 3.6 and 2.8.
Expand Down Expand Up @@ -134,11 +135,13 @@ function filterlayer(layer, qkeys, qvalues)
end

"""
get(country, subregions...; depth=0, version="4.1")
GADM.get(country, subregions...; depth=0, version="4.1")
Returns a Tables.jl columntable for the requested region.
Geometry of the region(s) can be accessed with the key `geom`.
Returns a Tables.jl columntable for the requested region
Geometry of the region(s) can be accessed with the key `geom`
The geometries are GeoInterface compliant Polygons/MultiPolygons.
The geometries are `GeoInterface`-compliant Polygons/MultiPolygons.
1. country: ISO 3166 Alpha 3 country code
2. subregions: Full official names in hierarchial order (provinces, districts, etc.)
Expand All @@ -147,12 +150,13 @@ The geometries are GeoInterface compliant Polygons/MultiPolygons.
## Examples
```julia
using GADM
# columntable of size 1, data of India's borders
data = get("IND")
data = GADM.get("IND")
# columntable of all states and union territories inside India
data = get("IND"; depth=1)
data = GADM.get("IND"; depth=1)
# columntable of all districts inside Uttar Pradesh
data = get("IND", "Uttar Pradesh"; depth=1)
data = GADM.get("IND", "Uttar Pradesh"; depth=1)
```
"""
function get(country, subregions...; depth=0, kwargs...)
Expand Down

0 comments on commit 2f36af1

Please sign in to comment.