← Back to all sparks
U

unhcrthemes

ANALYTICS
Velocity0.0

UNHCR 'ggplot2' Theme and Colour Palettes

UNHCR's chart theme re-based itself on a new house standard, then lost its font pipeline to CRAN attrition.

data-visualizationggplot2-themebrand-standardshumanitarian-datar-packagetypography
Current state
unhcrthemes supplies theme_unhcr() and the agency's official palettes to ggplot2 users, making it the mechanism by which UNHCR's visual standards reach analysts' charts. The 2025 releases realigned the theme and palettes to the revised UNHCR Data Visualization Guidelines and then stripped out the extrafont dependency. Lato is now imported through systemfonts only.
Where it's heading
Two different forces drive this package. The first is institutional: when the agency published 2025 guidelines, the package followed within months, updating text and gridline colours, revising existing palettes and adding new categorical, sequential and diverging ramps, with older colours flagged for eventual removal. The second is defensive — the font stack was rebuilt not by choice but because Rttf2pt1 is leaving CRAN, and the honest release note concedes the cost: embedding the official Lato font in PDFs is no longer possible. A deprecation of the older palettes is already announced.
Prediction
The announced phase-out of deprecated colours is the most likely next release, since the 0.7.0 notes commit to it explicitly; any further font work depends on what systemfonts can offer for PDF embedding.

Recent moves

  1. 11mo ago

    Font pipeline rebuilt on systemfonts, PDF embedding lost

    A breaking change forced from outside: extrafont is dropped ahead of Rttf2pt1's CRAN removal, lato_registered() is deleted and import_lato() now routes through systemfonts alone. The release notes are unusually candid that this costs users embedded Lato in PDF output, leaving system-installed fonts as the fallback.

    View source ↗
  2. 1y ago

    Theme and palettes rebuilt on the 2025 UNHCR guidelines

    ⚡ SPARK

    The package re-bases on the 2025 UNHCR Data Visualization Guidelines rather than adding to what it had: theme text and gridline colours change, existing palettes are revised, and new categorical, sequential and diverging ramps arrive. This is the release the rest of the recent history orbits, and it puts the older colours on notice.

    View source ↗
  3. 1y ago

    Legend placement defaults and deprecated scale argument dropped

    Small legend placement defaults in theme_unhcr() and the removal of ggplot2's deprecated scale_name argument from the three scale constructors. Upkeep against upstream deprecations in the months before the guidelines refresh.

    View source ↗
  4. 2y ago

    Sans fallback when Lato is unavailable

    Adds sans as a fallback when Lato cannot be installed. A one-line robustness fix, and an early sign that font availability is this package's most persistent weak point.

    View source ↗
  5. 2y ago

    CRAN resubmission with documentation fixes

    A CRAN resubmission clearing review comments: DESCRIPTION quoting, the UNHCR acronym spelled out, and @return tags added to four exported functions. Process work with no effect on output.

    View source ↗