Package 'imfweo'

Title: Seamless Access to IMF World Economic Outlook (WEO) Data
Description: Provides tools to download, process, and analyze data from the International Monetary Fund's World Economic Outlook (WEO) database <https://www.imf.org/en/Publications/SPROLLs/world-economic-outlook-databases>. Functions support downloading complete WEO releases, accessing specific economic indicators for selected countries, and listing available data.
Authors: Teal Emery [aut, cre], Teal Insights [cph], Christoph Scheuch [aut] (ORCID: <https://orcid.org/0009-0004-0423-6819>)
Maintainer: Teal Emery <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0.9001
Built: 2026-05-11 07:58:48 UTC
Source: https://github.com/teal-insights/r-imfweo

Help Index


imfweo: Seamless Access to IMF World Economic Outlook (WEO) Data

Description

Provides tools to download, process, and analyze data from the International Monetary Fund's World Economic Outlook (WEO) database https://www.imf.org/en/Publications/SPROLLs/world-economic-outlook-databases. Functions support downloading complete WEO releases, accessing specific economic indicators for selected countries, and listing available data.

Author(s)

Maintainer: Teal Emery [email protected]

Authors:

Other contributors:

  • Teal Insights [copyright holder]

See Also

Useful links:


Reset the Cache

Description

Reset the Cache

Usage

weo_cache_reset()

Value

No return value, called for side effects.


Get WEO Data

Description

Retrieve data from the IMF World Economic Outlook (WEO) database for specific series, countries, and years.

Usage

weo_get(
  entities = NULL,
  series = NULL,
  start_year = 1980L,
  end_year = NULL,
  year = NULL,
  release = NULL,
  quiet = TRUE
)

Arguments

entities

An optional character vector of ISO3 country codes or country group identifiers. See weo_get_entities.

series

A optional character vector of series codes. See weo_get_series.

start_year

Minimum year to include. Defaults to 1980.

end_year

Maximum year to include. Defaults to current year + 5 years.

year

The year of a WEO publication (e.g., 2024). Defaults to latest publication year.

release

The release of a WEO publication ("Spring" or "Fall"). Defaults to latest publication release.

quiet

A logical indicating whether to print download information. Defaults to TRUE.

Value

A data frame with columns:

entity_id

ISO3 country code or country group ID

entity_name

Entity name

series_code

WEO series code

series_name

Series name

units

Units of measurement

year

Year

value

Value

Examples

# Get GDP growth for selected countries
weo_get(
  entities = c("USA", "GBR", "DEU"),
  series = "NGDP_RPCH",
  start_year = 2015,
  end_year = 2020
)

Get Available WEO Entities

Description

Returns a data frame with available entities (countries and country groups) in the WEO database.

Usage

weo_get_entities(year = NULL, release = NULL, quiet = TRUE)

Arguments

year

The year of a WEO publication (e.g., 2024). Defaults to latest publication year.

release

The release of a WEO publication ("Spring" or "Fall"). Defaults to latest publication release.

quiet

A logical indicating whether to print download information. Defaults to TRUE.

Value

A data frame with columns:

entity_id

ISO3 country code or country group ID

entity_name

Full name of the country or country group

Examples

# List all countries and regions
weo_get_entities()

Get Latest WEO Publication from IMF Website

Description

Determines the latest available WEO publication based on the current date.

Usage

weo_get_latest_publication(quiet = TRUE)

Arguments

quiet

A logical indicating whether to print download information. Defaults to TRUE.

Value

A list with year and release

Examples

# List all series
weo_get_latest_publication(quiet = FALSE)

Get Available WEO Series

Description

Returns a data frame with available series in the WEO database.

Usage

weo_get_series(year = NULL, release = NULL, quiet = TRUE)

Arguments

year

The year of a WEO publication (e.g., 2024). Defaults to latest publication year.

release

The release of a WEO publication ("Spring" or "Fall"). Defaults to latest publication release.

quiet

A logical indicating whether to print download information. Defaults to TRUE.

Value

A data frame with columns:

series_id

The WEO series ID (e.g., "NGDP_RPCH")

series_name

Full name of the series (e.g., "Gross domestic product, constant prices")

units

Units of measurement

Examples

# List all series
weo_get_series()

List Available IMF WEO Publications

Description

Returns a data frame of available WEO publications from 2007 onwards. The IMF typically releases the WEO database twice per year:

  • Spring (April)

  • Fall (October)

Usage

weo_list_publications(
  start_year = 2007,
  end_year = as.integer(format(Sys.Date(), "%Y")),
  check_latest = FALSE
)

Arguments

start_year

Minimum year to include. Defaults to 2007.

end_year

Maximum year to include. Defaults to current year.

check_latest

Logical indicating whether to check whether the latest publication according to current date has been released. Defaults to FALSE.

Value

A data frame with columns:

year

The year of the release

release

The release name ("Spring" or "Fall")

month

The month of release ("April" or "October")

Examples

weo_list_publications(check_latest = TRUE)