topogram_labs: Labs for topogram widget

Description Usage Arguments Value Examples

View source: R/topo-extras.R

Description

Add title, subtitle and caption to a topogram.

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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"
      )
    )
  )

dreamRs/topogRam documentation built on Dec. 16, 2021, 6:47 p.m.