| Title: | Access and Plot 'G-TROPIC' Tropical Cyclone Exposure Data |
|---|---|
| Description: | Retrieves, filters and maps tropical cyclone exposure data from the 'G-TROPIC' collection on 'Harvard Dataverse' <https://dataverse.harvard.edu/dataverse/gtropic>, which is updated weekly (<doi:10.7910/DVN/EAVWC3>). For every second-level administrative unit (ADM2) and every storm in the International Best Track Archive for Climate Stewardship (IBTrACS) since 1980, the collection provides wind and precipitation exposure; from 2000 it also provides flood exposure based on places named in news reports of flooding. A single query function is complemented by helpers for exploring the available administrative units and storms, version manifests for reproducible retrieval, a managed on-disk cache, and static and interactive maps. Published exposure values are returned as they are; nothing is recomputed. |
| Authors: | Lawrence G. Chillrud [aut, cre] (ORCID: <https://orcid.org/0000-0003-0727-0161>), Lingke Jiang [aut] (ORCID: <https://orcid.org/0009-0009-4873-4648>), Majd Abid [aut] (ORCID: <https://orcid.org/0009-0009-8065-7101>), Anna Y. Palmer [aut] (ORCID: <https://orcid.org/0009-0003-9772-5664>), G. Brooke Anderson [aut], Robbie M. Parks [aut, cph] (ORCID: <https://orcid.org/0000-0002-7916-1717>), Columbia University [fnd] (ROR: <https://ror.org/00hj8s172>) |
| Maintainer: | Lawrence G. Chillrud <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.1.0 |
| Built: | 2026-12-03 07:25:43 UTC |
| Source: | https://github.com/sparklabnyc/gtropic |
The lines the corresponding print() method displays, as a character
vector, for example to include in a log or a report.
## S3 method for class 'gtropic_data' format(x, ...) ## S3 method for class 'summary.gtropic_data' format(x, ...) ## S3 method for class 'gtropic_manifest' format(x, ...) ## S3 method for class 'gtropic_filters' format(x, ...)## S3 method for class 'gtropic_data' format(x, ...) ## S3 method for class 'summary.gtropic_data' format(x, ...) ## S3 method for class 'gtropic_manifest' format(x, ...) ## S3 method for class 'gtropic_filters' format(x, ...)
x |
A |
... |
Passed to the |
A character vector with one element per printed line.
Other result methods:
print.gtropic_data(),
print.gtropic_filters(),
print.gtropic_manifest(),
summary.gtropic_data()
format(gtropic_manifest(gtropic_example()))format(gtropic_manifest(gtropic_example()))
Retrieves the G-TROPIC lookup table for second-level administrative units
(ADM2), such as counties, districts, or provinces. The table provides the
geographic identifiers and names used to define study areas in
gtropic_data().
Use this function to identify valid geographic values before requesting exposure data. Filters that do not match a published value produce an error rather than an empty result.
gtropic_adm2( ADM2_NAME = NULL, ADM2_GROUP = NULL, WHO_ENTITY = NULL, WHO_REGION = NULL, version = ":latest", cache = NULL )gtropic_adm2( ADM2_NAME = NULL, ADM2_GROUP = NULL, WHO_ENTITY = NULL, WHO_REGION = NULL, version = ":latest", cache = NULL )
ADM2_NAME |
Optional character vector of ADM2 names, matched case-insensitively. |
ADM2_GROUP |
Optional character vector of published ADM2 groupings, typically country or territory codes, matched case-insensitively. |
WHO_ENTITY |
Optional character vector of WHO entity names, matched case-insensitively. |
WHO_REGION |
Optional character vector of WHO region names or codes, matched case-insensitively. |
version |
Dataset version specification. Use |
cache |
Whether downloaded source files may be cached. |
A tibble containing the published ADM2 lookup. Each row represents an
administrative unit and includes its stable ADM2_ID and available name,
country or territory, and WHO regional classifications.
Other discovery functions:
gtropic_codebook(),
gtropic_excluded_storms(),
gtropic_metrics(),
gtropic_storms(),
gtropic_years()
# Review all available administrative units gtropic_adm2() # Find the identifiers used for units in the Philippines gtropic_adm2(WHO_ENTITY = "Philippines")# Review all available administrative units gtropic_adm2() # Find the identifiers used for units in the Philippines gtropic_adm2(WHO_ENTITY = "Philippines")
Countries use the locally installed Natural Earth data package. First use of
an administrative-level-1 layer requires the optional, non-CRAN
rnaturalearthhires package. No layer is downloaded by this function.
gtropic_basemap(what = c("countries", "admin1", "none"), scale = "medium")gtropic_basemap(what = c("countries", "admin1", "none"), scale = "medium")
what |
One of |
scale |
Country resolution: |
An sf object, or NULL for what = "none". Layers are cached by
resolution and type until the R session ends.
Other plotting functions:
gtropic_plot(),
gtropic_saffir_simpson(),
gtropic_save(),
plot.gtropic_data(),
scale_fill_gtropic_c(),
theme_gtropic()
gtropic_basemap(what = "none") countries <- gtropic_basemap() nrow(countries)gtropic_basemap(what = "none") countries <- gtropic_basemap() nrow(countries)
Removes all downloaded file content from the configured cache and clears its index. This operation does not change whether caching is enabled.
gtropic_cache_clear(confirm = TRUE)gtropic_cache_clear(confirm = TRUE)
confirm |
Logical. If |
Invisibly, the number of cached files selected for removal. Returns
0 if the cache is empty or interactive confirmation is declined.
Other cache functions:
gtropic_cache_dir(),
gtropic_cache_enable(),
gtropic_cache_list(),
gtropic_cache_prune()
gtropic_cache_enable() gtropic_cache_clear(confirm = FALSE)gtropic_cache_enable() gtropic_cache_clear(confirm = FALSE)
Returns the directory used to store downloaded G-TROPIC source files. Reusing these files can reduce data transfer and retrieval time for repeated or overlapping analyses.
gtropic_cache_dir()gtropic_cache_dir()
Unless changed through options(gtropic.cache_dir = ...) or
gtropic_cache_enable(), the path is
tools::R_user_dir("gtropic", "cache"). Calling this function reports the
path but does not create it.
A character scalar containing the cache directory path.
Other cache functions:
gtropic_cache_clear(),
gtropic_cache_enable(),
gtropic_cache_list(),
gtropic_cache_prune()
gtropic_cache_dir()gtropic_cache_dir()
gtropic_cache_enable() enables storage of downloaded G-TROPIC source files
for reuse. gtropic_cache_disable() stops using the cache for subsequent
retrievals but leaves existing files unchanged.
gtropic_cache_enable(dir = NULL, persist = FALSE) gtropic_cache_disable(persist = FALSE)gtropic_cache_enable(dir = NULL, persist = FALSE) gtropic_cache_disable(persist = FALSE)
dir |
Optional path for the cache. If |
persist |
Logical. Should this enabled or disabled state be used in
future R sessions? Defaults to |
Caching is enabled by default for each R session. These functions change the
gtropic.cache_enabled option for the current session. Set persist = TRUE
to use the same choice in future sessions; this writes the setting under
tools::R_user_dir("gtropic", "config"). The package never edits
.Rprofile. Enabling creates the cache directory if needed; disabling does
not delete cached files. Use gtropic_cache_clear() to delete them.
The first time in a session that a file is cached, a message says where.
The cache is managed automatically: after each retrieval that adds to it,
files downloaded more than getOption("gtropic.cache_max_age_days") (180)
days ago, files superseded by a newer dataset version retrieved with
version = ":latest", and then the least recently downloaded files beyond
getOption("gtropic.cache_max_gb") (10) gigabytes are removed. Files used
by that retrieval are never removed. Set either option to Inf to switch
its rule off; see gtropic_options.
Invisibly, a character scalar containing the cache directory path.
Other cache functions:
gtropic_cache_clear(),
gtropic_cache_dir(),
gtropic_cache_list(),
gtropic_cache_prune()
# Stop caching for the rest of this session, then start again gtropic_cache_disable() gtropic_cache_enable() ## Not run: # Not run: persist = TRUE writes the choice to your configuration directory gtropic_cache_disable(persist = TRUE) ## End(Not run)# Stop caching for the rest of this session, then start again gtropic_cache_disable() gtropic_cache_enable() ## Not run: # Not run: persist = TRUE writes the choice to your configuration directory gtropic_cache_disable(persist = TRUE) ## End(Not run)
gtropic_cache_list() reports the dataset file references recorded in the
cache index. gtropic_cache_size() reports the physical disk space occupied
by cached file content.
Cached content is identified by checksum and may be shared by more than one dataset version. Consequently, multiple index entries can refer to one file on disk.
gtropic_cache_list() gtropic_cache_size()gtropic_cache_list() gtropic_cache_size()
gtropic_cache_list() returns a tibble with one row per indexed
dataset file reference and columns server, doi, version,
directory_label, label, checksum, size_bytes, and fetched_at (the
original download time, retained when a cached file is reused).
gtropic_cache_size() returns a numeric scalar giving the physical cache
size in bytes, or 0 when the cache is empty.
Other cache functions:
gtropic_cache_clear(),
gtropic_cache_dir(),
gtropic_cache_enable(),
gtropic_cache_prune()
gtropic_cache_list() gtropic_cache_size()gtropic_cache_list() gtropic_cache_size()
Removes cache entries according to their original retrieval time. Entries older than the specified age are removed, and the oldest remaining entries are removed as needed to satisfy the size limit. When both criteria are supplied, an entry is removed if required by either criterion. With no arguments, nothing is removed.
If identical file content is referenced by multiple dataset versions, the physical file is retained until no remaining cache entry references it.
The cache is also pruned automatically after retrievals; see
gtropic_cache_enable() and gtropic_options.
gtropic_cache_prune(max_size_gb = NULL, older_than_days = NULL)gtropic_cache_prune(max_size_gb = NULL, older_than_days = NULL)
max_size_gb |
Optional maximum indexed cache size in gigabytes. The oldest entries are removed until the indexed size is at or below this value. |
older_than_days |
Optional age threshold in days. Entries fetched before the resulting cutoff are removed. |
Invisibly, a tibble containing the removed cache-index entries. An empty tibble is returned when no entries are removed.
Other cache functions:
gtropic_cache_clear(),
gtropic_cache_dir(),
gtropic_cache_enable(),
gtropic_cache_list()
gtropic_cache_enable() gtropic_cache_prune(max_size_gb = 5, older_than_days = 90)gtropic_cache_enable() gtropic_cache_prune(max_size_gb = 5, older_than_days = 90)
Downloads the published G-TROPIC codebook. The codebook describes the tables, variables, measurement units, and data provenance needed to interpret wind, precipitation, flood, population, and storm metadata in an exposure analysis.
gtropic_codebook(version = ":latest", cache = NULL)gtropic_codebook(version = ":latest", cache = NULL)
version |
Dataset version specification. Use |
cache |
Whether downloaded source files may be cached. |
A nested list preserving the structure of the published JSON codebook.
Other discovery functions:
gtropic_adm2(),
gtropic_excluded_storms(),
gtropic_metrics(),
gtropic_storms(),
gtropic_years()
codebook <- gtropic_codebook() names(codebook)codebook <- gtropic_codebook() names(codebook)
Errors and warnings that a script may want to handle carry classes, so they
can be caught with tryCatch() or withCallingHandlers() by class rather
than by matching message text.
Each inherits from gtropic_error (and then rlang_error):
gtropic_error_network: a request to the Dataverse server failed, for
example because there is no network connection, the DOI or version does
not exist, or the server is down.
gtropic_error_checksum: a downloaded file does not match the checksum
published for it.
gtropic_error_no_match: a filter value matches nothing in the published
metadata, or the filters together select no storm or ADM2 unit.
gtropic_error_download_size: a query is larger than
getOption("gtropic.confirm_threshold_gb") and was not confirmed, or a
download was stopped because the server sent more than the file's listed
size (plus 1 MB or 1 %, whichever is more), or more than 8 GB for a file
listed without a size.
gtropic_error_manifest: a manifest failed validation before replay.
Other errors, such as an invalid argument value, are ordinary rlang
errors.
Each inherits from gtropic_warning:
gtropic_warning_availability: the requested period reaches recent data
that may still lag or change.
gtropic_warning_polygon: ADM2 units moved in or out of a polygon
filter across the years evaluated.
gtropic_warning_precip_all_missing: some ADM2 units have no
non-missing precipitation values (see gtropic_known_limitations).
gtropic_warning_flood_reports: the result contains flood rows, which
record places named in news reports about flooding (see
gtropic_known_limitations). Shown once per session.
gtropic_warning_ambiguous_storm_name and
gtropic_warning_ambiguous_excluded_storm_name: a STORM_NAME matches
more than one STORM_ID.
This topic documents condition classes; it has no return value.
gtropic_data(), gtropic_diagnostics()
# A manifest from elsewhere that fails validation: bad <- gtropic_manifest(gtropic_example()) bad$files$label[1] <- "../outside.parquet" tryCatch( gtropic_data(manifest = bad), gtropic_error_manifest = function(e) "rejected the manifest" )# A manifest from elsewhere that fails validation: bad <- gtropic_manifest(gtropic_example()) bad$files$label[1] <- "../outside.parquet" tryCatch( gtropic_data(manifest = bad), gtropic_error_manifest = function(e) "rejected the manifest" )
Retrieves and filters published G-TROPIC data for assessing tropical cyclone exposures at the second-level administrative unit (ADM2). Available data include wind exposure, daily precipitation, flood events, population, administrative-unit characteristics, storm tracks, and storm metadata.
The function subsets published values; it does not recalculate hazard or exposure measures. This preserves the definitions and provenance of the source data for environmental health and epidemiologic analyses.
gtropic_data( ADM2_ID = NULL, ADM2_NAME = NULL, ADM2_GROUP = NULL, WHO_ENTITY = NULL, WHO_REGION = NULL, polygon = NULL, reproject = TRUE, date_range = NULL, date_list = NULL, date_format = NULL, STORM_ID = NULL, STORM_NAME = NULL, USA_ATCF_ID = NULL, wind_radius_km = 500, tables = c("wind", "precip", "flood", "pop", "adm2", "codebook", "zero_pairs", "tracks", "geometry", "storm_metadata"), precip_days_before = 2, precip_days_after = 1, precip_radius_km = 500, flood_days_before = 2, flood_days_after = 1, flood_radius_km = 500, flood_match = c("start", "overlap"), geometry_resolution = c("simplified", "full"), make_valid = TRUE, version = ":latest", manifest = NULL, cache = NULL, confirm = TRUE, quiet = getOption("gtropic.quiet", FALSE), offline = FALSE )gtropic_data( ADM2_ID = NULL, ADM2_NAME = NULL, ADM2_GROUP = NULL, WHO_ENTITY = NULL, WHO_REGION = NULL, polygon = NULL, reproject = TRUE, date_range = NULL, date_list = NULL, date_format = NULL, STORM_ID = NULL, STORM_NAME = NULL, USA_ATCF_ID = NULL, wind_radius_km = 500, tables = c("wind", "precip", "flood", "pop", "adm2", "codebook", "zero_pairs", "tracks", "geometry", "storm_metadata"), precip_days_before = 2, precip_days_after = 1, precip_radius_km = 500, flood_days_before = 2, flood_days_after = 1, flood_radius_km = 500, flood_match = c("start", "overlap"), geometry_resolution = c("simplified", "full"), make_valid = TRUE, version = ":latest", manifest = NULL, cache = NULL, confirm = TRUE, quiet = getOption("gtropic.quiet", FALSE), offline = FALSE )
ADM2_ID |
Optional character vector of published ADM2 identifiers. Matching is exact and case-sensitive. |
ADM2_NAME |
Optional character vector of ADM2 names, matched case-insensitively. |
ADM2_GROUP |
Optional character vector of published ADM2 groupings, typically country or territory codes, matched case-insensitively. |
WHO_ENTITY |
Optional character vector of WHO entity names, matched case-insensitively. |
WHO_REGION |
Optional character vector of WHO region names or codes, matched case-insensitively. |
polygon |
Optional |
reproject |
Logical. If |
date_range |
Optional vector of one or two endpoints defining an
inclusive period of storm genesis dates. A single value is used for both
endpoints. Cannot be combined with |
date_list |
Optional vector of complete genesis dates to match exactly.
Cannot be combined with |
date_format |
Optional character scalar specifying the order of
non-ISO dates, such as |
STORM_ID |
Optional character vector of published G-TROPIC storm identifiers. Each value uniquely identifies one storm. Matching is exact and case-sensitive; this is the preferred storm key. |
STORM_NAME |
Optional character vector of published convenience labels
in |
USA_ATCF_ID |
Optional character vector of US Automated Tropical Cyclone Forecasting System identifiers. Matching is exact and case-sensitive. |
wind_radius_km |
Maximum published storm-track distance (km) for
returned wind records; default 500. Records at exactly this distance are
kept. |
tables |
Tables to return; default all of |
precip_days_before, precip_days_after
|
Days (whole numbers, 0 or more) before and after the local date of closest approach in each precipitation window; defaults 2 and 1. |
precip_radius_km |
Maximum published storm-track distance (km) for a
pair to be linked to precipitation; default 500. |
flood_days_before, flood_days_after
|
Days (whole numbers, 0 or more) before and after the local date of closest approach in each flood window; defaults 2 and 1. |
flood_radius_km |
Maximum published storm-track distance (km) for a
pair to be linked to floods; default 500. |
flood_match |
How floods are matched to windows: |
geometry_resolution |
Resolution of boundaries returned when
|
make_valid |
Logical; default |
version |
Dataset version specification. Use |
manifest |
Optional |
cache |
Whether downloaded source files may be cached. |
confirm |
Logical; default |
quiet |
Logical. If |
offline |
Logical; default |
Several values in one filter are combined with OR; different filters are
combined with AND. WHO_ENTITY = c("United States", "Mexico") selects units
in either country, whereas ADM2_NAME = "San Jose", ADM2_GROUP = "CRI"
requires both. A polygon is combined with the other geographic filters
the same way. Identifiers (ADM2_ID, STORM_ID, USA_ATCF_ID) match
exactly; names and classifications match case-insensitively after
whitespace is normalised. Every value must match a published value, and the
filters together must select something: gtropic_adm2(), gtropic_storms()
and gtropic_excluded_storms() list the valid and excluded values.
The filter arguments are written in capitals because each is named after the published column it filters, as that column appears in the returned tables and the codebook.
Each flood row pairs one place named in a news report about flooding
(from Groundsource) with one ADM2 unit. Three published columns are renamed
to say what they measure, so they differ from the files on Harvard
Dataverse and from the codebook:
PROP_AREA_IN_FLOOD_REPORT (published as PROP_FLOODED_AREA): the share
of the unit's area inside the reported place.
PROP_POP_IN_FLOOD_REPORT (published as PROP_FLOODED_POP): the share of
the unit's population inside the reported place.
POP_CENTROID_IN_FLOOD_REPORT (published as FLOODED_POP_CENTROID):
whether the unit's population-weighted centroid lies inside the reported
place.
These are not flooded area or population: see gtropic_known_limitations.
date_range and date_list select storms by STORM_GENESIS_DATE_UTC, the
UTC date of the first best-track observation, not by landfall or by the date
of local exposure (see vignette("filtering", package = "gtropic")). The
endpoints of date_range are read as follows:
| Input | Start endpoint | End endpoint |
"2001" or 2001 |
2001-01-01 |
2001-12-31 |
"2001-03" |
2001-03-01 |
2001-03-31 |
"2001-03-04" |
unchanged | unchanged |
Date or POSIXct |
calendar date | calendar date |
Values in date_list must be complete dates. Non-ISO dates are read in one
order for all values; when more than one order fits, ymd is preferred,
then mdy, then dmy, with a warning. date_format fixes the order.
wind_radius_km = 500 keeps wind records for pairs whose published
STORM_DIST_KM is at most 500 km.
Precipitation and flood records are kept for pairs within
precip_radius_km and flood_radius_km (500 km each), in windows from 2
days before to 1 day after the local date of closest approach. links
keeps every pair inside the largest requested radius, so it can hold pairs
beyond the wind radius. Each precipitation or flood record appears once,
even when it falls in several storms' windows: join it to links to
assign it to storms (see vignette("linkage", package = "gtropic")).
A download estimated above getOption("gtropic.confirm_threshold_gb")
(1 GB) needs confirmation; in a non-interactive session it is an error
unless confirm = FALSE.
Each result carries a manifest of the dataset versions, files and checksums
it used. Passing it back as manifest retrieves the same source files and
replays the resolved query, including the resolved ADM2 and storm
identifiers (see vignette("versions-and-caching", package = "gtropic")).
An object of class gtropic_data, implemented as a named list. It
contains the requested data tables and a links tibble with one row per
ADM2-storm pair retained by the union of requested hazard radii (or all
available selected pairs when that union is unbounded). links includes
ADM2_ID, STORM_ID, the published local date and distance at closest
approach, logical WIND_EXPOSURE (TRUE for nonzero wind exposure),
WIND_IN_FIELD, PRECIP_IN_FIELD and FLOOD_IN_FIELD, and the start and
end of each precipitation and flood window. With a finite requested hazard
radius, tracks contains only storms with at least one qualifying link.
pop has a YEAR column taken from each yearly source file name.
Tabular elements are tibbles, codebook is a nested list, and geometry
is an sf object. Date-only columns (genesis, local and closest-approach
dates, flood start and end, window bounds) are Date vectors; datetimes
with a local UTC offset stay ISO 8601 text, as published.
The object also stores the source-file manifest, original query, resolved
filters, recorded diagnostics, availability metadata, retrieval time and
package version as attributes. Use gtropic_manifest(),
gtropic_filters(), gtropic_diagnostics() and gtropic_availability()
to read them.
gtropic_storms() and gtropic_adm2() to look up filter values,
gtropic_plot() to map the result, gtropic_options for settings.
Other retrieval functions:
gtropic_example(),
gtropic_manifest(),
gtropic_manifest_write()
# A small synthetic result, with the same structure as a real one x <- gtropic_example() x names(x) # The queries below download data from Harvard Dataverse. # All available tables for storms with genesis dates in calendar year 2005 # that were evaluated in Jamaica jamaica <- gtropic_data(WHO_ENTITY = "Jamaica", date_range = 2005) jamaica # Find a storm by its convenience label, then query by its unique STORM_ID gtropic_storms(STORM_NAME = "Haiyan-2013") haiyan <- gtropic_data( STORM_ID = "2013306N07162", date_range = 2013, tables = c("wind", "adm2") ) # Define a seven-day rainfall window and a 300-km storm field for an # epidemiologic study in the Philippines philippines <- gtropic_data( WHO_ENTITY = "Philippines", date_range = c("2015-06-01", "2015-12-31"), precip_days_before = 3, precip_days_after = 3, precip_radius_km = 300, tables = c("precip", "pop", "adm2") ) # Retain source-file provenance for a subsequent retrieval source_manifest <- gtropic_manifest(philippines) philippines_retrieved_again <- gtropic_data(manifest = source_manifest)# A small synthetic result, with the same structure as a real one x <- gtropic_example() x names(x) # The queries below download data from Harvard Dataverse. # All available tables for storms with genesis dates in calendar year 2005 # that were evaluated in Jamaica jamaica <- gtropic_data(WHO_ENTITY = "Jamaica", date_range = 2005) jamaica # Find a storm by its convenience label, then query by its unique STORM_ID gtropic_storms(STORM_NAME = "Haiyan-2013") haiyan <- gtropic_data( STORM_ID = "2013306N07162", date_range = 2013, tables = c("wind", "adm2") ) # Define a seven-day rainfall window and a 300-km storm field for an # epidemiologic study in the Philippines philippines <- gtropic_data( WHO_ENTITY = "Philippines", date_range = c("2015-06-01", "2015-12-31"), precip_days_before = 3, precip_days_after = 3, precip_radius_km = 300, tables = c("precip", "pop", "adm2") ) # Retain source-file provenance for a subsequent retrieval source_manifest <- gtropic_manifest(philippines) philippines_retrieved_again <- gtropic_data(manifest = source_manifest)
Returns a small synthetic gtropic_data() result for examples, tests and
trying out the plotting and accessor functions without a network
connection. All values are invented: six square administrative units in two
made-up places ("Example Coast" and "Example Pacific", one straddling the
antimeridian), three storms in August 2020, and a manifest that points at
the non-existent server example.invalid and the placeholder DOI
doi:10.0000/EXAMPLE. Do not use it for analysis.
gtropic_example()gtropic_example()
A gtropic_data object with the tables wind, precip, flood,
zero_pairs, tracks, storm_metadata, adm2, geometry, codebook
and links. geometry is an sf table when the sf package is
installed and is left out otherwise.
Other retrieval functions:
gtropic_data(),
gtropic_manifest(),
gtropic_manifest_write()
x <- gtropic_example() x names(x) x$windx <- gtropic_example() x names(x) x$wind
Retrieves records for storms excluded from the published wind data. These
records identify storms that cannot be retrieved with gtropic_data().
Published STORM_NAME convenience labels can duplicate; the unique
STORM_ID values in the returned rows distinguish excluded records.
Date filters are applied to STORM_GENESIS_DATE_UTC, the UTC date of the
first best-track observation. They do not select storms by landfall, closest
approach, or date of exposure.
gtropic_excluded_storms( date_range = NULL, STORM_NAME = NULL, version = ":latest", cache = NULL )gtropic_excluded_storms( date_range = NULL, STORM_NAME = NULL, version = ":latest", cache = NULL )
date_range |
Optional vector of one or two endpoints defining an
inclusive range of storm genesis dates; a single value is used for both
endpoints, so |
STORM_NAME |
Optional character vector of published convenience labels
in |
version |
Dataset version specification. Use |
cache |
Whether downloaded source files may be cached. |
A tibble with STORM_ID, STORM_NAME, and
STORM_GENESIS_DATE_UTC for published excluded storms satisfying the
requested genesis period and name filters. If no exclusion files are
available for the selected years, a warning is issued and an empty tibble is
returned. STORM_GENESIS_DATE_UTC is returned as a Date.
Other discovery functions:
gtropic_adm2(),
gtropic_codebook(),
gtropic_metrics(),
gtropic_storms(),
gtropic_years()
# Review exclusion records for storms that formed during calendar year 2005 gtropic_excluded_storms(date_range = 2005)# Review exclusion records for storms that formed during calendar year 2005 gtropic_excluded_storms(date_range = 2005)
Documents limitations in the published G-TROPIC source data that can affect retrievals and maps: precipitation gaps for small or coastal units, and flood data that record places named in news reports rather than mapped flood extent.
Some small or coastal ADM2 units in the current precipitation data have no non-missing values. This can occur when no ERA5-Land precipitation grid cell is assigned to the unit. A future G-TROPIC dataset release is planned to fill these gaps using finer-resolution ERA5 precipitation data.
gtropic_data() warns when a precipitation query includes an ADM2 unit with
no non-missing precipitation values in the returned period. The complete
vector of identifiers is retained in
gtropic_diagnostics(x)$precip_all_missing_adm2_ids. Automatic precipitation
captions from gtropic_plot() include a shorter note for affected mapped
units.
The diagnostic is based on the values actually returned, rather than a fixed list of identifiers. It will therefore stop appearing when corrected source data provide precipitation for those units. Other temporary source-data gaps can also produce the same diagnostic.
G-TROPIC's flood data come from Groundsource (Mayo et al. 2026), a dataset of flood events extracted from news articles. An AI model reads each article, picks out the place and date of the flooding, and looks up that place's boundary on Google Maps. The place can be a street, a neighbourhood, a town, a county or a whole province. Each flood polygon is therefore the outline of a place named in a news report about flooding, not a map of where the water was, and one flood appears once for every place its coverage names.
G-TROPIC overlays each polygon on each ADM2 unit and publishes one row per polygon and unit. gtropic returns three of its columns under names that say what they measure; the files on Harvard Dataverse and the codebook keep the published names:
PROP_AREA_IN_FLOOD_REPORT (published as PROP_FLOODED_AREA): the share
of the unit's area inside the reported place.
PROP_POP_IN_FLOOD_REPORT (published as PROP_FLOODED_POP): the share of
the unit's population inside the reported place.
POP_CENTROID_IN_FLOOD_REPORT (published as FLOODED_POP_CENTROID):
whether the unit's population-weighted centroid lies inside the reported
place.
These values mostly reflect how precisely a report named a place, not how much of a unit flooded:
A report naming a whole county gives that county a share near 1, even when the flooding it describes was local.
A place reported neighbourhood by neighbourhood gives many small shares.
Summarising a unit by its largest share ignores all its other reports.
An outline that crosses a border gives a small share to a neighbouring unit where nothing was reported.
For Hurricane Harvey (2017), the largest share is 99% for Bexar County (San Antonio) but 19% for Harris County (Houston), the centre of the catastrophic flooding. The same applies to the population measures.
As noted by Groundsource, flood data is also both spatially and temporally biased: flood events in regions and time periods with more accurate reporting are over-represented, while those lacking in news coverage are under-represented. The record covers 2000-01-01 to 2026-01-22. Care should be taken when interpreting and utilizing G-TROPIC flood exposure metrics, especially when comparing places, countries or years.
What the rows support most directly is whether a flood was reported in a
unit during a storm's flood window. The default exposure map of
gtropic_plot() shows this as "Flood reported" or "No flood reported"
(see its Details); an outline crossing a border can still mark a
neighbouring unit. Future G-TROPIC releases are planned to resolve this
with a new flood exposure metric.
gtropic_data() warns once per session when it returns flood rows (class
gtropic_warning_flood_reports, see gtropic_conditions), and every such
result keeps the note in gtropic_diagnostics(x)$flood_reports. Maps with
a flood panel carry a short version of it in their automatic caption.
Mayo, R., Zlydenko, O., Bootbool, M., Fronman, S., Gilon, O., Hassidim, A., Kratzert, F., Loike, G., Matias, Y., Nakar, Y., Nearing, G., Sayag, R., Sicherman, A., Zemach, I. and Cohen, D. (2026). Groundsource: A Dataset of Flood Events from News. EarthArXiv preprint. doi:10.31223/X5RR2K
gtropic_data(), gtropic_plot(), gtropic_diagnostics()
These accessor functions retrieve provenance, resolved query settings, and
recorded diagnostic information from an object returned by gtropic_data().
gtropic_manifest() identifies the source datasets and files used in the
retrieval, including their versions and checksums. Supplying the manifest to
a later gtropic_data() call requests those same source files, provided they
remain available.
Every file is checked against its published checksum when it is downloaded
and again before a cached copy is used; the manifest records each checksum
and its algorithm (checksum_type). The checksums are published by the same
server as the files, and are usually MD5, so they detect truncated or
corrupted transfers and silent changes to a published file, but they do not
prove who published it.
To keep or share a manifest, save it as JSON with
gtropic_manifest_write(). A manifest saved with saveRDS() works too, but
readRDS() can run code hidden in the file, so only read .rds files from
people you trust.
gtropic_filters() reports the filters as resolved by the package, including
selected ADM2 and storm identifiers, genesis-date bounds, years represented
by the selected storms, the wind radius, and precipitation and flood window
settings. These values support transparent reporting and quality assurance in
downstream analyses. Resolved storm identifiers are unique STORM_ID values,
the preferred keys for reproducible joins and grouping.
gtropic_diagnostics() returns diagnostic details retained with the result.
This can include complete values that were abbreviated in a console warning,
such as ADM2 units whose polygon membership varied over time. It is not a log
of every warning that may have been emitted during retrieval.
gtropic_availability() returns structured source update schedules, known
coverage, and the requested time range used for availability diagnostics.
gtropic_manifest(x) gtropic_filters(x) gtropic_diagnostics(x) gtropic_availability(x)gtropic_manifest(x) gtropic_filters(x) gtropic_diagnostics(x) gtropic_availability(x)
x |
A |
gtropic_manifest() returns an object of class gtropic_manifest.
gtropic_filters() returns a named gtropic_filters list of resolved
query settings. List elements retain their complete values; printing shows
a compact preview.
gtropic_diagnostics() returns a named list of recorded diagnostics,
which is empty when none were retained. gtropic_availability() returns a
named list of source availability and coverage metadata.
Other retrieval functions:
gtropic_data(),
gtropic_example(),
gtropic_manifest_write()
x <- gtropic_example() gtropic_manifest(x) gtropic_filters(x) gtropic_diagnostics(x) names(gtropic_availability(x))x <- gtropic_example() gtropic_manifest(x) gtropic_filters(x) gtropic_diagnostics(x) names(gtropic_availability(x))
gtropic_manifest_write() saves the manifest of a result as a JSON file;
gtropic_manifest_read() reads one back as a gtropic_manifest that can be
passed to gtropic_data(manifest = ).
A JSON manifest is plain text. It is the safe way to share a manifest:
reading an .rds file with readRDS() can run code placed in it by whoever
made it, but reading JSON cannot. It is also readable, and easy to keep in
version control next to an analysis. gtropic_manifest_read() checks every
field, and then applies the same validation as a replay, so a file that is
not a manifest made by gtropic is rejected with an error of class
gtropic_error_manifest (see gtropic_conditions).
gtropic_manifest_write(x, path) gtropic_manifest_read(path)gtropic_manifest_write(x, path) gtropic_manifest_read(path)
x |
A |
path |
Path of the JSON file. |
gtropic_manifest_write() returns path, invisibly.
gtropic_manifest_read() returns a gtropic_manifest.
Other retrieval functions:
gtropic_data(),
gtropic_example(),
gtropic_manifest()
path <- tempfile(fileext = ".json") gtropic_manifest_write(gtropic_example(), path) manifest <- gtropic_manifest_read(path) manifest unlink(path)path <- tempfile(fileext = ".json") gtropic_manifest_write(gtropic_example(), path) manifest <- gtropic_manifest_read(path) manifest unlink(path)
Summarizes the published wind, precipitation, and flooding exposure metrics available in G-TROPIC. The returned aggregation is the default used when a metric is summarized across its published records; it does not recompute a published exposure value.
gtropic_metrics()gtropic_metrics()
plot_supported identifies metrics currently supported by gtropic_plot().
POP_CENTROID_IN_FLOOD_REPORT is included because it documents a published
flood exposure, although it is not currently available for plotting.
The flood metrics describe places named in news reports about flooding, not mapped flood extent, and gtropic returns them under names that differ from the published ones; see gtropic_known_limitations.
A named list with wind, precip, and flood components. Each
component is a tibble with columns metric, label, unit, aggregate,
and plot_supported.
Other discovery functions:
gtropic_adm2(),
gtropic_codebook(),
gtropic_excluded_storms(),
gtropic_storms(),
gtropic_years()
metrics <- gtropic_metrics() metrics$floodmetrics <- gtropic_metrics() metrics$flood
gtropic is configured entirely through options(). Setting these is how
you point the package at a different Dataverse installation, or change how
it caches and confirms downloads, without needing a package update.
| Option | Default | Meaning |
gtropic.server |
"dataverse.harvard.edu" |
Dataverse host name (requests always use HTTPS), optionally with a port. |
gtropic.doi_historical |
"doi:10.7910/DVN/EAVWC3" |
DOI of the historical dataset. |
gtropic.doi_current |
"doi:10.7910/DVN/FZBAKO" |
DOI of the current-year dataset. Used only as a fallback if automatic discovery fails. |
gtropic.collection |
"gtropic" |
Dataverse collection (alias) searched during discovery. |
gtropic.cache_enabled |
TRUE |
Whether downloaded files are kept on disk. |
gtropic.cache_dir |
tools::R_user_dir("gtropic", "cache") |
Where cached files live. |
gtropic.cache_max_age_days |
180 |
Cached files downloaded more than this many days ago are removed automatically after a retrieval that adds to the cache. Inf keeps them. |
gtropic.cache_max_gb |
10 |
Size cap, in gigabytes, for the cache: after a retrieval that adds to it, the least recently downloaded files are removed until it fits. Inf disables the cap. |
gtropic.confirm_threshold_gb |
1 |
Download size, in gigabytes, above which you are asked to confirm. |
gtropic.timeout |
600 |
Seconds to wait for the server. A metadata request that takes longer is abandoned (and retried, see gtropic.max_tries), and so is a download that receives no data for this long; a download that keeps receiving data may take longer. Inf waits indefinitely. |
gtropic.max_tries |
3 |
Maximum attempts per request. Only transient failures are retried: a lost or refused connection, a timeout, and HTTP 408, 429 and 5xx responses. |
gtropic.quiet |
FALSE |
Session-wide default for quiet: TRUE suppresses progress and informational messages from every call. |
gtropic.discovery_ttl |
600 |
Seconds for which a session reuses what it learned about the collection's ":latest" datasets before asking the server again. A new weekly release is therefore seen within this time. 0 asks on every call; a pinned version is looked up once per session.
|
Each option is checked when it is read, and an invalid value is an error that names the option.
A "cache" here means a folder of previously downloaded files on your own
computer. It is enabled by default and uses a standard per-user location
chosen by R. Use gtropic_cache_disable() or cache = FALSE on a retrieval
to bypass it. See gtropic_cache_enable() to persist an enabled or disabled
choice across R sessions; a persisted choice replaces the default of
gtropic.cache_enabled when the package is loaded.
These are options, not a function; nothing is returned. This topic exists for documentation only.
# Inspect a setting getOption("gtropic.server") # Change one for a while, then restore it old <- options(gtropic.confirm_threshold_gb = 2) getOption("gtropic.confirm_threshold_gb") options(old)# Inspect a setting getOption("gtropic.server") # Change one for a while, then restore it old <- options(gtropic.confirm_threshold_gb = 2) getOption("gtropic.confirm_threshold_gb") options(old)
Creates exposure maps, exposure-day or exposure-storm count maps, and
storm-track maps from data retrieved by gtropic_data(). This function never
retrieves data itself, nor does it recalculate published exposure values,
storm distances, or metadata.
gtropic_plot( data, type = c("exposure", "count", "track"), metric = NULL, storm = NULL, adm2 = NULL, aggregate = NULL, threshold = NULL, binary = FALSE, wind_categories = NULL, count_unit = c("storms", "days"), facet_by = NULL, track = NULL, track_map_key = gtropic_saffir_simpson(), track_labels = TRUE, track_interval = 6, track_legend_position = NULL, basemap = c("countries", "admin1", "none"), bbox = NULL, expand = 2, crs = NULL, interactive = FALSE, palette = NULL, direction = NULL, gridlines = TRUE, make_valid = TRUE, title = NULL, subtitle = NULL, caption = NULL, quiet = getOption("gtropic.quiet", FALSE), ... )gtropic_plot( data, type = c("exposure", "count", "track"), metric = NULL, storm = NULL, adm2 = NULL, aggregate = NULL, threshold = NULL, binary = FALSE, wind_categories = NULL, count_unit = c("storms", "days"), facet_by = NULL, track = NULL, track_map_key = gtropic_saffir_simpson(), track_labels = TRUE, track_interval = 6, track_legend_position = NULL, basemap = c("countries", "admin1", "none"), bbox = NULL, expand = 2, crs = NULL, interactive = FALSE, palette = NULL, direction = NULL, gridlines = TRUE, make_valid = TRUE, title = NULL, subtitle = NULL, caption = NULL, quiet = getOption("gtropic.quiet", FALSE), ... )
data |
A |
type |
The output type. One of |
metric |
A supported published metric name, or a character vector of metric
names to plot. The |
storm |
Optional character vector of |
adm2 |
Optional character vector of |
aggregate |
Summary method for exposure maps: one of |
threshold |
A named list of finite numeric thresholds, with names matching
selected |
binary |
Logical; default |
wind_categories |
Optional key that classifies aggregated wind values
into categories instead of a continuous scale: a data frame with
|
count_unit |
The unit counted when |
facet_by |
An optional single column name in the assembled plotting data to
use for facets. |
track |
Whether to overlay tracks on exposure/count maps. |
track_map_key |
A data frame defining the discrete color scale used when
plotting track points. Defaults to the data frame returned by
|
track_labels |
Logical; if |
track_interval |
Hours (UTC) between displayed track intensity points:
|
track_legend_position |
Position of per-panel metric scale strips on static
exposure/count maps. |
basemap |
Natural Earth background layer: |
bbox |
Map extent as an sf/sfc object, an sf bbox with a known CRS, or
four geographic bounds in |
expand |
Padding (degrees, 0 or more) added to each side of the map extent; default 2. Latitude limits stay within -90 to 90. |
crs |
A coordinate reference system understood by |
interactive |
Logical; if |
palette |
Viridis palette name or letter, or a vector of them. |
direction |
Palette direction: 1 (the default) or -1. It accepts the same
scalar, positional, and named forms as |
gridlines |
Logical; if |
make_valid |
Logical. If |
title, subtitle, caption
|
Plot labels. Each defaults to |
quiet |
Logical; if |
... |
For static exposure and count maps, named arguments passed to
|
Maps use the actual date range of contributing observations after storm, ADM2,
and linkage filters. Automatic subtitles begin with "Aggregated across" and
show the displayed date range. Single-metric titles use readable aggregate
labels; multi-metric titles describe the panel set. A single plotted storm
prefixes the title, while multiple storms do not alter it. Metric strips use
readable aggregate and active-threshold labels. Automatic captions use
newline-separated source, retrieval, dataset-provenance, hazard-parameter,
known source-data limitation, track-interval, and plotting-CRS lines as
applicable. Hazard radii and windows are derived from rows that contributed
to the plot.
Flood rows record places named in news reports about flooding, not mapped flood extent (gtropic_known_limitations). A yes/no flood panel therefore shows "Flood reported" when at least one report's place covers a share of the unit above the threshold (default: more than 0) in a matched storm's flood window, and "No flood reported" when the unit was in a storm's flood field, its window lies inside the Groundsource record (2000-01-01 to 2026-01-22) and no report matched. Units whose windows fall outside the record have no flood data and are shown as missing.
Track paths are drawn from every supplied observation. By default, constant-
size points use gtropic_saffir_simpson() categories derived from
USA_WIND, which is published in knots and converted to the map key's unit
before classification.
An explicit metric = "USA_STATUS" retains the status-color display.
A ggplot for static output or a leaflet widget for interactive output.
What to plot: data, type, metric, storm, adm2, aggregate,
threshold, binary, wind_categories, count_unit, facet_by.
Tracks: track, track_map_key, track_labels, track_interval,
track_legend_position.
Map frame: basemap, bbox, expand, crs, interactive.
Appearance: palette, direction, gridlines, make_valid,
title, subtitle, caption, quiet, ....
Other plotting functions:
gtropic_basemap(),
gtropic_saffir_simpson(),
gtropic_save(),
plot.gtropic_data(),
scale_fill_gtropic_c(),
theme_gtropic()
x <- gtropic_example() # Exposure map of maximum sustained wind gtropic_plot(x, metric = "VMAX_SUST_MS", basemap = "none") # Track map gtropic_plot(x, type = "track", basemap = "none")x <- gtropic_example() # Exposure map of maximum sustained wind gtropic_plot(x, metric = "VMAX_SUST_MS", basemap = "none") # Track map gtropic_plot(x, type = "track", basemap = "none")
Provides the category thresholds and conventional display colors for the
Saffir-Simpson Hurricane Wind Scale. Thresholds are sustained wind speeds in
meters per second. Each threshold is the upper bound of its category, except
for "Cat5", which has no upper bound.
gtropic_saffir_simpson()gtropic_saffir_simpson()
A tibble with one row per category and columns category,
threshold, unit, and color. threshold is numeric and "Cat5" has
an infinite threshold.
Other plotting functions:
gtropic_basemap(),
gtropic_plot(),
gtropic_save(),
plot.gtropic_data(),
scale_fill_gtropic_c(),
theme_gtropic()
gtropic_saffir_simpson()gtropic_saffir_simpson()
Save a ggplot with ggplot2::ggsave() or an HTML widget, including a
Leaflet map, with htmlwidgets::saveWidget(). This helper writes files;
gtropic_plot() itself only returns plot objects.
gtropic_save( plot, filename, ..., dpi = 300, width = NULL, height = NULL, units = "in" )gtropic_save( plot, filename, ..., dpi = 300, width = NULL, height = NULL, units = "in" )
plot |
A ggplot or HTML widget, such as one returned by |
filename |
One nonempty output filename, optionally including a path.
For static plots the extension selects the device unless |
... |
Uniquely named arguments. For static plots, passed unchanged to
|
dpi |
Positive finite resolution in dots per inch. Defaults to 300. |
width, height
|
Positive finite output dimensions in |
units |
Dimension units: |
Interactive maps are saved as HTML widgets. By default, their JavaScript and
CSS dependencies are written to a sibling directory rather than embedded in
the HTML file (selfcontained = FALSE), which does not require Pandoc. Keep
that directory with the HTML file when moving or publishing the map. Set
selfcontained = TRUE to request a single-file widget when Pandoc is
available.
Map plots carry a geographic gtropic_bbox attribute in the order
c(xmin, ymin, xmax, ymax) (named bounds may be in any order), matching
sf::st_bbox(). The estimated
width-to-height ratio is longitude span times the cosine of mean latitude,
divided by latitude span. This is a geographic approximation, not a
measurement of the final projected panels, legends, or facets.
Without usable bounds, the ratio is 7:5. With neither dimension supplied, width defaults to 7 inches and height follows the ratio. With one dimension supplied, the other follows the ratio. Inferred dimensions are bounded to 3–10 inches to keep narrow, polar, or very wide extents usable. Supplying both dimensions overrides all automatic sizing. Defaults are converted to the requested units.
Invisibly, the output filename, combined with path when supplied.
The path is not normalized. Saver errors are propagated.
Other plotting functions:
gtropic_basemap(),
gtropic_plot(),
gtropic_saffir_simpson(),
plot.gtropic_data(),
scale_fill_gtropic_c(),
theme_gtropic()
p <- ggplot2::ggplot(mtcars, ggplot2::aes(wt, mpg)) + ggplot2::geom_point() output <- gtropic_save(p, tempfile(fileext = ".pdf"), width = 7, height = 5) unlink(output)p <- ggplot2::ggplot(mtcars, ggplot2::aes(wt, mpg)) + ggplot2::geom_point() output <- gtropic_save(p, tempfile(fileext = ".pdf"), width = 7, height = 5) unlink(output)
Retrieves metadata for tropical cyclones represented in G-TROPIC, including
storm identifiers, names, and genesis dates. This function can be used to
identify storms and confirm temporal coverage before retrieving exposure
data with gtropic_data().
Date filters are applied to STORM_GENESIS_DATE_UTC, the UTC date of the
first best-track observation. They do not select storms by landfall, closest
approach, or date of exposure.
When a requested STORM_NAME is not available, G-TROPIC checks the published
exclusion records and reports whether the storm is excluded or absent from
both lists.
STORM_NAME is a convenience lookup and can identify multiple storms. If a
name matches multiple unique STORM_IDs after all filters are applied, this
function returns every match and warns. Use gtropic_storms(STORM_NAME = ...)
to identify the intended STORM_ID, then query gtropic_data() with
STORM_ID, which is unique and preferred.
gtropic_storms( date_range = NULL, STORM_NAME = NULL, version = ":latest", cache = NULL )gtropic_storms( date_range = NULL, STORM_NAME = NULL, version = ":latest", cache = NULL )
date_range |
Optional vector of one or two endpoints defining an
inclusive range of storm genesis dates; a single value is used for both
endpoints, so |
STORM_NAME |
Optional character vector of published convenience labels
in |
version |
Dataset version specification. Use |
cache |
Whether downloaded source files may be cached. |
A tibble containing the published metadata records for storms that
satisfy the requested genesis period and name filters. If no metadata files
are available for the selected years, a warning is issued and an empty
tibble is returned. STORM_GENESIS_DATE_UTC is returned as a Date.
Other discovery functions:
gtropic_adm2(),
gtropic_codebook(),
gtropic_excluded_storms(),
gtropic_metrics(),
gtropic_years()
# Review storms that formed during calendar year 2005 gtropic_storms(date_range = 2005) # Retrieve the published identifiers and dates for Hurricane Katrina gtropic_storms(STORM_NAME = "Katrina-2005")# Review storms that formed during calendar year 2005 gtropic_storms(date_range = 2005) # Retrieve the published identifiers and dates for Hurricane Katrina gtropic_storms(STORM_NAME = "Katrina-2005")
Reports the genesis calendar years represented in the historical and
current-year G-TROPIC datasets. Storm-linked annual coverage is based on
STORM_GENESIS_DATE_UTC, not the season suffix in STORM_NAME. This
information can be used to define feasible study periods before retrieving
storm exposure data.
The historical collection contains completed genesis calendar years. When available, the separate current-year collection is updated as storms with genesis dates in the current calendar year are published, so coverage for that calendar year may be provisional.
gtropic_years(version = ":latest")gtropic_years(version = ":latest")
version |
Dataset version specification. Use |
A list of integer vectors with components historical, current,
and all. all is the sorted union of the two collections; current is
empty when no separate current-year dataset is available.
Other discovery functions:
gtropic_adm2(),
gtropic_codebook(),
gtropic_excluded_storms(),
gtropic_metrics(),
gtropic_storms()
coverage <- gtropic_years() range(coverage$all)coverage <- gtropic_years() range(coverage$all)
Thin S3 interface to gtropic_plot().
## S3 method for class 'gtropic_data' plot(x, type = "exposure", ...)## S3 method for class 'gtropic_data' plot(x, type = "exposure", ...)
x |
A |
type |
Plot type, defaulting to |
... |
Arguments passed to |
The plot object returned by gtropic_plot().
Other plotting functions:
gtropic_basemap(),
gtropic_plot(),
gtropic_saffir_simpson(),
gtropic_save(),
scale_fill_gtropic_c(),
theme_gtropic()
plot(gtropic_example(), metric = "VMAX_SUST_MS", basemap = "none")plot(gtropic_example(), metric = "VMAX_SUST_MS", basemap = "none")
Displays a concise overview of a G-TROPIC retrieval, including source dataset versions, resolved genesis period, numbers of storms and ADM2 units, and the dimensions of each returned table. Printing does not modify or materialize the result.
## S3 method for class 'gtropic_data' print(x, ...)## S3 method for class 'gtropic_data' print(x, ...)
x |
A |
... |
Additional arguments passed to the print method. Currently ignored. |
x, invisibly.
Other result methods:
format.gtropic_data(),
print.gtropic_filters(),
print.gtropic_manifest(),
summary.gtropic_data()
print(gtropic_example())print(gtropic_example())
Displays each resolved filter with a compact value preview. Long vectors,
such as selected ADM2 identifiers, show at most n values and state how many
values were omitted. The complete values remain available through ordinary
list access.
## S3 method for class 'gtropic_filters' print(x, n = 10L, ...)## S3 method for class 'gtropic_filters' print(x, n = 10L, ...)
x |
A |
n |
Maximum number of values to display for each filter. |
... |
Additional arguments passed to the print method. Currently ignored. |
x, invisibly.
Other result methods:
format.gtropic_data(),
print.gtropic_data(),
print.gtropic_manifest(),
summary.gtropic_data()
print(gtropic_filters(gtropic_example()), n = 3)print(gtropic_filters(gtropic_example()), n = 3)
Displays the dataset server, DOI and version information for datasets actually
used, file count and total size, retrieval time, and package version recorded for a G-TROPIC
retrieval. A manifest can be supplied to gtropic_data() to request the same
published source files in a subsequent analysis.
## S3 method for class 'gtropic_manifest' print(x, ...)## S3 method for class 'gtropic_manifest' print(x, ...)
x |
A |
... |
Additional arguments passed to the print method. Currently ignored. |
x, invisibly.
Other result methods:
format.gtropic_data(),
print.gtropic_data(),
print.gtropic_filters(),
summary.gtropic_data()
print(gtropic_manifest(gtropic_example()))print(gtropic_manifest(gtropic_example()))
Native ggplot2 viridis scales: inferno for wind, mako for precipitation, and viridis for flooding when a metric is supplied. Missing values are gray.
scale_fill_gtropic_c( ..., metric = NULL, palette = NULL, direction = 1, name = NULL, na.value = "grey90" ) scale_fill_gtropic_d( ..., metric = NULL, palette = NULL, direction = 1, name = NULL, na.value = "grey90" )scale_fill_gtropic_c( ..., metric = NULL, palette = NULL, direction = 1, name = NULL, na.value = "grey90" ) scale_fill_gtropic_d( ..., metric = NULL, palette = NULL, direction = 1, name = NULL, na.value = "grey90" )
... |
Additional arguments passed to the ggplot2 viridis fill scale. |
metric |
Optional published metric name, used for palette and title. |
palette |
Viridis palette name; NULL chooses a hazard-specific palette. |
direction |
Palette direction, either 1 or -1. |
name |
Legend title; NULL uses the metric label and unit when available. |
na.value |
Color for missing values. |
A continuous or discrete ggplot2 fill scale.
Other plotting functions:
gtropic_basemap(),
gtropic_plot(),
gtropic_saffir_simpson(),
gtropic_save(),
plot.gtropic_data(),
theme_gtropic()
scale_fill_gtropic_c(metric = "VMAX_SUST_MS") scale_fill_gtropic_d(name = "Exposed")scale_fill_gtropic_c(metric = "VMAX_SUST_MS") scale_fill_gtropic_d(name = "Exposed")
Builds an extended overview of a G-TROPIC retrieval; printing it shows dataset provenance, retrieval time and size, returned table dimensions, resolved geographic and storm filters, hazard-specific temporal and spatial windows, and any diagnostics retained with the result.
## S3 method for class 'gtropic_data' summary(object, ...) ## S3 method for class 'summary.gtropic_data' print(x, ...)## S3 method for class 'gtropic_data' summary(object, ...) ## S3 method for class 'summary.gtropic_data' print(x, ...)
object |
A |
... |
Additional arguments. Currently ignored. |
x |
A |
summary() returns an object of class summary.gtropic_data: a
list with the result's manifest, resolved filters, retained
diagnostics, retrieved_at time and the dimensions of each returned
table (tables, a named character vector). Its print() method displays
it and returns x invisibly.
Other result methods:
format.gtropic_data(),
print.gtropic_data(),
print.gtropic_filters(),
print.gtropic_manifest()
summary(gtropic_example())summary(gtropic_example())
A minimal theme with subdued grid lines, bold titles, and readable captions. Map builders remove axis titles and move multi-panel legends to the bottom.
theme_gtropic(base_size = 12)theme_gtropic(base_size = 12)
base_size |
Base text size in points. |
A ggplot2 theme that can be added to a plot.
Other plotting functions:
gtropic_basemap(),
gtropic_plot(),
gtropic_saffir_simpson(),
gtropic_save(),
plot.gtropic_data(),
scale_fill_gtropic_c()
theme_gtropic(base_size = 11)theme_gtropic(base_size = 11)