The relevant columns for this dataset relating to site and location include

- socken = location, where location_type = 2 (in this case parish)
- landskap = location, where location_type = 2 (in this case province)
- place_name = site_name
- raa_id = site_property, where property_type = RAÄ_number
- site_type = site_property, where property_type = type_of_site
- site_id = Lämningsnummer = national_site_identifier
- uppdragsnummer = site_property, where property_type = uppdragsnummer (the official government number on record for a specific Swedish archaeological excavation)

  • Bruno used the extra column location_type_id = 2 for everything in the dataset
  • Since the entire dataset is Sweden specific, should we also add a column to every row for Country ( location_type_id = 1) and set it to Sweden?

Unnest

ID Variables(columns to keep as is)
Value Variables
(columns to unpivot)
Variable Name Column
(name for the new column containing variable names)
Value Name Column
landskap, sockenlocation_type_namelocation_name

lookup table info

location_type_idlocation_type
1Country
2provience
4settlment
17Archaeological site
abbreviationProvince name
Blekinge
BoBohuslän
Dalarna
Dalsland
Gotland
Gästrikland
HaHalland
Hälsingland
Härjedalen
Jämtland
Lappland
MeMedelpad
Norrbotten
NäNärke
SkSkåne
SmSmåland
SöSödermanland
UpUppland
Värmland
Västerbotten
vgVästergötland
VsVästmanland
Ångermanland
Öland
ÖgÖstergötland
  • the settlements need to have h location_type_id = 4 associated with them
  • the archaeological sites (lämningsnummber and RAÄ nummer) need to have h location_type_id = 17 associated with them

YAML as of 2026-09-29

name: location
type: entity
system_id: system_id
keys:
  - location_name
columns:
  - socken
  - landskap
public_id: location_id
source: datasheet
drop_duplicates:
  - location_name
check_functional_dependency: false
unnest:
  id_vars: []
  value_vars:
    - landskap
    - socken
  var_name: location_type_name
  value_name: location_name
extra_columns:
  location_type_id: 2
```