values_minimize: Simplify a Kolada values table

View source: R/data.R

values_minimizeR Documentation

Simplify a Kolada values table

Description

Simplify a Kolada values table, i.e as created by get_values, by removing columns that contain monotonous data, i.e. that contain only one value for all observations.

Usage

values_minimize(values_df)

Arguments

values_df

A Kolada value table, as created by get_values.

Value

A Kolada values table

Examples

# Download values for all available years of a given KPI for
# Malmö municipality (code 1280)
vals <- get_values(kpi = "N45933", municipality = "1280", simplify = TRUE)
# (Returns a table with 5 rows and 8 columns)

# Remove columns with no information to differentiate between rows
values_minimize(vals)
# (Returns a table with 5 rows and 4 columns)

rKolada documentation built on March 18, 2022, 5:07 p.m.