hc_bar_chart_country: Bar Chart plot with highchart()

Description Usage Arguments Value See Also Examples

View source: R/ggts_corona.R

Description

Visualization with top x country series bar chart

Usage

1
hc_bar_chart_country(data, x = "Country", y, title = "Text", n = 15)

Arguments

data

A data.frame object with data to chart. Code region and value are required.

x

A string value with the column name for the bar names, default = "Country".

y

A string value with the column name for the bar data values.

title

A string value with the title of the chart.

n

numeric, number of bars in chart

Value

highchart plot

See Also

Create a highchart object https://rdrr.io/cran/highcharter/man/hchart.html

Highcharts series.bar and aesthetic mappings https://api.highcharts.com/highcharts/series.bar https://rdrr.io/cran/highcharter/man/hcaes.html

Examples

1
2
3
4
last_date <- max(corona_data$Date)
data <- corona_data %>%
  dplyr::filter(Date == last_date & Case_Type == "Confirmed" & Country != "World")
hc_bar_chart_country(data, y = "Population",  title = "World Population")

WoVollmer/pkgTS documentation built on June 2, 2021, 4:02 a.m.