---
title: "Locations (Norway)"
output: rmarkdown::html_vignette
author: "Richard Aubrey White"
date: "2022-11-18"
vignette: >
  %\VignetteIndexEntry{Locations (Norway)}
  %\VignetteEncoding{UTF-8}
  %\VignetteEngine{knitr::rmarkdown}
editor_options: 
  chunk_output_type: console
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(csdata)
library(data.table)
library(magrittr)
```

Valid locations (and location types) are available in `csdata::nor_locations_names()`.

Here we list as a reference table the valid `location_code`s and `location_name_description_nb`s (the two most commonly used locations).

```{r echo=FALSE, results='asis'}
d <- csdata::nor_locations_names()[, .(
  location_order = paste0("#", location_order),
  location_code,
  location_name_description_nb
)]

gt::gt(d) %>%
  gt::tab_options(
    table.width = "750px"
  ) %>%
  gt::tab_header(title = "Reference table of location_code and location_name_description_nb") %>%
  gt::cols_label(
    location_order = "#"
  )
```
