Title: | Wrapper for 'Visa Chart Components' |
---|---|
Description: | Provides a set of wrapper functions for 'Visa Chart Components'. 'Visa Chart Components' <https://github.com/visa/visa-chart-components> is an accessibility focused, framework agnostic set of data experience design systems components for the web. |
Authors: | Christopher DeMartini [aut, cre], Stephanie Modica [aut], David Kutas [aut], Jaime Tanner [aut], Frank Elavsky [aut], Wojtek Kostelecki [ctb], Visa Data Experience Team [aut, fnd], Visa, Inc. [cph] |
Maintainer: | Christopher DeMartini <[email protected]> |
License: | MIT + file LICENSE |
Version: | 4.0.1 |
Built: | 2024-12-25 07:13:31 UTC |
Source: | CRAN |
R wrapper for @visa/alluvial-diagram via htmlwidgets.
Here is an example of alluvial-diagram in action:
alluvial_diagram( linkData, nodeData = NULL, sourceAccessor, targetAccessor, valueAccessor, nodeIDAccessor = "", groupAccessor = "", mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
alluvial_diagram( linkData, nodeData = NULL, sourceAccessor, targetAccessor, valueAccessor, nodeIDAccessor = "", groupAccessor = "", mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
linkData |
required to be a valid, R data frame. Data used to create links in diagram, an array of objects which includes keys that map to chart accessors. See d3-sankey for additional detail on data requirements. |
nodeData |
required to be a valid, R data frame. Optional. Data used to create nodes in diagram, an array of objects which includes key that map to chart accessors. See d3-sankey for additional detail on data requirements. |
sourceAccessor |
String. Key used to determine link's source, must be a node. |
targetAccessor |
String. Key used to determine link's target, must be a node. |
valueAccessor |
String. Key used to determine link (and ultimately node size). |
nodeIDAccessor |
String. Key used to determine unique node identifiers. Requires nodeData to be populated. |
groupAccessor |
String. Key used to determine link's group or category. |
mainTitle |
String. The dynamic tag of title for the map (or you can create your own separately). See |
subTitle |
String. The dynamic tag for a sub title for the map (or you can create your own separately). See |
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/alluvial-diagram |
... |
All other props passed into the function will be passed through to the chart, see all props for @visa/alluvial-diagram. |
To see all available options for the chart properties/API see @visa/alluvial-diagram.
a visaNodeLinkChart htmlwidget object for plotting an alluvial diagram
library(dplyr) data.frame(HairEyeColor) %>% filter(Sex=="Female") %>% mutate(newHair = paste(Hair,"-Hair")) %>% mutate(newEye = paste(Eye,"-Eye")) %>% alluvial_diagram(sourceAccessor = "newHair", targetAccessor = "newEye", valueAccessor = "Freq")
library(dplyr) data.frame(HairEyeColor) %>% filter(Sex=="Female") %>% mutate(newHair = paste(Hair,"-Hair")) %>% mutate(newEye = paste(Eye,"-Eye")) %>% alluvial_diagram(sourceAccessor = "newHair", targetAccessor = "newEye", valueAccessor = "Freq")
R wrapper for @visa/bar-chart via htmlwidgets.
Here is an example of bar-chart in action:
bar_chart( data, ordinalAccessor, valueAccessor, groupAccessor = "", mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
bar_chart( data, ordinalAccessor, valueAccessor, groupAccessor = "", mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
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. |
ordinalAccessor |
String. Key used to determine bar's categorical property. (similar to x in ggplot) |
valueAccessor |
String. Key used to determine bar's numeric property. (similar to y in ggplot) |
groupAccessor |
String. Key used to determine bar group encoding (e.g., color/texture). |
mainTitle |
String. The dynamic tag of title for the map (or you can create your own separately). See |
subTitle |
String. The dynamic tag for a sub title for the map (or you can create your own separately). See |
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/bar-chart |
... |
All other props passed into the function will be passed through to the chart, see all props for @visa/bar-chart. |
To see all available options for the chart properties/API see @visa/bar-chart.
a visaChart htmlwidget object for plotting a bar chart
library(dplyr) bar_chart(BOD, "Time", "demand") mtcars %>% sample_n(5) %>% tibble::rownames_to_column() %>% bar_chart("rowname", "mpg")
library(dplyr) bar_chart(BOD, "Time", "demand") mtcars %>% sample_n(5) %>% tibble::rownames_to_column() %>% bar_chart("rowname", "mpg")
R wrapper for @visa/circle-packing via htmlwidgets.
Here is an example of circle-packing in action:
circle_packing( data, nodeAccessor, parentAccessor, sizeAccessor, mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
circle_packing( data, nodeAccessor, parentAccessor, sizeAccessor, mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
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. See d3-hierarchy.stratify() for additional detail on data requirements. |
nodeAccessor |
String. Key used to determine circle's child, must be a unique child. |
parentAccessor |
String. Key used to determine circle's parent. |
sizeAccessor |
String. Key used to determine circle size. |
mainTitle |
String. The dynamic tag of title for the map (or you can create your own separately). See |
subTitle |
String. The dynamic tag for a sub title for the map (or you can create your own separately). See |
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/circle-packing |
... |
All other props passed into the function will be passed through to the chart, see all props for @visa/circle-packing. |
To see all available options for the chart properties/API see @visa/circle-packing.
a visaChart htmlwidget object for plotting a circle packing plot
library(dplyr) data.frame(parent = c(NA, "A", "A", "C", "C"), node = c("A", "B", "C", "D", "E"), size = c(NA, 8L, 7L, 6L, 5L)) %>% circle_packing("node", "parent", "size", accessibility = list(hideTextures = TRUE, hideDataTableButton = TRUE)) library(dplyr) data.frame(Orange) %>% mutate(age = as.character(age)) %>% bind_rows(data.frame(Tree = c(rep("Trees", 5), NA), age = c(1:5, "Trees"))) %>% circle_packing("age", "Tree", "circumference", accessibility=list(hideTextures = TRUE, includeDataKeyNames = TRUE, hideDataTableButton = TRUE))
library(dplyr) data.frame(parent = c(NA, "A", "A", "C", "C"), node = c("A", "B", "C", "D", "E"), size = c(NA, 8L, 7L, 6L, 5L)) %>% circle_packing("node", "parent", "size", accessibility = list(hideTextures = TRUE, hideDataTableButton = TRUE)) library(dplyr) data.frame(Orange) %>% mutate(age = as.character(age)) %>% bind_rows(data.frame(Tree = c(rep("Trees", 5), NA), age = c(1:5, "Trees"))) %>% circle_packing("age", "Tree", "circumference", accessibility=list(hideTextures = TRUE, includeDataKeyNames = TRUE, hideDataTableButton = TRUE))
R wrapper for @visa/clustered-bar-chart via htmlwidgets.
Here is an example of clustered-bar-chart in action:
clustered_bar_chart( data, ordinalAccessor, valueAccessor, groupAccessor, mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
clustered_bar_chart( data, ordinalAccessor, valueAccessor, groupAccessor, mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
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. |
ordinalAccessor |
String. Key used to determine bar's categorical property, within groups. (similar to x in ggplot) |
valueAccessor |
String. Key used to determine bar's numeric property. (similar to y in ggplot) |
groupAccessor |
String. Key used to determine bar clusters. |
mainTitle |
String. The dynamic tag of title for the map (or you can create your own separately). See |
subTitle |
String. The dynamic tag for a sub title for the map (or you can create your own separately). See |
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/clustered-bar-chart |
... |
All other props passed into the function will be passed through to the chart, see all props for @visa/clustered-bar-chart. |
To see all available options for the chart properties/API see @visa/clustered-bar-chart.
a visaChart htmlwidget object for plotting a clustered bar chart
library(dplyr) data.frame(UCBAdmissions) %>% filter(Admit == "Rejected") %>% clustered_bar_chart("Gender","Freq","Dept")
library(dplyr) data.frame(UCBAdmissions) %>% filter(Admit == "Rejected") %>% clustered_bar_chart("Gender","Freq","Dept")
R wrapper for @visa/dumbbell-plot via htmlwidgets.
Here is an example of dumbbell-plot in action:
dumbbell_plot( data, ordinalAccessor, valueAccessor, seriesAccessor, mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
dumbbell_plot( data, ordinalAccessor, valueAccessor, seriesAccessor, mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
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. |
ordinalAccessor |
String. Key used to determine dumbbell's categorical property. (similar to x in ggplot) |
valueAccessor |
String. Key used to determine dumbbell's numeric property. (similar to y in ggplot) |
seriesAccessor |
String. Key used to determine dumbbell's series. |
mainTitle |
String. The dynamic tag of title for the map (or you can create your own separately). See |
subTitle |
String. The dynamic tag for a sub title for the map (or you can create your own separately). See |
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/dumbbell-plot |
... |
All other props passed into the function will be passed through to the chart, see all props for @visa/dumbbell-plot. |
To see all available options for the chart properties/API see @visa/dumbbell-plot.
a visaChart htmlwidget object for plotting a dumbbell plot
library(dplyr) data.frame(UCBAdmissions) %>% filter(Admit == "Rejected") %>% dumbbell_plot("Dept","Freq","Gender")
library(dplyr) data.frame(UCBAdmissions) %>% filter(Admit == "Rejected") %>% dumbbell_plot("Dept","Freq","Gender")
R wrapper for @visa/heat-map via htmlwidgets.
Here is an example of heat-map in action:
heat_map( data, xAccessor, yAccessor, valueAccessor, mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
heat_map( data, xAccessor, yAccessor, valueAccessor, mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
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. |
xAccessor |
String. Key used to determine the x-axis categorical value. (similar to x in ggplot) |
yAccessor |
String. Key used to determine the y-axis categorical value. (similar to y in ggplot) |
valueAccessor |
String. Key used to determine heatmap's numeric property, for assigning color. |
mainTitle |
String. The dynamic tag of title for the map (or you can create your own separately). See |
subTitle |
String. The dynamic tag for a sub title for the map (or you can create your own separately). See |
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/heat-map |
... |
All other props passed into the function will be passed through to the chart, see all props for @visa/heat-map. |
To see all available options for the chart properties/API see @visa/heat-map.
a visaChart htmlwidget object for plotting a heat map
library(dplyr) data.frame(UCBAdmissions) %>% filter(Admit == "Rejected") %>% heat_map("Dept","Gender", "Freq")
library(dplyr) data.frame(UCBAdmissions) %>% filter(Admit == "Rejected") %>% heat_map("Dept","Gender", "Freq")
R wrapper for @visa/line-chart via htmlwidgets.
Here is an example of line-chart in action:
line_chart( data, ordinalAccessor, valueAccessor, seriesAccessor, mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
line_chart( data, ordinalAccessor, valueAccessor, seriesAccessor, mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
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. |
ordinalAccessor |
String. Key used to determine line's categorical property. (similar to x in ggplot) |
valueAccessor |
String. Key used to determine line's numeric property. (similar to y in ggplot) |
seriesAccessor |
String. Key used to determine series (e.g., color/texture). |
mainTitle |
String. The dynamic tag of title for the map (or you can create your own separately). See |
subTitle |
String. The dynamic tag for a sub title for the map (or you can create your own separately). See |
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/line-chart |
... |
All other props passed into the function will be passed through to the chart, see all props for @visa/line-chart. |
To see all available options for the chart properties/API see @visa/line-chart.
a visaChart htmlwidget object for plotting a line chart
library(dplyr) ChickWeight %>% filter(Chick==1 | Chick == 4) %>% line_chart("Time", "weight", "Chick", showBaselineX=FALSE, xAxis=list(label="Time",format="0a", visible=TRUE), yAxis=list(label="Weight", visible=TRUE, gridVisible=TRUE), mainTitle = "Selected chick weight over time")
library(dplyr) ChickWeight %>% filter(Chick==1 | Chick == 4) %>% line_chart("Time", "weight", "Chick", showBaselineX=FALSE, xAxis=list(label="Time",format="0a", visible=TRUE), yAxis=list(label="Weight", visible=TRUE, gridVisible=TRUE), mainTitle = "Selected chick weight over time")
R wrapper for @visa/parallel-plot via htmlwidgets.
Here is an example of parallel-plot in action:
parallel_plot( data, ordinalAccessor, valueAccessor, seriesAccessor, mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
parallel_plot( data, ordinalAccessor, valueAccessor, seriesAccessor, mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
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. |
ordinalAccessor |
String. Key used to determine line's categorical property. (similar to x in ggplot) |
valueAccessor |
String. Key used to determine line's numeric property. (similar to y in ggplot) |
seriesAccessor |
String. Key used to determine series (e.g., color/texture). |
mainTitle |
String. The dynamic tag of title for the map (or you can create your own separately). See |
subTitle |
String. The dynamic tag for a sub title for the map (or you can create your own separately). See |
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/parallel-plot |
... |
All other props passed into the function will be passed through to the chart, see all props for @visa/parallel-plot. |
To see all available options for the chart properties/API see @visa/parallel-plot.
a visaChart htmlwidget object for plotting a parallel plot
library(dplyr) ChickWeight %>% filter(Chick==1 | Chick == 4) %>% parallel_plot("Time", "weight", "Chick", showBaselineX=FALSE, xAxis=list(label="Time",format="0a", visible=TRUE), yAxis=list(label="Weight", visible=FALSE, gridVisible=FALSE), mainTitle = "Selected chick weight over time", dataLabel=list(visible = TRUE, labelAccessor = "weight", placement = "bottom-right", format = "0a"))
library(dplyr) ChickWeight %>% filter(Chick==1 | Chick == 4) %>% parallel_plot("Time", "weight", "Chick", showBaselineX=FALSE, xAxis=list(label="Time",format="0a", visible=TRUE), yAxis=list(label="Weight", visible=FALSE, gridVisible=FALSE), mainTitle = "Selected chick weight over time", dataLabel=list(visible = TRUE, labelAccessor = "weight", placement = "bottom-right", format = "0a"))
R wrapper for @visa/pie-chart via htmlwidgets.
Here is an example of pie-chart in action:
pie_chart( data, ordinalAccessor, valueAccessor, mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
pie_chart( data, ordinalAccessor, valueAccessor, mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
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. |
ordinalAccessor |
String. Key used to determine chart's categorical property. |
valueAccessor |
String. Key used to determine chart's numeric property. |
mainTitle |
String. The dynamic tag of title for the map (or you can create your own separately). See |
subTitle |
String. The dynamic tag for a sub title for the map (or you can create your own separately). See |
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/pie-chart |
... |
All other props passed into the function will be passed through to the chart, see all props for @visa/pie-chart. |
To see all available options for the chart properties/API see @visa/pie-chart.
a visaChart htmlwidget object for plotting a pie chart
library(dplyr) data.frame (HairEyeColor) %>% filter(Hair=="Blond", Sex=="Male") %>% mutate(blueEyes = if_else(Eye=="Blue", "Blue","Other")) %>% group_by(blueEyes, Hair, Sex) %>% summarise(FreqSum=sum(Freq), n=n()) %>% pie_chart( "blueEyes", "FreqSum", mainTitle="How many males with Blonde hair have Blue eyes?", sortOrder="desc" )
library(dplyr) data.frame (HairEyeColor) %>% filter(Hair=="Blond", Sex=="Male") %>% mutate(blueEyes = if_else(Eye=="Blue", "Blue","Other")) %>% group_by(blueEyes, Hair, Sex) %>% summarise(FreqSum=sum(Freq), n=n()) %>% pie_chart( "blueEyes", "FreqSum", mainTitle="How many males with Blonde hair have Blue eyes?", sortOrder="desc" )
R wrapper for @visa/scatter-plot via htmlwidgets.
Here is an example of scatter-plot in action:
scatter_plot( data, xAccessor, yAccessor, groupAccessor = "", mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
scatter_plot( data, xAccessor, yAccessor, groupAccessor = "", mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
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. |
xAccessor |
String. Key used to determine each point's position along the x-axis. |
yAccessor |
String. Key used to determine each point's position along the y-axis. |
groupAccessor |
String. Key used to determine bar group encoding (e.g., color/texture). |
mainTitle |
String. The dynamic tag of title for the map (or you can create your own separately). See |
subTitle |
String. The dynamic tag for a sub title for the map (or you can create your own separately). See |
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/scatter-plot |
... |
All other props passed into the function will be passed through to the chart, see all props for @visa/scatter-plot. |
To see all available options for the chart properties/API see @visa/scatter-plot.
a visaChart htmlwidget object for plotting a scatter plot
library(dplyr) scatter_plot(mtcars[order(mtcars$cyl),], "wt", "mpg", "cyl")
library(dplyr) scatter_plot(mtcars[order(mtcars$cyl),], "wt", "mpg", "cyl")
R wrapper for @visa/stacked-bar-chart via htmlwidgets.
Here is an example of stacked-bar-chart in action:
stacked_bar_chart( data, ordinalAccessor, valueAccessor, groupAccessor, mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
stacked_bar_chart( data, ordinalAccessor, valueAccessor, groupAccessor, mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
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. |
ordinalAccessor |
String. Key used to determine bar's categorical property, within groups. (similar to x in ggplot) |
valueAccessor |
String. Key used to determine bar's numeric property. (similar to y in ggplot) |
groupAccessor |
String. Key used to determine bar clusters. |
mainTitle |
String. The dynamic tag of title for the map (or you can create your own separately). See |
subTitle |
String. The dynamic tag for a sub title for the map (or you can create your own separately). See |
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/stacked-bar-chart |
... |
All other props passed into the function will be passed through to the chart, see all props for @visa/stacked-bar-chart. |
To see all available options for the chart properties/API see @visa/stacked-bar-chart.
a visaChart htmlwidget object for plotting a stacked bar chart
library(dplyr) data.frame(UCBAdmissions) %>% filter(Admit == "Rejected") %>% stacked_bar_chart("Gender", "Freq", "Dept")
library(dplyr) data.frame(UCBAdmissions) %>% filter(Admit == "Rejected") %>% stacked_bar_chart("Gender", "Freq", "Dept")
Visa Chart Components wrapped in r htmlwidgets package
visaChart(tagName, data, propList, width = NULL, height = NULL, ...)
visaChart(tagName, data, propList, width = NULL, height = NULL, ...)
tagName |
String. The custom web component HTML tag for the Visa Chart Component. Set by respective chart functions. |
data |
a valid R data frame. See more details in respective component functions. |
propList |
a list of props, created by each component function, see Visa Chart Components. |
width |
Number. Width of chart container. |
height |
Number. Height of chart container. |
... |
All other props passed into the function will be passed through to the chart. |
a visaChart htmlwidget object for creating a variety of plot types
Output and render functions for using visaChart within Shiny applications and interactive Rmd documents.
visaChartOutput(outputId, width = "100%", height = "400px") renderVisaChart(expr, env = parent.frame(), quoted = FALSE)
visaChartOutput(outputId, width = "100%", height = "400px") renderVisaChart(expr, env = parent.frame(), quoted = FALSE)
outputId |
output variable to read from |
width , height
|
Must be a valid CSS unit (like |
expr |
An expression that generates a visaChart |
env |
The environment in which to evaluate |
quoted |
Is |
a Shiny output or render function for visaChart htmlwidgets
Visa Chart Components wrapped in r htmlwidgets package
visaNodeLinkChart( tagName, linkData, nodeData, propList, width = NULL, height = NULL, ... )
visaNodeLinkChart( tagName, linkData, nodeData, propList, width = NULL, height = NULL, ... )
tagName |
String. The custom web component HTML tag for the Visa Chart Component. Set by respective chart functions. |
linkData |
a valid R data frame. See more details in respective component functions. |
nodeData |
a valid R data frame. See more details in respective component functions. |
propList |
a list of props, created by each component function, see Visa Chart Components. |
width |
Number. Width of chart container. |
height |
Number. Height of chart container. |
... |
All other props passed into the function will be passed through to the chart. |
a visaNodeLinkChart htmlwidget object for creating a variety of plot types
Output and render functions for using visaNodeLinkChart within Shiny applications and interactive Rmd documents.
visaNodeLinkChartOutput(outputId, width = "100%", height = "400px") rendervisaNodeLinkChart(expr, env = parent.frame(), quoted = FALSE)
visaNodeLinkChartOutput(outputId, width = "100%", height = "400px") rendervisaNodeLinkChart(expr, env = parent.frame(), quoted = FALSE)
outputId |
output variable to read from |
width , height
|
Must be a valid CSS unit (like |
expr |
An expression that generates a visaNodeLinkChart |
env |
The environment in which to evaluate |
quoted |
Is |
a Shiny output or render function for visaNodeLinkChart htmlwidgets
R wrapper for @visa/world-map via htmlwidgets.
Here is an example of world-map in action:
world_map( data, joinAccessor = "", joinNameAccessor = "", markerAccessor = "", markerNameAccessor = "", latitudeAccessor = "", longitudeAccessor = "", valueAccessor, groupAccessor = "", mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
world_map( data, joinAccessor = "", joinNameAccessor = "", markerAccessor = "", markerNameAccessor = "", latitudeAccessor = "", longitudeAccessor = "", valueAccessor, groupAccessor = "", mainTitle = "", subTitle = "", accessibility = list(), props = list(), ... )
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 |
subTitle |
String. The dynamic tag for a sub title for the map (or you can create your own separately). See |
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. |
To see all available options for the chart properties/API see @visa/world-map.
a visaChart htmlwidget object for plotting a world map
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) ) )
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) ) )