← Back to all sparks
G

GDPuc

ANALYTICS
Velocity0.0

Easily Convert GDP Data

A GDP unit converter that keeps widening which currencies and deflators it will accept

economicscurrency-conversiondata-harmonisationr-packageintegrated-assessment
Current state
GDPuc converts GDP figures between currencies, base years and price bases, using World Bank conversion factors, and is used as a dependency inside the madrat/magclass modelling stack. The 1.6.x line introduced xCU as a unit — local currency of any country x — added arguments for non-default iso3c and year columns, and made the package work with madrat caching and region mappings. The most recent release fixes a bug in iso3c column selection.
Where it's heading
The direction is toward accepting messier inputs from more callers. Successive releases have relaxed assumptions the package originally made — that a year column exists, that column names follow a convention, that PPP data is available for every country — and each relaxation is driven by an integration rather than by an economics question. The one genuinely methodological addition is the CPI as an alternative deflator, which arrived in 1.0.0.
Prediction
Conversion factors are versioned World Bank data and were last refreshed in 1.0.0, so a data update is the most likely content of the next substantive release, alongside continued fixes to the column-detection logic that has now produced bugs twice.

Recent moves

  1. 8mo ago

    Fix iso3c column selection

    A single bug fix in how the iso3c column is chosen, following the 1.6.0 work that made those columns configurable. Narrow correction to recently changed code.

    View source ↗
  2. 8mo ago

    xCU unit introduced; madrat caching and region mappings supported

    Adds xCU as a unit for the local currency of an arbitrary country, makes the package compatible with madrat caching, accepts a madrat regionmapping string in with_regions, and lets callers name non-default iso3c and year columns. Also fixes countries without PPP data silently missing US conversion factors, and drops the lifecycle dependency.

    View source ↗
  3. 1y ago

    Better column detection; magclass objects without years accepted

    Improves internal column detection and allows magclass objects that carry no year dimension. Small accommodations for how the surrounding modelling stack passes data in.

    View source ↗
  4. 2y ago

    CPI added as an alternative deflator; constant euro conversion

    Updates the World Bank conversion factors and data, adds the CPI as a deflator option with shortcut functions for single-value conversion, and adds options for constant euro output and US-only deflators. The only release that changes the methods available rather than the inputs accepted.

    View source ↗
  5. 3y ago

    Suggests field cleaned for CRAN compliance

    Tidies the Suggests field to meet CRAN specifications and improves documentation. Packaging housekeeping.

    View source ↗
  6. 3y ago

    Correct conversion factors returned by return_cfs

    Fixes the data frame returned when return_cfs = TRUE, which had been showing incorrect conversion factors, and clears dplyr warnings. A correctness fix in a diagnostic output rather than in the conversion itself.

    View source ↗