time_series_pdf: Export ggplot with city time series to pdf file

Description Usage Arguments Value Examples

Description

The function helps to create pdf with ggplot for visual checking the quality of city data

Usage

1
time_series_pdf(dataset, folder = getwd(), filename = NULL, begin = 2010, end = 2020, lag = 5, oktmo_style = FALSE, scn_vec = NULL, kpi_vec = "All", ind_vec = "All")

Arguments

dataset

Dataframe with mandatory fields : year (integer), location (integer), indicator (c-code in character), industry (character) or okved (character)

folder

Path in string for saving pdf-document

filename

filename, like "all2",

begin

First year for charts plot

end

Last year for charts plot

lag

The numbers of intervals which splite time period between "begin" & "end" years to render on x-axix

oktmo_style

Boolean, TRUE (by default) if title should include oktmo instead of city name. FALSE if city name on title preferable

scn_vec

Vector with column's names needed to be displayed on chart. e.g. c ("fact", "dyn_calc')

kpi_vec

Vector of C-codes in character like c("C019", "C475") or "All" in cases ploting all indicators on 1 per plot

ind_vec

Vector with the code of industries & okved like c("1", "5") or "All" in cases ploting all industies in 1 pdf section."AllCity" by default if no industry column

Value

Pdf-file with ggplots in folder

Examples

1
2
3
path <- 'https://www.dropbox.com/s/x0izu2v5b1jrd7d/sd_sample.csv?dl=1'
sd <- read.table(path, header = T, sep = ";")
time_series_pdf(dataset     = sd, folder = getwd(), begin = 2000, end = 2030, lag = 1, oktmo_style = F, kpi_vec = c ("C475", "C499"), ind_vec = "All")

St-Digital-Twin/Dtwin documentation built on Jan. 1, 2022, 8:11 p.m.