Skip to contents

Add title, subtitle and caption to a topogram.

Usage

topogram_labs(topo, title = NULL, subtitle = NULL, caption = NULL)

Arguments

topo

A topogram() htmlwidget object.

title

Main title.

subtitle

Subtitle.

caption

Brief explanation of the source of the data.

Value

A topogram() / topogram_proxy()htmlwidget object.

Examples

library(topogram)
library(htmltools)

topogram(world, "pop_est") %>% 
  topogram_labs(
    title = "World population",
    subtitle = "Population estimate for 2017",
    caption = tagList(
      "Data source:",
      tags$a(
        href = "https://www.naturalearthdata.com/",
        "NaturalEarth"
      )
    )
  )
#> Loading required namespace: stringi
#> Warning: 'geojsonlint' not installed, skipping GeoJSON linting