Skip to contents

Thin wrappers that put a provider's data on the ISO spine. Each is Suggests-gated on that provider's own client package – countryatlas does not reimplement any of them. All four are registered as sources, so the usual route is fetch_indicator()("owid", ...) rather than calling these directly; they are exported because calling them directly is sometimes what you want.

Usage

fetch_owid(indicator, countries = NULL, years = NULL, ...)

fetch_eurostat(indicator, countries = NULL, years = NULL, ...)

fetch_oecd(indicator, countries = NULL, years = NULL, ...)

fetch_comtrade(indicator, countries = NULL, years = NULL, ...)

Arguments

indicator

Indicator code(s), optionally named to rename the output columns.

countries

Optional iso3c vector.

years

Optional numeric year vector.

...

Passed to the underlying client.

Value

A tibble on the ISO spine: iso3c, year and one column per indicator.

Which provider needs what

AdapterNeedsNotes
fetch_owid()owidROur World in Data; indicator is an OWID chart slug
fetch_eurostat()eurostatEuropean coverage only; geo codes are harmonised to iso3c
fetch_oecd()OECDindicator is a dataset id; OECD's own filters go through ...
fetch_comtrade()comtradrUN trade flows; needs an API token (see comtradr::set_primary_comtrade_key())

Examples

if (FALSE) { # \dontrun{
fetch_owid("life-expectancy", years = 2020)
fetch_eurostat("demo_pjan", years = 2020)
} # }