Skip to contents

Create a map with the risk color of each region (NUTS3 granularity), without financial data.

Usage

map_region_risk(
  data,
  country_code = c("DE"),
  benchmark = c("all", "isic_4digit", "tilt_sector", "unit", "unit_isic_4digit",
    "unit_tilt_sector"),
  mode = c("equal_weight", "worst_case", "best_case")
)

Arguments

data

A data frame like without_financial

country_code

Country code (ISO 3166 alpha-2) for which the map will be plotted.

benchmark

The mode of benchmark to plot. It can be one of "all", "unit" or "tilt_sector", "unit_tilt_sector", "isic_4digit" or "unit_isic_4digit". If nothing is chosen, "all" is the default mode.

mode

The mode to plot. It can be one of "equal_weight", "worst_case" or "best_case". If nothing is chosen, "equal_weight" is the default mode.

Value

A ggplot2 object representing the country data plot.

Examples

# Plot a German with a "unit" benchmark and equal_weight finance
try({
  map_region_risk(without_financial, country_code = "DE", benchmark = "unit")
})
#> Extracting data using giscoR package, please report issues on https://github.com/rOpenGov/giscoR/issues
#> Cache management as per giscoR. see 'giscoR::gisco_get_nuts()'
#> HTTP Status Code: 503 - Service Unavailable
#> 
#> url 
#>   https://gisco-services.ec.europa.eu/distribution/v2/nuts/geojson/NUTS_RG_10M_2016_3035_LEVL_3.geojson  not reachable.
#> 
#> Please download manually.  If you think this is a bug please consider opening an issue on  https://github.com/ropengov/giscoR/issues
#> Returning `NULL`
#> Error in UseMethod("filter") : 
#>   no applicable method for 'filter' applied to an object of class "NULL"