world_map {visachartR}R Documentation

world_map

Description

R wrapper for @visa/world-map via htmlwidgets.

Here is an example of world-map in action: example world map

Usage

world_map(
  data,
  joinAccessor = "",
  joinNameAccessor = "",
  markerAccessor = "",
  markerNameAccessor = "",
  latitudeAccessor = "",
  longitudeAccessor = "",
  valueAccessor,
  groupAccessor = "",
  mainTitle = "",
  subTitle = "",
  accessibility = list(),
  props = list(),
  ...
)

Arguments

data

required to be a valid, R data frame. Data used to create chart, an array of objects which includes keys that map to chart accessors.

joinAccessor

String. Key used to determine country's key property (ISO 3-Digit Code).

joinNameAccessor

String. Key used to determine country's name property.

markerAccessor

String. Key used to determine marker's key property.

markerNameAccessor

String. Key used to determine marker's name property.

latitudeAccessor

String. Key used to determine marker's latitude property.

longitudeAccessor

String. Key used to determine marker's longitude property.

valueAccessor

String. Key used to determine the country/marker's numeric property.

groupAccessor

String. Key used to determine country/marker color.

mainTitle

String. The dynamic tag of title for the map (or you can create your own separately). See highestHeadingLevel prop for how tags get assigned.

subTitle

String. The dynamic tag for a sub title for the map (or you can create your own separately). See highestHeadingLevel prop for how tags get assigned.

accessibility

List(). Manages messages and settings for chart accessibility, see object definition

props

List(). A valid R list with additional property configurations, see all props for @visa/world-map

...

All other props passed into the function will be passed through to the chart, see all props for @visa/world-map.

Details

To see all available options for the chart properties/API see @visa/world-map.

Value

a visaChart htmlwidget object for plotting a world map

Examples

library(dplyr)
quakes %>%
 sample_n(100) %>%
 tibble::rowid_to_column() %>%
 world_map(
   markerAccessor = "rowid",
   latitudeAccessor = "long",
   longitudeAccessor = "lat",
   valueAccessor = "stations",
   markerStyle=list(
    visible=TRUE,
    fill=TRUE,
    opacity=.5,
    radiusRange=c(5,15)
   )
 )

[Package visachartR version 3.3.0 Index]