Skip to content

Commit fb84ca5

Browse files
authored
250825 Data Update, Ballot Topics and Quarto Enhancements (#13)
* feat: add ballot topics * feat: update data 20250819 * chore: update git-cliff to v4 in changelog workflow * fix: fix typo * feat: split exploratory plots depending on MP origin * fix: fix MP name typo * feat: update year entry * fix: update party affiliations * feat: make use of dynamically created plots * feat: add information csv on parties and MPs * fix: fix citation key * feat: expand party description * fix: improve code chunk names * feat: add substitute MP information * feat: add more statistics base data * style: format list alphabetically * feat: enhance report with better charts * feat: better linking in quarto * feat: update codebook to use inline computing * feat: move static data files to subfolder * feat: improve markdown formatting * feat: bring metadata json files up to date * feat: update party information * feat: improve code for generating MP table * feat: enhance codebook with new variables and better formatting * feat: add party affiliation to MP_dates * feat: add colours to party information data * feat: add timeline visualisation of party representation in FT * fix: improve variable descriptions * feat: enhance description of dataset * feat: add Faroese MP L. Petersen to the dataset * feat: bring targets workflow up to date * feat: add metadata to ballot_topics * feat: add missing MP to codebook description * feat: add UML datamodel visualization * fix: fix links to renamed data frame * feat: improve sample plot code * feat: improve content structure * chore: remove outdated static files * feat: restructure page navigation * feat: improve language * feat: use lowercase variable names as in other csv files * ci: snapshot renv lockfile * ci: add libglpk-dev as dependency to workflow
1 parent 2a8e781 commit fb84ca5

36 files changed

+69252
-40613
lines changed

.github/workflows/changelog.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
fetch-depth: 0
1414

1515
- name: Generate a changelog
16-
uses: orhun/git-cliff-action@v2
16+
uses: orhun/git-cliff-action@v4
1717
id: git-cliff
1818
with:
1919
config: cliff.toml

.github/workflows/quarto-publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
- name: Install system dependencies for R packages
7373
run: |
7474
sudo apt-get update
75-
sudo apt-get install -y libcurl4-openssl-dev pkg-config
75+
sudo apt-get install -y libcurl4-openssl-dev pkg-config libglpk-dev
7676
7777
- name: Setup R environment
7878
uses: r-lib/actions/setup-renv@v2

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This repository contains voting records of Greenlandic and Faroese Members of Pa
1515
The structure of this repository is based on the [Open Research Data Template](https://github.com/maehr/open-research-data-template) by [@maehr](https://github.com/maehr), follows the [Advanced Structure for Data Analysis](https://the-turing-way.netlify.app/project-design/project-repo/project-repo-advanced.html) of _The Turing Way_ and is organized as follows:
1616

1717
- `analysis/`: scripts and notebooks used to analyze the data
18-
- `assets/`: images, logos, etc. used in the README and other documentation
18+
- `assets/`: images, background data, literature references etc. used in the README and other documentation
1919
- `build/`: built files, PDF outputs
2020
- `data/`: data files
2121
- `docs/`: documentation for the data and the repository
@@ -33,7 +33,7 @@ For all MPs that were elected in either Greenland or the Faroe Islands since 200
3333

3434
In this repository, the raw data is available as `csv` files, and processed data is available as `rds` and `csv` files including metadata. Also included is the workflow to replicate and update the data set using R.
3535

36-
Descriptions of all variables are provided in the [codebook](./docs/codebook.qmd). Take a first glance at the dataset [in report.qmd](report.qmd).
36+
Descriptions of the workflow and all variables are provided in the [codebook](./docs/codebook.qmd). To get an impression of the available data, take a [first glance](report.qmd).
3737

3838
### Installation
3939

_quarto.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ website:
3434
sidebar:
3535
contents:
3636
- section: nordatlantisk-ft
37+
contents:
38+
- text: Data Overview
39+
href: report.qmd
40+
- text: Codebook
41+
href: docs/codebook.qmd
42+
- text: Zotero
43+
href: 'https://www.zotero.org/groups/5346749/nordatlantisk-ft'
44+
- section: Repository
3745
href: index.qmd
3846
contents:
3947
- text: Changelog
@@ -48,8 +56,6 @@ website:
4856
href: LICENSE-AGPL.md
4957
- text: Security
5058
href: SECURITY.md
51-
- href: report.qmd
52-
contents: project-management/*
5359

5460
format:
5561
html:
@@ -61,6 +67,8 @@ format:
6167
code-copy: true
6268
code-overflow: wrap
6369
link-external-newwindow: true
70+
mermaid:
71+
theme: neutral
6472

6573
freeze: true
6674

_targets.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ tar_plan(
8585

8686
cleaned_ballot_results = clean_ballot_results(raw_ballot_results),
8787

88-
northatlantic_ft = join_results(cleaned_voting_records, cleaned_ballot_results, MP_names),
88+
ballot_topics = get_topics(cleaned_ballot_results),
8989

90-
#codebook = render_codebook()
91-
)
90+
northatlantic_ft = join_results(cleaned_voting_records, cleaned_ballot_results,
91+
ballot_topics, MP_names)
92+
)

_targets/meta/meta

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,37 @@
11
name|type|data|command|depend|seed|path|time|size|bytes|format|repository|iteration|parent|children|seconds|warnings|error
2-
.Random.seed|object|54ac0fea53ee8993|||||||||||||||
3-
ballot_info|stem|dc4377866dd82ca4|c3177031d0f9a243|75ab3e3d487c01bb|-1356312050||t20260.3839043537s|84a80ce5374d7e47|213457|rds|local|vector|||13.665||
4-
ballot_info_with_dates|stem|bc1e1f2da66f480e|c199bd9203f4720e|f61440bc8b742678|-1538018715||t20259.8892941429s|8c813f4b9f4ec776|234836|rds|local|vector|||51.648||
2+
.Random.seed|object|7ea8721b348a55b9|||||||||||||||
3+
ballot_info|stem|2b2d946209c69266|c3177031d0f9a243|b4af8777fd74109a|-1356312050||t20319.5836720021s|9559196a434b931b|213510|rds|local|vector|||10.549||
4+
ballot_info_with_dates|stem|d206486540fedd24|c199bd9203f4720e|fec95f0a6f47d806|-1538018715||t20319.5841927613s|1d464e19f5ab7d22|234893|rds|local|vector|||44.948||
55
ballot_results|stem|8d1750210e047b1d|6efabfa22b2b7d0e|d7b1e0640ad92fd3|1992756893||t19720.9153063949s|ca06277be079bbc9|222691|rds|local|vector|||459.526||
6+
ballot_results_with_topics|stem|9c5b1f46e472143e|dc8fb805ea9aec5d|52eb4c347fd896be|822781586||t20319.6031643917s|5cf73858a05ff67f|597396|rds|local|vector|||534.922||
7+
ballot_topics|stem|be9b6434c5f95390|dc8fb805ea9aec5d|a8184eb2a71be4bd|-271092198||t20325.685856372s|1c6425f587ceb822|597397|rds|local|vector|||657.631||
68
clean_ballot_results|function|78f7bbc6d23fe0e7|||||||||||||||
79
clean_voting_records|function|b6b4c49a55d6c9e8|||||||||||||||
8-
cleaned_ballot_results|stem|d65250d1def95f4b|0717b24f8002e719|b2deb09991141d7f|-1908955450||t20259.8983366888s|71e7b22bd76a2c30|262706|rds|local|vector|||0.137||
9-
cleaned_voting_records|stem|bfe24bf0eb372f4d|ad9405147657a520|baeedcb84e503057|1063931314||t20260.3828992852s|f87117fcc89a50e8|293728|rds|local|vector|||0.114||
10+
cleaned_ballot_results|stem|4feac0bb3d7c39df|0717b24f8002e719|b21321511b49a367|-1908955450||t20319.589464997s|328b27439a0f3172|262769|rds|local|vector|||0.131||
11+
cleaned_voting_records|stem|e49bf7651e85bde5|ad9405147657a520|8f68ec75f6ef2d35|1063931314||t20325.6918197069s|08002aace5d34d86|294626|rds|local|vector|||0.119||
1012
codebook|stem|d0ae3a1d17d62d65|1005ee0ab3e841f3|e11738939520571e|-2106169944||t19727.9633783945s|045b07e719c4cc68|120|rds|local|vector|||4.412|unable to translate \T1lmrmn10 Javnaf0ar to a wide string. input string 556 is invalid. unable to translate \T1lmrmn10 Javnaf0ar to a wide string. input string 556 is invalid. The file codebook.log is not encoded in UTF8. These lines contain invalid UTF8 characters 561. The file codebook.log is not encoded in UTF8. These lines contain invalid UTF8 characters 561. unable to translate \T1lmrmn10 Javnaf0ar to a wide string. input string 561 is invalid|
1113
cue|stem||77364f0bc8f16811|ef46db3751d8e999|1566650647||t19720.8965934433s||0|rds|local|vector|||0.173||target cue attempted to run targetstar_exist_meta to during a pipeline, which is unsupported except when format in cfile, file_fast and repository local, or if you are reading from a data store that does not belong to the current pipeline. This is because functions like tar_exist_meta attempt to access or modify the local data store, which may not exist or be properly synced in certain situations. Also, please be aware that some functions like tar_make and tar_destroy should never run inside a target. Please find a different workaround for your use case.
12-
get_ballot_info|function|5ac7336c8c969ae5|||||||||||||||
14+
get_ballot_info|function|173140e8f6ed2662|||||||||||||||
1315
get_content|function|848c18fb0b8218c4|||||||||||||||
1416
get_max_page_number|function|24dbaf74ef9cc085|||||||||||||||
1517
get_max_skip_index|function|a5ef2fc242fdffd8|||||||||||||||
1618
get_meeting_dates|function|6dff7eea218b6005|||||||||||||||
1719
get_missing_info|function|30506597563bc174|||||||||||||||
1820
get_MP_record|function|4d5f6d9554356ac1|||||||||||||||
1921
get_MP_records|function|5ab3ddde9f272a9b|||||||||||||||
22+
get_topics|function|4b24b8d570ae2ccf|||||||||||||||
2023
get_voting_records|function|34c4dc16c1bd04f8|||||||||||||||
21-
join_results|function|d242386b75eb2fa8|||||||||||||||
24+
join_results|function|e8aea8f40762c4c9|||||||||||||||
2225
meeting_dates|stem|8a9919bc537c0756|c199bd9203f4720e|eef333682651bd94|642247789||t19720.909064753s|a117b83c5fa3383c|209318|rds|local|vector|||29.965||
23-
MP_names|stem|4122c72160604147|9114fb1216a41601|c38492989e04015b|-136046039||t20260.3817382266s|06f2499ce5dc01d0|718|rds|local|vector|||0||
24-
MP_names_file|stem|4122c72160604147|dd33efc92ee2f645|ef46db3751d8e999|1302994070|/Users/mtwente/github/nordatlantisk-ft/data/processed/MP_names.rds|t20260.3815077921s|06f2499ce5dc01d0|718|file|local|vector|||0.073||
26+
MP_names|stem|d509cb7c7f9283f8|9114fb1216a41601|e218df7ecfe68cf8|-136046039||t20325.6904602208s|5f0404ccd275e1fb|761|rds|local|vector|||0||
27+
MP_names_file|stem|d509cb7c7f9283f8|dd33efc92ee2f645|ef46db3751d8e999|1302994070|/Users/mtwente/github/nordatlantisk-ft/data/processed/MP_names.rds|t20325.6901762056s|5f0404ccd275e1fb|761|file|local|vector|||0.091||
2528
MP_names_file_path|stem|24b4b40c1d8d7e93|dd33efc92ee2f645|ef46db3751d8e999|-2121344532|/Users/mtwente/github/nordatlantisk-ft/data/processed/MP_names.rds|t20260.3508400771s|77f1a8cb303e5572|743|file|local|vector|||0.075||
2629
MP_names_RDS|stem|24b4b40c1d8d7e93|9114fb1216a41601|ecff70af28ed9e08|403381341||t20260.3613458462s|77f1a8cb303e5572|743|rds|local|vector|||0||
27-
northatlantic_ft|stem|fb4f3cb5d4418dbf|fb92ef8f3b43df67|dedae9f7cced7fdd|-955248254||t20260.3839090258s|8d48ef369126b1d9|798303|rds|local|vector|||0.25||
30+
northatlantic_ft|stem|5c543fbf4bd9589c|a57c9ee76d2ed7ce|8b81ae4b098bf616|-955248254||t20325.6918292734s|f336382d7411481c|2957814|rds|local|vector|||0.479||
2831
northatlantic_votes_raw|stem|b5d421a179ec69b2|706901400d0b71c3|847d7324c0552a6a|390780735||t19720.9099869671s|4a8c3bac8bfc04b8|417669|rds|local|vector|||79.561||
2932
print_test|stem|da6e0b1eb43cde3f|1cc02097f1123527|ef46db3751d8e999|58567252||t19720.8749633778s|93a4d4dc4116d568|64|rds|local|vector|||0.17||
30-
raw_ballot_results|stem|7c10dbec26363d1b|b7ef26a6f737c918|a9026067a5818a39|-710281401||t20260.3682429991s|e439e0e014040bf6|248663|rds|local|vector|||445.444||
31-
raw_voting_records|stem|f2e61402b20f3a0d|97d6902dc1bf00c2|82bdb340578b6be6|-47314081||t20260.382897458s|7afd4bd7b2925cca|450267|rds|local|vector|||100.097||
33+
raw_ballot_results|stem|35751598f7eb1764|b7ef26a6f737c918|df9c2cdefb8fd2a9|-710281401||t20319.5894612032s|43289f064214d6eb|248709|rds|local|vector|||344.641||
34+
raw_voting_records|stem|1303f6778340b485|97d6902dc1bf00c2|98e52c90056477d4|-47314081||t20325.6918178379s|b653072faf2b01fa|453637|rds|local|vector|||117.238||
3235
render_codebook|function|6c8990f3cd1e54d4|||||||||||||||
3336
results_with_meeting_dates|stem|8a9919bc537c0756|c199bd9203f4720e|eef333682651bd94|1808671628||t19721.6037192915s|a117b83c5fa3383c|209318|rds|local|vector|||32.517||
3437
round_to_hundred|function|e83e6c687e98a356|||||||||||||||

analysis/example_plots.R

Lines changed: 0 additions & 87 deletions
This file was deleted.

assets/background_data/MP_dates.csv

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
surname;firstname;origin;party;start;end;substitute
2+
Olsvig;Sara;GL;IA;2011-09-15;2013-09-08;FALSE
3+
Olsvig;Sara;GL;IA;2013-09-14;2013-10-01;FALSE
4+
Olsvig;Sara;GL;IA;2013-11-19;2014-03-21;FALSE
5+
Olsvig;Sara;GL;IA;2014-04-25;2014-09-15;FALSE
6+
Olsvig;Sara;GL;IA;2015-05-27;2015-06-18;FALSE
7+
Lund Olsen;Johan;GL;IA;2013-09-08;2013-09-14;TRUE
8+
Lund Olsen;Johan;GL;IA;2013-10-01;2013-11-19;TRUE
9+
Lund Olsen;Johan;GL;IA;2014-03-21;2014-04-25;TRUE
10+
Lund Olsen;Johan;GL;IA;2014-09-15;2015-05-27;TRUE
11+
Jakobsen;Doris;GL;SIU;2009-10-08;2009-11-30;TRUE
12+
Jakobsen;Doris;GL;SIU;2011-09-15;2014-12-16;FALSE
13+
Jakobsen;Doris;GL;SIU;2015-02-11;2015-06-18;FALSE
14+
Johansen;Lars-Emil;GL;SIU;2001-11-20;2009-10-08;FALSE
15+
Johansen;Lars-Emil;GL;SIU;2009-11-30;2011-09-15;FALSE
16+
Kleist;Kuupik;GL;IA;2001-11-20;2007-04-10;FALSE
17+
Kleist;Kuupik;GL;IA;2007-06-01;2007-11-13;FALSE
18+
Rossen;Sofia;GL;IA;2007-04-10;2007-06-01;TRUE
19+
Rossen;Sofia;GL;IA;2010-01-12;2010-10-04;TRUE
20+
Henningsen Heilmann;Juliane;GL;IA;2007-11-13;2010-01-12;FALSE
21+
Henningsen Heilmann;Juliane;GL;IA;2010-10-04;2011-09-15;FALSE
22+
Nielsen;Nick;GL;SIU;2014-12-16;2015-02-11;TRUE
23+
Chemnitz;Aaja;GL;IA;2015-06-18;NA;FALSE
24+
Hammond;Aleqa;GL;SIU;2015-06-18;2016-08-22;FALSE
25+
Hammond;Aleqa;GL;UF;2016-08-23;2018-04-24;FALSE
26+
Hammond;Aleqa;GL;NQ;2018-04-25;2019-06-05;FALSE
27+
Høegh-Dam;Aki-Matilda;GL;SIU;2019-06-05;2023-09-22;FALSE
28+
Høegh-Dam;Aki-Matilda;GL;SIU;2023-10-06;2025-02-07;FALSE
29+
Høegh-Dam;Aki-Matilda;GL;UF;2025-02-08;2025-02-10;FALSE
30+
Høegh-Dam;Aki-Matilda;GL;N;2025-02-11;NA;FALSE
31+
Olsen;Markus E.;GL;SIU;2023-09-22;2023-10-06;TRUE
32+
Joensen;Edmund;FO;B;1994-09-21;1998-03-11;FALSE
33+
Joensen;Edmund;FO;B;2007-11-13;2015-06-18;FALSE
34+
Joensen;Edmund;FO;B;2019-06-05;2022-11-01;FALSE
35+
Petersen;Lisbeth;FO;B;1988-10-06;1988-10-19;TRUE
36+
Petersen;Lisbeth;FO;B;2001-11-20;2005-02-08;FALSE
37+
Arge;Magni;FO;E;2015-07-28;2017-12-11;TRUE
38+
Arge;Magni;FO;E;2017-12-11;2019-06-05;FALSE
39+
Hoydal;Høgni;FO;E;2001-11-20;2008-02-19;FALSE
40+
Hoydal;Høgni;FO;E;2008-10-24;2011-09-15;FALSE
41+
Hoydal;Høgni;FO;E;2015-06-18;2015-07-28;FALSE
42+
Johannesen;Aksel;FO;C;2012-04-20;2012-05-20;TRUE
43+
Skaale;Sjúrður;FO;E;2008-02-19;2008-09-09;TRUE
44+
Skaale;Sjúrður;FO;C;2011-09-15;2012-04-20;FALSE
45+
Skaale;Sjúrður;FO;C;2012-05-20;NA;FALSE
46+
á Fríðriksmørk;Annita;FO;E;2008-09-09;2008-10-24;TRUE
47+
Kallsberg;Anfinn;FO;A;2005-02-08;2007-11-13;FALSE
48+
Falkenberg;Anna;FO;B;2022-11-01;NA;FALSE
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"@context": "https://www.w3.org/ns/csvw",
3+
"url": "MP_dates.csv",
4+
"dc:title": "Calendar Information on Membership Terms",
5+
"dc:publisher": "Moritz Twente",
6+
"dc:updated": "2025-06-22",
7+
"dc:type": "Dataset",
8+
"dc:format": "text/csv",
9+
"dc:license": "https://creativecommons.org/licenses/by/4.0/",
10+
"tableSchema": {
11+
"aboutUrl": "/README.md",
12+
"notes": "Dataset with information on the beginning and end of Folketinget memberships per MPs.",
13+
"columns": [
14+
{
15+
"name": "surname",
16+
"dc:title": "Surname(s)",
17+
"dc:description": "Surname(s) of the MP",
18+
"datatype": "string"
19+
},
20+
{
21+
"name": "firstname",
22+
"dc:title": "First Name(s)",
23+
"dc:description": "First Name(s) of the MP",
24+
"datatype": "string"
25+
},
26+
{
27+
"name": "origin",
28+
"dc:title": "Origin",
29+
"description": "Geographical origin of the MP.",
30+
"datatype": { "base": "string", "format": "GL|FO" }
31+
},
32+
{
33+
"name": "party",
34+
"dc:title": "Political Party",
35+
"dc:description": "Abbreviation of the Political Party the MP is a member of at the given time",
36+
"datatype": "string"
37+
},
38+
{
39+
"name": "start",
40+
"dc:title": "Start Date",
41+
"dc:description": "Date of the beginning of parliamentary membership",
42+
"datatype": { "base": "date", "format": "yyyy-MM-dd" }
43+
},
44+
{
45+
"name": "end",
46+
"dc:title": "End Date",
47+
"dc:description": "Date of the end of parliamentary membership",
48+
"datatype": { "base": "date", "format": "yyyy-MM-dd" }
49+
},
50+
{
51+
"name": "substitute",
52+
"dc:title": "Substitute Membership",
53+
"description": "Information whether the MP served Folketinget as a substitute member for another MP who went on leave",
54+
"datatype": "boolean"
55+
}
56+
],
57+
"dialect": {
58+
"delimiter": ";",
59+
"quoteChar": "\"",
60+
"encoding": "UTF-8"
61+
}
62+
}
63+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
election;date
2+
General Election;2001-11-20
3+
General Election;2005-02-08
4+
General Election;2007-11-13
5+
General Election;2011-09-15
6+
General Election;2015-06-18
7+
General Election;2019-06-05
8+
General Election;2022-11-01

0 commit comments

Comments
 (0)