nutsr provides functions to visualize spatial data. This article showcases currently implemented methods as well as some prototypes for future visualization.
Maps
nuts_map() creates maps of regions using the leaflet package. The input dataset should contain region codes that are compatible with nutsr.
Drilldown
nuts_drilldown() allows you to create graphs similar to https://www.highcharts.com/demo/column-drilldown based on iso5 data. Regions can be expanded by clicking on the bars. It is planned to also add support for iso3 data in the future.
nuts_drilldown(iso5_pop(), title = "Population of ${name}",
value_label = "population")To use this function with STATcubeR datasets, it is easiest to use the raw parameter of the $tabulate() method.
x <- STATcubeR::od_table('OGD_gem_basis_quer1_GemHH_BQ_1')
y <- x$tabulate("Commune", "Ordinary expenditures", raw = TRUE)
y <- y[y[[1]] %in% iso5()$code, ]
nuts_drilldown(y, title = "ordinary expenditures in ${name}",
value_label = "expenditures")Scatter
readRDS('graphs/by_age.rds')Timeseries
readRDS('graphs/ts_to_bar.rds')Packed Bubble
readRDS('graphs/packedbubble.rds')Bubble chart
readRDS('graphs/bubble.rds')Voilin
readRDS('graphs/violin.rds')Age Distribution
readRDS('graphs/dist_nuts2.rds')Treemap
readRDS('graphs/treemap.rds')Dumbbell
readRDS('graphs/dumbbell.rds')