iplotIndDist: Interactive indicator distribution plots

Description Usage Arguments Value Examples

View source: R/coin_iplot.R

Description

Generates a JavaScript distribution plot of a single indicator, using plotly. Plot can be embedded e.g. in HTML documents, websites, etc, or used for more interactive data exploration. This only plots one indicator at a time - for multiple plots you can use plotIndDist().

Usage

1
2
3
4
5
6
7
8
iplotIndDist(
  COIN,
  dset = "Raw",
  icodes = NULL,
  ptype = "Violin",
  aglev = 1,
  axlims = NULL
)

Arguments

COIN

The COIN object, or a data frame of indicator data

dset

The source data set to use for indicator data (if input is COIN object)

icodes

A character vector of a single indicator name or aggregate name to plot.

ptype

The type of plot to produce. Currently supports "Violin" and "Histogram".

aglev

The aggregation level to extract the indicator data from. Defaults to indicator level (1)

axlims

Optional parameter specifying axis limits. Useful mainly for matching with another plot.

Value

Plots generated with plotly. These can be edited further with plotly commands.

Examples

1
2
3
4
# build ASEM COIN
ASEM <- assemble(IndData = ASEMIndData, IndMeta = ASEMIndMeta, AggMeta = ASEMAggMeta)
# plot renewable energy indicator
iplotIndDist(ASEM, "Raw", "Renew", ptype = "Violin")

COINr documentation built on Nov. 30, 2021, 9:06 a.m.