make_EDIT_service_URL {soilDB} | R Documentation |
Make Ecological Dynamics Interpretive Tool (EDIT) web services URL
Description
Construct a URL for Ecological Dynamics Interpretive Tool (EDIT) web services (https://edit.jornada.nmsu.edu/services/...
) to return PDF, TXT or JSON results.
Usage
make_EDIT_service_URL(
src = c("descriptions", "downloads", "plant-community-tables", "models", "keys"),
catalog = c("esd", "esg"),
geoUnit = NULL,
ecoclass = NULL,
landuse = NULL,
state = NULL,
community = NULL,
key = NULL,
endpoint = NULL,
querystring = NULL
)
Arguments
src |
One of: |
catalog |
Catalog ID. One of: |
geoUnit |
Geographic unit ID. For example: |
ecoclass |
Ecological class ID. For example: |
landuse |
Optional: Used only for |
state |
Optional: Used only for |
community |
Optional: Used only for |
key |
Optional: Key number. All keys will be returned if not specified. |
endpoint |
Optional: Specific endpoint e.g. |
querystring |
Optional: Additional request parameters specified as a query string |
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:
Value
A character vector containing URLs with specified parameters. This function is vectorized.
See Also
get_EDIT_ecoclass_by_geoUnit
Examples
# url for all geoUnit keys as PDF
make_EDIT_service_URL(src = "descriptions",
catalog = "esd",
geoUnit = "039X")
# url for a single key within geoUnit as PDF
make_EDIT_service_URL(src = "descriptions",
catalog = "esd",
geoUnit = "039X",
key = "1")
# 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)