| Title: | Discover and Retrieve Tampa Bay Public Open Data |
|---|---|
| Description: | Provides tools for discovering and retrieving public 'ArcGIS' datasets across the Tampa Bay region. Search a selected catalog of checked datasets or live publisher portals, and load records into 'R'. The six configured publishers are 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 service 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. Public source pages include 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/>. |
| Authors: | Jack Lenga [aut, cre, cph] (ORCID: <https://orcid.org/0009-0003-1153-8105>) |
| Maintainer: | Jack Lenga <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-10-22 10:26:34 UTC |
| Source: | https://github.com/jaclenga/tampabayopendata |
Checks current public ArcGIS endpoints and saved schemas for selected entries in the bundled checked catalog. It contacts publisher services and returns a report without changing the catalog or saving files. A healthy result is a point-in-time metadata check, not a measure of record freshness.
tbod_check_catalog( jurisdiction = "all", ids = NULL, timeout = 10, total_timeout = 1800, pause = 0.25, probe_query = FALSE )tbod_check_catalog( jurisdiction = "all", ids = NULL, timeout = 10, total_timeout = 1800, pause = 0.25, probe_query = FALSE )
jurisdiction |
One checked-catalog jurisdiction code or |
ids |
Optional nonempty vector of unique checked dataset IDs within
|
timeout |
Per-HTTP-attempt timeout in seconds. |
total_timeout |
Maximum elapsed seconds for the complete check,
including requests, retries, and pauses. Defaults to 1,800; |
pause |
Delay from 0 to 30 seconds between entries to limit request
rate; defaults to 0.25. With |
probe_query |
Run a zero-match count query after usable metadata to
verify Query capability. Defaults to |
Each entry starts one layer-metadata request. The client probes the
service root only after a missing-layer response (HTTP or ArcGIS 404/410,
or an explicit layer-not-found error) to distinguish a missing layer from
a missing service. Transient failures remain unknown
after bounded retries; entries not reached before total_timeout are also
unknown. The default retry limit is three additional attempts per
retryable failure sequence. Set
options(tampaBayOpenData.max_retries = 3L) to change it (whole number
from 0 to 10).
healthy means the layer metadata is valid, Query is advertised, and the
schema matches the saved snapshot. schema_changed includes both
compatible and incompatible drift; inspect schema_status and
schema_issues. Confirmed schema drift remains schema_changed if Query
capability is unreported. A missing object-ID field is reported as schema
drift when a baseline exists; the details also identify unsupported record
retrieval. With no saved baseline, schema_status is
unavailable and status is unknown. unsupported includes layers
that cannot be queried and access failures. By default the check does not
retrieve features or run count and object-ID queries. A layer can advertise Query
yet fail those operations during retrieval. Set probe_query = TRUE to
run a zero-match count request after valid layer metadata; it reads no
features and records whether the actual Query operation succeeds. A
confirmed query failure is degraded, while a transient probe failure is
unknown unless independently confirmed schema drift already makes the
result degraded. The result cannot guarantee future service availability.
A tibble with one row per selected entry and publisher,
jurisdiction, dataset_id, endpoint, checked_at (UTC POSIXct),
status (healthy, unavailable, schema_changed, unsupported, or
unknown), failure_type, http_status, service_status,
and layer_status (available, unavailable, or unknown),
schema_status (unchanged, compatible, incompatible, or
unavailable), schema_issues (a list of issue tibbles), and
details. health_state summarizes status as healthy, degraded,
unavailable, or unknown. response_time_ms is elapsed request
time including retries and a missing-layer service-root probe, excluding
deliberate pauses; it is missing if no request was made. query_status is
not_checked, verified, failed, or unknown;
query_failure_type, query_http_status, and query_details
explain a failed or uncertain probe. http_status is missing when no
metadata HTTP response was received.
if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) { report <- tbod_check_catalog(ids = "construction-permits") report[, c("dataset_id", "status", "schema_status", "details")] }if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) { report <- tbod_check_catalog(ids = "construction-permits") report[, c("dataset_id", "status", "schema_status", "details")] }
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.
tbod_check_schema( id, jurisdiction = NULL, expected = NULL, timeout = 30, total_timeout = 60, portal = NULL )tbod_check_schema( id, jurisdiction = NULL, expected = NULL, timeout = 30, total_timeout = 60, portal = NULL )
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
|
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.
if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) { report <- tbod_check_schema("construction-permits") report$status report$issues }if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) { report <- tbod_check_schema("construction-permits") report$status report$issues }
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.
tbod_dataset_info( id, jurisdiction = NULL, refresh = FALSE, timeout = 30, total_timeout = 60, portal = NULL )tbod_dataset_info( id, jurisdiction = NULL, refresh = FALSE, timeout = 30, total_timeout = 60, portal = NULL )
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 |
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.
info <- tbod_dataset_info("construction-permits") info[c("id", "title", "publisher", "source_url")]info <- tbod_dataset_info("construction-permits") info[c("id", "title", "publisher", "source_url")]
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.
tbod_discover( portal, query = NULL, max_items = 25, timeout = 30, total_timeout = 90, org_id = NULL, publisher = NULL, jurisdiction = "unspecified" )tbod_discover( portal, query = NULL, max_items = 25, timeout = 30, total_timeout = 90, org_id = NULL, publisher = NULL, jurisdiction = "unspecified" )
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 |
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.
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.
if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) { rows <- tbod_discover("https://www.arcgis.com/sharing/rest", query = "parks", max_items = 5) }if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) { rows <- tbod_discover("https://www.arcgis.com/sharing/rest", query = "parks", max_items = 5) }
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. Successful validation writes complete.rds in
the download directory; a resumed call clears and recreates it after
matching the manifest and revalidating chunks. See tbod_download_dataset() for the directory, lock, and record-change rules.
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 )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 )
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. Transient failures may be
retried according to |
total_timeout |
Overall operation deadline in seconds. The default
|
resume |
Reuse a matching saved download and skip validated chunks. |
A named list with the download path, ordered chunk files, matched and returned row counts, completeness, and summary provenance.
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) }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) }
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.
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 )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 )
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. Transient failures may be
retried according to |
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 |
The client retrieves the matching object-ID manifest when records exist, 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. After all chunks have been
validated, the client atomically writes complete.rds in path. No
marker is written before a new download finishes or after an interrupted
call. After confirming the saved manifest matches, a resumed call clears
the marker before revalidating saved chunks, then writes it again only
after successful completion.
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.
Transient connection failures and timeouts, HTTP 429, 500, 502, 503, and
504 responses, ArcGIS error objects with those codes inside HTTP 200
responses, and a generic transient ArcGIS query error are retried.
Set options(tampaBayOpenData.max_retries = 3L) to control additional
retries per failure sequence (integer 0 through 10). HTTP failures and
ArcGIS errors in successful HTTP responses use separate bounded
sequences; mixed failures can make more than four HTTP attempts overall.
A valid Retry-After delay or HTTP date is honored if at most 30 seconds;
a longer delay stops retrying rather than causing an early retry. Otherwise
retries use exponential backoff with jitter. Permanent HTTP
and ArcGIS errors fail without retrying.
An interrupted call does not return a complete download summary; resume
with the same path to validate and continue saved chunks.
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. With no matches, files is empty and
summary integrity is count-only.
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]])) }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]])) }
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.
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" )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" )
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 failures may be
retried according to |
total_timeout |
Overall operation budget in seconds. Defaults to 120;
|
integrity |
|
A tibble or sf object with source, completeness, and retrieval
metadata attached. Read it with tbod_provenance().
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 }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 }
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.
tbod_get_capital_projects(...)tbod_get_capital_projects(...)
... |
Arguments passed to |
A tibble or sf object with retrieval provenance attached.
if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) { tbod_get_capital_projects(limit = 10) }if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) { tbod_get_capital_projects(limit = 10) }
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.
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 )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 )
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 failures may be
retried according to |
total_timeout |
Overall operation budget in seconds. Defaults to 120;
|
integrity |
|
portal |
Optional public HTTPS ArcGIS sharing REST portal URL for a
stable |
Retrieval requests the current layer schema and matching count.
Full requests with matches 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. Truncated or short object-ID batches are
split into smaller requests. Persistently 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.
Transient connection failures and timeouts, HTTP 429, 500, 502, 503, and
504 responses, ArcGIS error objects with those codes inside HTTP 200
responses, and a generic transient ArcGIS query error are retried.
The default is three additional retries per failure sequence; set the
integer option tampaBayOpenData.max_retries from 0 to 10 to change it.
HTTP failures and ArcGIS errors in successful HTTP responses have
separate bounded sequences, so mixed failures may use more than four
HTTP attempts overall. Retries use exponential backoff with jitter or a
valid Retry-After delay or HTTP date. A requested delay longer than
30 seconds stops retrying instead of retrying before the service permits it.
Invalid queries, authentication
failures, unavailable layers, and unsupported operations fail without
retries. total_timeout may stop attempts earlier.
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().
if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) { data <- tbod_get_dataset("construction-permits", limit = 5) tbod_provenance(data)$source_url }if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) { data <- tbod_get_dataset("construction-permits", limit = 5) tbod_provenance(data)$source_url }
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.
tbod_get_development_cases(...)tbod_get_development_cases(...)
... |
Arguments passed to |
A tibble or sf object with retrieval provenance attached.
if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) { tbod_get_development_cases(limit = 10) }if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) { tbod_get_development_cases(limit = 10) }
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.
tbod_get_permits(...)tbod_get_permits(...)
... |
Arguments passed to |
A tibble or sf object with retrieval provenance attached.
if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) { tbod_get_permits(limit = 10) }if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) { tbod_get_permits(limit = 10) }
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.
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 )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 )
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. |
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. Use
max_items = Inf with an appropriate time budget to follow all available
index pages, and inspect attr(result, "discovery_complete"). This flag
describes the selected public portal index scan, not every publisher
service. Live results also carry
discovery_issues, discovery_failed_portals,
discovery_scanned_items, and discovery_truncated_portals attributes.
If every selected portal fails, source = "all" returns the checked entries
with failure details in these attributes; unknown scan counts are NA.
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.
tbod_list_datasets(source = "checked")tbod_list_datasets(source = "checked")
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().
tbod_list_portals()tbod_list_portals()
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().
tbod_list_portals()tbod_list_portals()
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.
tbod_provenance(x)tbod_provenance(x)
x |
A retrieval result or a chunk read from |
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.
if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) { permits <- tbod_get_permits(limit = 10) tbod_provenance(permits)$source_url }if (identical(Sys.getenv("TAMPA_OPEN_DATA_LIVE"), "true")) { permits <- tbod_get_permits(limit = 10) tbod_provenance(permits)$source_url }
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.
tbod_schema( id, jurisdiction = NULL, refresh = FALSE, timeout = 30, total_timeout = 60, portal = NULL )tbod_schema( id, jurisdiction = NULL, refresh = FALSE, timeout = 30, total_timeout = 60, portal = NULL )
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
|
A list with endpoint, a tibble of field names, types and aliases, geometry type, spatial reference, object-ID field, and dataset ID.
schema <- tbod_schema("construction-permits") head(schema$fields[, c("name", "type")])schema <- tbod_schema("construction-permits") head(schema$fields[, c("name", "type")])
Searches checked Tampa Bay entries and, when requested, configured live
ArcGIS portals. The checked catalog is a selected, offline registry; live
discovery searches each publisher's public portal index. Use tbod_discover()
to search another ArcGIS portal or a service URL.
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, limit = Inf )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, limit = Inf )
query |
A single search string. Checked matching treats punctuation literally and ignores case. Separate words must all match. An empty or whitespace-only query lists datasets. |
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. |
limit |
Maximum result rows returned after filtering and ranking.
Defaults to |
Values within a filter are combined with OR; different filters
and the search query are combined with AND. Publisher names are exact,
case-insensitive filters; use tbod_list_portals() to inspect them. A
publisher with no match returns no rows.
Checked entries search ID, title, description, publisher, category, and tags. Exact title or ID matches rank first, then title or ID prefixes, substrings, and matches across title or ID words. Tags, categories, and publisher matches follow; description-only matches rank after those. Within a rank, each word scores title, ID, tags or categories, publisher, and description in that order; title, ID, and source URL then break ties consistently. If no checked entry matches the literal query, a spelling fallback may return close checked entries. Query words must be alphanumeric, and words shorter than four characters have no typo tolerance. The fallback does not change live portal search terms.
Live items come from the portal index, which can search fields not exposed
in returned rows. Available row metadata helps rank them, but an indexed
hit is retained even without a local text match. Layers found both live
and in the checked catalog appear once with "checked" status. With
source = "all", checked matches remain available even when a portal
does not return them. limit applies after discovery, overlay, filtering,
and ranking. Even limit = 0 still performs the selected live scan and
preserves its diagnostics.
Portal searches include public Feature Service and Map Service items and
expand supported, queryable layers. A private, unindexed, stale, or
unavailable item may be absent. max_items caps service items per portal;
item errors and capped scans can leave returned results incomplete, and
a timeout can stop the operation. Check attr(result, "discovery_complete")
and the issue, failed-portal, scanned-item, and truncated-portal attributes
described in tbod_list_datasets(). Even a complete scan covers the
public portal index, not every publisher service.
A tibble with the same columns and live discovery attributes as
tbod_list_datasets(). A checked-only search requires no network request.
tbod_search_datasets("permit", source = "checked")tbod_search_datasets("permit", source = "checked")