Make Ecological Dynamics Interpretive Tool (EDIT) web services URL
Source:R/fetchEDIT_tools.R
make_EDIT_service_URL.Rd
Construct a URL for Ecological Dynamics Interpretive Tool (EDIT) web services (https://edit.jornada.nmsu.edu/services/...
) to return PDF, TXT or JSON results.
Arguments
- src
One of:
descriptions
,downloads
,plant-community-tables
,models
,keys
- catalog
Catalog ID. One of:
esd
oresg
- geoUnit
Geographic unit ID. For example:
022A
- ecoclass
Ecological class ID. For example:
F022AX101CA
- landuse
Optional: Used only for
src = "plant-community-tables"
- state
Optional: Used only for
src = "plant-community-tables"
- community
Optional: Used only for
src = "plant-community-tables"
- key
Optional: Key number. All keys will be returned if not specified.
- endpoint
Optional: Specific endpoint e.g.
overview.json
,class-list.json
,soil-features.json
- querystring
Optional: Additional request parameters specified as a query string
?param1=value¶m2=value
.
Details
See the following official EDIT developer resources to see which endpoints are available for Ecological Site Description (ESD) or Ecological Site Group (ESG) catalogs:
Examples
# url for all geoUnit keys as PDF
make_EDIT_service_URL(src = "descriptions",
catalog = "esd",
geoUnit = "039X")
#> [1] "https://edit.jornada.nmsu.edu/services/descriptions/esd/039X.pdf"
# url for a single key within geoUnit as PDF
make_EDIT_service_URL(src = "descriptions",
catalog = "esd",
geoUnit = "039X",
key = "1")
#> [1] "https://edit.jornada.nmsu.edu/services/descriptions/esd/039X/1.pdf"
# query for "full" description in JSON
desc <- make_EDIT_service_URL(src = "descriptions",
catalog = "esd",
geoUnit = "039X",
endpoint = "R039XA109AZ.json")
# query for "overview"
desc_ov <- make_EDIT_service_URL(src = "descriptions",
catalog = "esd",
geoUnit = "039X",
ecoclass = "R039XA109AZ",
endpoint = "overview.json")
# query for specific section, e.g. "water features"
desc_wf <- make_EDIT_service_URL(src = "descriptions",
catalog = "esd",
geoUnit = "039X",
ecoclass = "R039XA109AZ",
endpoint = "water-features.json")
# construct the URLs -- that is a query essentially
# then download the result with read_json
#full <- jsonlite::read_json(desc)
#overview <- jsonlite::read_json(desc_ov)
#waterfeature <- jsonlite::read_json(desc_wf)