| Title: | An R Interface to Tampa Bay Public Open Data |
| Version: | 0.1.0 |
| Description: | Provides a lightweight R interface for discovering and retrieving public 'ArcGIS' datasets across the Tampa Bay region. Search civic datasets and load records directly into R without manually navigating separate portals, constructing REST API requests, or handling pagination. Supports public data published by the City of Tampa, City of St. Petersburg, City of Clearwater, Hillsborough County, Pinellas County, and Tampa Bay Regional Planning Council. Discover layers in these and other public 'ArcGIS' portals and retrieve them by their REST URLs. A publisher registry configures discovery, while a separate dataset registry identifies layers checked by package maintainers. Filter catalogs by source, geometry, topic, category, and modification date. Retrieve queryable layers with validated pagination, bounded previews, server-side filtering, typed tabular results, optional spatial objects, and source provenance. Save large downloads as local chunks that can be validated and resumed. Designed for analysts, researchers, students, journalists, and civic technologists who work across separate public data portals. Public source pages are the City of Tampa GeoHub https://city-tampa.opendata.arcgis.com/, St. Petersburg ArcGIS portal https://csp.maps.arcgis.com/home/index.html, Clearwater ArcGIS portal https://cityofclearwater.maps.arcgis.com/home/index.html, Hillsborough County GeoHub https://hcfl.gov/about-hillsborough/open-data-and-gis/geohub, Pinellas County Enterprise GIS https://new-pinellas-egis.opendata.arcgis.com/, and Tampa Bay Regional Planning Council GeoHub https://opendata-tbrpc.hub.arcgis.com/. |
| License: | MIT + file LICENSE |
| URL: | https://jaclenga.github.io/tampaBayOpenData/, https://github.com/Jaclenga/tampaBayOpenData |
| BugReports: | https://github.com/Jaclenga/tampaBayOpenData/issues |
| Encoding: | UTF-8 |
| Depends: | R (≥ 4.1.0) |
| Imports: | httr2 (≥ 1.2.3), jsonlite (≥ 1.6.0), tibble (≥ 3.0.0) |
| Suggests: | knitr, rmarkdown, sf (≥ 1.0.0), testthat (≥ 3.2.1) |
| VignetteBuilder: | knitr |
| Config/testthat/edition: | 3 |
| Config/roxygen2/version: | 8.1.0 |
| NeedsCompilation: | no |
| Packaged: | 2026-10-08 23:23:39 UTC; jack3 |
| Author: | Jack Lenga |
| Maintainer: | Jack Lenga <jlenga@alumni.cmu.edu> |
| Repository: | CRAN |
| Date/Publication: | 2026-10-21 08:00:02 UTC |
Discover and retrieve public ArcGIS data
Description
The package includes a catalog of 52 checked layers from Tampa Bay
publishers. Use tbod_list_datasets() or tbod_search_datasets() with
source = "checked" to browse the catalog offline. The default also searches
public ArcGIS portals configured for Tampa, St. Petersburg, Clearwater,
Hillsborough County, Pinellas County, and the Tampa Bay Regional Planning
Council.
tbod_list_portals() lists those publishers.
Details
tbod_discover() searches another ArcGIS portal or lists layers in a
FeatureServer or MapServer service. tbod_get_dataset() accepts a bundled
ID, discovered row, stable ArcGIS ID, or direct layer URL and returns a tibble
or optional sf object. tbod_provenance() reads its source and query
record. tbod_download_dataset() saves resumable chunks.
Checked layers have saved schema snapshots. tbod_schema() reads a saved or
current schema, and tbod_check_schema() reports changes. Retrieval warns
for compatible drift and stops before querying for incompatible drift.
This independent package was inspired by rOpenSci's nycOpenData; it is not affiliated with rOpenSci or any government publisher. Government datasets retain their upstream terms.
Request identity
Web requests use tampaBayOpenData/0.1.0 as the default user agent. Set
options(tampaBayOpenData.user_agent = "my-project/1.0 (contact: me@example.org)")
before calling a function that contacts a publisher to identify your own
application. Set the option to NULL to restore the default. The setting
applies to discovery, retrieval, and downloads.
Live examples
Examples that contact public ArcGIS services run when
TAMPA_OPEN_DATA_LIVE=true is set in the R environment. Without this opt-in,
the examples use only the bundled registry and run offline.
Author(s)
Maintainer: Jack Lenga jlenga@alumni.cmu.edu (ORCID) [copyright holder]
Authors:
Jack Lenga jlenga@alumni.cmu.edu (ORCID) [copyright holder]
See Also
Useful links:
Report bugs at https://github.com/Jaclenga/tampaBayOpenData/issues
Check a current ArcGIS schema against an expected schema
Description
The checked catalog supplies an expected snapshot automatically. For a
discovered descriptor or direct ArcGIS URL, pass expected explicitly to
compare it with a previously saved tbod_schema() result. Otherwise the
result is untracked and contains the current schema. Added fields and
changed aliases are compatible drift. Removed or renamed fields, changed
field types, object-ID fields, geometry or CRS, and moved or missing endpoints
are incompatible drift. This inspection function returns a report, including
missing endpoints; checked retrieval warns for compatible drift and errors
before querying for incompatible drift.
Usage
tbod_check_schema(
id,
jurisdiction = NULL,
expected = NULL,
timeout = 30,
total_timeout = 60,
portal = NULL
)
Arguments
id |
Checked dataset ID, discovered descriptor, stable ArcGIS item ID, or public HTTPS ArcGIS layer URL. |
jurisdiction |
Optional checked-catalog jurisdiction. |
expected |
Optional schema list with |
timeout |
Per-request timeout in seconds. |
total_timeout |
Overall operation budget in seconds; |
portal |
Optional public ArcGIS sharing REST portal URL for a stable
|
Value
A tbod_schema_check list with status (unchanged,
compatible, incompatible, or untracked), a tibble of issues with
category, severity, field, expected, and actual columns, and
expected and current schemas. An incompatible missing endpoint has no
current schema.
Examples
if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) {
report <- tbod_check_schema("construction-permits")
report$status
report$issues
}
Inspect a dataset and its source
Description
Accepts a bundled ID, one-row discovery result, stable ArcGIS ID, or direct
public HTTPS layer URL. A checked ID reads its bundled record offline;
a stable ArcGIS ID resolves the current portal item. refresh = TRUE
retrieves current fields, aliases, types, geometry, CRS, query capabilities,
and editing metadata. The registry's verified date records an endpoint
check, not record freshness. Use tbod_schema() to inspect the schema or
tbod_check_schema() to compare it with the checked snapshot.
Usage
tbod_dataset_info(
id,
jurisdiction = NULL,
refresh = FALSE,
timeout = 30,
total_timeout = 60,
portal = NULL
)
Arguments
id |
Bundled ID, one-row discovery result, stable ArcGIS ID, or public HTTPS ArcGIS layer URL. |
jurisdiction |
Optional bundled catalog jurisdiction. |
refresh |
Whether to request current ArcGIS layer metadata. |
timeout |
Per-request timeout in seconds. |
total_timeout |
Maximum elapsed seconds for inspection, including
metadata requests and retries. Defaults to 60; |
portal |
Optional ArcGIS sharing REST portal URL when |
Value
A named list with the dataset ID, title, publisher, jurisdiction,
source and service URLs, scope, and terms. With refresh = TRUE, it also
contains fields (a tibble of source names, types, and aliases),
metadata (raw ArcGIS layer metadata), and UTC inspected_at.
Examples
info <- tbod_dataset_info("construction-permits")
info[c("id", "title", "publisher", "source_url")]
Discover datasets from an ArcGIS portal
Description
Searches a public ArcGIS portal or lists layers from a FeatureServer or
MapServer service or layer URL. Pass a result row to tbod_get_dataset() to
retrieve it. Portal rows have discovered status; service URL rows have
not_checked status because they have no portal item identity. Publisher
services can change after discovery.
Usage
tbod_discover(
portal,
query = NULL,
max_items = 25,
timeout = 30,
total_timeout = 90,
org_id = NULL,
publisher = NULL,
jurisdiction = "unspecified"
)
Arguments
portal |
Public HTTPS ArcGIS sharing REST root ending in
|
query |
Optional portal search text. For a service URL, a literal case-insensitive layer-name filter. |
max_items |
Maximum service items to scan in a portal or layers to
inspect in a service. Defaults to 25; |
timeout |
Per-request timeout in seconds. |
total_timeout |
Maximum elapsed seconds for the operation. Defaults to
90; |
org_id |
Optional ArcGIS organization ID to restrict a portal search. This argument does not apply to service URLs. |
publisher |
Publisher label to attach to discovery rows. If NULL, a portal organization name is used when available; service URLs use an unknown-publisher label. |
jurisdiction |
Jurisdiction label to attach to discovery rows. Defaults
to |
Details
A portal search scans at most max_items service items, then
expands queryable layers. For a FeatureServer or MapServer URL, discovery
enumerates the service's layers; query filters their names. The result
reports scan completeness and item errors as attributes.
Value
A tibble of discovered ArcGIS layers. Discovery issues, scan counts,
truncation, and completeness are attached as attributes; check
attr(rows, "discovery_complete") before assuming a complete search.
Examples
if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) {
rows <- tbod_discover("https://www.arcgis.com/sharing/rest",
query = "parks", max_items = 5)
}
Download a direct ArcGIS layer URL
Description
Uses tbod_download_dataset() with a public HTTPS ArcGIS FeatureServer or
MapServer layer URL. The direct source has not_checked provenance and no
inferred publisher identity. A saved manifest fixes the endpoint, query,
fields, schema, CRS, IDs, and batch size; a resumed call rechecks them before
reusing validated chunks. See tbod_download_dataset() for the directory,
lock, and record-change rules.
Usage
tbod_download_arcgis_layer(
url,
path,
where = "1=1",
fields = NULL,
spatial = FALSE,
out_sr = NULL,
page_size = 1000,
query = list(),
timeout = 30,
total_timeout = Inf,
resume = TRUE
)
Arguments
url |
Public HTTPS ArcGIS layer URL. |
path |
Local directory for the manifest, checkpoints, and chunk files. |
where |
ArcGIS SQL WHERE clause using source field names; defaults to
|
fields |
Character vector of exact source field names, or |
spatial |
Write |
out_sr |
Optional positive ArcGIS/EPSG output reference for server
projection; requires |
page_size |
Positive integer batch size capped at 1,000 and the service maximum. The effective size must stay fixed when resuming. |
query |
Named list of advanced ArcGIS filters such as |
timeout |
Per-request timeout in seconds. |
total_timeout |
Overall operation deadline in seconds. The default
|
resume |
Reuse a matching saved download and skip validated chunks. |
Value
A named list with the download path, ordered chunk files, matched and returned row counts, completeness, and summary provenance.
Examples
if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) {
url <- tbod_dataset_info("construction-permits")$source_url
tbod_download_arcgis_layer(url, tempfile("permit-url-download-"),
where = "OBJECTID <= 10", page_size = 5)
}
Download a dataset into resumable chunks
Description
Accepts a bundled ID, discovery row, stable ArcGIS ID, or direct ArcGIS layer URL. A custom Enterprise portal can be provided with stable IDs. Layers in the checked catalog are compared with expected schemas before downloading; compatible drift warns and incompatible drift stops the download.
Usage
tbod_download_dataset(
id,
path,
jurisdiction = NULL,
where = "1=1",
fields = NULL,
spatial = FALSE,
out_sr = NULL,
page_size = 1000,
query = list(),
timeout = 30,
total_timeout = Inf,
resume = TRUE,
portal = NULL
)
Arguments
id |
Bundled ID, one-row discovery result, stable ArcGIS ID, or direct public HTTPS ArcGIS layer URL. |
path |
Local directory for the manifest, checkpoints, and chunk files. |
jurisdiction |
Optional bundled catalog jurisdiction. |
where |
ArcGIS SQL WHERE clause using source field names; defaults to
|
fields |
Character vector of exact source field names, or |
spatial |
Write |
out_sr |
Optional positive ArcGIS/EPSG output reference for server
projection; requires |
page_size |
Positive integer batch size capped at 1,000 and the service maximum. The effective size must stay fixed when resuming. |
query |
Named list of advanced ArcGIS filters such as |
timeout |
Per-request timeout in seconds. |
total_timeout |
Overall operation deadline in seconds. The default
|
resume |
Reuse a matching saved download and skip validated chunks. |
portal |
Optional ArcGIS sharing REST portal URL when |
Details
The client retrieves the full matching object-ID manifest, then
writes bounded RDS chunks to a caller-selected directory. Each chunk is
a tibble or sf object with its own provenance; read files one at a time
with readRDS(). Feature pages are not accumulated in memory, but the
manifest itself is subject to the one-million-record limit.
A saved manifest fixes the endpoint, query, fields, schema, CRS metadata,
matching IDs, and batch size. With resume = TRUE, current metadata and
IDs are rechecked before saved chunks are used. Changed options, schema,
CRS, or membership cause an error. Completed chunks must match their
checkpoint checksums, expected IDs, columns, and provenance. Temporary
files from interrupted writes are ignored.
The directory must be empty on the first call. Unrelated files and
existing downloads with resume = FALSE are rejected. An exclusive lock
prevents concurrent writers. If a terminated process leaves .lock,
confirm no writer remains, remove that empty directory, and resume.
Record attributes can change between chunks or resumed calls even when
IDs and schema remain stable; this is not a frozen snapshot. The returned
summary records whether the complete matching manifest was downloaded.
Value
A named list with path, ordered chunk files, matched_rows,
returned_rows, complete, and summary source provenance. Each RDS
chunk has its own provenance; tbod_provenance(chunk)$download includes
its chunk number and object IDs.
Examples
if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) {
saved <- tbod_download_dataset("construction-permits",
tempfile("permit-download-"), where = "OBJECTID <= 10", page_size = 5)
if (length(saved$files)) tbod_provenance(readRDS(saved$files[[1L]]))
}
Retrieve a direct ArcGIS layer URL
Description
Calls tbod_get_dataset() with a public HTTPS ArcGIS FeatureServer or
MapServer layer URL. Direct layers have not_checked provenance and no
inferred publisher or portal item identity.
Usage
tbod_get_arcgis_layer(
url,
where = "1=1",
fields = NULL,
spatial = FALSE,
out_sr = NULL,
order_by = NULL,
limit = Inf,
page_size = NULL,
query = list(),
timeout = 30,
total_timeout = 120,
integrity = "auto"
)
Arguments
url |
Public HTTPS ArcGIS layer URL. |
where |
ArcGIS SQL WHERE clause using source field names; defaults to
|
fields |
Character vector of exact source field names, or |
spatial |
Return an |
out_sr |
Optional positive ArcGIS/EPSG spatial reference ID for server
projection, such as 4326. Requires |
order_by |
Source fields with ASC or DESC, such as
|
limit |
Maximum records. |
page_size |
Optional positive integer batch size, capped at 1,000 and the service maximum. |
query |
Named list of advanced ArcGIS filters: |
timeout |
Per-request timeout in seconds. Transient transport and HTTP failures may receive three attempts; a generic ArcGIS query error may receive four. |
total_timeout |
Overall operation budget in seconds. Defaults to 120;
|
integrity |
|
Value
A tibble or sf object with source, completeness, and retrieval
metadata attached. Read it with tbod_provenance().
Examples
if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) {
url <- tbod_dataset_info("construction-permits")$source_url
data <- tbod_get_arcgis_layer(url, limit = 10)
tbod_provenance(data)$validation_status
}
Retrieve checked City of Tampa capital projects
Description
Calls tbod_get_dataset() with the checked City of Tampa
capital-projects catalog ID to retrieve current publisher records.
The City service publishes records marked PUBLIC;
the package preserves that source scope.
Usage
tbod_get_capital_projects(...)
Arguments
... |
Arguments passed to |
Value
A tibble or sf object with retrieval provenance attached.
Examples
if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) {
tbod_get_capital_projects(limit = 10)
}
Retrieve a checked, discovered, or direct ArcGIS dataset
Description
Accepts a checked catalog ID, a one-row discovery result, a stable
arcgis:<item-id>:<layer-id> identifier, or a public HTTPS ArcGIS layer URL
ending in /FeatureServer/<id> or /MapServer/<id>. For a stable ArcGIS ID
from an Enterprise portal, supply that portal's sharing REST URL in portal.
Direct URLs use the same retrieval engine and carry not_checked provenance.
For a layer in the checked catalog, retrieval compares current metadata with its
expected schema, warns for compatible drift, and errors before querying for
incompatible drift. Use tbod_check_schema() to inspect the differences.
Usage
tbod_get_dataset(
id,
jurisdiction = NULL,
where = "1=1",
fields = NULL,
spatial = FALSE,
out_sr = NULL,
order_by = NULL,
limit = Inf,
page_size = NULL,
query = list(),
timeout = 30,
total_timeout = 120,
integrity = "auto",
portal = NULL
)
Arguments
id |
Bundled ID, one-row discovery result, stable
|
jurisdiction |
Optional checked-catalog jurisdiction. |
where |
ArcGIS SQL WHERE clause using source field names; defaults to
|
fields |
Character vector of exact source field names, or |
spatial |
Return an |
out_sr |
Optional positive ArcGIS/EPSG spatial reference ID for server
projection, such as 4326. Requires |
order_by |
Source fields with ASC or DESC, such as
|
limit |
Maximum records. |
page_size |
Optional positive integer batch size, capped at 1,000 and the service maximum. |
query |
Named list of advanced ArcGIS filters: |
timeout |
Per-request timeout in seconds. Transient transport and HTTP failures may receive three attempts; a generic ArcGIS query error may receive four. |
total_timeout |
Overall operation budget in seconds. Defaults to 120;
|
integrity |
|
portal |
Optional public HTTPS ArcGIS sharing REST portal URL for a
stable |
Details
Retrieval requests the current layer schema and matching count.
Full requests also retrieve and validate an object-ID manifest. A small
preview of a large queryable layer can validate only its returned IDs
against the original filter. Missing or duplicate records, truncated
manifests, unexpected responses, and upstream errors fail explicitly.
Full retrieval requires a complete manifest and must be narrowed by
filters if more than one million records match. Use
tbod_download_dataset() to save validated chunks to disk.
Source field names, strings, coded values, and date-looking strings are preserved. ArcGIS epoch-millisecond dates become UTC POSIXct and date-only fields become Date. Dates declared to have an unknown timezone remain raw milliseconds with a warning; UTC editor tracking dates can still convert. Integer values remain integers when safe, larger numeric values become doubles, and exact big integers can be represented as character values. NULL or absent attributes become typed missing values. Spatial results use two-dimensional XY coordinates and exclude Z and M values.
The package does not cache live data. Record membership changes detected during retrieval cause an error, but attribute changes cannot be frozen. Accepted responses are limited to 50 MiB and 64 nested JSON containers; requests do not follow redirects. Native curl, GDAL, and PROJ parsing remains subject to the installed libraries' behavior.
Value
A tibble, or an sf object when spatial = TRUE. source,
dataset_id, jurisdiction, and retrieved_at attributes record the
source and retrieval. Read the complete record with tbod_provenance().
Examples
if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) {
data <- tbod_get_dataset("construction-permits", limit = 5)
tbod_provenance(data)$source_url
}
Retrieve checked City of Tampa development cases
Description
Calls tbod_get_dataset() with the checked City of Tampa
development-cases catalog ID to retrieve current publisher records.
It covers active entitlement locations, not all
historical development cases.
Usage
tbod_get_development_cases(...)
Arguments
... |
Arguments passed to |
Value
A tibble or sf object with retrieval provenance attached.
Examples
if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) {
tbod_get_development_cases(limit = 10)
}
Retrieve checked City of Tampa permit locations
Description
Calls tbod_get_dataset() with the checked City of Tampa
construction-permits catalog ID to retrieve current publisher records.
It reflects the City's active permit viewer;
the source is not a complete historical archive of every permit.
Usage
tbod_get_permits(...)
Arguments
... |
Arguments passed to |
Value
A tibble or sf object with retrieval provenance attached.
Examples
if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) {
tbod_get_permits(limit = 10)
}
List datasets in the bundled catalog
Description
By default, scans the configured Tampa Bay ArcGIS portals and combines their
layers with the bundled checked catalog. Use source = "checked" to list
checked entries offline. Live scans may be incomplete; see Details for the
result attributes. Use tbod_discover() to scan another portal.
Usage
tbod_list_datasets(
jurisdiction = "all",
source = "all",
portals = "all",
max_items = 25,
timeout = 30,
total_timeout = 90,
publisher = NULL,
validation_status = NULL,
spatial = NULL,
topic = NULL,
category = NULL,
modified_after = NULL,
modified_before = NULL
)
Arguments
jurisdiction |
Jurisdiction code or vector of codes from
|
source |
|
portals |
Configured publisher IDs from |
max_items |
Maximum number of service items scanned per selected
portal. Defaults to 25; |
timeout |
Per-request timeout in seconds. |
total_timeout |
Overall operation budget, including retries and live
discovery. Defaults to 90 seconds; |
publisher |
Publisher name or vector, matched exactly without regard to case. Narrows both checked results and the live portal scan. |
validation_status |
|
spatial |
|
topic |
Word or vector matched as case-insensitive literal substrings
in tags and categories; |
category |
Category or vector matched, ignoring case, against full source paths or their final labels. |
modified_after, modified_before |
Inclusive modification bounds. A Date or YYYY-MM-DD string includes its full UTC day; POSIXct specifies an instant. Unknown modification times are excluded when a bound is set. This is an item or checked snapshot time, not record freshness. |
Details
Values within a filter are combined with OR; different filters
and a search query are combined with AND. Status, geometry, topic,
category, and date filters apply after the bounded live scan and checked
overlay. A capped scan can miss older matching items. For an exhaustive
scan, use max_items = Inf with an appropriate time budget and inspect
attr(result, "discovery_complete"). Live results also carry
discovery_issues, discovery_failed_portals,
discovery_scanned_items, and discovery_truncated_portals attributes.
Value
A tibble with stable IDs, service and layer locations, portal and
item IDs when available, and validation_status of "checked" or
"discovered". Live results include scan-completeness and issue attributes
described in Details.
Examples
tbod_list_datasets(source = "checked")
List bundled ArcGIS publisher configurations
Description
Returns the package's Tampa Bay publisher configurations without a network
request. Each entry provides an ArcGIS organization ID and sharing REST
root. Its verified date checks publisher identity, not every layer's
contents or reuse terms. To scan another portal, pass its sharing REST URL
to tbod_discover().
Usage
tbod_list_portals()
Value
A tibble with id (the discovery selector), root, org_id,
publisher, jurisdiction, website, verified (a Date),
metadata_url, and evidence_url. Use id in the portals argument of
tbod_list_datasets() or tbod_search_datasets().
Examples
tbod_list_portals()
Read retrieval provenance
Description
Reads the source, query, completeness, and schema information attached to
a tabular or spatial result from tbod_get_dataset(), or a chunk saved by
tbod_download_dataset(). The record includes publisher, source and query
URLs, UTC retrieval time, returned and matching row counts, and integrity
status. validation_status is checked for bundled entries, discovered
for live portal results, and not_checked for direct layer URLs. Item ID,
portal, and original metadata are included when available. A successful
full retrieval checks object-ID membership, but upstream attributes are
not a transactionally frozen snapshot. R transformations can discard
attributes; save provenance before transforming or exporting the result.
Usage
tbod_provenance(x)
Arguments
x |
A retrieval result or a chunk read from |
Value
The attached source list, including dataset_id, publisher,
jurisdiction, source_url, query endpoint, validation_status, UTC
started_at and retrieved_at, submitted query, matched_rows,
returned_rows, complete, and integrity. Download chunks also include
download with the chunk number and object IDs.
Examples
if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) {
permits <- tbod_get_permits(limit = 10)
tbod_provenance(permits)$source_url
}
Inspect a dataset schema
Description
For a checked dataset, the default returns the bundled schema snapshot
without a network request. refresh = TRUE requests current ArcGIS layer
metadata. A direct ArcGIS layer URL or discovered descriptor has no bundled
expected schema and requires refresh = TRUE. Call tbod_check_schema() to
compare a current service against its expected schema. A stable ArcGIS item
ID from an Enterprise portal can be resolved with portal.
Usage
tbod_schema(
id,
jurisdiction = NULL,
refresh = FALSE,
timeout = 30,
total_timeout = 60,
portal = NULL
)
Arguments
id |
Checked dataset ID, discovered descriptor, stable ArcGIS item ID, or public HTTPS ArcGIS layer URL. |
jurisdiction |
Optional checked-catalog jurisdiction. |
refresh |
Request current layer metadata when TRUE. |
timeout |
Per-request timeout in seconds. |
total_timeout |
Overall operation budget in seconds; |
portal |
Optional public ArcGIS sharing REST portal URL for a stable
|
Value
A list with endpoint, a tibble of field names, types and aliases, geometry type, spatial reference, object-ID field, and dataset ID.
Examples
schema <- tbod_schema("construction-permits")
head(schema$fields[, c("name", "type")])
Search datasets in the bundled catalog
Description
Searches checked Tampa Bay entries and, when requested, configured live
ArcGIS portals. Checked entries match literal, case-insensitive words in
their IDs, titles, descriptions, categories, and tags. Live searches use
each portal's index, so matching can differ. Use tbod_discover() to search
another ArcGIS portal.
Usage
tbod_search_datasets(
query,
jurisdiction = "all",
source = "all",
portals = "all",
max_items = 25,
timeout = 30,
total_timeout = 90,
publisher = NULL,
validation_status = NULL,
spatial = NULL,
topic = NULL,
category = NULL,
modified_after = NULL,
modified_before = NULL
)
Arguments
query |
A single search string. Checked matching treats punctuation literally; live matching uses the ArcGIS portal index. |
jurisdiction |
Jurisdiction code or vector of codes from
|
source |
|
portals |
Configured publisher IDs from |
max_items |
Maximum number of service items scanned per selected
portal. Defaults to 25; |
timeout |
Per-request timeout in seconds. |
total_timeout |
Overall operation budget, including retries and live
discovery. Defaults to 90 seconds; |
publisher |
Publisher name or vector, matched exactly without regard to case. Narrows both checked results and the live portal scan. |
validation_status |
|
spatial |
|
topic |
Word or vector matched as case-insensitive literal substrings
in tags and categories; |
category |
Category or vector matched, ignoring case, against full source paths or their final labels. |
modified_after, modified_before |
Inclusive modification bounds. A Date or YYYY-MM-DD string includes its full UTC day; POSIXct specifies an instant. Unknown modification times are excluded when a bound is set. This is an item or checked snapshot time, not record freshness. |
Details
Values within a filter are combined with OR; different filters
and the search query are combined with AND. Filters apply after the
bounded scan, so a capped scan can miss matching items. See
tbod_list_datasets() for the discovery attributes.
Value
A tibble with the same columns and live discovery attributes as
tbod_list_datasets(). A checked-only search requires no network request.
Examples
tbod_search_datasets("permit", source = "checked")