| Title: | Client for the eolas.fyi Statistical Data API |
|---|---|
| Description: | Provides convenient access to the eolas.fyi REST API (<https://api.eolas.fyi>), which serves 1,500+ official statistical and geospatial datasets from Stats NZ, OECD, RBNZ, LINZ, NZTA, and more. Source-specific functions (eolas_get_statsnz(), eolas_get_oecd(), etc.) return tidy data frames ready for analysis with ggplot2, dplyr, or your favourite tooling. |
| Authors: | Virtus Solutions [aut, cre] |
| Maintainer: | Virtus Solutions <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.3.18 |
| Built: | 2026-06-19 20:31:23 UTC |
| Source: | https://github.com/phildonovan/eolas-r |
eolas caches at two levels: session metadata (eolas_info() per dataset,
used for routing and attached column glosses) and on-disk bulk files
(Parquet/GeoParquet in the library directory, with .eolas-meta.json
sidecars). This function clears one or both without contacting the API.
eolas_cache_clear( name = NULL, cache_dir = NULL, format = NULL, files = TRUE, meta = TRUE, base_url = EOLAS_BASE_URL )eolas_cache_clear( name = NULL, cache_dir = NULL, format = NULL, files = TRUE, meta = TRUE, base_url = EOLAS_BASE_URL )
name |
Dataset identifier, e.g. |
cache_dir |
Library directory. |
format |
|
files |
When |
meta |
When |
base_url |
Override the API base URL for metadata cache keys. |
Use eolas_get() or eolas_get_local() with force = TRUE to clear caches
and immediately re-fetch in one step.
When name is set and format = NULL, removes on-disk files for all
bulk extensions (.parquet, .csv.gz, .geo.parquet) that exist for that
dataset. When name = NULL and files = TRUE, sweeps the entire library
directory for bulk data files and sidecars.
Invisibly a list with files (character vector of deleted paths)
and meta_cleared (integer count of session cache entries removed).
eolas_get(), eolas_sync_bulk(), eolas_get_local(), eolas_library_status()
## Not run: # Free disk space without re-downloading eolas_cache_clear("nz_parcels") # Metadata only (e.g. after a warehouse schema change) eolas_cache_clear("nz_cpi", files = FALSE) # Nuclear option -- wipe library files + all session metadata eolas_cache_clear(name = NULL) ## End(Not run)## Not run: # Free disk space without re-downloading eolas_cache_clear("nz_parcels") # Metadata only (e.g. after a warehouse schema change) eolas_cache_clear("nz_cpi", files = FALSE) # Nuclear option -- wipe library files + all session metadata eolas_cache_clear(name = NULL) ## End(Not run)
Looks up the human-readable gloss for a column name from the metadata attached at fetch time (built server-side from the Iceberg schema).
eolas_column_label(x, column)eolas_column_label(x, column)
x |
An |
column |
Column name, e.g. |
Character description, or NULL if unknown / not attached.
## Not run: df <- eolas_get("nz_cpi", limit = 10) eolas_column_label(df, "value") ## End(Not run)## Not run: df <- eolas_get("nz_cpi", limit = 10) eolas_column_label(df, "value") ## End(Not run)
Wraps GET /v1/bulk/{namespace}/{table} to download a whole Iceberg table
as a Parquet, gzipped-CSV, or GeoParquet snapshot – no row caps, no
pagination.
eolas_download_bulk( name, freshness = "auto", format = "parquet", path = NULL, progress = NULL, base_url = EOLAS_BASE_URL, ... )eolas_download_bulk( name, freshness = "auto", format = "parquet", path = NULL, progress = NULL, base_url = EOLAS_BASE_URL, ... )
name |
Dataset identifier, e.g. |
freshness |
|
format |
|
path |
Where to write the file. |
progress |
Control progress feedback. |
base_url |
Override the API base URL (useful for testing). |
... |
Reserved for future arguments; currently ignored. |
The endpoint requires both namespace and table. These are resolved
automatically by calling GET /v1/datasets/{name} first and reading the
metadata. The extra round-trip is negligible; monthly snapshots are served
from Cloudflare's edge cache in milliseconds.
Invisibly the normalised path when path is set;
a raw vector when path = NULL.
freshness = "auto" (the default) omits the query parameter so the server
redirects to the right level for your plan – Free accounts get the latest
monthly snapshot; Pro accounts get the current Iceberg snapshot. Pass
"monthly" or "current" to override explicitly.
"parquet"Apache Parquet – best for R (via the arrow package),
Polars, DuckDB, Spark.
"csv_gz"Gzipped CSV – readable by read.csv(),
readr::read_csv(), Excel.
"geoparquet"GeoParquet 1.0 – only available on datasets with
geometry; read with sfarrow::st_read_parquet() or geopandas.
Stops with "Bulk upgrade required:" – freshness = "current"
requires a Pro plan.
Stops with "Bulk licence restricted:" – dataset is
excluded from bulk (e.g. OECD). Use eolas_get() instead.
Stops with "Bulk not yet available:" – monthly snapshot
not yet generated.
https://docs.eolas.fyi/bulk-downloads/
## Not run: eolas_key("your_key") # Return raw bytes (e.g. hand to arrow::read_parquet) raw_bytes <- eolas_download_bulk("nz_cpi") df <- arrow::read_parquet(raw_bytes) # Write to a file, get the path back path <- eolas_download_bulk("nz_cpi", path = "nz_cpi.parquet") df <- arrow::read_parquet(path) # Gzipped CSV (readable by read.csv) eolas_download_bulk("nz_cpi", format = "csv_gz", path = "nz_cpi.csv.gz") df <- read.csv(gzfile("nz_cpi.csv.gz")) # Force monthly freshness (reproducibility) eolas_download_bulk("nz_cpi", freshness = "monthly", path = "nz_cpi.parquet") # GeoParquet for a geospatial dataset eolas_download_bulk("territorial_authority_2023", format = "geoparquet", path = "ta2023.geo.parquet") # Silence the bar in a script run interactively eolas_download_bulk("nz_cpi", path = "nz_cpi.parquet", progress = FALSE) ## End(Not run)## Not run: eolas_key("your_key") # Return raw bytes (e.g. hand to arrow::read_parquet) raw_bytes <- eolas_download_bulk("nz_cpi") df <- arrow::read_parquet(raw_bytes) # Write to a file, get the path back path <- eolas_download_bulk("nz_cpi", path = "nz_cpi.parquet") df <- arrow::read_parquet(path) # Gzipped CSV (readable by read.csv) eolas_download_bulk("nz_cpi", format = "csv_gz", path = "nz_cpi.csv.gz") df <- read.csv(gzfile("nz_cpi.csv.gz")) # Force monthly freshness (reproducibility) eolas_download_bulk("nz_cpi", freshness = "monthly", path = "nz_cpi.parquet") # GeoParquet for a geospatial dataset eolas_download_bulk("territorial_authority_2023", format = "geoparquet", path = "ta2023.geo.parquet") # Silence the bar in a script run interactively eolas_download_bulk("nz_cpi", path = "nz_cpi.parquet", progress = FALSE) ## End(Not run)
The generic workhorse – use eolas_get_statsnz(), eolas_get_oecd() etc. for
source-tagged results and a nicer print output.
eolas_get( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, meta = TRUE, envelope = FALSE, progress = NULL, force = FALSE, base_url = EOLAS_BASE_URL, ... )eolas_get( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, meta = TRUE, envelope = FALSE, progress = NULL, force = FALSE, base_url = EOLAS_BASE_URL, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
meta |
When |
envelope |
When |
progress |
Control bulk download/read progress when the request is
auto-routed to |
force |
When |
base_url |
Override the API base URL (useful for testing). |
... |
Forwarded to |
Hits the live /v1/datasets/{name}/data endpoint for slices and smaller
datasets. Whole-dataset pulls on large or geospatial tables are
auto-routed to eolas_get_local() (CDN-backed Parquet/GeoParquet) –
so eolas_get("nz_addresses") and eolas_get_linz("nz_addresses") work
without hitting the API 413 guard.
A eolas_dataset tibble with date coerced to Date, or an
sf object when geometry is present and conversion is enabled. Table and
column metadata are attached as attributes (not printed by default).
## Not run: eolas_key("your_key") df <- eolas_get("nz_cpi", start = "2020-01-01") library(ggplot2) ggplot(df, aes(date, value)) + geom_line() ## End(Not run)## Not run: eolas_key("your_key") df <- eolas_get("nz_cpi", start = "2020-01-01") library(ggplot2) ggplot(df, aes(date, value)) + geom_line() ## End(Not run)
Fetch an ACC dataset
eolas_get_acc( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_acc( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
A named wrapper over eolas_get() for datasets sourced from the Auckland
Council open data hub. Covers district plan overlays, notable trees,
significant ecological areas, heritage, and stormwater management zones.
eolas_get_akl_council( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_akl_council( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Source: https://data-aucklandcouncil.opendata.arcgis.com. Licence: CC-BY 4.0 (Auckland Council).
A eolas_dataset data frame, or an sf object when geometry is
present and conversion is enabled.
## Not run: eolas_key("your_key") gdf <- eolas_get_akl_council("akc_notable_trees_overlay") gdf <- eolas_get_akl_council("akc_significant_ecological_areas_overlay") ## End(Not run)## Not run: eolas_key("your_key") gdf <- eolas_get_akl_council("akc_notable_trees_overlay") gdf <- eolas_get_akl_council("akc_significant_ecological_areas_overlay") ## End(Not run)
A named wrapper over eolas_get() for datasets sourced from Auckland
Transport (AT). Covers bus stops, bus routes, bridges, and cycle
infrastructure.
eolas_get_akl_transport( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_akl_transport( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Source: https://data-atgis.opendata.arcgis.com. Licence: CC-BY 4.0 (Auckland Transport).
A eolas_dataset data frame, or an sf object when geometry is
present and conversion is enabled.
## Not run: eolas_key("your_key") gdf <- eolas_get_akl_transport("akt_bus_stop") gdf <- eolas_get_akl_transport("akt_cycle_facility_network") ## End(Not run)## Not run: eolas_key("your_key") gdf <- eolas_get_akl_transport("akt_bus_stop") gdf <- eolas_get_akl_transport("akt_cycle_facility_network") ## End(Not run)
A named wrapper over eolas_get() for datasets from Bay of Plenty Regional
Council and its territorial authorities. Covers flood extents, liquefaction,
coastal hazards, and planning layers.
eolas_get_bay_of_plenty( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_bay_of_plenty( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Source: https://www.boprc.govt.nz. Licence: CC-BY 4.0.
A eolas_dataset data frame, or an sf object when geometry is
present and conversion is enabled.
## Not run: eolas_key("your_key") gdf <- eolas_get_bay_of_plenty("boprc_historic_flood_extents") gdf <- eolas_get_bay_of_plenty("boprc_liquefaction_level_b") ## End(Not run)## Not run: eolas_key("your_key") gdf <- eolas_get_bay_of_plenty("boprc_historic_flood_extents") gdf <- eolas_get_bay_of_plenty("boprc_liquefaction_level_b") ## End(Not run)
A named wrapper over eolas_get() for datasets from Charities Services
(a business unit of the Department of Internal Affairs). Covers registered
charities, officers, beneficiary groups, and annual financial returns.
eolas_get_charities( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_charities( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Source: https://www.charities.govt.nz. Licence: Open Government Licence v3.0.
A eolas_dataset data frame.
## Not run: eolas_key("your_key") df <- eolas_get_charities("charities_organisations") df <- eolas_get_charities("charities_annual_returns") ## End(Not run)## Not run: eolas_key("your_key") df <- eolas_get_charities("charities_organisations") df <- eolas_get_charities("charities_annual_returns") ## End(Not run)
A named wrapper over eolas_get() for datasets aggregated via the Co-Lab
Waikato open data hub. Covers district plan zones, coastal hazards,
heritage, and building footprints across Waikato-region territorial
authorities.
eolas_get_colab_waikato( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_colab_waikato( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Source: https://data-waikatolass.opendata.arcgis.com. Licence: CC-BY 4.0 (respective councils).
A eolas_dataset data frame, or an sf object when geometry is
present and conversion is enabled.
## Not run: eolas_key("your_key") gdf <- eolas_get_colab_waikato("wmkdc_buildings") gdf <- eolas_get_colab_waikato("tcdc_dp_coastal_environment") ## End(Not run)## Not run: eolas_key("your_key") gdf <- eolas_get_colab_waikato("wmkdc_buildings") gdf <- eolas_get_colab_waikato("tcdc_dp_coastal_environment") ## End(Not run)
A named wrapper over eolas_get() for datasets sourced from the
Department of Conservation (DOC). Covers public conservation land polygons,
hut and campsite locations, walking experiences, tracks, marine reserves,
and marine mammal sanctuaries.
eolas_get_doc( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_doc( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Refreshed weekly from DOC's ArcGIS hub. Operational alert streams (track closures, hazard notices) are wired but currently blocked on an API key issue; they will appear automatically once resolved. Source: https://doc.govt.nz. Licence: CC-BY 4.0 International (Crown / Department of Conservation).
A eolas_dataset data frame, or an sf object when geometry is
present and conversion is enabled.
## Not run: eolas_key("your_key") huts <- eolas_get_doc("doc_huts") # 1,429 DOC huts (Point) land <- eolas_get_doc("doc_public_conservation_land") # ~11k conservation land polygons trks <- eolas_get_doc("doc_tracks") # 3,248 DOC tracks (Polyline) ## End(Not run)## Not run: eolas_key("your_key") huts <- eolas_get_doc("doc_huts") # 1,429 DOC huts (Point) land <- eolas_get_doc("doc_public_conservation_land") # ~11k conservation land polygons trks <- eolas_get_doc("doc_tracks") # 3,248 DOC tracks (Polyline) ## End(Not run)
A named wrapper over eolas_get() for datasets from Environment Canterbury
(ECan) and Canterbury-region councils. Covers liquefaction, earthquake
faults, tsunami zones, water allocation, and resource consents.
eolas_get_ecan_canterbury( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_ecan_canterbury( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Source: https://opendata.canterburymaps.govt.nz. Licence: CC-BY 4.0 (Environment Canterbury / respective councils).
A eolas_dataset data frame, or an sf object when geometry is
present and conversion is enabled.
## Not run: eolas_key("your_key") gdf <- eolas_get_ecan_canterbury("ecan_liquefaction_susceptibility_final") gdf <- eolas_get_ecan_canterbury("ecan_tsunami_evacuation_zones") ## End(Not run)## Not run: eolas_key("your_key") gdf <- eolas_get_ecan_canterbury("ecan_liquefaction_susceptibility_final") gdf <- eolas_get_ecan_canterbury("ecan_tsunami_evacuation_zones") ## End(Not run)
Fetch an Education Counts dataset
eolas_get_edcounts( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_edcounts( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
A named wrapper over eolas_get() for datasets from the Energy Efficiency
and Conservation Authority (EECA). Covers NZ energy end-use by sector and
fuel type, public and co-funded EV charger locations, quarterly EV
penetration metrics by region and territorial authority, and regional
industrial process heat demand.
eolas_get_eeca( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_eeca( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
EV charger streams (eeca_ev_chargers_public, eeca_ev_chargers_cofunded)
carry point geometry and refresh quarterly.
eeca_energy_end_use is the annual Energy End Use Database (EEUD).
eeca_regional_heat_demand is an Aug 2024 snapshot.
Source: https://www.eeca.govt.nz/insights/data-tools/.
Licence: CC-BY 4.0 NZ (Crown).
A eolas_dataset data frame, or an sf object when geometry is
present and conversion is enabled.
## Not run: eolas_key("your_key") df <- eolas_get_eeca("eeca_energy_end_use") # NZ energy by sector x fuel x end-use x year gdf <- eolas_get_eeca("eeca_ev_chargers_public") # public EV charging network (Point geometry) df <- eolas_get_eeca("eeca_ev_metrics_district") # EV penetration by territorial authority df <- eolas_get_eeca("eeca_regional_heat_demand") # industrial process heat by region x sector ## End(Not run)## Not run: eolas_key("your_key") df <- eolas_get_eeca("eeca_energy_end_use") # NZ energy by sector x fuel x end-use x year gdf <- eolas_get_eeca("eeca_ev_chargers_public") # public EV charging network (Point geometry) df <- eolas_get_eeca("eeca_ev_metrics_district") # EV penetration by territorial authority df <- eolas_get_eeca("eeca_regional_heat_demand") # industrial process heat by region x sector ## End(Not run)
A named wrapper over eolas_get() for datasets sourced from GeoNet,
operated by Earth Sciences New Zealand (formerly GNS Science). Covers
recent NZ earthquake activity (MMI>=3), volcanic alert levels for 12
monitored volcanoes, and strong-motion sensor station locations.
eolas_get_geonet( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_geonet( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
The earthquake catalogue (geonet_quakes_recent) is a rolling window of
recent events, not a historical archive. Refreshed every 6 hours.
Source: https://www.geonet.org.nz.
Licence: CC-BY 3.0 NZ (Earth Sciences New Zealand, formerly GNS Science).
A eolas_dataset data frame, or an sf object when geometry is
present and conversion is enabled.
## Not run: eolas_key("your_key") df <- eolas_get_geonet("geonet_quakes_recent") # rolling ~100 recent MMI>=3 quakes df <- eolas_get_geonet("geonet_volcanic_alert_levels") # 12 monitored NZ volcanoes gdf <- eolas_get_geonet("geonet_strong_motion_sensors") # 25 strong-motion stations ## End(Not run)## Not run: eolas_key("your_key") df <- eolas_get_geonet("geonet_quakes_recent") # rolling ~100 recent MMI>=3 quakes df <- eolas_get_geonet("geonet_volcanic_alert_levels") # 12 monitored NZ volcanoes gdf <- eolas_get_geonet("geonet_strong_motion_sensors") # 25 strong-motion stations ## End(Not run)
A named wrapper over eolas_get() for datasets from Hawke's Bay Regional
Council and its territorial authorities. Covers coastal erosion,
liquefaction, flood hazards, and district planning layers.
eolas_get_hawkes_bay( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_hawkes_bay( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Source: https://www.hbrc.govt.nz. Licence: CC-BY 4.0.
A eolas_dataset data frame, or an sf object when geometry is
present and conversion is enabled.
## Not run: eolas_key("your_key") gdf <- eolas_get_hawkes_bay("hbrc_coastal_erosion_likely_66") gdf <- eolas_get_hawkes_bay("hbrc_chb_hdc_wdc_liquefaction_severity") ## End(Not run)## Not run: eolas_key("your_key") gdf <- eolas_get_hawkes_bay("hbrc_coastal_erosion_likely_66") gdf <- eolas_get_hawkes_bay("hbrc_chb_hdc_wdc_liquefaction_severity") ## End(Not run)
Fetch an Immigration NZ dataset
eolas_get_immigration( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_immigration( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Fetch a LINZ series
eolas_get_linz( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_linz( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
This is the recommended path for large or geospatial datasets in an
interactive R session or R Markdown notebook. On the first call it fetches
the bulk file from CDN (milliseconds for monthly snapshots) and writes it to
~/.cache/eolas/. On subsequent calls a lightweight HEAD request checks
whether the local file is still current; if so the cached copy is read
directly – zero network I/O on the data payload.
eolas_get_local( name, cache_dir = NULL, format = NULL, freshness = "auto", as_sf = NULL, as_arrow = FALSE, meta = TRUE, progress = NULL, force = FALSE, base_url = EOLAS_BASE_URL, ... )eolas_get_local( name, cache_dir = NULL, format = NULL, freshness = "auto", as_sf = NULL, as_arrow = FALSE, meta = TRUE, progress = NULL, force = FALSE, base_url = EOLAS_BASE_URL, ... )
name |
Dataset identifier, e.g. |
cache_dir |
Local directory for cached files. Accepts |
format |
|
freshness |
|
as_sf |
When |
as_arrow |
When |
meta |
When |
progress |
Control progress feedback for the two bulk phases:
download (streaming byte bar while fetching from CDN) and
read (indeterminate spinner while Parquet/GeoParquet is
materialised into a data frame or |
force |
When |
base_url |
Override the API base URL (useful for testing). |
... |
Reserved for future arguments; currently ignored. |
If you have been calling eolas_get("nz_parcels") on a 3-million-row
geospatial dataset and it takes 15+ minutes, use eolas_get_local()
instead – it serves a pre-materialised GeoParquet from CDN, not a live
Iceberg scan through the row-oriented data endpoint.
A data.frame, sf object, or arrow::Table, depending on the
dataset and the as_sf / as_arrow arguments.
When format = NULL (the default), eolas_get_local() calls
eolas_info(name) and checks the metadata for a geometry_type field.
Geo datasets use "geoparquet"; everything else uses "parquet".
When format = "geoparquet" and the sf package is installed, the
returned object is an sf data frame with the CRS read from the GeoParquet
metadata (typically OGC:CRS84 / WGS84). If sf is not installed, or
as_sf = FALSE, a plain data frame is returned with the WKT geometry
preserved as a character column (extracted from the WKB binary by the
sfarrow package if available, else left as raw). Install sf with
install.packages("sf").
eolas_sync_bulk(), eolas_library_set(), https://docs.eolas.fyi/bulk-downloads/
## Not run: eolas_key("your_key") # 3-million-row geospatial dataset -- first call downloads GeoParquet from CDN; # subsequent calls return in <1 s via sidecar check. gdf <- eolas_get_local("nz_parcels") # Non-geo tabular dataset df <- eolas_get_local("nz_cpi") # Explicit cache directory (overrides library config -- highest priority) df <- eolas_get_local("nz_cpi", cache_dir = "/data/eolas-cache") # Force CSV format df <- eolas_get_local("nz_cpi", format = "csv_gz") # Keep plain data.frame even for geo datasets df <- eolas_get_local("nz_parcels", as_sf = FALSE) # Arrow table -- zero-copy, no sf allocation; suitable for DuckDB / dplyr tbl <- eolas_get_local("nz_parcels", as_arrow = TRUE) ## End(Not run)## Not run: eolas_key("your_key") # 3-million-row geospatial dataset -- first call downloads GeoParquet from CDN; # subsequent calls return in <1 s via sidecar check. gdf <- eolas_get_local("nz_parcels") # Non-geo tabular dataset df <- eolas_get_local("nz_cpi") # Explicit cache directory (overrides library config -- highest priority) df <- eolas_get_local("nz_cpi", cache_dir = "/data/eolas-cache") # Force CSV format df <- eolas_get_local("nz_cpi", format = "csv_gz") # Keep plain data.frame even for geo datasets df <- eolas_get_local("nz_parcels", as_sf = FALSE) # Arrow table -- zero-copy, no sf allocation; suitable for DuckDB / dplyr tbl <- eolas_get_local("nz_parcels", as_arrow = TRUE) ## End(Not run)
A named wrapper over eolas_get() for datasets sourced from the Land
Resource Information System (LRIS), managed by Manaaki Whenua - Landcare
Research NZ. Covers LCDB land-cover vintages (v3.0 through v6), NZLUM land
use management, PBC, and the PAN-NZ protected areas layer.
eolas_get_lris( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_lris( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
LCDB v3.0-v4.1 are deprecated vintages retained for longitudinal analysis.
LCDB v5 is superseded by v6 but still served.
pan_nz_2025_draft was marked Draft at the time of ingestion (2026-05-12).
Source: https://lris.scinfo.org.nz.
Licence: CC-BY 4.0 International (LCDB v5/v6, NZLUM, PBC, PAN-NZ);
CC-BY 3.0 NZ (LCDB v3/v4 vintages). Attribution: Manaaki Whenua.
A eolas_dataset data frame, or an sf object when geometry is
present and conversion is enabled.
## Not run: eolas_key("your_key") gdf <- eolas_get_lris("lcdb_v6_mainland") # current NZ land cover gdf <- eolas_get_lris("nzlum_v03") # NZ Land Use Management v0.3 gdf <- eolas_get_lris("pan_nz_2025_draft") # protected areas (Draft, 2025) ## End(Not run)## Not run: eolas_key("your_key") gdf <- eolas_get_lris("lcdb_v6_mainland") # current NZ land cover gdf <- eolas_get_lris("nzlum_v03") # NZ Land Use Management v0.3 gdf <- eolas_get_lris("pan_nz_2025_draft") # protected areas (Draft, 2025) ## End(Not run)
A named wrapper over eolas_get() for datasets from Horizons Regional
Council (Manawatu-Whanganui) and its territorial authorities. Covers
airsheds, coastal marine areas, freshwater, and planning layers.
eolas_get_manawatu_whanganui( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_manawatu_whanganui( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Source: https://www.horizons.govt.nz. Licence: CC-BY 4.0.
A eolas_dataset data frame, or an sf object when geometry is
present and conversion is enabled.
## Not run: eolas_key("your_key") gdf <- eolas_get_manawatu_whanganui("horizons_coastal_marine_area") gdf <- eolas_get_manawatu_whanganui("horizons_airshed_taihape") ## End(Not run)## Not run: eolas_key("your_key") gdf <- eolas_get_manawatu_whanganui("horizons_coastal_marine_area") gdf <- eolas_get_manawatu_whanganui("horizons_airshed_taihape") ## End(Not run)
Fetch an MBIE dataset
eolas_get_mbie( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_mbie( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Fetch an MSD dataset
eolas_get_msd( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_msd( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
A named wrapper over eolas_get() for datasets from Napier City Council
and Whanganui District Council. Covers district plan precincts, heritage
buildings and areas, address points, road centrelines, and parcels.
eolas_get_napier_whanganui( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_napier_whanganui( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Source: https://www.napier.govt.nz / https://www.whanganui.govt.nz. Licence: CC-BY 4.0.
A eolas_dataset data frame, or an sf object when geometry is
present and conversion is enabled.
## Not run: eolas_key("your_key") gdf <- eolas_get_napier_whanganui("napier_heritage_buildings") gdf <- eolas_get_napier_whanganui("napier_address_points") ## End(Not run)## Not run: eolas_key("your_key") gdf <- eolas_get_napier_whanganui("napier_heritage_buildings") gdf <- eolas_get_napier_whanganui("napier_address_points") ## End(Not run)
A named wrapper over eolas_get() for datasets from Northland Regional
Council and its territorial authorities (Far North, Whangarei, Kaipara).
Covers district plan zones, designations, heritage, and environmental
layers.
eolas_get_northland( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_northland( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Source: https://www.nrc.govt.nz. Licence: CC-BY 4.0.
A eolas_dataset data frame, or an sf object when geometry is
present and conversion is enabled.
## Not run: eolas_key("your_key") gdf <- eolas_get_northland("fndc_district_plan_zones") gdf <- eolas_get_northland("fndc_heritage_areas") ## End(Not run)## Not run: eolas_key("your_key") gdf <- eolas_get_northland("fndc_district_plan_zones") gdf <- eolas_get_northland("fndc_heritage_areas") ## End(Not run)
Fetch a Waka Kotahi (NZTA) dataset
eolas_get_nzta( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_nzta( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Fetch an OECD series
eolas_get_oecd( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_oecd( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
A named wrapper over eolas_get() for datasets from Otago Regional Council
and its territorial authorities (Dunedin, Queenstown-Lakes, Central Otago,
Clutha, Waitaki). Covers land use, floodbanks, groundwater protection, and
planning layers.
eolas_get_otago( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_otago( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Source: https://www.orc.govt.nz. Licence: CC-BY 4.0.
A eolas_dataset data frame, or an sf object when geometry is
present and conversion is enabled.
## Not run: eolas_key("your_key") gdf <- eolas_get_otago("orc_otago_irrigated_areas") gdf <- eolas_get_otago("orc_otago_land_use_2024") ## End(Not run)## Not run: eolas_key("your_key") gdf <- eolas_get_otago("orc_otago_irrigated_areas") gdf <- eolas_get_otago("orc_otago_land_use_2024") ## End(Not run)
A named wrapper over eolas_get() for datasets from PHARMAC (Pharmaceutical
Management Agency). Covers the monthly Pharmaceutical Schedule (community-
funded medicines and subsidies) and the Hospital Medicines List (HML),
including full longitudinal archives from 2006 and 2011 respectively.
eolas_get_pharmac( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_pharmac( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Historical archive datasets (pharmac_schedule_history,
pharmac_hml_history) are append-mode; each month's snapshot is tagged
with a time_frame column (YYYY-MM format).
Source: https://schedule.pharmac.govt.nz/.
Licence: CC-BY 3.0 NZ (Crown).
A eolas_dataset data frame.
## Not run: eolas_key("your_key") df <- eolas_get_pharmac("pharmac_schedule") # current month's funded medicines df <- eolas_get_pharmac("pharmac_schedule_history") # 2006-present subsidy archive df <- eolas_get_pharmac("pharmac_hospital_medicines_list") # current HML df <- eolas_get_pharmac("pharmac_hml_history") # 2011-present HML archive ## End(Not run)## Not run: eolas_key("your_key") df <- eolas_get_pharmac("pharmac_schedule") # current month's funded medicines df <- eolas_get_pharmac("pharmac_schedule_history") # 2006-present subsidy archive df <- eolas_get_pharmac("pharmac_hospital_medicines_list") # current HML df <- eolas_get_pharmac("pharmac_hml_history") # 2011-present HML archive ## End(Not run)
Fetch an NZ Police / MoJ dataset
eolas_get_police( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_police( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Fetch an RBNZ series
eolas_get_rbnz( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_rbnz( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
A named wrapper over eolas_get() for datasets from Environment Southland
and its territorial authorities (Southland District, Gore, Invercargill).
Covers district plan zones, coastal hazards, heritage, and land use.
eolas_get_southland( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_southland( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Source: https://www.es.govt.nz. Licence: CC-BY 4.0.
A eolas_dataset data frame, or an sf object when geometry is
present and conversion is enabled.
## Not run: eolas_key("your_key") gdf <- eolas_get_southland("sdc_southland_dp_zones") gdf <- eolas_get_southland("sdc_southland_dp_heritage_items") ## End(Not run)## Not run: eolas_key("your_key") gdf <- eolas_get_southland("sdc_southland_dp_zones") gdf <- eolas_get_southland("sdc_southland_dp_heritage_items") ## End(Not run)
A named wrapper over eolas_get() that tags the result with the
"Stats NZ" source label.
eolas_get_statsnz( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_statsnz( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
A eolas_dataset data frame, an sf object when geometry is present
and conversion is enabled, or an arrow::Table when as_arrow = TRUE.
## Not run: eolas_key("your_key") df <- eolas_get_statsnz("bds_enterprises_business_type", start = "2015-01-01") library(ggplot2) ggplot(df, aes(date, value)) + geom_line() ## End(Not run)## Not run: eolas_key("your_key") df <- eolas_get_statsnz("bds_enterprises_business_type", start = "2015-01-01") library(ggplot2) ggplot(df, aes(date, value)) + geom_line() ## End(Not run)
The server returns source = "Stats NZ" for both SDMX time series and
Datafinder geospatial datasets – the eolas_dataset attribute reflects that.
This helper exists as a discoverability shortcut, not a separate source.
eolas_get_statsnz_geo( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_statsnz_geo( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
A named wrapper over eolas_get() for datasets from Taranaki Regional
Council and its territorial authorities (New Plymouth, Stratford, South
Taranaki). Covers biodiversity, coastal management, and district planning
layers.
eolas_get_taranaki( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_taranaki( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Source: https://www.trc.govt.nz. Licence: CC-BY 4.0.
A eolas_dataset data frame, or an sf object when geometry is
present and conversion is enabled.
## Not run: eolas_key("your_key") gdf <- eolas_get_taranaki("trc_biodiversity_coastal_mgmt_areas") gdf <- eolas_get_taranaki("npdc_dp_operative_coastal_flooding") ## End(Not run)## Not run: eolas_key("your_key") gdf <- eolas_get_taranaki("trc_biodiversity_coastal_mgmt_areas") gdf <- eolas_get_taranaki("npdc_dp_operative_coastal_flooding") ## End(Not run)
A named wrapper over eolas_get() for datasets from Gisborne District
Council, Marlborough District Council, Nelson City Council, and Tasman
District Council. Covers coastal hazards, planning zones, and heritage
layers.
eolas_get_top_of_south( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_top_of_south( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Source: https://www.gdc.govt.nz. Licence: CC-BY 4.0.
A eolas_dataset data frame, or an sf object when geometry is
present and conversion is enabled.
## Not run: eolas_key("your_key") gdf <- eolas_get_top_of_south("gdc_coastal_environment") gdf <- eolas_get_top_of_south("gdc_coastal_erosion") ## End(Not run)## Not run: eolas_key("your_key") gdf <- eolas_get_top_of_south("gdc_coastal_environment") gdf <- eolas_get_top_of_south("gdc_coastal_erosion") ## End(Not run)
Fetch a NZ Treasury series
eolas_get_treasury( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_treasury( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
A named wrapper over eolas_get() for datasets from Greater Wellington
Regional Council and its territorial authorities (Wellington, Hutt, Upper
Hutt, Porirua, Kapiti Coast). Covers flood and earthquake hazards, district
plan zones, and coastal inundation.
eolas_get_wellington( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_wellington( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Source: https://www.gw.govt.nz. Licence: CC-BY 4.0.
A eolas_dataset data frame, or an sf object when geometry is
present and conversion is enabled.
## Not run: eolas_key("your_key") gdf <- eolas_get_wellington("wcc_district_plan_zones_2024") gdf <- eolas_get_wellington("gwrc_flood_1pct_aep") ## End(Not run)## Not run: eolas_key("your_key") gdf <- eolas_get_wellington("wcc_district_plan_zones_2024") gdf <- eolas_get_wellington("gwrc_flood_1pct_aep") ## End(Not run)
A named wrapper over eolas_get() for datasets from West Coast Regional
Council (Te Tai o Poutini) and its territorial authorities (Buller, Grey,
Westland). Covers active faults, the Alpine Fault, landslide catalogs, and
significant natural areas.
eolas_get_west_coast( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_west_coast( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Source: https://www.ttpp.nz. Licence: CC-BY 4.0.
A eolas_dataset data frame, or an sf object when geometry is
present and conversion is enabled.
## Not run: eolas_key("your_key") gdf <- eolas_get_west_coast("wcrc_active_faults") gdf <- eolas_get_west_coast("wcrc_alpine_fault_traces") ## End(Not run)## Not run: eolas_key("your_key") gdf <- eolas_get_west_coast("wcrc_active_faults") gdf <- eolas_get_west_coast("wcrc_alpine_fault_traces") ## End(Not run)
Fetch a WorkSafe NZ dataset
eolas_get_worksafe( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )eolas_get_worksafe( name, start = NULL, end = NULL, limit = NULL, as_sf = NULL, as_arrow = FALSE, ... )
name |
Dataset identifier, e.g. |
start |
ISO date lower bound, e.g. |
end |
ISO date upper bound, e.g. |
limit |
Max rows to return. Default |
as_sf |
Convert geospatial datasets to an |
as_arrow |
When |
... |
Forwarded to |
Get metadata for a single dataset
eolas_info(name, base_url = EOLAS_BASE_URL)eolas_info(name, base_url = EOLAS_BASE_URL)
name |
Dataset identifier, e.g. |
base_url |
Override the API base URL (useful for testing). |
A one-row tibble with dataset metadata.
## Not run: eolas_key("your_key") eolas_info("nz_cpi") ## End(Not run)## Not run: eolas_key("your_key") eolas_info("nz_cpi") ## End(Not run)
Calls the eolas Enterprise-only /v1/integrations/<platform> endpoint and
returns the generated config files. Optionally writes them to disk.
eolas_integration( platform, datasets, output_dir = NULL, force = FALSE, base_url = EOLAS_BASE_URL )eolas_integration( platform, datasets, output_dir = NULL, force = FALSE, base_url = EOLAS_BASE_URL )
platform |
One of |
datasets |
Character vector of dataset names to include in the config. |
output_dir |
Optional directory path. When supplied, the generated
files are written there (creating the directory if needed) and the path
to each written file is included in the returned list. When |
force |
When |
base_url |
Override the API base URL (useful for testing). |
Supported platforms:
"meltano" – meltano.yml using tap-rest-api-msdk, plus README
and .env.example. meltano install && meltano run tap-eolas target-jsonl and you're loading.
"fivetran" – Connector Builder YAML for paste-into-dashboard import.
"azure-data-factory" – linked-service + per-dataset REST datasets
+ copy pipeline JSON; usable via az datafactory CLI or ADF Studio.
This is an Enterprise-plan feature. Non-Enterprise keys receive a 403 from the server; the upgrade pointer flows through verbatim as the error message. See https://eolas.fyi/#pricing.
A list with elements:
platform – the platform name as echoed by the server.
files – a named list of filename = content (always populated).
written – character vector of paths actually written
(only present when output_dir is set).
skipped – character vector of paths skipped because they
already existed and force = FALSE.
## Not run: eolas_key("your_enterprise_key") # In-memory: inspect what the server would generate result <- eolas_integration("meltano", c("nz_cpi", "nz_gdp")) names(result$files) cat(result$files$meltano.yml) # Write straight to a directory ready for `meltano install` eolas_integration( "meltano", c("nz_cpi", "nz_gdp"), output_dir = "./my-pipeline" ) ## End(Not run)## Not run: eolas_key("your_enterprise_key") # In-memory: inspect what the server would generate result <- eolas_integration("meltano", c("nz_cpi", "nz_gdp")) names(result$files) cat(result$files$meltano.yml) # Write straight to a directory ready for `meltano install` eolas_integration( "meltano", c("nz_cpi", "nz_gdp"), output_dir = "./my-pipeline" ) ## End(Not run)
Stores the key for the duration of the R session. Alternatively, set the
EOLAS_API_KEY environment variable or use eolas_key_save() to persist
it to the OS keyring so you never need to call this again.
eolas_key(key)eolas_key(key)
key |
An API key from https://eolas.fyi/signup. |
The key, invisibly.
## Not run: eolas_key("your_key_here") ## End(Not run)## Not run: eolas_key("your_key_here") ## End(Not run)
Deletes the entry stored by eolas_key_save(). Does not affect the
EOLAS_API_KEY environment variable or the in-session key set by
eolas_key().
eolas_key_clear()eolas_key_clear()
Invisibly NULL.
eolas_key_save(), eolas_key_status()
## Not run: eolas_key_clear() ## End(Not run)## Not run: eolas_key_clear() ## End(Not run)
Stores the key in the OS-native credential store (macOS Keychain, Windows
Credential Manager, Linux Secret Service) under
service = "eolas", username = "api-key". Once saved, eolas_key() and
every eolas_get_*() call will find the key automatically – no environment
variable or explicit call needed in future sessions.
eolas_key_save(key = NULL)eolas_key_save(key = NULL)
key |
The API key to save. |
The same keyring slot is read by the Python eolas-data client, so a key
saved from R is immediately available in Python and vice versa.
Requires the keyring package. On Linux, libsecret-1-dev system headers
are needed before install.packages("keyring").
Invisibly NULL.
eolas_key_clear(), eolas_key_status()
## Not run: eolas_key_save() # interactive prompt eolas_key_save("vs_...") # non-interactive ## End(Not run)## Not run: eolas_key_save() # interactive prompt eolas_key_save("vs_...") # non-interactive ## End(Not run)
Checks all sources in precedence order and reports the first one that has a key, masking all but the first eight characters for safety.
eolas_key_status()eolas_key_status()
Precedence:
In-session key set by eolas_key()
EOLAS_API_KEY environment variable
OS keyring (via the keyring package)
~/.eolas/config.json (as written by the Python CLI eolas auth set-key)
A character string describing the key source (invisibly). Primarily called for its side-effect of printing a status message.
eolas_key_save(), eolas_key_clear()
## Not run: eolas_key_status() ## End(Not run)## Not run: eolas_key_status() ## End(Not run)
Removes library_dir from ~/.eolas/config.json. After clearing,
eolas_get_local() falls back to ~/.cache/eolas/ (or the
EOLAS_LIBRARY env var if set).
eolas_library_clear()eolas_library_clear()
Invisibly NULL.
## Not run: eolas_library_clear() ## End(Not run)## Not run: eolas_library_clear() ## End(Not run)
Writes the chosen path to ~/.eolas/config.json as library_dir.
Future calls to eolas_get_local() will use this directory when no
explicit cache_dir argument is passed.
eolas_library_set(path)eolas_library_set(path)
path |
Character string – the directory path to use as the library.
Supports |
The config file is shared with the Python eolas-data client, so a path
set from R is immediately honoured in Python and vice versa.
The resolved (absolute) path, invisibly.
## Not run: eolas_library_set("~/eolas-library") eolas_library_set("/data/eolas") ## End(Not run)## Not run: eolas_library_set("~/eolas-library") eolas_library_set("/data/eolas") ## End(Not run)
Checks all sources in precedence order and reports which one supplies the library directory:
eolas_library_status()eolas_library_status()
EOLAS_LIBRARY environment variable
library_dir in ~/.eolas/config.json
~/.cache/eolas/ (transient fallback)
A named list with elements source, path, env_var,
config_file, and config_value, invisibly. Called primarily for
its printed output.
## Not run: eolas_library_status() ## End(Not run)## Not run: eolas_library_status() ## End(Not run)
Returns a tibble (or data frame) with one row per dataset, including name, title, source, namespace, and description.
eolas_list(source = NULL, base_url = EOLAS_BASE_URL)eolas_list(source = NULL, base_url = EOLAS_BASE_URL)
source |
Optional source filter, e.g. |
base_url |
Override the API base URL (useful for testing). |
A tibble.
## Not run: eolas_key("your_key") eolas_list() eolas_list("Stats NZ") ## End(Not run)## Not run: eolas_key("your_key") eolas_list() eolas_list("Stats NZ") ## End(Not run)
List all Auckland Council datasets available in eolas
eolas_list_akl_council()eolas_list_akl_council()
A data frame (tibble if available) of dataset metadata.
List all Auckland Transport datasets available in eolas
eolas_list_akl_transport()eolas_list_akl_transport()
A data frame (tibble if available) of dataset metadata.
List all Bay of Plenty Councils datasets available in eolas
eolas_list_bay_of_plenty()eolas_list_bay_of_plenty()
A data frame (tibble if available) of dataset metadata.
List all Charities Services datasets available in eolas
eolas_list_charities()eolas_list_charities()
A data frame (tibble if available) of dataset metadata.
List all Co-Lab Waikato datasets available in eolas
eolas_list_colab_waikato()eolas_list_colab_waikato()
A data frame (tibble if available) of dataset metadata.
List all DOC datasets available in eolas
eolas_list_doc()eolas_list_doc()
A data frame (tibble if available) of dataset metadata.
List all ECan / Canterbury datasets available in eolas
eolas_list_ecan_canterbury()eolas_list_ecan_canterbury()
A data frame (tibble if available) of dataset metadata.
List all Education Counts datasets
eolas_list_edcounts()eolas_list_edcounts()
List all EECA datasets available in eolas
eolas_list_eeca()eolas_list_eeca()
A data frame (tibble if available) of dataset metadata.
List all GeoNet datasets available in eolas
eolas_list_geonet()eolas_list_geonet()
A data frame (tibble if available) of dataset metadata.
List all Hawke's Bay Councils datasets available in eolas
eolas_list_hawkes_bay()eolas_list_hawkes_bay()
A data frame (tibble if available) of dataset metadata.
List all Immigration NZ datasets
eolas_list_immigration()eolas_list_immigration()
List all Manaaki Whenua / LRIS datasets
eolas_list_lris()eolas_list_lris()
A data frame (tibble if available) of dataset metadata.
List all Manawatu-Whanganui Councils datasets available in eolas
eolas_list_manawatu_whanganui()eolas_list_manawatu_whanganui()
A data frame (tibble if available) of dataset metadata.
List all Napier + Whanganui datasets available in eolas
eolas_list_napier_whanganui()eolas_list_napier_whanganui()
A data frame (tibble if available) of dataset metadata.
List all Northland Councils datasets available in eolas
eolas_list_northland()eolas_list_northland()
A data frame (tibble if available) of dataset metadata.
List all Waka Kotahi datasets
eolas_list_nzta()eolas_list_nzta()
List all Otago Councils datasets available in eolas
eolas_list_otago()eolas_list_otago()
A data frame (tibble if available) of dataset metadata.
List all PHARMAC datasets available in eolas
eolas_list_pharmac()eolas_list_pharmac()
A data frame (tibble if available) of dataset metadata.
List all NZ Police / MoJ datasets
eolas_list_police()eolas_list_police()
List all Southland Councils datasets available in eolas
eolas_list_southland()eolas_list_southland()
A data frame (tibble if available) of dataset metadata.
List all Stats NZ series
eolas_list_statsnz()eolas_list_statsnz()
A data frame (tibble if available) of dataset metadata.
Filters on namespace == "statsnz_geo" rather than the source label, because
the source label "Stats NZ" is now shared with the SDMX time-series datasets.
eolas_list_statsnz_geo()eolas_list_statsnz_geo()
List all Taranaki Councils datasets available in eolas
eolas_list_taranaki()eolas_list_taranaki()
A data frame (tibble if available) of dataset metadata.
List all Gisborne / Top of South Councils datasets available in eolas
eolas_list_top_of_south()eolas_list_top_of_south()
A data frame (tibble if available) of dataset metadata.
List all NZ Treasury series
eolas_list_treasury()eolas_list_treasury()
List all Wellington Region Councils datasets available in eolas
eolas_list_wellington()eolas_list_wellington()
A data frame (tibble if available) of dataset metadata.
List all West Coast (Te Tai o Poutini) datasets available in eolas
eolas_list_west_coast()eolas_list_west_coast()
A data frame (tibble if available) of dataset metadata.
List all WorkSafe NZ datasets
eolas_list_worksafe()eolas_list_worksafe()
Faithful port of the Python client's merge_changes. Drops local rows for every pk the feed
touched (including deletes), appends the non-delete change rows, applies the
current_state_filter, and strips the _eolas_* meta columns. The result is the current state
for the touched pks merged with the untouched local rows.
eolas_merge_changes( local_df, changes_df, pk_columns, current_state_filter = NULL )eolas_merge_changes( local_df, changes_df, pk_columns, current_state_filter = NULL )
local_df |
Current local materialised state (may be a 0-row frame with the right columns). |
changes_df |
Change rows from the |
pk_columns |
Character vector of primary-key columns (non-empty). The merge keys on these only – never on geometry. |
current_state_filter |
Optional |
The merged current-state data frame, meta columns stripped, row names reset.
Returns the one-row metadata tibble attached by eolas_get(),
eolas_get_local(), and source-specific getters – title, description,
licence, refresh cadence, and provenance fields. The full description
is available here but is not printed by default; call this accessor
when you need the prose.
eolas_meta(x)eolas_meta(x)
x |
An object returned by an |
A one-row tibble, or NULL when metadata was not attached
(e.g. meta = FALSE on the fetch call).
## Not run: df <- eolas_get("nz_cpi", limit = 10) eolas_meta(df)$description ## End(Not run)## Not run: df <- eolas_get("nz_cpi", limit = 10) eolas_meta(df)$description ## End(Not run)
Substring search over the dataset catalog. Common analyst tokens are
expanded – e.g. "HLFS" also matches labour-force and unemployment
datasets; "OCR" matches official cash rate series.
eolas_search(query, source = NULL, base_url = EOLAS_BASE_URL)eolas_search(query, source = NULL, base_url = EOLAS_BASE_URL)
query |
Search string (case-insensitive). |
source |
Optional source filter, e.g. |
base_url |
Override the API base URL (useful for testing). |
A tibble of matching datasets (same columns as eolas_list()).
## Not run: eolas_key("your_key") eolas_search("HLFS") eolas_search("OCR", source = "RBNZ") ## End(Not run)## Not run: eolas_key("your_key") eolas_search("HLFS") eolas_search("OCR", source = "RBNZ") ## End(Not run)
Reads cdc_serving_tier from the dataset metadata and dispatches:
"changelog" -> eolas_sync_changes() – incremental /changes feed, pk-merged into the local file
(first call downloads a baseline; later calls apply only what changed).
anything else ("snapshot") -> eolas_sync_bulk() – full-snapshot download, refreshed when the
server snapshot changes.
eolas_sync( name, path, format = "parquet", progress = NULL, force = FALSE, base_url = EOLAS_BASE_URL )eolas_sync( name, path, format = "parquet", progress = NULL, force = FALSE, base_url = EOLAS_BASE_URL )
name |
Dataset identifier, e.g. |
path |
Local file to materialise. |
format |
Output format. Changelog sync requires |
progress |
Tri-state progress bar control forwarded to the underlying sync. |
force |
When |
base_url |
API base URL. |
Both paths keep a paste0(path, ".eolas-meta.json") sidecar and return a list with at least
status, path, and current_snapshot_id; the changelog path additionally returns sync_mode,
previous_seq, current_seq, and ops_applied.
The result list from the dispatched sync (see eolas_sync_changes() / eolas_sync_bulk()).
## Not run: # Same call works whether the dataset is snapshot- or changelog-tier: eolas_sync("nz_building_outlines", path = "buildings.parquet") ## End(Not run)## Not run: # Same call works whether the dataset is snapshot- or changelog-tier: eolas_sync("nz_building_outlines", path = "buildings.parquet") ## End(Not run)
Checks whether the locally-cached file is still current by issuing a
lightweight HEAD request and reading the X-Snapshot-Version response
header. If the snapshot id matches the sidecar, the function returns
immediately with status = "unchanged" and no data I/O. Otherwise it
downloads the new snapshot, replaces the local file atomically (via a
temp file + file.rename()), and updates the sidecar.
eolas_sync_bulk( name, path, format = "parquet", freshness = "auto", progress = NULL, force = FALSE, base_url = EOLAS_BASE_URL, ... )eolas_sync_bulk( name, path, format = "parquet", freshness = "auto", progress = NULL, force = FALSE, base_url = EOLAS_BASE_URL, ... )
name |
Dataset identifier, e.g. |
path |
Required. File path where the data should live. The
sidecar is written at |
format |
|
freshness |
|
progress |
Control the download progress bar ( |
force |
When |
base_url |
Override the API base URL (useful for testing). |
... |
Reserved; currently ignored. |
A named list with the same fields as Python's SyncResult:
status"downloaded", "updated", or "unchanged"
previous_snapshot_idSnapshot id from the sidecar, or NA if none
current_snapshot_idSnapshot id from the server
pathNormalised path to the data file
bytes_downloadedBytes written (0 when unchanged)
A JSON file <path>.eolas-meta.json is written next to the data file.
It stores the snapshot id, download timestamp, format, and source URL
and is read on the next call to perform the no-op check cheaply.
The new file is downloaded to <path>.eolas-tmp-<rand> and then renamed
over the original with file.rename(). On most POSIX systems this is an
atomic inode swap; on Windows it uses MoveFileExW with
MOVEFILE_REPLACE_EXISTING. Readers with the file open will see either
the old or the new content, never a partial write.
eolas_download_bulk, https://docs.eolas.fyi/bulk-downloads/
## Not run: eolas_key("your_key") # First call: full download r <- eolas_sync_bulk("nz_cpi", path = "nz_cpi.parquet") r$status # "downloaded" r$bytes_downloaded # e.g. 2100000 # Second call (same snapshot): no network I/O on the data file r <- eolas_sync_bulk("nz_cpi", path = "nz_cpi.parquet") r$status # "unchanged" r$bytes_downloaded # 0 # Poll for updates in a long-running script repeat { r <- eolas_sync_bulk("nz_cpi", path = "nz_cpi.parquet") if (r$status != "unchanged") message("Updated to snapshot ", r$current_snapshot_id) Sys.sleep(3600) } ## End(Not run)## Not run: eolas_key("your_key") # First call: full download r <- eolas_sync_bulk("nz_cpi", path = "nz_cpi.parquet") r$status # "downloaded" r$bytes_downloaded # e.g. 2100000 # Second call (same snapshot): no network I/O on the data file r <- eolas_sync_bulk("nz_cpi", path = "nz_cpi.parquet") r$status # "unchanged" r$bytes_downloaded # 0 # Poll for updates in a long-running script repeat { r <- eolas_sync_bulk("nz_cpi", path = "nz_cpi.parquet") if (r$status != "unchanged") message("Updated to snapshot ", r$current_snapshot_id) Sys.sleep(3600) } ## End(Not run)
The OUT half of CDC. On the first call (cold start) downloads the full baseline via
eolas_sync_bulk() and anchors the watermark at the current feed head. On subsequent calls pages
only the new changes since the watermark and pk-merges them into the local file (atomic rewrite),
applying the dataset's current_state_filter (e.g. is_current = true for SCD2). A 410
(watermark expired) self-heals by re-baselining. Mirrors the Python client's sync_changes.
eolas_sync_changes( name, path, format = "parquet", progress = NULL, force = FALSE, base_url = EOLAS_BASE_URL )eolas_sync_changes( name, path, format = "parquet", progress = NULL, force = FALSE, base_url = EOLAS_BASE_URL )
name |
Dataset identifier, e.g. |
path |
Where to write the materialised Parquet file. The sidecar lives at
|
format |
Only |
progress |
Forwarded to |
force |
When |
base_url |
API base URL. |
A list with status, sync_mode = "changelog", previous_seq, current_seq,
ops_applied, path, current_snapshot_id.