line_plot {bdl}R Documentation

Generate quick line plot

Description

Generate line plot for one unit/multiple variables or variable/multiple units

Usage

line_plot(
  data_type = c("unit", "unit.locality", "variable", "variable.locality"),
  unitId = NULL,
  varId = NULL,
  year = NULL,
  aggregateId = NULL,
  lang = NULL,
  unitParentId = NULL,
  unitLevel = NULL,
  ...
)

Arguments

data_type

A type of data used for generating plot, "unit"(default), "unit.locality","variable","variable.locality"

unitId

A 12 character NUTS unit id or locality 12 character id with 7 characters locality individual id, separated by dash.

varId

A vector of variable Id's (data_type equal "unit" or "unit.locality) or single variable (data_type equal "variable" or "variable.locality"). Use search_variables or get_variables to find variable id code.

year

A vector of years. If NULL (default) returns data for all available years.

aggregateId

An aggregate id. Use get_aggregates for more info.

lang

A language of returned data, "pl" (default), "en"

unitParentId

A 12 character NUTS id code of interested unit. (Used only with data_type equal "variable" or "variable.locality") Use search_units or get_units to find unit id code.

unitLevel

A number from 0 to 6, filters the returned unit by its level. (Used only with data_type equal "variable") If NULL (default) no level filters apply. Use get_levels to find more info.

...

Other arguments passed on to GET. For example a proxy parameters, see details.

Details

Generate quickly 'ggplot2' plot, using BDL data.

Plot multiple variable values for one unit or one variable value for multiple units.

To use a proxy to connect, a use_proxy can be passed to GET. For example get_request(id, filters, config = httr::use_proxy(url, port, username, password)).

Value

A ggplot2 plot.

Examples

  # line_plot(data_type = "unit", unitId = "000000000000", varId = c("415","420"))

[Package bdl version 1.0.5 Index]