iplotIndDist2: Interactive indicator distribution plots for two indicators...

Description Usage Arguments Value Examples

View source: R/coin_iplot.R

Description

Generates a JavaScript distribution plot of two indicators, using Plotly. Plot can be embedded e.g. in HTML documents, websites, etc, or used for more interactive data exploration.

Usage

1
2
3
4
5
6
7
iplotIndDist2(
  COIN,
  dsets = "Raw",
  icodes = NULL,
  ptype = "Scatter",
  aglevs = 1
)

Arguments

COIN

The COIN, or a data frame of indicator data

dsets

The source data sets to use for indicator data (if input is COIN object). If the source data sets are the same, this can be a single character string, otherwise, a character vector, e.g. c("Raw", "Treated").

icodes

A character vector of two indicator codes to plot (corresponding to the two dsets specified)

ptype

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

aglevs

The aggregation level to extract the indicator data from. Defaults to indicator level (1). This also can be specified as a vector if the two indicators are from different levels.

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 CO2 against renewable energy indicator
iplotIndDist2(ASEM, dsets = "Raw", icodes = c("Renew", "CO2"))

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