plot_voi_doi {globaltrends}R Documentation

Line plots of VOI and DOI time series

Description

The function uses the outputs of export_voi and export_doi to prepare a parallel time series plot of volume and degree of internationalization values. When the output includes more than one keyword, only the first keyword is used.

Usage

plot_voi_doi(
  data_voi,
  data_doi,
  type = c("obs", "sad", "trd"),
  measure = c("gini", "hhi", "entropy"),
  locations = "countries",
  smooth = TRUE
)

Arguments

data_voi

Data exported from export_voi function.

data_doi

Data exported from export_doi function.

type

Object of type character indicating the type of time series-column from data_score, takes either obs, sad, or trd. Defaults to "obs".

measure

Object of type character indicating the DOI measure, takes either gini, hhi, or entropy. Defaults to "gini".

locations

Object of type character indicating for which set of locations should be filtered. Defaults to "countries".

smooth

Object of type logical indicating whether the geom_smooth function of ggplot2 should be used. Defaults to TRUE.

Value

Line plot of VOI and DOI time series as ggplot2 object.

See Also

Examples

## Not run: 
data1 <- export_voi(keyword = "manchester united")
data2 <- export_doi(
  keyword = "manchester united",
  locations = "countries"
)
plot_voi_doi(
  data_voi = data1,
  data_doi = data2,
  type = "obs",
  measure = "gini",
  smooth = TRUE
)
plot_voi_doi(
  data_voi = data1,
  data_doi = data2,
  type = "sad",
  measure = "hhi",
  smooth = FALSE
)
plot_voi_doi(
  data_voi = data1,
  data_doi = data2,
  type = "trd",
  measure = "entropy",
  smooth = TRUE
)

## End(Not run)


[Package globaltrends version 0.0.14 Index]