Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fd16d29442 | |||
| bed6e047c1 | |||
| ba0a2f2d48 | |||
| 2109a1c80f | |||
| 6c1e40fffe | |||
| 8c920739ea | |||
| 55b4895872 | |||
| 9b925f340f | |||
| dad75063fc | |||
| 952329bff4 | |||
| f59b8645b3 | |||
| c53c1e8ba2 | |||
| e2b0b1a025 | |||
| bc2d616605 | |||
| 91403e2bdf | |||
| b67b39edf8 | |||
| 7643658b15 | |||
| 9a16f3232f | |||
| 7313b1a3dc | |||
| 79abf60cc1 | |||
| 241e9e8a8d | |||
| 8353d02761 | |||
| d9c648bd54 |
-13
@@ -1,13 +0,0 @@
|
||||
_local/
|
||||
tmp/
|
||||
outputs/
|
||||
|
||||
data/raw/
|
||||
data/staging/
|
||||
data/releases/
|
||||
|
||||
metadata/release_manifest_*.csv
|
||||
metadata/scientific_data_release_*.txt
|
||||
|
||||
__pycache__/
|
||||
*/__pycache__/
|
||||
@@ -0,0 +1,7 @@
|
||||
# party2d_estimates agent notes
|
||||
|
||||
- For repositories on `git.seimel.app`, use the existing Tea/Gitea token from `~/.config/tea/config.yml` for authenticated `git push`/`git fetch` operations.
|
||||
- Do not print, log, or expose the token.
|
||||
- Prefer token-authenticated HTTPS over unauthenticated HTTPS or SSH when pushing to `git.seimel.app`.
|
||||
- Python is forbidden for this project. Public workflow code and documentation must use R, Julia, Stan, and shell only; do not add Python scripts or Python references.
|
||||
- `data-setup/run_data_setup.sh` is intentionally a no-option public entry point. It downloads script-accessible sources, checks local raw files, rebuilds generated inputs under `_local/`, compares them to committed `data/`, and never replaces committed inputs automatically.
|
||||
@@ -0,0 +1,19 @@
|
||||
CC BY 4.0
|
||||
|
||||
Creative Commons Attribution 4.0 International
|
||||
|
||||
This repository is released under the Creative Commons Attribution 4.0
|
||||
International License (CC BY 4.0), except where third-party source terms
|
||||
require otherwise.
|
||||
|
||||
You are free to share and adapt the licensed material for any purpose,
|
||||
including commercial use, provided that appropriate credit is given, a link to
|
||||
the license is provided, and any changes are indicated.
|
||||
|
||||
This license applies to the dataset, metadata, documentation, diagnostics, and
|
||||
repository workflow materials created for this release. It does not relicense
|
||||
third-party source data used to construct the release inputs; those sources
|
||||
remain governed by their own terms.
|
||||
|
||||
License deed: https://creativecommons.org/licenses/by/4.0/
|
||||
Legal code: https://creativecommons.org/licenses/by/4.0/legalcode
|
||||
@@ -4,15 +4,56 @@ Code and processed model inputs for generating two-dimensional party-position es
|
||||
|
||||
## Repository contents
|
||||
|
||||
- `src/r/` — scripts that prepare processed model inputs from source datasets.
|
||||
- `data-setup/` — source download, source-file checks, and rebuild workflow for raw files that cannot be redistributed here.
|
||||
- `src/julia/` — Stan data preparation, model fitting, post-estimation, enrichment, and validation.
|
||||
- `models/` — Stan model specification.
|
||||
- `data/` — processed party-level inputs used by the model.
|
||||
- `data/` — processed party-level inputs used by the Julia/Stan model.
|
||||
- `metadata/` — data dictionary and source-support documentation.
|
||||
- `docs/` — raw data source documentation, coding decisions, and operational notes.
|
||||
- `diagnostics/` — repository diagnostics report regenerated after model estimation.
|
||||
- `data/releases/` — release-ready data files, checksums, and diagnostics report.
|
||||
|
||||
Processed inputs needed by the model are included in `data/` so the estimation step can be reproduced from the model-ready data.
|
||||
|
||||
## Release assets
|
||||
|
||||
The public `v0` release is available from <https://git.seimel.app/armin/party2d/releases> and contains:
|
||||
|
||||
- `party_2d_election_year_panel_v0.zip` — primary election-year party-position panel.
|
||||
- `party_2d_annual_model_output_v0.zip` — secondary annual model output.
|
||||
- `party_2d_diagnostics_report_v0.pdf` — script-generated diagnostics report.
|
||||
- `SHA256SUMS` — checksums for the release assets.
|
||||
|
||||
## Source data and redistribution
|
||||
|
||||
The public repository does **not** contain the original raw/source files. Several inputs are third-party datasets with their own terms of use, and the Morgan historical file is a local OCR/transcription source. Instead, this repository provides:
|
||||
|
||||
1. committed model-ready inputs in `data/`, sufficient for fitting the Julia/Stan model; and
|
||||
2. `data-setup/`, an R/Shell workflow that downloads script-accessible sources, checks locally supplied raw sources, and rebuilds comparable model-ready inputs locally.
|
||||
|
||||
`data-setup/` downloads script-accessible sources and checks locally supplied sources for:
|
||||
|
||||
- PolDem
|
||||
- PartyFacts crosswalk
|
||||
- CHES family files
|
||||
- POPPA from Harvard Dataverse
|
||||
- Global Party Survey 2019 from Harvard Dataverse
|
||||
- V-Party through the provider's download form
|
||||
|
||||
Two inputs require user-provided access/material:
|
||||
|
||||
- **Manifesto Project**: users must obtain the source data through their own Manifesto Project access.
|
||||
- **Morgan historical expert data**: `morgan_positions_raw.csv` is not publicly downloadable; it can be provided on request and should be placed locally under `_local/raw/morgan/`.
|
||||
|
||||
The setup workflow never overwrites committed files in `data/`. See `data-setup/README.md` for exact commands and source details.
|
||||
|
||||
Run the full source-data setup workflow with:
|
||||
|
||||
```bash
|
||||
bash data-setup/run_data_setup.sh
|
||||
```
|
||||
|
||||
This downloads script-accessible source files, checks required local files, rebuilds model-ready inputs locally, and writes a comparison report. Manifesto Project requires your own provider access, and the Morgan OCR/transcription file can be provided on request.
|
||||
|
||||
## Running the pipeline
|
||||
|
||||
Run the full workflow with:
|
||||
@@ -21,16 +62,17 @@ Run the full workflow with:
|
||||
bash run_estimation.sh full
|
||||
```
|
||||
|
||||
This executes the numbered workflow scripts:
|
||||
This checks that model-ready inputs are present, then executes the Julia/Stan workflow scripts:
|
||||
|
||||
```bash
|
||||
bash scripts/01_prepare_data.sh
|
||||
bash scripts/01_prepare_data.sh # checks model-ready inputs; does not rebuild raw data
|
||||
bash scripts/02_fit_model.sh
|
||||
bash scripts/03_extract_estimates.sh
|
||||
bash scripts/04_enrich_estimates.sh
|
||||
bash scripts/05_validate_estimates.sh
|
||||
```
|
||||
|
||||
The numbered scripts can also be run manually in that order. `scripts/05_validate_estimates.sh` runs validation checks after estimates have been generated.
|
||||
The numbered scripts can also be run manually in that order.
|
||||
|
||||
The Bayesian model is computationally expensive. The production run used 4 cores on an AMD Ryzen 9 7945HX and took 60,372 seconds, approximately 16 hours 46 minutes.
|
||||
|
||||
@@ -40,7 +82,7 @@ If model output is already available, rebuild estimates without refitting Stan:
|
||||
bash run_estimation.sh reuse
|
||||
```
|
||||
|
||||
`reuse` reruns source-data processing, post-estimation, and enrichment while skipping the Stan fitting step.
|
||||
`reuse` verifies the model-ready inputs, then reruns post-estimation, enrichment, and validation while skipping the Stan fitting step.
|
||||
|
||||
To check the local setup without fitting the model, run:
|
||||
|
||||
@@ -48,17 +90,49 @@ To check the local setup without fitting the model, run:
|
||||
bash run_estimation.sh dry-run
|
||||
```
|
||||
|
||||
After estimation and validation have been run, regenerate the diagnostics report with:
|
||||
|
||||
```bash
|
||||
Rscript diagnostics/generate_diagnostics.R
|
||||
```
|
||||
|
||||
The report is written to `diagnostics/generated/diagnostics_report.pdf` and copied to `data/releases/party_2d_diagnostics_report_v0.pdf`.
|
||||
|
||||
## Data inputs
|
||||
|
||||
The model-ready inputs are included under `data/`.
|
||||
The model-ready inputs are included under `data/`:
|
||||
|
||||
Original raw source files are not redistributed. See `docs/RAW_DATA_SOURCES.md` for the list of original data sources, access information, and expected local filenames for regenerating the processed inputs.
|
||||
- `text_data.csv`
|
||||
- `expert.csv`
|
||||
- `lr_data.csv`
|
||||
- `union_mapping.csv`
|
||||
- `party_families.csv`
|
||||
|
||||
## Output variables
|
||||
Original raw source files are not redistributed. Rebuilding inputs from raw files is separate from the normal estimation workflow and never replaces committed `data/` inputs automatically.
|
||||
|
||||
The two position variables are scaled from 0 to 1:
|
||||
## Output dimensions
|
||||
|
||||
- `economic_lr`: economic left to economic right.
|
||||
- `galtan`: cosmopolitan/socially liberal to traditionalist/nationalist.
|
||||
The two position dimensions are scaled from 0 to 1:
|
||||
|
||||
- Economic left-right: economic left to economic right.
|
||||
- Cultural cosmopolitan--traditionalist: cosmopolitan to traditionalist.
|
||||
|
||||
Column definitions are in `metadata/data_dictionary.csv`.
|
||||
|
||||
## Release files
|
||||
|
||||
The public release assets are:
|
||||
|
||||
- `party_2d_election_year_panel_v0.zip`
|
||||
- `party_2d_annual_model_output_v0.zip`
|
||||
- `party_2d_diagnostics_report_v0.pdf`
|
||||
- `SHA256SUMS`
|
||||
|
||||
`SHA256SUMS` hashes the release assets listed above.
|
||||
|
||||
## License
|
||||
|
||||
This release uses the Creative Commons Attribution 4.0 International License
|
||||
(CC BY 4.0). The license applies to release materials created for this
|
||||
repository; third-party source data remain governed by their own terms. See
|
||||
`LICENSE`.
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env Rscript
|
||||
|
||||
repo_root <- normalizePath(getwd(), mustWork = TRUE)
|
||||
lib <- Sys.getenv("R_LIBS_USER", file.path(repo_root, "_local", "R", "library"))
|
||||
dir.create(lib, recursive = TRUE, showWarnings = FALSE)
|
||||
.libPaths(c(lib, .libPaths()))
|
||||
|
||||
required <- c("tidyverse", "countrycode", "haven", "foreign", "jsonlite")
|
||||
missing <- required[!vapply(required, requireNamespace, quietly = TRUE, FUN.VALUE = logical(1))]
|
||||
|
||||
if (length(missing) > 0) {
|
||||
message("Installing missing R packages into ", lib, ": ", paste(missing, collapse = ", "))
|
||||
install.packages(missing, repos = "https://cloud.r-project.org", lib = lib)
|
||||
} else {
|
||||
message("R data-setup dependencies already available")
|
||||
}
|
||||
@@ -0,0 +1,203 @@
|
||||
#!/usr/bin/env Rscript
|
||||
|
||||
args <- commandArgs(trailingOnly = FALSE)
|
||||
file_arg <- args[grepl("^--file=", args)][1]
|
||||
if (!is.na(file_arg)) {
|
||||
script_path <- sub("^--file=", "", file_arg)
|
||||
repo_root <- normalizePath(file.path(dirname(script_path), "..", ".."), mustWork = FALSE)
|
||||
} else {
|
||||
repo_root <- normalizePath(getwd(), mustWork = TRUE)
|
||||
}
|
||||
if (!dir.exists(file.path(repo_root, "data-setup"))) repo_root <- normalizePath(getwd(), mustWork = TRUE)
|
||||
|
||||
raw_dir <- normalizePath(Sys.getenv("PARTY2D_RAW_DATA_DIR", file.path(repo_root, "_local", "raw")), mustWork = FALSE)
|
||||
report_dir <- normalizePath(Sys.getenv("PARTY2D_REPORT_DIR", file.path(repo_root, "_local", "reports")), mustWork = FALSE)
|
||||
dir.create(raw_dir, recursive = TRUE, showWarnings = FALSE)
|
||||
dir.create(report_dir, recursive = TRUE, showWarnings = FALSE)
|
||||
|
||||
ua <- "party2d-data-setup/1.0 (+https://git.seimel.app/armin/party2d)"
|
||||
|
||||
download_file <- function(url, dest, overwrite = FALSE, headers = character()) {
|
||||
dir.create(dirname(dest), recursive = TRUE, showWarnings = FALSE)
|
||||
if (file.exists(dest) && file.info(dest)$size > 0 && !overwrite) {
|
||||
message("OK existing: ", dest)
|
||||
return(TRUE)
|
||||
}
|
||||
tmp <- paste0(dest, ".tmp")
|
||||
if (file.exists(tmp)) unlink(tmp)
|
||||
message("Downloading ", url, " -> ", dest)
|
||||
ok <- tryCatch({
|
||||
utils::download.file(
|
||||
url,
|
||||
tmp,
|
||||
mode = "wb",
|
||||
quiet = TRUE,
|
||||
method = "libcurl",
|
||||
headers = c("User-Agent" = ua, headers)
|
||||
)
|
||||
file.rename(tmp, dest)
|
||||
}, error = function(e) {
|
||||
message("FAILED ", url, ": ", conditionMessage(e))
|
||||
FALSE
|
||||
})
|
||||
if (!ok && file.exists(tmp)) unlink(tmp)
|
||||
isTRUE(ok)
|
||||
}
|
||||
|
||||
download_dataverse <- function(doi, filename, dest, directory = NA_character_) {
|
||||
if (!requireNamespace("jsonlite", quietly = TRUE)) {
|
||||
message("FAILED Dataverse lookup: install R package jsonlite")
|
||||
return(FALSE)
|
||||
}
|
||||
api <- paste0("https://dataverse.harvard.edu/api/datasets/:persistentId/?persistentId=", utils::URLencode(doi, reserved = TRUE))
|
||||
fid <- tryCatch({
|
||||
meta <- jsonlite::fromJSON(api, simplifyVector = FALSE)
|
||||
files <- meta$data$latestVersion$files
|
||||
matches <- Filter(function(x) {
|
||||
same_file <- identical(x$dataFile$filename, filename)
|
||||
same_dir <- is.na(directory) || identical(x$directoryLabel, directory)
|
||||
same_file && same_dir
|
||||
}, files)
|
||||
if (length(matches) == 0) NA_integer_ else as.integer(matches[[1]]$dataFile$id)
|
||||
}, error = function(e) {
|
||||
message("FAILED Dataverse lookup ", doi, " ", filename, ": ", conditionMessage(e))
|
||||
NA_integer_
|
||||
})
|
||||
if (is.na(fid)) {
|
||||
message("FAILED Dataverse lookup ", doi, ": file not found: ", filename)
|
||||
return(FALSE)
|
||||
}
|
||||
download_file(paste0("https://dataverse.harvard.edu/api/access/datafile/", fid), dest)
|
||||
}
|
||||
|
||||
download_manifesto <- function(dest) {
|
||||
key <- Sys.getenv("MANIFESTO_API_KEY", Sys.getenv("PARTY2D_MANIFESTO_API_KEY", ""))
|
||||
if (!nzchar(key)) {
|
||||
message("SKIP Manifesto: set MANIFESTO_API_KEY or PARTY2D_MANIFESTO_API_KEY")
|
||||
return(FALSE)
|
||||
}
|
||||
url <- "https://manifesto-project.wzb.eu/api/v1/get_core?key=MPDS2025a&raw=true"
|
||||
download_file(
|
||||
url,
|
||||
dest,
|
||||
overwrite = TRUE,
|
||||
headers = c("Referer" = "https://manifesto-project.wzb.eu/datasets", "API_KEY" = key)
|
||||
)
|
||||
}
|
||||
|
||||
download_vparty <- function(dest) {
|
||||
email <- Sys.getenv("PARTY2D_VDEM_EMAIL", "")
|
||||
if (!nzchar(email)) {
|
||||
message("SKIP V-Party: set PARTY2D_VDEM_EMAIL to use V-Dem's required download form")
|
||||
return(FALSE)
|
||||
}
|
||||
curl <- Sys.which("curl")
|
||||
if (!nzchar(curl)) {
|
||||
message("FAILED V-Party: curl is required for the provider form")
|
||||
return(FALSE)
|
||||
}
|
||||
page <- "https://www.v-dem.net/data/v-party-dataset/country-party-date-v2/"
|
||||
tmpdir <- tempfile("vparty")
|
||||
dir.create(tmpdir)
|
||||
on.exit(unlink(tmpdir, recursive = TRUE), add = TRUE)
|
||||
cookie <- file.path(tmpdir, "cookies.txt")
|
||||
html <- file.path(tmpdir, "page.html")
|
||||
payload <- file.path(tmpdir, "payload.bin")
|
||||
zip_path <- file.path(tmpdir, "vparty.zip")
|
||||
status <- system2(curl, c("-L", "-A", ua, "-c", cookie, "-b", cookie, "-o", html, page), stdout = TRUE, stderr = TRUE)
|
||||
if (!file.exists(html)) {
|
||||
message("FAILED V-Party form load")
|
||||
return(FALSE)
|
||||
}
|
||||
page_text <- paste(readLines(html, warn = FALSE), collapse = "\n")
|
||||
csrf <- sub('.*name="csrfmiddlewaretoken"[^>]*value="([^"]*)".*', '\\1', page_text)
|
||||
if (identical(csrf, page_text)) csrf <- ""
|
||||
gender <- Sys.getenv("PARTY2D_VDEM_GENDER", "")
|
||||
form <- c(
|
||||
"csrfmiddlewaretoken", csrf,
|
||||
"email", email,
|
||||
"gender", gender,
|
||||
"accept_terms", "on",
|
||||
"dataset_file", "17",
|
||||
"website", ""
|
||||
)
|
||||
args <- c(
|
||||
"-L", "-A", ua, "-c", cookie, "-b", cookie,
|
||||
"-H", paste0("Referer: ", page),
|
||||
"-H", paste0("X-CSRFToken: ", csrf),
|
||||
"-H", "X-Requested-With: XMLHttpRequest",
|
||||
"-o", payload,
|
||||
"--data-urlencode", paste0(form[1], "=", form[2]),
|
||||
"--data-urlencode", paste0(form[3], "=", form[4]),
|
||||
"--data-urlencode", paste0(form[5], "=", form[6]),
|
||||
"--data-urlencode", paste0(form[7], "=", form[8]),
|
||||
"--data-urlencode", paste0(form[9], "=", form[10]),
|
||||
"--data-urlencode", paste0(form[11], "=", form[12]),
|
||||
paste0(page, "#dataset-download")
|
||||
)
|
||||
system2(curl, args, stdout = TRUE, stderr = TRUE)
|
||||
if (!file.exists(payload) || file.info(payload)$size == 0) {
|
||||
message("FAILED V-Party form submit")
|
||||
return(FALSE)
|
||||
}
|
||||
bytes <- readBin(payload, "raw", n = min(file.info(payload)$size, 4))
|
||||
if (length(bytes) >= 2 && identical(as.integer(bytes[1:2]), c(0x50L, 0x4bL))) {
|
||||
file.copy(payload, zip_path, overwrite = TRUE)
|
||||
} else {
|
||||
text <- paste(readLines(payload, warn = FALSE), collapse = "\n")
|
||||
m <- regexpr('https?://[^" ]*CPD_V-Party_R_v2\\.zip|/[^" ]*CPD_V-Party_R_v2\\.zip', text)
|
||||
if (m[1] < 0) {
|
||||
message("FAILED V-Party form response did not include a recognizable ZIP download")
|
||||
return(FALSE)
|
||||
}
|
||||
url <- regmatches(text, m)[1]
|
||||
if (startsWith(url, "/")) url <- paste0("https://www.v-dem.net", url)
|
||||
if (!download_file(url, zip_path, overwrite = TRUE, headers = c("Referer" = page))) return(FALSE)
|
||||
}
|
||||
listing <- utils::unzip(zip_path, list = TRUE)
|
||||
member <- listing$Name[grepl("\\.(rds|rda|rdata)$", listing$Name, ignore.case = TRUE)][1]
|
||||
if (is.na(member)) {
|
||||
message("FAILED V-Party ZIP contains no R data file")
|
||||
return(FALSE)
|
||||
}
|
||||
dir.create(dirname(dest), recursive = TRUE, showWarnings = FALSE)
|
||||
utils::unzip(zip_path, files = member, exdir = tmpdir, overwrite = TRUE)
|
||||
file.copy(file.path(tmpdir, member), dest, overwrite = TRUE)
|
||||
message("Extracted V-Party R data: ", dest)
|
||||
TRUE
|
||||
}
|
||||
|
||||
status <- c()
|
||||
status["PolDem"] <- download_file("https://poldem.eui.eu/downloads/cosa/poldem-election_all.csv", file.path(raw_dir, "poldem", "poldem-election_all.csv"))
|
||||
status["PartyFacts external parties"] <- download_file("https://partyfacts.herokuapp.com/download/external-parties-csv/", file.path(raw_dir, "partyfacts", "partyfacts-external-parties.csv"))
|
||||
status["Manifesto MPDS 2025a"] <- download_manifesto(file.path(raw_dir, "manifesto", "MPDataset_MPDS2025a.csv"))
|
||||
|
||||
ches_base <- "https://www.chesdata.eu/s/"
|
||||
ches_files <- c(
|
||||
"1999-2019_CHES_dataset_meansv3.csv" = "1999-2019_CHES_dataset_means(v3).csv",
|
||||
"1999-2024_CHES_dataset_meansV2-3k4l.csv" = "1999-2024_CHES_dataset_meansV2-3k4l.csv",
|
||||
"CHES_2024_final_v2.csv" = "CHES_2024_final_v2.csv",
|
||||
"CHES_2024_ALL_Stacked_Expert.csv" = "CHES_2024_expert_level.csv",
|
||||
"CHES_CA2023.csv" = "CHES_CA2023.csv",
|
||||
"CHES_CA2023_expert-level.csv" = "CHES_CA2023_expert_level.csv",
|
||||
"ches_la_2020_aggregate_level_v01.csv" = "ches_la_2020_aggregate_level_v01.csv",
|
||||
"ches_la_2020_expert_level_v01.csv" = "CHES_LA2020_expert_level.csv",
|
||||
"CHES_ISRAEL_means_2021_2022.csv" = "CHES_ISRAEL_means_2021_2022.csv",
|
||||
"CHES_ISRAEL_expert_level_2021_2022.csv" = "CHES_IL_expert_level.csv"
|
||||
)
|
||||
for (remote in names(ches_files)) {
|
||||
local <- ches_files[[remote]]
|
||||
status[paste("CHES", local)] <- download_file(paste0(ches_base, utils::URLencode(remote, reserved = TRUE)), file.path(raw_dir, "ches", local))
|
||||
}
|
||||
|
||||
status["POPPA integrated v2"] <- download_dataverse("doi:10.7910/DVN/RMQREQ", "poppa_integrated_v2.rds", file.path(raw_dir, "poppa", "poppa_integrated_v2.rds"), "final_data_v2")
|
||||
status["GPS 2019 party"] <- download_dataverse("doi:10.7910/DVN/WMGTNS", "Global Party Survey by Party SPSS V2_1_Apr_2020-2.tab", file.path(raw_dir, "gps", "Global Party Survey by Party SPSS V2_1_Apr_2020-2.tab"))
|
||||
status["V-Party"] <- download_vparty(file.path(raw_dir, "vparty", "V-Dem-CPD-Party-V2.rds"))
|
||||
|
||||
report <- file.path(report_dir, "download_sources_report.md")
|
||||
lines <- c("# Download sources report", "", "| source | status |", "| --- | --- |")
|
||||
for (name in names(status)) lines <- c(lines, paste0("| ", name, " | ", if (isTRUE(status[[name]])) "ok" else "missing/failed", " |"))
|
||||
writeLines(lines, report)
|
||||
message("Wrote download report: ", report)
|
||||
|
||||
quit(status = if (all(status)) 0 else 2)
|
||||
@@ -1,16 +1,17 @@
|
||||
# ============================================================
|
||||
# 00_data-management.R - Master Data Pipeline Orchestrator
|
||||
# 02_build_model_inputs.R - Master Data Pipeline Orchestrator
|
||||
# ============================================================
|
||||
# Coordinates all data processing sub-scripts and produces
|
||||
# final output files for the 4D latent trait model.
|
||||
# final output files for the two-dimensional party-position model. By default this writes only
|
||||
# to local-only directories under _local/ and never overwrites committed data/.
|
||||
#
|
||||
# Sub-scripts (run conditionally based on intermediate file existence):
|
||||
# 00a_process_manifesto.R -> manifesto_data.csv
|
||||
# 00c_process_poldem.R -> poldem_data.csv
|
||||
# 00d_process_expert.R -> expert_raw.csv, lr_data_raw.csv
|
||||
# 00e_process_morgan.R -> morgan_data.csv, morgan_lr.csv
|
||||
# process_manifesto.R -> manifesto_data.csv
|
||||
# process_poldem.R -> poldem_data.csv
|
||||
# process_expert.R -> expert_raw.csv, lr_data_raw.csv
|
||||
# process_morgan.R -> morgan_data.csv, morgan_lr.csv
|
||||
#
|
||||
# Final outputs:
|
||||
# Final generated model inputs:
|
||||
# text_data.csv - Combined manifesto + PolDem
|
||||
# expert.csv - Expert survey data (CHES, V-Party, POPPA, GPS)
|
||||
# lr_data.csv - General left-right anchoring data
|
||||
@@ -19,14 +20,45 @@
|
||||
library(tidyverse)
|
||||
library(countrycode)
|
||||
|
||||
# Set working directory (works both in RStudio and command line)
|
||||
if (interactive() && requireNamespace("rstudioapi", quietly = TRUE)) {
|
||||
try(setwd(dirname(rstudioapi::getActiveDocumentContext()$path)), silent = TRUE)
|
||||
cmd_args <- commandArgs(trailingOnly = FALSE)
|
||||
file_arg <- grep("^--file=", cmd_args, value = TRUE)
|
||||
if (length(file_arg) > 0) {
|
||||
this_file <- normalizePath(sub("^--file=", "", file_arg[[1]]), mustWork = TRUE)
|
||||
repo_root <- normalizePath(file.path(dirname(this_file), "..", ".."), mustWork = TRUE)
|
||||
} else {
|
||||
repo_root <- normalizePath(getwd(), mustWork = TRUE)
|
||||
}
|
||||
script_dir <- file.path(repo_root, "data-setup", "R")
|
||||
build_dir <- normalizePath(
|
||||
Sys.getenv("PARTY2D_BUILD_DIR", file.path(repo_root, "_local", "build")),
|
||||
mustWork = FALSE
|
||||
)
|
||||
generated_input_dir <- normalizePath(
|
||||
Sys.getenv("PARTY2D_GENERATED_INPUT_DIR", file.path(repo_root, "_local", "generated-inputs")),
|
||||
mustWork = FALSE
|
||||
)
|
||||
dir.create(build_dir, recursive = TRUE, showWarnings = FALSE)
|
||||
dir.create(generated_input_dir, recursive = TRUE, showWarnings = FALSE)
|
||||
|
||||
# The source-processing scripts use relative paths for intermediate files.
|
||||
# Keep those intermediates in the ignored build directory, never committed data/.
|
||||
setwd(build_dir)
|
||||
|
||||
# Static model support inputs are versioned in data/ and copied into the local
|
||||
# generated-input set for comparison. They are not regenerated by raw-source setup.
|
||||
for (support_file in c("union_mapping.csv", "party_families.csv")) {
|
||||
src <- file.path(repo_root, "data", support_file)
|
||||
if (!file.exists(src)) {
|
||||
stop("Required committed support input not found: ", src)
|
||||
}
|
||||
file.copy(src, file.path(build_dir, support_file), overwrite = TRUE)
|
||||
}
|
||||
|
||||
cat("============================================================\n")
|
||||
cat("Data Management Pipeline\n")
|
||||
cat("============================================================\n\n")
|
||||
cat("Build directory: ", build_dir, "\n", sep = "")
|
||||
cat("Generated input directory: ", generated_input_dir, "\n\n", sep = "")
|
||||
|
||||
# ============================================================
|
||||
# Configuration: Set to TRUE to force re-run of sub-scripts
|
||||
@@ -43,8 +75,8 @@ FORCE_RERUN_MORGAN <- FALSE
|
||||
|
||||
cat("Step 1: Manifesto data\n")
|
||||
if (!file.exists("manifesto_data.csv") || !file.exists("election_data.csv") || FORCE_RERUN_MANIFESTO) {
|
||||
cat(" Running 00a_process_manifesto.R...\n")
|
||||
source("../src/r/00a_process_manifesto.R")
|
||||
cat(" Running process_manifesto.R...\n")
|
||||
source(file.path(script_dir, "process_manifesto.R"))
|
||||
} else {
|
||||
cat(" Loading cached manifesto_data.csv and election_data.csv...\n")
|
||||
}
|
||||
@@ -59,8 +91,8 @@ cat(sprintf(" Loaded election: %d rows, %d parties\n\n", nrow(election_data), n
|
||||
|
||||
cat("Step 2: PolDem media data\n")
|
||||
if (!file.exists("poldem_data.csv") || FORCE_RERUN_POLDEM) {
|
||||
cat(" Running 00c_process_poldem.R...\n")
|
||||
source("../src/r/00c_process_poldem.R")
|
||||
cat(" Running process_poldem.R...\n")
|
||||
source(file.path(script_dir, "process_poldem.R"))
|
||||
} else {
|
||||
cat(" Loading cached poldem_data.csv...\n")
|
||||
}
|
||||
@@ -73,8 +105,8 @@ cat(sprintf(" Loaded: %d rows, %d parties\n\n", nrow(poldem_data), n_distinct(p
|
||||
|
||||
cat("Step 3: Expert survey data\n")
|
||||
if (!file.exists("expert_raw.csv") || !file.exists("lr_data_raw.csv") || FORCE_RERUN_EXPERT) {
|
||||
cat(" Running 00d_process_expert.R...\n")
|
||||
source("../src/r/00d_process_expert.R")
|
||||
cat(" Running process_expert.R...\n")
|
||||
source(file.path(script_dir, "process_expert.R"))
|
||||
} else {
|
||||
cat(" Loading cached expert_raw.csv and lr_data_raw.csv...\n")
|
||||
}
|
||||
@@ -90,8 +122,8 @@ cat("Step 3b: Morgan (1976) historical L-R data\n")
|
||||
|
||||
# First run to generate morgan_data.csv if needed
|
||||
if (!file.exists("morgan_data.csv") || FORCE_RERUN_MORGAN) {
|
||||
cat(" Running 00e_process_morgan.R (initial processing)...\n")
|
||||
source("../src/r/00e_process_morgan.R")
|
||||
cat(" Running process_morgan.R (initial processing)...\n")
|
||||
source(file.path(script_dir, "process_morgan.R"))
|
||||
}
|
||||
|
||||
# morgan_lr.csv depends on text_data.csv, so we need to check if it needs regeneration
|
||||
@@ -256,7 +288,7 @@ if (!file.exists("morgan_lr.csv") || FORCE_RERUN_MORGAN) {
|
||||
cat(" Generating morgan_lr.csv...\n")
|
||||
# Write text_data first so morgan script can use it
|
||||
write_csv(text_data, "text_data.csv")
|
||||
source("../src/r/00e_process_morgan.R")
|
||||
source(file.path(script_dir, "process_morgan.R"))
|
||||
}
|
||||
|
||||
# Load and integrate Morgan L-R data
|
||||
@@ -292,11 +324,16 @@ write_csv(text_data, "text_data.csv")
|
||||
write_csv(expert, "expert.csv")
|
||||
write_csv(lr_data, "lr_data.csv")
|
||||
|
||||
for (final_file in c("text_data.csv", "expert.csv", "lr_data.csv", "union_mapping.csv", "party_families.csv")) {
|
||||
file.copy(file.path(build_dir, final_file), file.path(generated_input_dir, final_file), overwrite = TRUE)
|
||||
}
|
||||
|
||||
cat("\n============================================================\n")
|
||||
cat("Pipeline Complete!\n")
|
||||
cat("============================================================\n\n")
|
||||
|
||||
cat("Output files written:\n")
|
||||
cat(sprintf(" local generated input dir: %s\n", generated_input_dir))
|
||||
cat(sprintf(" text_data.csv: %d rows\n", nrow(text_data)))
|
||||
cat(sprintf(" - Manifesto: %d rows\n", sum(grepl("_manifesto", text_data$var))))
|
||||
cat(sprintf(" - PolDem: %d rows\n", sum(grepl("_poldem", text_data$var))))
|
||||
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env Rscript
|
||||
|
||||
args <- commandArgs(trailingOnly = FALSE)
|
||||
file_arg <- args[grepl("^--file=", args)][1]
|
||||
if (!is.na(file_arg)) {
|
||||
script_path <- sub("^--file=", "", file_arg)
|
||||
repo_root <- normalizePath(file.path(dirname(script_path), "..", ".."), mustWork = FALSE)
|
||||
} else {
|
||||
repo_root <- normalizePath(getwd(), mustWork = TRUE)
|
||||
}
|
||||
if (!dir.exists(file.path(repo_root, "data"))) repo_root <- normalizePath(getwd(), mustWork = TRUE)
|
||||
|
||||
generated_dir <- Sys.getenv("PARTY2D_GENERATED_INPUT_DIR", file.path(repo_root, "_local", "generated-inputs"))
|
||||
report_dir <- Sys.getenv("PARTY2D_REPORT_DIR", file.path(repo_root, "_local", "reports"))
|
||||
dir.create(report_dir, recursive = TRUE, showWarnings = FALSE)
|
||||
|
||||
files <- c("text_data.csv", "expert.csv", "lr_data.csv", "union_mapping.csv", "party_families.csv")
|
||||
|
||||
file_info <- lapply(files, function(file) {
|
||||
committed <- file.path(repo_root, "data", file)
|
||||
generated <- file.path(generated_dir, file)
|
||||
committed_exists <- file.exists(committed)
|
||||
generated_exists <- file.exists(generated)
|
||||
committed_size <- if (committed_exists) file.info(committed)$size else NA_real_
|
||||
generated_size <- if (generated_exists) file.info(generated)$size else NA_real_
|
||||
identical_bytes <- committed_exists && generated_exists && isTRUE(tools::md5sum(committed) == tools::md5sum(generated))
|
||||
data.frame(
|
||||
file = file,
|
||||
committed_exists = committed_exists,
|
||||
generated_exists = generated_exists,
|
||||
committed_size = committed_size,
|
||||
generated_size = generated_size,
|
||||
identical_bytes = identical_bytes,
|
||||
stringsAsFactors = FALSE
|
||||
)
|
||||
})
|
||||
|
||||
summary <- do.call(rbind, file_info)
|
||||
report <- file.path(report_dir, "input_comparison.md")
|
||||
lines <- c(
|
||||
"# Model input comparison",
|
||||
"",
|
||||
paste0("Generated: ", format(Sys.time(), "%Y-%m-%d %H:%M:%S %Z")),
|
||||
"",
|
||||
"| File | Committed exists | Generated exists | Committed bytes | Generated bytes | Identical bytes |",
|
||||
"| --- | --- | --- | ---: | ---: | --- |",
|
||||
apply(summary, 1, function(row) {
|
||||
paste0("| ", row[["file"]], " | ", row[["committed_exists"]], " | ", row[["generated_exists"]], " | ", row[["committed_size"]], " | ", row[["generated_size"]], " | ", row[["identical_bytes"]], " |")
|
||||
})
|
||||
)
|
||||
writeLines(lines, report)
|
||||
print(summary, row.names = FALSE)
|
||||
message("Comparison report written to ", report)
|
||||
@@ -1,5 +1,5 @@
|
||||
# ============================================================
|
||||
# 00d_process_expert.R - Expert Survey Data Processing
|
||||
# process_expert.R - Expert Survey Data Processing
|
||||
# ============================================================
|
||||
# Processes expert survey data from multiple sources:
|
||||
# - Chapel Hill Expert Survey (CHES)
|
||||
@@ -29,11 +29,47 @@ if (interactive() && requireNamespace("rstudioapi", quietly = TRUE)) {
|
||||
|
||||
cat("Processing expert survey data...\n")
|
||||
|
||||
raw_data_dir <- Sys.getenv(
|
||||
"PARTY2D_RAW_DATA_DIR",
|
||||
unset = file.path("..", "..", "_local", "raw")
|
||||
)
|
||||
ches_dir <- file.path(raw_data_dir, "ches")
|
||||
vparty_dir <- file.path(raw_data_dir, "vparty")
|
||||
poppa_dir <- file.path(raw_data_dir, "poppa")
|
||||
gps_dir <- file.path(raw_data_dir, "gps")
|
||||
partyfacts_path <- file.path(raw_data_dir, "partyfacts", "partyfacts-external-parties.csv")
|
||||
|
||||
ches_country_iso2 <- function(country_id) {
|
||||
lookup <- c(
|
||||
`1` = "BE", `2` = "DK", `3` = "DE", `4` = "GR", `5` = "ES",
|
||||
`6` = "FR", `7` = "IE", `8` = "IT", `10` = "NL", `11` = "GB",
|
||||
`12` = "PT", `13` = "AT", `14` = "FI", `16` = "SE", `20` = "BG",
|
||||
`21` = "CZ", `22` = "EE", `23` = "HU", `24` = "LV", `25` = "LT",
|
||||
`26` = "PL", `27` = "RO", `28` = "SK", `29` = "SI", `31` = "HR",
|
||||
`32` = "TR", `33` = "NO", `34` = "CH", `35` = "MT", `36` = "CY",
|
||||
`37` = "IS", `38` = "CH", `40` = "CY"
|
||||
)
|
||||
unname(lookup[as.character(country_id)])
|
||||
}
|
||||
|
||||
ches2024_country_iso2 <- function(country_id) {
|
||||
lookup <- c(
|
||||
`1` = "BE", `2` = "DK", `3` = "DE", `4` = "GR", `5` = "ES",
|
||||
`6` = "FR", `7` = "IE", `8` = "IT", `10` = "NL", `11` = "GB",
|
||||
`12` = "PT", `13` = "AT", `14` = "FI", `16` = "SE", `20` = "BG",
|
||||
`21` = "CZ", `22` = "EE", `23` = "HU", `24` = "LV", `25` = "LT",
|
||||
`26` = "PL", `27` = "RO", `28` = "SK", `29` = "SI", `31` = "HR",
|
||||
`34` = "TR", `35` = "NO", `36` = "CH", `37` = "MT", `40` = "CY",
|
||||
`45` = "IS"
|
||||
)
|
||||
unname(lookup[as.character(country_id)])
|
||||
}
|
||||
|
||||
# ============================================================
|
||||
# PartyFacts Linkage for CHES
|
||||
# ============================================================
|
||||
|
||||
partyfacts_raw <- read_csv('partyfacts-external-parties.csv', show_col_types = FALSE)
|
||||
partyfacts_raw <- read_csv(partyfacts_path, show_col_types = FALSE)
|
||||
ches_link <- partyfacts_raw %>%
|
||||
filter(dataset_key == "ches") %>%
|
||||
transmute(id = dataset_party_id,
|
||||
@@ -47,7 +83,7 @@ ches_link <- partyfacts_raw %>%
|
||||
cat(" Loading expert count tables from individual response files...\n")
|
||||
|
||||
# CHES 2024: dual lookup (party_id primary, country+name fallback for ID mismatches)
|
||||
ches24_exp_raw <- read_csv('~/data/ches/CHES_2024_expert_level.csv', show_col_types = FALSE)
|
||||
ches24_exp_raw <- read_csv(file.path(ches_dir, 'CHES_2024_expert_level.csv'), show_col_types = FALSE)
|
||||
ches24_exp_by_id <- ches24_exp_raw %>%
|
||||
group_by(party_id) %>%
|
||||
summarise(n_experts_id = as.integer(n_distinct(id)), .groups = "drop")
|
||||
@@ -56,15 +92,15 @@ ches24_exp_by_name <- ches24_exp_raw %>%
|
||||
group_by(country_iso2, party_name) %>%
|
||||
summarise(n_experts_name = as.integer(n_distinct(id)), .groups = "drop")
|
||||
|
||||
ches_ca_expert_counts <- read_csv('~/data/ches/CHES_CA2023_expert_level.csv', show_col_types = FALSE) %>%
|
||||
ches_ca_expert_counts <- read_csv(file.path(ches_dir, 'CHES_CA2023_expert_level.csv'), show_col_types = FALSE) %>%
|
||||
group_by(party_id) %>%
|
||||
summarise(n_experts = as.integer(n_distinct(expert)), .groups = "drop")
|
||||
|
||||
ches_la_expert_counts <- read_csv('~/data/ches/CHES_LA2020_expert_level.csv', show_col_types = FALSE) %>%
|
||||
ches_la_expert_counts <- read_csv(file.path(ches_dir, 'CHES_LA2020_expert_level.csv'), show_col_types = FALSE) %>%
|
||||
group_by(party_id) %>%
|
||||
summarise(n_experts = as.integer(n_distinct(expert_id)), .groups = "drop")
|
||||
|
||||
ches_il_expert_counts <- read_csv('~/data/ches/CHES_IL_expert_level.csv', show_col_types = FALSE) %>%
|
||||
ches_il_expert_counts <- read_csv(file.path(ches_dir, 'CHES_IL_expert_level.csv'), show_col_types = FALSE) %>%
|
||||
group_by(party_id, year) %>%
|
||||
summarise(n_experts = as.integer(n_distinct(id)), .groups = "drop")
|
||||
|
||||
@@ -74,10 +110,9 @@ ches_il_expert_counts <- read_csv('~/data/ches/CHES_IL_expert_level.csv', show_c
|
||||
|
||||
cat(" Processing CHES 1999-2019...\n")
|
||||
|
||||
ches <- read_csv('~/data/ches/1999-2019_CHES_dataset_means(v3).csv', show_col_types = FALSE) %>%
|
||||
ches <- read_csv(file.path(ches_dir, '1999-2019_CHES_dataset_means(v3).csv'), show_col_types = FALSE) %>%
|
||||
rename(country_id = country) %>%
|
||||
left_join(readRDS('~/data/ches/link.rds'), by = "country_id") %>%
|
||||
transmute(country = countrycode(country, origin = 'country.name', destination = 'iso2c'),
|
||||
transmute(country = ches_country_iso2(country_id),
|
||||
vote = vote,
|
||||
year = year,
|
||||
id = as.character(party_id),
|
||||
@@ -111,12 +146,14 @@ country_lookup <- c(
|
||||
)
|
||||
|
||||
convert_country_codes <- function(codes) {
|
||||
numeric_result <- ches2024_country_iso2(codes)
|
||||
result <- country_lookup[codes]
|
||||
result[is.na(result)] <- numeric_result[is.na(result)]
|
||||
result[is.na(result)] <- codes[is.na(result)]
|
||||
return(unname(result))
|
||||
}
|
||||
|
||||
ches24 <- read_csv('~/data/ches/CHES_2024_final_v2.csv', show_col_types = FALSE) %>%
|
||||
ches24 <- read_csv(file.path(ches_dir, 'CHES_2024_final_v2.csv'), show_col_types = FALSE) %>%
|
||||
mutate(country_iso2 = convert_country_codes(country)) %>%
|
||||
left_join(ches24_exp_by_id, by = "party_id") %>%
|
||||
left_join(ches24_exp_by_name, by = c("country_iso2", "party" = "party_name")) %>%
|
||||
@@ -144,7 +181,7 @@ ches <- bind_rows(ches, ches24)
|
||||
|
||||
cat(" Processing CHES Canada 2023...\n")
|
||||
|
||||
ches_ca <- read_csv('~/data/ches/CHES_CA2023.csv', show_col_types = FALSE) %>%
|
||||
ches_ca <- read_csv(file.path(ches_dir, 'CHES_CA2023.csv'), show_col_types = FALSE) %>%
|
||||
filter(!is.na(partyfacts_id)) %>%
|
||||
left_join(ches_ca_expert_counts, by = "party_id") %>%
|
||||
transmute(country = "CA",
|
||||
@@ -169,13 +206,15 @@ cat(sprintf(" CHES Canada: %d observations\n", nrow(ches_ca)))
|
||||
|
||||
cat(" Processing CHES Latin America 2020...\n")
|
||||
|
||||
ches_la_link <- read_csv('~/data/ches/ches_la_link.csv', show_col_types = FALSE) %>%
|
||||
transmute(id = as.character(ches_party_id),
|
||||
ches_la_link <- partyfacts_raw %>%
|
||||
filter(dataset_key == "ches") %>%
|
||||
transmute(id = as.character(dataset_party_id),
|
||||
country = countrycode(country, origin = "iso3c", destination = "iso2c"),
|
||||
party = partyfacts_id)
|
||||
|
||||
ches_la <- read_csv('~/data/ches/ches_la_2020_aggregate_level_v01.csv', show_col_types = FALSE) %>%
|
||||
ches_la <- read_csv(file.path(ches_dir, 'ches_la_2020_aggregate_level_v01.csv'), show_col_types = FALSE) %>%
|
||||
left_join(ches_la_expert_counts, by = "party_id") %>%
|
||||
transmute(country = country_abb,
|
||||
transmute(country = toupper(country_abb),
|
||||
year = 2020,
|
||||
id = as.character(party_id),
|
||||
project = 'CHES',
|
||||
@@ -184,11 +223,11 @@ ches_la <- read_csv('~/data/ches/ches_la_2020_aggregate_level_v01.csv', show_col
|
||||
galtan_ches = galtan/10) %>%
|
||||
pivot_longer(cols = lrecon_ches:galtan_ches, names_to = 'var', values_to = 'val') %>%
|
||||
mutate(n_scale = 10L) %>%
|
||||
left_join(ches_la_link, by = "id") %>%
|
||||
left_join(ches_la_link, by = c("id", "country")) %>%
|
||||
filter(!is.na(val), !is.na(party), !is.na(country)) %>%
|
||||
select(-id) %>%
|
||||
mutate(type_low = ifelse(var == "lrecon_ches", "pro_welfare", "cosmopolitan"),
|
||||
type_high = ifelse(var == "lrecon_ches", "pro_market", "traditional"))
|
||||
mutate(type_low = as.character(ifelse(var == "lrecon_ches", "pro_welfare", "cosmopolitan")),
|
||||
type_high = as.character(ifelse(var == "lrecon_ches", "pro_market", "traditional")))
|
||||
|
||||
ches <- bind_rows(ches, ches_la)
|
||||
cat(sprintf(" CHES Latin America: %d observations\n", nrow(ches_la)))
|
||||
@@ -199,11 +238,13 @@ cat(sprintf(" CHES Latin America: %d observations\n", nrow(ches_la)))
|
||||
|
||||
cat(" Processing CHES Israel 2021-2022...\n")
|
||||
|
||||
ches_il_link <- read_csv('~/data/ches/ches_israel_link.csv', show_col_types = FALSE) %>%
|
||||
transmute(id = as.character(ches_party_id),
|
||||
ches_il_link <- partyfacts_raw %>%
|
||||
filter(dataset_key == "ches") %>%
|
||||
transmute(id = as.character(dataset_party_id),
|
||||
country = countrycode(country, origin = "iso3c", destination = "iso2c"),
|
||||
party = partyfacts_id)
|
||||
|
||||
ches_il <- read_csv('~/data/ches/CHES_ISRAEL_means_2021_2022.csv', show_col_types = FALSE) %>%
|
||||
ches_il <- read_csv(file.path(ches_dir, 'CHES_ISRAEL_means_2021_2022.csv'), show_col_types = FALSE) %>%
|
||||
left_join(ches_il_expert_counts, by = c("party_id", "year")) %>%
|
||||
transmute(country = "IL",
|
||||
year = year,
|
||||
@@ -214,7 +255,7 @@ ches_il <- read_csv('~/data/ches/CHES_ISRAEL_means_2021_2022.csv', show_col_type
|
||||
galtan_ches = galtan/10) %>%
|
||||
pivot_longer(cols = lrecon_ches:galtan_ches, names_to = 'var', values_to = 'val') %>%
|
||||
mutate(n_scale = 10L) %>%
|
||||
left_join(ches_il_link, by = "id") %>%
|
||||
left_join(ches_il_link, by = c("id", "country")) %>%
|
||||
filter(!is.na(val), !is.na(party), !is.na(country)) %>%
|
||||
select(-id) %>%
|
||||
mutate(type_low = ifelse(var == "lrecon_ches", "pro_welfare", "cosmopolitan"),
|
||||
@@ -231,10 +272,9 @@ cat(sprintf(" CHES total: %d observations\n", nrow(ches)))
|
||||
|
||||
cat(" Processing CHES LR anchoring data...\n")
|
||||
|
||||
ches_lr <- read_csv('~/data/ches/1999-2019_CHES_dataset_means(v3).csv', show_col_types = FALSE) %>%
|
||||
ches_lr <- read_csv(file.path(ches_dir, '1999-2019_CHES_dataset_means(v3).csv'), show_col_types = FALSE) %>%
|
||||
rename(country_id = country) %>%
|
||||
left_join(readRDS('~/data/ches/link.rds'), by = "country_id") %>%
|
||||
transmute(country = countrycode(country, origin = 'country.name', destination = 'iso2c'),
|
||||
transmute(country = ches_country_iso2(country_id),
|
||||
vote = vote,
|
||||
year = year,
|
||||
id = as.character(party_id),
|
||||
@@ -247,7 +287,7 @@ ches_lr <- read_csv('~/data/ches/1999-2019_CHES_dataset_means(v3).csv', show_col
|
||||
filter(!is.na(val), !is.na(party), !is.na(country)) %>%
|
||||
select(-id)
|
||||
|
||||
ches24_lr <- read_csv('~/data/ches/CHES_2024_final_v2.csv', show_col_types = FALSE) %>%
|
||||
ches24_lr <- read_csv(file.path(ches_dir, 'CHES_2024_final_v2.csv'), show_col_types = FALSE) %>%
|
||||
mutate(country_iso2 = convert_country_codes(country)) %>%
|
||||
left_join(ches24_exp_by_id, by = "party_id") %>%
|
||||
left_join(ches24_exp_by_name, by = c("country_iso2", "party" = "party_name")) %>%
|
||||
@@ -265,7 +305,7 @@ ches24_lr <- read_csv('~/data/ches/CHES_2024_final_v2.csv', show_col_types = FAL
|
||||
select(-id)
|
||||
|
||||
# CHES Canada LR
|
||||
ches_ca_lr <- read_csv('~/data/ches/CHES_CA2023.csv', show_col_types = FALSE) %>%
|
||||
ches_ca_lr <- read_csv(file.path(ches_dir, 'CHES_CA2023.csv'), show_col_types = FALSE) %>%
|
||||
filter(!is.na(partyfacts_id)) %>%
|
||||
left_join(ches_ca_expert_counts, by = "party_id") %>%
|
||||
transmute(country = "CA",
|
||||
@@ -279,9 +319,9 @@ ches_ca_lr <- read_csv('~/data/ches/CHES_CA2023.csv', show_col_types = FALSE) %>
|
||||
filter(!is.na(val), !is.na(party))
|
||||
|
||||
# CHES Latin America LR
|
||||
ches_la_lr <- read_csv('~/data/ches/ches_la_2020_aggregate_level_v01.csv', show_col_types = FALSE) %>%
|
||||
ches_la_lr <- read_csv(file.path(ches_dir, 'ches_la_2020_aggregate_level_v01.csv'), show_col_types = FALSE) %>%
|
||||
left_join(ches_la_expert_counts, by = "party_id") %>%
|
||||
transmute(country = country_abb,
|
||||
transmute(country = toupper(country_abb),
|
||||
year = 2020,
|
||||
id = as.character(party_id),
|
||||
project = 'CHES',
|
||||
@@ -289,12 +329,12 @@ ches_la_lr <- read_csv('~/data/ches/ches_la_2020_aggregate_level_v01.csv', show_
|
||||
val = lrgen/10,
|
||||
var = 'lr_ches',
|
||||
n_scale = 10L) %>%
|
||||
left_join(ches_la_link, by = "id") %>%
|
||||
left_join(ches_la_link, by = c("id", "country")) %>%
|
||||
filter(!is.na(val), !is.na(party), !is.na(country)) %>%
|
||||
select(-id)
|
||||
|
||||
# CHES Israel LR
|
||||
ches_il_lr <- read_csv('~/data/ches/CHES_ISRAEL_means_2021_2022.csv', show_col_types = FALSE) %>%
|
||||
ches_il_lr <- read_csv(file.path(ches_dir, 'CHES_ISRAEL_means_2021_2022.csv'), show_col_types = FALSE) %>%
|
||||
left_join(ches_il_expert_counts, by = c("party_id", "year")) %>%
|
||||
transmute(country = "IL",
|
||||
year = year,
|
||||
@@ -304,7 +344,7 @@ ches_il_lr <- read_csv('~/data/ches/CHES_ISRAEL_means_2021_2022.csv', show_col_t
|
||||
val = lrgen/10,
|
||||
var = 'lr_ches',
|
||||
n_scale = 10L) %>%
|
||||
left_join(ches_il_link, by = "id") %>%
|
||||
left_join(ches_il_link, by = c("id", "country")) %>%
|
||||
filter(!is.na(val), !is.na(party), !is.na(country)) %>%
|
||||
select(-id)
|
||||
|
||||
@@ -316,7 +356,7 @@ ches_lr <- bind_rows(ches_lr, ches24_lr, ches_ca_lr, ches_la_lr, ches_il_lr)
|
||||
|
||||
cat(" Processing V-Party...\n")
|
||||
|
||||
vparty_raw <- readRDS('~/data/v-party/V-Dem-CPD-Party-V2.rds')
|
||||
vparty_raw <- readRDS(file.path(vparty_dir, 'V-Dem-CPD-Party-V2.rds'))
|
||||
|
||||
# Economic 1: v2pariglef_osp (0-6 scale, higher = more right, NO reverse)
|
||||
vparty_econ1 <- vparty_raw %>%
|
||||
@@ -453,7 +493,7 @@ cat(sprintf(" immig: %d, lgbt: %d, culsup: %d, relig: %d, gender: %d\n",
|
||||
|
||||
cat(" Processing POPPA...\n")
|
||||
|
||||
poppa <- readRDS('~/data/POPPA/poppa_integrated_v2.rds') %>%
|
||||
poppa <- readRDS(file.path(poppa_dir, 'poppa_integrated_v2.rds')) %>%
|
||||
transmute(country = countrycode(country_short, origin = "iso3c", destination = "iso2c"),
|
||||
party = partyfacts_id,
|
||||
val = lrecon/10,
|
||||
@@ -469,7 +509,7 @@ poppa <- readRDS('~/data/POPPA/poppa_integrated_v2.rds') %>%
|
||||
cat(sprintf(" POPPA: %d observations\n", nrow(poppa)))
|
||||
|
||||
# POPPA General LR
|
||||
poppa_lr <- readRDS('~/data/POPPA/poppa_integrated_v2.rds') %>%
|
||||
poppa_lr <- readRDS(file.path(poppa_dir, 'poppa_integrated_v2.rds')) %>%
|
||||
transmute(country = countrycode(country_short, origin = "iso3c", destination = "iso2c"),
|
||||
party = partyfacts_id,
|
||||
val = lroverall/10,
|
||||
@@ -486,7 +526,7 @@ poppa_lr <- readRDS('~/data/POPPA/poppa_integrated_v2.rds') %>%
|
||||
|
||||
cat(" Processing GPS...\n")
|
||||
|
||||
gps <- read.delim("~/data/GPS_norris/Global Party Survey by Party SPSS V2_1_Apr_2020-2.tab") %>%
|
||||
gps <- read.delim(file.path(gps_dir, "Global Party Survey by Party SPSS V2_1_Apr_2020-2.tab")) %>%
|
||||
transmute(n_experts = as.integer(Experts),
|
||||
lrecon_gps = as.numeric(V4_Scale)/10,
|
||||
libcon_gps = as.numeric(V6_Scale)/10,
|
||||
@@ -1,7 +1,7 @@
|
||||
# ============================================================
|
||||
# 00a_process_manifesto.R - Manifesto Project Data Processing
|
||||
# process_manifesto.R - Manifesto Project Data Processing
|
||||
# ============================================================
|
||||
# Processes Manifesto Project data for the 4D latent trait model
|
||||
# Processes Manifesto Project data for the two-dimensional party-position model
|
||||
# Input: $PARTY2D_RAW_DATA_DIR/manifesto/MPDataset_MPDS2025a.csv
|
||||
# Output: manifesto_data.csv
|
||||
# ============================================================
|
||||
@@ -22,12 +22,13 @@ raw_data_dir <- Sys.getenv(
|
||||
unset = file.path("..", "..", "_local", "raw")
|
||||
)
|
||||
manifesto_raw_path <- file.path(raw_data_dir, "manifesto", "MPDataset_MPDS2025a.csv")
|
||||
partyfacts_path <- file.path(raw_data_dir, "partyfacts", "partyfacts-external-parties.csv")
|
||||
|
||||
# ============================================================
|
||||
# PartyFacts Linkage
|
||||
# ============================================================
|
||||
|
||||
partyfacts_raw <- read_csv('partyfacts-external-parties.csv', show_col_types = FALSE)
|
||||
partyfacts_raw <- read_csv(partyfacts_path, show_col_types = FALSE)
|
||||
manifesto_link <- partyfacts_raw %>%
|
||||
filter(dataset_key == "manifesto") %>%
|
||||
transmute(id = dataset_party_id,
|
||||
@@ -133,12 +134,12 @@ manifesto <- vars %>%
|
||||
mutate(var = paste0(tolower(gsub(" ", "_", var)), "_manifesto"))
|
||||
|
||||
# ============================================================
|
||||
# NOTE: Temporal continuity filter moved to 00_data-management.R
|
||||
# NOTE: Temporal continuity filter moved to the data setup orchestrator.
|
||||
# This allows exempting parties that appear in parliamentary data
|
||||
# (parties in parliament are by definition not fringe parties)
|
||||
# ============================================================
|
||||
|
||||
cat("Skipping temporal filter (applied in 00_data-management.R after combining with parl data)\n")
|
||||
cat("Skipping temporal filter (applied in 02_build_model_inputs.R after combining with other text data)\n")
|
||||
cat(sprintf(" Parties: %d\n", n_distinct(manifesto$party)))
|
||||
|
||||
# ============================================================
|
||||
@@ -1,4 +1,4 @@
|
||||
# 00e_process_morgan.R
|
||||
# process_morgan.R
|
||||
# Process Morgan (1976) expert party position data
|
||||
#
|
||||
# Source: Morgan, Michael-John (1976). "The Modelling of Governmental
|
||||
@@ -13,14 +13,21 @@ library(tidyverse)
|
||||
|
||||
cat("Processing Morgan (1976) expert party position data...\n")
|
||||
|
||||
raw_data_dir <- Sys.getenv(
|
||||
"PARTY2D_RAW_DATA_DIR",
|
||||
unset = file.path("..", "..", "_local", "raw")
|
||||
)
|
||||
morgan_raw_path <- file.path(raw_data_dir, "morgan", "morgan_positions_raw.csv")
|
||||
partyfacts_path <- file.path(raw_data_dir, "partyfacts", "partyfacts-external-parties.csv")
|
||||
|
||||
# Load raw extracted data
|
||||
morgan_raw <- read_csv("morgan_positions_raw.csv", show_col_types = FALSE)
|
||||
morgan_raw <- read_csv(morgan_raw_path, show_col_types = FALSE)
|
||||
|
||||
cat(sprintf("Loaded %d party-period observations from %d countries\n",
|
||||
nrow(morgan_raw), n_distinct(morgan_raw$country)))
|
||||
|
||||
# Load PartyFacts linkage data
|
||||
partyfacts <- read_csv("partyfacts-external-parties.csv", show_col_types = FALSE)
|
||||
partyfacts <- read_csv(partyfacts_path, show_col_types = FALSE)
|
||||
|
||||
# Filter to Morgan dataset entries
|
||||
morgan_pf <- partyfacts %>%
|
||||
@@ -310,6 +317,9 @@ cat("Generating lr_data-compatible output (postwar only)\n")
|
||||
cat("============================================================\n")
|
||||
|
||||
# Load text_data to get party-years with manifesto/PolDem coverage
|
||||
if (!file.exists("text_data.csv")) {
|
||||
cat("text_data.csv not present yet; skipping morgan_lr.csv generation on this pass.\n")
|
||||
} else {
|
||||
text_data <- read_csv("text_data.csv", show_col_types = FALSE)
|
||||
|
||||
# Convert Morgan ISO3 country codes to ISO2 (matching text_data format)
|
||||
@@ -386,3 +396,4 @@ print(morgan_lr_summary, n = 20)
|
||||
# Write morgan_lr.csv
|
||||
write_csv(morgan_lr, "morgan_lr.csv")
|
||||
cat(sprintf("\nWrote morgan_lr.csv with %d rows\n", nrow(morgan_lr)))
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
# ============================================================
|
||||
# 00c_process_poldem.R - PolDem Media Data Processing
|
||||
# process_poldem.R - PolDem Media Data Processing
|
||||
# ============================================================
|
||||
# Processes PolDem (Political Deliberation in the Media) data
|
||||
# for the 4D latent trait model
|
||||
# for the two-dimensional party-position model
|
||||
#
|
||||
# Input: $PARTY2D_RAW_DATA_DIR/poldem/poldem-election_all.csv (sentence-level)
|
||||
# Output: poldem_data.csv (party-year-var aggregates)
|
||||
@@ -23,12 +23,13 @@ raw_data_dir <- Sys.getenv(
|
||||
unset = file.path("..", "..", "_local", "raw")
|
||||
)
|
||||
poldem_raw_path <- file.path(raw_data_dir, "poldem", "poldem-election_all.csv")
|
||||
partyfacts_path <- file.path(raw_data_dir, "partyfacts", "partyfacts-external-parties.csv")
|
||||
|
||||
# ============================================================
|
||||
# PartyFacts Linkage (via CMP party IDs)
|
||||
# ============================================================
|
||||
|
||||
partyfacts_raw <- read_csv('partyfacts-external-parties.csv', show_col_types = FALSE)
|
||||
partyfacts_raw <- read_csv(partyfacts_path, show_col_types = FALSE)
|
||||
manifesto_link <- partyfacts_raw %>%
|
||||
filter(dataset_key == "manifesto") %>%
|
||||
transmute(cmp = as.numeric(dataset_party_id), # Convert to numeric for join
|
||||
@@ -0,0 +1,86 @@
|
||||
# Data setup
|
||||
|
||||
This directory exists because the public repository cannot redistribute the original raw/source files. It downloads script-accessible sources, checks user-provided source files, rebuilds model-ready inputs, and compares them with the committed files in `../data/`.
|
||||
|
||||
The main estimation workflow does not run these scripts. Once the five model-ready CSVs exist in `data/`, fitting and post-estimation are Julia/Stan-only.
|
||||
|
||||
The setup workflow never overwrites committed files in `data/`.
|
||||
|
||||
Put raw source files in `_local/raw/` or set `PARTY2D_RAW_DATA_DIR` to another local directory. See `source_manifest.csv` and the source notes below for source-specific access requirements.
|
||||
|
||||
## What downloads automatically?
|
||||
|
||||
`data-setup/R/01_download_sources.R` downloads source files that are script-accessible under the providers' terms and reports sources that require credentials or manual local files.
|
||||
|
||||
| Source | Automatic? | Requirement |
|
||||
| --- | --- | --- |
|
||||
| PolDem | Yes | none |
|
||||
| PartyFacts crosswalk | Yes | none |
|
||||
| CHES family files | Yes | none where provider links are live |
|
||||
| POPPA | Yes | none; downloaded from Harvard Dataverse |
|
||||
| Global Party Survey 2019 | Yes | none; downloaded from Harvard Dataverse |
|
||||
| V-Party | Yes, with provider form details | set `PARTY2D_VDEM_EMAIL`; optionally set `PARTY2D_VDEM_GENDER` |
|
||||
| Manifesto Project | Yes, with credentials | set your own `MANIFESTO_API_KEY` or `PARTY2D_MANIFESTO_API_KEY` |
|
||||
| Morgan historical expert data | No | place `morgan_positions_raw.csv` locally; available on request |
|
||||
|
||||
Do not commit downloaded or user-provided source files.
|
||||
|
||||
Recommended local layout:
|
||||
|
||||
```text
|
||||
_local/raw/
|
||||
manifesto/MPDataset_MPDS2025a.csv
|
||||
poldem/poldem-election_all.csv
|
||||
ches/...
|
||||
vparty/...
|
||||
poppa/...
|
||||
gps/...
|
||||
morgan/...
|
||||
partyfacts/partyfacts-external-parties.csv
|
||||
```
|
||||
|
||||
Local output layout:
|
||||
|
||||
```text
|
||||
_local/build/ # intermediate processing files
|
||||
_local/generated-inputs/ # regenerated final model-input CSVs
|
||||
_local/reports/ # comparison reports
|
||||
```
|
||||
|
||||
## Commands
|
||||
|
||||
Run the full source-data setup workflow with:
|
||||
|
||||
```bash
|
||||
bash data-setup/run_data_setup.sh
|
||||
```
|
||||
|
||||
The command downloads script-accessible sources, checks required local files,
|
||||
rebuilds model-ready inputs under `_local/generated-inputs/`, and writes a
|
||||
comparison report under `_local/reports/`. It never replaces committed files in
|
||||
`data/`.
|
||||
|
||||
V-Party:
|
||||
|
||||
```bash
|
||||
export PARTY2D_VDEM_EMAIL='you@example.org'
|
||||
export PARTY2D_VDEM_GENDER='' # blank means prefer not to say
|
||||
```
|
||||
|
||||
Manifesto Project:
|
||||
|
||||
```bash
|
||||
export MANIFESTO_API_KEY='...'
|
||||
# or
|
||||
export PARTY2D_MANIFESTO_API_KEY='...'
|
||||
```
|
||||
|
||||
Morgan is not a public provider download. The local OCR/transcription file can be provided on request and should be placed at:
|
||||
|
||||
```text
|
||||
_local/raw/morgan/morgan_positions_raw.csv
|
||||
```
|
||||
|
||||
The comparison writes `_local/reports/input_comparison.md`. Replacing committed inputs, if ever needed, is a separate manual decision and is not done by these scripts.
|
||||
|
||||
Known behavior: the current public/rebuilt sources run through the workflow successfully, but regenerated `text_data.csv`, `expert.csv`, and `lr_data.csv` are not byte-identical to the committed model-ready inputs because of source-version and linkage differences. The comparison report records those differences explicitly.
|
||||
@@ -0,0 +1,58 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
|
||||
raw_data_dir="${PARTY2D_RAW_DATA_DIR:-$repo_root/_local/raw}"
|
||||
report_dir="${PARTY2D_REPORT_DIR:-$repo_root/_local/reports}"
|
||||
mkdir -p "$report_dir"
|
||||
missing_report="$report_dir/raw_data_preflight_missing.txt"
|
||||
: > "$missing_report"
|
||||
|
||||
required_files=(
|
||||
"manifesto/MPDataset_MPDS2025a.csv"
|
||||
"poldem/poldem-election_all.csv"
|
||||
"partyfacts/partyfacts-external-parties.csv"
|
||||
"ches/1999-2019_CHES_dataset_means(v3).csv"
|
||||
"ches/CHES_2024_final_v2.csv"
|
||||
"ches/CHES_2024_expert_level.csv"
|
||||
"ches/CHES_CA2023.csv"
|
||||
"ches/CHES_CA2023_expert_level.csv"
|
||||
"ches/ches_la_2020_aggregate_level_v01.csv"
|
||||
"ches/CHES_LA2020_expert_level.csv"
|
||||
"ches/CHES_ISRAEL_means_2021_2022.csv"
|
||||
"ches/CHES_IL_expert_level.csv"
|
||||
"vparty/V-Dem-CPD-Party-V2.rds"
|
||||
"poppa/poppa_integrated_v2.rds"
|
||||
"gps/Global Party Survey by Party SPSS V2_1_Apr_2020-2.tab"
|
||||
"morgan/morgan_positions_raw.csv"
|
||||
)
|
||||
|
||||
echo "Raw data directory: $raw_data_dir"
|
||||
echo
|
||||
echo "Required raw inputs for regeneration:"
|
||||
|
||||
missing=0
|
||||
for rel in "${required_files[@]}"; do
|
||||
path="$raw_data_dir/$rel"
|
||||
if [ -s "$path" ]; then
|
||||
bytes="$(wc -c < "$path")"
|
||||
read -r sha _ < <(sha256sum "$path")
|
||||
echo " OK $rel ($bytes bytes, sha256=$sha)"
|
||||
else
|
||||
echo " MISSING $rel"
|
||||
printf '%s\n' "$rel" >> "$missing_report"
|
||||
missing=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$missing" -ne 0 ]; then
|
||||
echo
|
||||
echo "At least one required raw input is missing." >&2
|
||||
echo "Missing-file report: $missing_report" >&2
|
||||
echo "See data-setup/README.md and docs/RAW_DATA_SOURCES.md for instructions." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Required raw data preflight passed."
|
||||
rm -f "$missing_report"
|
||||
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
usage() {
|
||||
cat >&2 <<'EOF'
|
||||
Usage: bash data-setup/run_data_setup.sh
|
||||
EOF
|
||||
}
|
||||
|
||||
if [ "$#" -ne 0 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
|
||||
cd "$repo_root"
|
||||
|
||||
export PARTY2D_RAW_DATA_DIR="${PARTY2D_RAW_DATA_DIR:-$repo_root/_local/raw}"
|
||||
export PARTY2D_BUILD_DIR="${PARTY2D_BUILD_DIR:-$repo_root/_local/build}"
|
||||
export PARTY2D_GENERATED_INPUT_DIR="${PARTY2D_GENERATED_INPUT_DIR:-$repo_root/_local/generated-inputs}"
|
||||
export PARTY2D_REPORT_DIR="${PARTY2D_REPORT_DIR:-$repo_root/_local/reports}"
|
||||
export R_LIBS_USER="${R_LIBS_USER:-$repo_root/_local/R/library}"
|
||||
mkdir -p "$R_LIBS_USER"
|
||||
|
||||
command -v bash >/dev/null
|
||||
command -v Rscript >/dev/null
|
||||
bash -n data-setup/check_raw_data.sh
|
||||
Rscript data-setup/R/00_install_dependencies.R
|
||||
Rscript data-setup/R/01_download_sources.R || true
|
||||
bash data-setup/check_raw_data.sh
|
||||
rm -rf "$PARTY2D_BUILD_DIR" "$PARTY2D_GENERATED_INPUT_DIR"
|
||||
mkdir -p "$PARTY2D_BUILD_DIR" "$PARTY2D_GENERATED_INPUT_DIR"
|
||||
Rscript data-setup/R/02_build_model_inputs.R
|
||||
Rscript data-setup/R/03_compare_generated_inputs.R
|
||||
@@ -0,0 +1,17 @@
|
||||
source,scope,local_path,access,automatic_download,notes
|
||||
Manifesto Project,manifesto text/coding,manifesto/MPDataset_MPDS2025a.csv,API key/login required,yes with MANIFESTO_API_KEY,Use the MPDS 2025a CSV export; raw file is not redistributed.
|
||||
PolDem Election Campaigns,media campaign issue statements,poldem/poldem-election_all.csv,public download,yes,CSV URL https://poldem.eui.eu/downloads/cosa/poldem-election_all.csv; observed sha256 2cd8c9108b1b0b9c1b6594bb21acee709c70259cd02f450bc69fc09b505fc9fb.
|
||||
CHES 1999-2019,expert party placements,ches/1999-2019_CHES_dataset_means(v3).csv,public archived download,yes,Downloaded from archived CHES URL at chesdata.eu.
|
||||
CHES 2024,expert party placements,ches/CHES_2024_final_v2.csv,CHES terms,no,Requires matching expert-level file for expert counts.
|
||||
CHES 2024 expert level,expert counts,ches/CHES_2024_expert_level.csv,CHES terms,no,Required for expert counts.
|
||||
CHES Canada 2023 aggregate,expert party placements,ches/CHES_CA2023.csv,CHES terms,no,Required for Canada extension.
|
||||
CHES Canada 2023,expert party placements,ches/CHES_CA2023_expert_level.csv,CHES terms,no,Used by expert-source processing where available.
|
||||
CHES Latin America aggregate,expert party placements,ches/ches_la_2020_aggregate_level_v01.csv,CHES terms,no,Required for Latin America extension.
|
||||
CHES Latin America 2020,expert party placements,ches/CHES_LA2020_expert_level.csv,CHES terms,no,Used by expert-source processing where available.
|
||||
CHES Israel aggregate,expert party placements,ches/CHES_ISRAEL_means_2021_2022.csv,CHES terms,no,Required for Israel extension.
|
||||
CHES Israel,expert party placements,ches/CHES_IL_expert_level.csv,CHES terms,no,Used by expert-source processing where available.
|
||||
V-Party,expert-coded party variables,vparty/V-Dem-CPD-Party-V2.rds,V-Dem form terms,yes with PARTY2D_VDEM_EMAIL,Downloader submits provider form and extracts R data from ZIP.
|
||||
POPPA,expert party placements,poppa/poppa_integrated_v2.rds,public Dataverse,yes,Downloaded from Harvard Dataverse DOI 10.7910/DVN/RMQREQ.
|
||||
Global Party Survey 2019,expert party placements,gps/Global Party Survey by Party SPSS V2_1_Apr_2020-2.tab,public Dataverse,yes,Downloaded from Harvard Dataverse DOI 10.7910/DVN/WMGTNS.
|
||||
Morgan historical expert data,historical left-right placements,morgan/morgan_positions_raw.csv,derived local transcription/no redistribution,no public URL,Local OCR/transcription source used for historical anchoring.
|
||||
PartyFacts crosswalk,party ID harmonization,partyfacts/partyfacts-external-parties.csv,public download,yes,Support crosswalk required by source-processing scripts.
|
||||
|
+8
-2
@@ -1,7 +1,13 @@
|
||||
# Data directory
|
||||
|
||||
This directory contains processed, model-ready party-level inputs used by the estimation pipeline.
|
||||
This directory contains only the processed, model-ready inputs used by the Julia/Stan estimation pipeline:
|
||||
|
||||
Original raw source files are not stored here. To regenerate the processed inputs, place raw files in a local directory and set `PARTY2D_RAW_DATA_DIR`; see `../docs/RAW_DATA_SOURCES.md`.
|
||||
- `text_data.csv`
|
||||
- `expert.csv`
|
||||
- `lr_data.csv`
|
||||
- `union_mapping.csv`
|
||||
- `party_families.csv`
|
||||
|
||||
Original raw source files and intermediate build products are not stored here. To regenerate the processed inputs, place raw files in a local directory and set `PARTY2D_RAW_DATA_DIR`; see `../data-setup/README.md`.
|
||||
|
||||
Generated outputs and temporary staging files are ignored by git.
|
||||
|
||||
-1161
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
-48729
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
-40633
File diff suppressed because it is too large
Load Diff
-2634
File diff suppressed because it is too large
Load Diff
@@ -1,150 +0,0 @@
|
||||
country,partyfacts_id,period,year_start,year_end,party_abbrev,party_name,lr_morgan,lr_morgan_se,n_surveys
|
||||
BEL,302,1919-1939,1919,1939,COMM,Communist Party,0.005,0.01,11
|
||||
BEL,2289,1919-1939,1919,1939,POB,Social Democratic Party,0.2511,0.016522821682861448,11
|
||||
BEL,1892,1919-1939,1919,1939,CATH,Catholic Party,0.6785,0.02948780949970528,11
|
||||
BEL,275,1919-1939,1919,1939,LIB,Liberal Party,0.7884,0.026152036249592493,10
|
||||
BEL,1834,1919-1939,1919,1939,FNAT,Flemish Nationalist parties,0.8078,0.0359703034081272,11
|
||||
BEL,1829,1919-1939,1919,1939,REX,Rexist,0.9872,0.01,10
|
||||
BEL,302,1945-1973,1945,1973,COMM,Communist Party,0.005,0.01,17
|
||||
BEL,480,1945-1973,1945,1973,PSB,Socialist Party,0.3193,0.01273312031440748,17
|
||||
BEL,281,1945-1973,1945,1973,RW,Rassemblement Wallon,0.5365,0.024325,16
|
||||
BEL,405,1945-1973,1945,1973,PSC,Christian Social Party,0.7090000000000001,0.01598309768989434,17
|
||||
BEL,1333,1945-1973,1945,1973,FDF,Front Democratique Wallon,0.7189,0.033591184067532115,17
|
||||
BEL,1424,1945-1973,1945,1973,VOLK,Volksunie,0.8321,0.01610436550241251,17
|
||||
BEL,49,1945-1973,1945,1973,PLP,Liberal Party,0.995,0.01,17
|
||||
DEU,1135,1919-1930,1919,1930,KPD,Communist Party,0.005,0.01,15
|
||||
DEU,383,1919-1930,1919,1930,SDAP,Social Democratic Party,0.25579999999999997,0.011928788706318843,15
|
||||
DEU,1826,1919-1930,1919,1930,DDP,Democratic Party,0.4557,0.012367726818889016,15
|
||||
DEU,1798,1919-1930,1919,1930,DZP,Center Party,0.5125,0.01639562949894473,15
|
||||
DEU,1825,1919-1930,1919,1930,BVP,Bavarian People's Party,0.6317,0.01697508869972809,11
|
||||
DEU,1827,1919-1930,1919,1930,DVP,German People's Party,0.6517000000000001,0.012367726818889016,15
|
||||
DEU,1828,1919-1930,1919,1930,RDMW,Economic Party,0.7064,0.017879622733461383,11
|
||||
DEU,1831,1919-1930,1919,1930,LVP,Rural People's Party,0.8035,0.021766666666666667,9
|
||||
DEU,1830,1919-1930,1919,1930,DNVP,German National People's Party,0.8817,0.01,15
|
||||
DEU,1893,1919-1930,1919,1930,NAZI,National Socialist Party,0.995,0.01,15
|
||||
DNK,379,1919-1939,1919,1939,SOCd,Social Democrats,0.005,0.01,19
|
||||
DNK,1507,1919-1939,1919,1939,RAD,Radicals,0.3394,0.010599006904819953,19
|
||||
DNK,1204,1919-1939,1919,1939,LIB,Liberals,0.7187,0.018330317136257882,19
|
||||
DNK,536,1919-1939,1919,1939,CONS,Conservatives,0.995,0.01,19
|
||||
DNK,277,1945-1973,1945,1973,COMM,Communists,0.005,0.01,22
|
||||
DNK,1136,1945-1973,1945,1973,LS,Left Socialists,0.065,0.01,22
|
||||
DNK,329,1945-1973,1945,1973,SOCL,Socialists (SF),0.1954,0.012642802479887697,22
|
||||
DNK,379,1945-1973,1945,1973,SOCd,Social Democrats,0.41490000000000005,0.015329131505968391,22
|
||||
DNK,1507,1945-1973,1945,1973,RAD,Radicals,0.6185,0.01328240462895453,22
|
||||
DNK,1118,1945-1973,1945,1973,LC,Liberal Center,0.679,0.019492576934709162,18
|
||||
DNK,1204,1945-1973,1945,1973,LIB,Liberals,0.8198000000000001,0.013772766276572434,22
|
||||
DNK,1134,1945-1973,1945,1973,JUST,Justice Party,0.8408,0.03245126662986135,17
|
||||
DNK,536,1945-1973,1945,1973,CONS,Conservatives,0.995,0.01,22
|
||||
FIN,1904,1919-1939,1919,1939,SKDL,Communist,0.005,0.01,12
|
||||
FIN,1303,1919-1939,1919,1939,SOCd,Social Democrats,0.2492,0.01,12
|
||||
FIN,1862,1919-1939,1919,1939,PROG,National Progressives,0.575,0.013509996299037243,12
|
||||
FIN,901,1919-1939,1919,1939,AGR,Agrarian Union,0.5932,0.012874911002928655,12
|
||||
FIN,1229,1919-1939,1919,1939,SWPP,Swedish People's Party,0.6779000000000001,0.01896595634287921,12
|
||||
FIN,495,1919-1939,1919,1939,CONS,Finnish Conservative Party,0.9196,0.011258330249197703,12
|
||||
FIN,725,1919-1939,1919,1939,NPF,Finnish Patriotic Movement,0.995,0.01,12
|
||||
FIN,1096,1945-1973,1945,1973,PDEM,Democratic League,0.005,0.01,15
|
||||
FIN,1164,1945-1973,1945,1973,SDWS,Workers Smallholders SD League,0.2115,0.017376785279983945,15
|
||||
FIN,1303,1945-1973,1945,1973,SOCd,Social Democrats,0.25780000000000003,0.01,15
|
||||
FIN,901,1945-1973,1945,1973,CENT,Center Party,0.5776,0.012175669307143778,13
|
||||
FIN,1689,1945-1973,1945,1973,FRP,Finnish Rural Party,0.6411,0.046899901590843125,13
|
||||
FIN,249,1945-1973,1945,1973,LIB,Finnish People Party/Liberal League,0.7034,0.014200938936093862,15
|
||||
FIN,1229,1945-1973,1945,1973,SWPP,Swedish People's Party,0.7975,0.01608579083124814,15
|
||||
FIN,495,1945-1973,1945,1973,CONS,Finnish Conservative Party,0.9854999999999999,0.01,15
|
||||
FRA,1251,1946-1958,1946,1958,PCF,Communist Party,0.005,0.01,23
|
||||
FRA,1478,1946-1958,1946,1958,SFIO,Socialist Party,0.2365,0.01,23
|
||||
FRA,737,1946-1958,1946,1958,MRP,Popular Republican Movement,0.43119999999999997,0.014033020066041133,23
|
||||
FRA,14,1946-1958,1946,1958,RDA,Radical Party,0.4337,0.015048737488573584,20
|
||||
FRA,2470,1946-1958,1946,1958,UDSR,Democratic Socialist Union,0.4462,0.014936934089698595,20
|
||||
FRA,1083,1946-1958,1946,1958,RPF,Rally of the French People,0.7,0.01511729501913792,23
|
||||
FRA,2689,1946-1958,1946,1958,AR,Republican Action,0.7293000000000001,0.01,20
|
||||
FRA,3181,1946-1958,1946,1958,ARS,Republican Social Action,0.7737999999999999,0.017075,16
|
||||
FRA,1246,1946-1958,1946,1958,RI,Independent Republicans,0.8262,0.01846796657658022,19
|
||||
FRA,1629,1946-1958,1946,1958,CNIP,National Center of Independents,0.835,0.011700202427398648,19
|
||||
FRA,1898,1946-1958,1946,1958,AP,Popular Action,0.8540000000000001,0.013085592354674942,11
|
||||
FRA,1473,1946-1958,1946,1958,PRL,Republican Liberty Party,0.8756,0.013727516377056447,17
|
||||
FRA,1580,1946-1958,1946,1958,POUJ,Poujadists,0.995,0.01,22
|
||||
ISL,1249,1919-1939,1919,1939,COMM,Communist People Alliance,0.005,0.01,6
|
||||
ISL,1325,1919-1939,1919,1939,SOCd,Social Democratic Party,0.2101,0.017350552344714183,6
|
||||
ISL,964,1919-1939,1919,1939,PROG,Progressives/Farmers Party,0.6211,0.04992876592373045,6
|
||||
ISL,1890,1919-1939,1919,1939,LIB,Liberal Party,0.6302,0.0441316401991436,6
|
||||
ISL,363,1919-1939,1919,1939,INDP,Independence Party,0.8128,0.02135138559126004,6
|
||||
ISL,1891,1919-1939,1919,1939,CONS,Conservative Party,0.995,0.01,6
|
||||
ISL,1249,1945-1973,1945,1973,COMM,Communist People Alliance,0.005,0.01,9
|
||||
ISL,1517,1945-1973,1945,1973,LLIB,Liberal Left,0.11410000000000001,0.012966666666666668,9
|
||||
ISL,1325,1945-1973,1945,1973,SOCd,Social Democratic Party,0.3778,0.029333333333333336,9
|
||||
ISL,964,1945-1973,1945,1973,PROG,Progressive Party,0.7299,0.025666666666666667,9
|
||||
ISL,363,1945-1973,1945,1973,INDP,Independence Party,0.995,0.01,9
|
||||
ISR,907,1949-1973,1949,1973,RAKA,Rakah,0.005,0.01,10
|
||||
ISR,1417,1949-1973,1949,1973,MAKI,Maki,0.0346,0.01,10
|
||||
ISR,169,1949-1973,1949,1973,MAPM,Mapam,0.1804,0.018499324311985015,10
|
||||
ISR,1398,1949-1973,1949,1973,ADUT,Ahdut Haavoda,0.3492,0.03993956684792663,10
|
||||
ISR,615,1949-1973,1949,1973,LAB,Labor Alignment,0.4808,0.021029146440119724,10
|
||||
ISR,109,1949-1973,1949,1973,MAPI,Mapai,0.4827,0.02210432084457697,10
|
||||
ISR,1491,1949-1973,1949,1973,PAUG,Poalei Agudat,0.5582,0.021392210420306423,6
|
||||
ISR,396,1949-1973,1949,1973,RAFI,Rafi,0.6042000000000001,0.025361416138919145,7
|
||||
ISR,712,1949-1973,1949,1973,PROG,Progressives,0.65,0.01902117241391813,8
|
||||
ISR,434,1949-1973,1949,1973,ILIB,Independent Liberals,0.6579999999999999,0.025166666666666667,9
|
||||
ISR,1447,1949-1973,1949,1973,NRP,National Religious Party,0.69,0.031030883234057557,7
|
||||
ISR,909,1949-1973,1949,1973,URF,United Religious Front,0.77,0.04753880520164553,5
|
||||
ISR,678,1949-1973,1949,1973,LIB,Liberals,0.7857,0.034499999999999996,9
|
||||
ISR,770,1949-1973,1949,1973,NATL,National List,0.7967,0.04437658917342191,6
|
||||
ISR,1786,1949-1973,1949,1973,TORA,Torah,0.8529000000000001,0.01,6
|
||||
ISR,1489,1949-1973,1949,1973,ZION,General Zionists,0.8795000000000001,0.011166666666666667,9
|
||||
ISR,198,1949-1973,1949,1973,GHAL,Gahal,0.9068999999999999,0.016652364696943193,8
|
||||
ISR,641,1949-1973,1949,1973,AGDT,Agudat Israel,0.9625,0.012298373876248842,5
|
||||
ISR,1655,1949-1973,1949,1973,HRUT,Herut,0.98,0.01,9
|
||||
ITA,34,1946-1975,1946,1975,PCI,Communist Party,0.0308,0.01,12
|
||||
ITA,1505,1946-1975,1946,1975,PSIU,Socialist Party of Proletarian Unity,0.0361,0.011547005383792516,12
|
||||
ITA,742,1946-1975,1946,1975,PSI,Socialist Party (Nenni),0.2281,0.01,12
|
||||
ITA,1126,1946-1975,1946,1975,PSDI,Social Democratic Party,0.36119999999999997,0.010883052574224445,12
|
||||
ITA,394,1946-1975,1946,1975,PRI,Republican Party,0.4218,0.01,12
|
||||
ITA,934,1946-1975,1946,1975,DC,Christian Democratic Party,0.5716,0.015703927321957824,12
|
||||
ITA,1461,1946-1975,1946,1975,PLI,Liberal Party,0.7292000000000001,0.01,12
|
||||
ITA,773,1946-1975,1946,1975,MON,Monarchists,0.9168000000000001,0.01,12
|
||||
ITA,1696,1946-1975,1946,1975,MSI,Italian Social Movement,0.995,0.01,12
|
||||
LUX,1647,1945-1973,1945,1973,COMM,Communist Party,0.005,0.01,7
|
||||
LUX,186,1945-1973,1945,1973,SOCd,Socialist Party,0.36219999999999997,0.04849284188708385,7
|
||||
LUX,539,1945-1973,1945,1973,CSOC,Christian Social Party,0.8576,0.05091181451434291,7
|
||||
LUX,300,1945-1973,1945,1973,GRPD,Democratic Group,0.9333,0.051653170280245145,5
|
||||
NLD,459,1919-1939,1919,1939,CPN,Communist Party,0.005,0.01,6
|
||||
NLD,1894,1919-1939,1919,1939,SOCd,Social Democratic Party (SDAP),0.1832,0.022086232514094993,6
|
||||
NLD,1581,1919-1939,1919,1939,RAD,Radical Party,0.4704,0.012818996320565301,6
|
||||
NLD,1390,1919-1939,1919,1939,KVP,Catholic Party,0.5605,0.02629118990587278,6
|
||||
NLD,1102,1919-1939,1919,1939,CHU,Christian Historical Union,0.6920000000000001,0.030986045246207204,6
|
||||
NLD,1889,1919-1939,1919,1939,LIB,Liberal Party,0.7193999999999999,0.016738179909018384,6
|
||||
NLD,163,1919-1939,1919,1939,ARP,Anti-Revolutionary Party,0.7243,0.03715059443221154,6
|
||||
NLD,1178,1919-1939,1919,1939,SGP,Political Reformed Party,0.885,0.01,6
|
||||
NLD,1832,1919-1939,1919,1939,NSB,National Social Movement,0.995,0.01,6
|
||||
NLD,459,1945-1973,1945,1973,CPN,Communist Party,0.005,0.01,14
|
||||
NLD,1050,1945-1973,1945,1973,PSP,Pacifist Socialist Party,0.0766,0.012427647748927736,14
|
||||
NLD,1581,1945-1973,1945,1973,PPR,Political Radicals,0.1967,0.01501526495997263,11
|
||||
NLD,1234,1945-1973,1945,1973,PVDA,Labor Party,0.2669,0.01312252697790004,14
|
||||
NLD,921,1945-1973,1945,1973,DS70,Social Democratic splinter,0.4604,0.016436566377614103,14
|
||||
NLD,1390,1945-1973,1945,1973,KVP,Catholic Party,0.5125,0.01,14
|
||||
NLD,163,1945-1973,1945,1973,ARP,Anti-Revolutionary Party,0.5556,0.022931014556086014,14
|
||||
NLD,1102,1945-1973,1945,1973,CHU,Christian Historical Union,0.6647,0.015100260168051978,14
|
||||
NLD,828,1945-1973,1945,1973,VVD,Liberal Party,0.7609999999999999,0.0155546042793031,14
|
||||
NLD,1178,1945-1973,1945,1973,SGP,Political Reform Party,0.9634999999999999,0.010650243767524398,13
|
||||
NLD,1602,1945-1973,1945,1973,GPV,Reformed Political Association,0.9670000000000001,0.011200595222278741,12
|
||||
NLD,1110,1945-1973,1945,1973,BP,Peasant Party (Poujadist),0.9682,0.013447405968168258,11
|
||||
NOR,448,1919-1939,1919,1939,LAB,Labor Party,0.005,0.01,19
|
||||
NOR,1173,1919-1939,1919,1939,LIB,Liberal Party,0.5771000000000001,0.017137355320130963,19
|
||||
NOR,1072,1919-1939,1919,1939,AGR,Agrarian Party,0.7061,0.019821519406416535,19
|
||||
NOR,503,1919-1939,1919,1939,CONS,Conservative Party,0.995,0.01,19
|
||||
NOR,1079,1945-1973,1945,1973,COMM,Communist Party,0.005,0.01,20
|
||||
NOR,1203,1945-1973,1945,1973,SOCL,Socialist People Party,0.0745,0.01,20
|
||||
NOR,448,1945-1973,1945,1973,LAB,Labor Party,0.3529,0.011292143286373936,20
|
||||
NOR,1173,1945-1973,1945,1973,LIB,Liberal Party,0.6426999999999999,0.015294704966098562,20
|
||||
NOR,705,1945-1973,1945,1973,CHPP,Christian People Party,0.6907,0.020280350874157655,19
|
||||
NOR,1072,1945-1973,1945,1973,CENT,Center Party,0.7813,0.01,20
|
||||
NOR,503,1945-1973,1945,1973,CONS,Conservative Party,0.995,0.01,20
|
||||
SWE,830,1919-1939,1919,1939,COMM,Communist Party,0.005,0.01,15
|
||||
SWE,487,1919-1939,1919,1939,SOCd,Social Democratic Party,0.2585,0.013891100268397268,15
|
||||
SWE,199,1919-1939,1919,1939,AGR,Agrarian Party,0.5857,0.014020199713270847,15
|
||||
SWE,1274,1919-1939,1919,1939,LIB,Liberal Party,0.7419,0.011386571037849805,15
|
||||
SWE,690,1919-1939,1919,1939,CONS,Conservative Party,0.995,0.01,15
|
||||
SWE,830,1945-1973,1945,1973,COMM,Communist Party,0.005,0.01,20
|
||||
SWE,487,1945-1973,1945,1973,SOCd,Social Democratic Party,0.3251,0.013796539421173702,20
|
||||
SWE,199,1945-1973,1945,1973,CENT,Center/Agrarian Party,0.6456999999999999,0.01,19
|
||||
SWE,1274,1945-1973,1945,1973,LIB,Liberal/People Party,0.7444,0.013863621460498696,20
|
||||
SWE,690,1945-1973,1945,1973,CONS,Conservative Party,0.995,0.01,20
|
||||
|
@@ -1,472 +0,0 @@
|
||||
country,party,var,year,val,project,n_scale,val_int,n_experts
|
||||
BE,49,lr_morgan,1971,0.995,Morgan,10,10,17
|
||||
BE,281,lr_morgan,1968,0.5365,Morgan,10,5,16
|
||||
BE,281,lr_morgan,1971,0.5365,Morgan,10,5,16
|
||||
BE,405,lr_morgan,1946,0.7090000000000001,Morgan,10,7,17
|
||||
BE,405,lr_morgan,1949,0.7090000000000001,Morgan,10,7,17
|
||||
BE,405,lr_morgan,1950,0.7090000000000001,Morgan,10,7,17
|
||||
BE,405,lr_morgan,1954,0.7090000000000001,Morgan,10,7,17
|
||||
BE,405,lr_morgan,1958,0.7090000000000001,Morgan,10,7,17
|
||||
BE,405,lr_morgan,1961,0.7090000000000001,Morgan,10,7,17
|
||||
BE,405,lr_morgan,1965,0.7090000000000001,Morgan,10,7,17
|
||||
BE,480,lr_morgan,1946,0.3193,Morgan,10,3,17
|
||||
BE,480,lr_morgan,1949,0.3193,Morgan,10,3,17
|
||||
BE,480,lr_morgan,1950,0.3193,Morgan,10,3,17
|
||||
BE,480,lr_morgan,1954,0.3193,Morgan,10,3,17
|
||||
BE,480,lr_morgan,1958,0.3193,Morgan,10,3,17
|
||||
BE,480,lr_morgan,1961,0.3193,Morgan,10,3,17
|
||||
BE,480,lr_morgan,1965,0.3193,Morgan,10,3,17
|
||||
BE,480,lr_morgan,1968,0.3193,Morgan,10,3,17
|
||||
BE,480,lr_morgan,1971,0.3193,Morgan,10,3,17
|
||||
BE,1424,lr_morgan,1954,0.8321,Morgan,10,8,17
|
||||
BE,1424,lr_morgan,1958,0.8321,Morgan,10,8,17
|
||||
BE,1424,lr_morgan,1961,0.8321,Morgan,10,8,17
|
||||
BE,1424,lr_morgan,1965,0.8321,Morgan,10,8,17
|
||||
BE,1424,lr_morgan,1968,0.8321,Morgan,10,8,17
|
||||
BE,1424,lr_morgan,1971,0.8321,Morgan,10,8,17
|
||||
DK,277,lr_morgan,1945,0.005,Morgan,10,0,22
|
||||
DK,277,lr_morgan,1947,0.005,Morgan,10,0,22
|
||||
DK,277,lr_morgan,1950,0.005,Morgan,10,0,22
|
||||
DK,277,lr_morgan,1953,0.005,Morgan,10,0,22
|
||||
DK,277,lr_morgan,1957,0.005,Morgan,10,0,22
|
||||
DK,277,lr_morgan,1960,0.005,Morgan,10,0,22
|
||||
DK,277,lr_morgan,1964,0.005,Morgan,10,0,22
|
||||
DK,277,lr_morgan,1966,0.005,Morgan,10,0,22
|
||||
DK,277,lr_morgan,1968,0.005,Morgan,10,0,22
|
||||
DK,277,lr_morgan,1971,0.005,Morgan,10,0,22
|
||||
DK,277,lr_morgan,1973,0.005,Morgan,10,0,22
|
||||
DK,329,lr_morgan,1960,0.1954,Morgan,10,2,22
|
||||
DK,329,lr_morgan,1964,0.1954,Morgan,10,2,22
|
||||
DK,329,lr_morgan,1966,0.1954,Morgan,10,2,22
|
||||
DK,329,lr_morgan,1968,0.1954,Morgan,10,2,22
|
||||
DK,329,lr_morgan,1971,0.1954,Morgan,10,2,22
|
||||
DK,329,lr_morgan,1973,0.1954,Morgan,10,2,22
|
||||
DK,379,lr_morgan,1945,0.41490000000000005,Morgan,10,4,22
|
||||
DK,379,lr_morgan,1947,0.41490000000000005,Morgan,10,4,22
|
||||
DK,379,lr_morgan,1950,0.41490000000000005,Morgan,10,4,22
|
||||
DK,379,lr_morgan,1953,0.41490000000000005,Morgan,10,4,22
|
||||
DK,379,lr_morgan,1957,0.41490000000000005,Morgan,10,4,22
|
||||
DK,379,lr_morgan,1960,0.41490000000000005,Morgan,10,4,22
|
||||
DK,379,lr_morgan,1964,0.41490000000000005,Morgan,10,4,22
|
||||
DK,379,lr_morgan,1966,0.41490000000000005,Morgan,10,4,22
|
||||
DK,379,lr_morgan,1968,0.41490000000000005,Morgan,10,4,22
|
||||
DK,379,lr_morgan,1971,0.41490000000000005,Morgan,10,4,22
|
||||
DK,379,lr_morgan,1973,0.41490000000000005,Morgan,10,4,22
|
||||
DK,536,lr_morgan,1945,0.995,Morgan,10,10,22
|
||||
DK,536,lr_morgan,1947,0.995,Morgan,10,10,22
|
||||
DK,536,lr_morgan,1950,0.995,Morgan,10,10,22
|
||||
DK,536,lr_morgan,1953,0.995,Morgan,10,10,22
|
||||
DK,536,lr_morgan,1957,0.995,Morgan,10,10,22
|
||||
DK,536,lr_morgan,1960,0.995,Morgan,10,10,22
|
||||
DK,536,lr_morgan,1964,0.995,Morgan,10,10,22
|
||||
DK,536,lr_morgan,1966,0.995,Morgan,10,10,22
|
||||
DK,536,lr_morgan,1968,0.995,Morgan,10,10,22
|
||||
DK,536,lr_morgan,1971,0.995,Morgan,10,10,22
|
||||
DK,536,lr_morgan,1973,0.995,Morgan,10,10,22
|
||||
DK,1134,lr_morgan,1945,0.8408,Morgan,10,8,17
|
||||
DK,1134,lr_morgan,1947,0.8408,Morgan,10,8,17
|
||||
DK,1134,lr_morgan,1950,0.8408,Morgan,10,8,17
|
||||
DK,1134,lr_morgan,1953,0.8408,Morgan,10,8,17
|
||||
DK,1134,lr_morgan,1957,0.8408,Morgan,10,8,17
|
||||
DK,1134,lr_morgan,1960,0.8408,Morgan,10,8,17
|
||||
DK,1134,lr_morgan,1964,0.8408,Morgan,10,8,17
|
||||
DK,1134,lr_morgan,1966,0.8408,Morgan,10,8,17
|
||||
DK,1134,lr_morgan,1968,0.8408,Morgan,10,8,17
|
||||
DK,1134,lr_morgan,1971,0.8408,Morgan,10,8,17
|
||||
DK,1134,lr_morgan,1973,0.8408,Morgan,10,8,17
|
||||
DK,1136,lr_morgan,1968,0.065,Morgan,10,1,22
|
||||
DK,1136,lr_morgan,1971,0.065,Morgan,10,1,22
|
||||
DK,1136,lr_morgan,1973,0.065,Morgan,10,1,22
|
||||
DK,1204,lr_morgan,1945,0.8198000000000001,Morgan,10,8,22
|
||||
DK,1204,lr_morgan,1947,0.8198000000000001,Morgan,10,8,22
|
||||
DK,1204,lr_morgan,1950,0.8198000000000001,Morgan,10,8,22
|
||||
DK,1204,lr_morgan,1953,0.8198000000000001,Morgan,10,8,22
|
||||
DK,1204,lr_morgan,1957,0.8198000000000001,Morgan,10,8,22
|
||||
DK,1204,lr_morgan,1960,0.8198000000000001,Morgan,10,8,22
|
||||
DK,1204,lr_morgan,1964,0.8198000000000001,Morgan,10,8,22
|
||||
DK,1204,lr_morgan,1966,0.8198000000000001,Morgan,10,8,22
|
||||
DK,1204,lr_morgan,1968,0.8198000000000001,Morgan,10,8,22
|
||||
DK,1204,lr_morgan,1971,0.8198000000000001,Morgan,10,8,22
|
||||
DK,1204,lr_morgan,1973,0.8198000000000001,Morgan,10,8,22
|
||||
DK,1507,lr_morgan,1945,0.6185,Morgan,10,6,22
|
||||
DK,1507,lr_morgan,1947,0.6185,Morgan,10,6,22
|
||||
DK,1507,lr_morgan,1950,0.6185,Morgan,10,6,22
|
||||
DK,1507,lr_morgan,1953,0.6185,Morgan,10,6,22
|
||||
DK,1507,lr_morgan,1957,0.6185,Morgan,10,6,22
|
||||
DK,1507,lr_morgan,1960,0.6185,Morgan,10,6,22
|
||||
DK,1507,lr_morgan,1964,0.6185,Morgan,10,6,22
|
||||
DK,1507,lr_morgan,1966,0.6185,Morgan,10,6,22
|
||||
DK,1507,lr_morgan,1968,0.6185,Morgan,10,6,22
|
||||
DK,1507,lr_morgan,1971,0.6185,Morgan,10,6,22
|
||||
DK,1507,lr_morgan,1973,0.6185,Morgan,10,6,22
|
||||
FI,249,lr_morgan,1945,0.7034,Morgan,10,7,15
|
||||
FI,249,lr_morgan,1948,0.7034,Morgan,10,7,15
|
||||
FI,249,lr_morgan,1951,0.7034,Morgan,10,7,15
|
||||
FI,249,lr_morgan,1954,0.7034,Morgan,10,7,15
|
||||
FI,249,lr_morgan,1958,0.7034,Morgan,10,7,15
|
||||
FI,249,lr_morgan,1962,0.7034,Morgan,10,7,15
|
||||
FI,249,lr_morgan,1966,0.7034,Morgan,10,7,15
|
||||
FI,249,lr_morgan,1970,0.7034,Morgan,10,7,15
|
||||
FI,249,lr_morgan,1972,0.7034,Morgan,10,7,15
|
||||
FI,495,lr_morgan,1945,0.9854999999999999,Morgan,10,10,15
|
||||
FI,495,lr_morgan,1948,0.9854999999999999,Morgan,10,10,15
|
||||
FI,495,lr_morgan,1951,0.9854999999999999,Morgan,10,10,15
|
||||
FI,495,lr_morgan,1954,0.9854999999999999,Morgan,10,10,15
|
||||
FI,495,lr_morgan,1958,0.9854999999999999,Morgan,10,10,15
|
||||
FI,495,lr_morgan,1962,0.9854999999999999,Morgan,10,10,15
|
||||
FI,495,lr_morgan,1966,0.9854999999999999,Morgan,10,10,15
|
||||
FI,495,lr_morgan,1970,0.9854999999999999,Morgan,10,10,15
|
||||
FI,495,lr_morgan,1972,0.9854999999999999,Morgan,10,10,15
|
||||
FI,901,lr_morgan,1945,0.5776,Morgan,10,6,13
|
||||
FI,901,lr_morgan,1948,0.5776,Morgan,10,6,13
|
||||
FI,901,lr_morgan,1951,0.5776,Morgan,10,6,13
|
||||
FI,901,lr_morgan,1954,0.5776,Morgan,10,6,13
|
||||
FI,901,lr_morgan,1958,0.5776,Morgan,10,6,13
|
||||
FI,901,lr_morgan,1962,0.5776,Morgan,10,6,13
|
||||
FI,901,lr_morgan,1966,0.5776,Morgan,10,6,13
|
||||
FI,901,lr_morgan,1970,0.5776,Morgan,10,6,13
|
||||
FI,901,lr_morgan,1972,0.5776,Morgan,10,6,13
|
||||
FI,1096,lr_morgan,1945,0.005,Morgan,10,0,15
|
||||
FI,1096,lr_morgan,1948,0.005,Morgan,10,0,15
|
||||
FI,1096,lr_morgan,1951,0.005,Morgan,10,0,15
|
||||
FI,1096,lr_morgan,1954,0.005,Morgan,10,0,15
|
||||
FI,1096,lr_morgan,1958,0.005,Morgan,10,0,15
|
||||
FI,1096,lr_morgan,1962,0.005,Morgan,10,0,15
|
||||
FI,1096,lr_morgan,1966,0.005,Morgan,10,0,15
|
||||
FI,1096,lr_morgan,1970,0.005,Morgan,10,0,15
|
||||
FI,1096,lr_morgan,1972,0.005,Morgan,10,0,15
|
||||
FI,1164,lr_morgan,1958,0.2115,Morgan,10,2,15
|
||||
FI,1164,lr_morgan,1962,0.2115,Morgan,10,2,15
|
||||
FI,1164,lr_morgan,1966,0.2115,Morgan,10,2,15
|
||||
FI,1229,lr_morgan,1945,0.7975,Morgan,10,8,15
|
||||
FI,1229,lr_morgan,1948,0.7975,Morgan,10,8,15
|
||||
FI,1229,lr_morgan,1951,0.7975,Morgan,10,8,15
|
||||
FI,1229,lr_morgan,1954,0.7975,Morgan,10,8,15
|
||||
FI,1229,lr_morgan,1958,0.7975,Morgan,10,8,15
|
||||
FI,1229,lr_morgan,1962,0.7975,Morgan,10,8,15
|
||||
FI,1229,lr_morgan,1966,0.7975,Morgan,10,8,15
|
||||
FI,1229,lr_morgan,1970,0.7975,Morgan,10,8,15
|
||||
FI,1229,lr_morgan,1972,0.7975,Morgan,10,8,15
|
||||
FI,1303,lr_morgan,1945,0.25780000000000003,Morgan,10,3,15
|
||||
FI,1303,lr_morgan,1948,0.25780000000000003,Morgan,10,3,15
|
||||
FI,1303,lr_morgan,1951,0.25780000000000003,Morgan,10,3,15
|
||||
FI,1303,lr_morgan,1954,0.25780000000000003,Morgan,10,3,15
|
||||
FI,1303,lr_morgan,1958,0.25780000000000003,Morgan,10,3,15
|
||||
FI,1303,lr_morgan,1962,0.25780000000000003,Morgan,10,3,15
|
||||
FI,1303,lr_morgan,1966,0.25780000000000003,Morgan,10,3,15
|
||||
FI,1303,lr_morgan,1970,0.25780000000000003,Morgan,10,3,15
|
||||
FI,1303,lr_morgan,1972,0.25780000000000003,Morgan,10,3,15
|
||||
FI,1689,lr_morgan,1966,0.6411,Morgan,10,6,13
|
||||
FI,1689,lr_morgan,1970,0.6411,Morgan,10,6,13
|
||||
FI,1689,lr_morgan,1972,0.6411,Morgan,10,6,13
|
||||
FR,14,lr_morgan,1946,0.4337,Morgan,10,4,20
|
||||
FR,14,lr_morgan,1951,0.4337,Morgan,10,4,20
|
||||
FR,14,lr_morgan,1956,0.4337,Morgan,10,4,20
|
||||
FR,14,lr_morgan,1958,0.4337,Morgan,10,4,20
|
||||
FR,737,lr_morgan,1946,0.43119999999999997,Morgan,10,4,23
|
||||
FR,737,lr_morgan,1951,0.43119999999999997,Morgan,10,4,23
|
||||
FR,737,lr_morgan,1956,0.43119999999999997,Morgan,10,4,23
|
||||
FR,737,lr_morgan,1958,0.43119999999999997,Morgan,10,4,23
|
||||
FR,1083,lr_morgan,1946,0.7,Morgan,10,7,23
|
||||
FR,1083,lr_morgan,1951,0.7,Morgan,10,7,23
|
||||
FR,1083,lr_morgan,1956,0.7,Morgan,10,7,23
|
||||
FR,1083,lr_morgan,1958,0.7,Morgan,10,7,23
|
||||
FR,1251,lr_morgan,1946,0.005,Morgan,10,0,23
|
||||
FR,1251,lr_morgan,1951,0.005,Morgan,10,0,23
|
||||
FR,1251,lr_morgan,1956,0.005,Morgan,10,0,23
|
||||
FR,1251,lr_morgan,1958,0.005,Morgan,10,0,23
|
||||
FR,1478,lr_morgan,1946,0.2365,Morgan,10,2,23
|
||||
FR,1478,lr_morgan,1951,0.2365,Morgan,10,2,23
|
||||
FR,1478,lr_morgan,1956,0.2365,Morgan,10,2,23
|
||||
FR,1478,lr_morgan,1958,0.2365,Morgan,10,2,23
|
||||
FR,1629,lr_morgan,1946,0.835,Morgan,10,8,19
|
||||
FR,1629,lr_morgan,1951,0.835,Morgan,10,8,19
|
||||
FR,1629,lr_morgan,1956,0.835,Morgan,10,8,19
|
||||
FR,1629,lr_morgan,1958,0.835,Morgan,10,8,19
|
||||
IL,109,lr_morgan,1949,0.4827,Morgan,10,5,10
|
||||
IL,109,lr_morgan,1951,0.4827,Morgan,10,5,10
|
||||
IL,109,lr_morgan,1955,0.4827,Morgan,10,5,10
|
||||
IL,109,lr_morgan,1959,0.4827,Morgan,10,5,10
|
||||
IL,109,lr_morgan,1961,0.4827,Morgan,10,5,10
|
||||
IL,169,lr_morgan,1949,0.1804,Morgan,10,2,10
|
||||
IL,169,lr_morgan,1951,0.1804,Morgan,10,2,10
|
||||
IL,169,lr_morgan,1955,0.1804,Morgan,10,2,10
|
||||
IL,169,lr_morgan,1959,0.1804,Morgan,10,2,10
|
||||
IL,169,lr_morgan,1961,0.1804,Morgan,10,2,10
|
||||
IL,169,lr_morgan,1965,0.1804,Morgan,10,2,10
|
||||
IL,434,lr_morgan,1965,0.6579999999999999,Morgan,10,7,9
|
||||
IL,434,lr_morgan,1969,0.6579999999999999,Morgan,10,7,9
|
||||
IL,434,lr_morgan,1973,0.6579999999999999,Morgan,10,7,9
|
||||
IL,615,lr_morgan,1965,0.4808,Morgan,10,5,10
|
||||
IL,615,lr_morgan,1969,0.4808,Morgan,10,5,10
|
||||
IL,615,lr_morgan,1973,0.4808,Morgan,10,5,10
|
||||
IL,641,lr_morgan,1949,0.9625,Morgan,10,10,5
|
||||
IL,641,lr_morgan,1951,0.9625,Morgan,10,10,5
|
||||
IL,641,lr_morgan,1955,0.9625,Morgan,10,10,5
|
||||
IL,641,lr_morgan,1959,0.9625,Morgan,10,10,5
|
||||
IL,641,lr_morgan,1965,0.9625,Morgan,10,10,5
|
||||
IL,641,lr_morgan,1969,0.9625,Morgan,10,10,5
|
||||
IL,907,lr_morgan,1965,0.005,Morgan,10,0,10
|
||||
IL,907,lr_morgan,1969,0.005,Morgan,10,0,10
|
||||
IL,907,lr_morgan,1973,0.005,Morgan,10,0,10
|
||||
IL,1398,lr_morgan,1955,0.3492,Morgan,10,3,10
|
||||
IL,1398,lr_morgan,1959,0.3492,Morgan,10,3,10
|
||||
IL,1398,lr_morgan,1961,0.3492,Morgan,10,3,10
|
||||
IL,1417,lr_morgan,1949,0.0346,Morgan,10,0,10
|
||||
IL,1417,lr_morgan,1951,0.0346,Morgan,10,0,10
|
||||
IL,1417,lr_morgan,1955,0.0346,Morgan,10,0,10
|
||||
IL,1417,lr_morgan,1959,0.0346,Morgan,10,0,10
|
||||
IL,1417,lr_morgan,1961,0.0346,Morgan,10,0,10
|
||||
IL,1417,lr_morgan,1965,0.0346,Morgan,10,0,10
|
||||
IL,1417,lr_morgan,1969,0.0346,Morgan,10,0,10
|
||||
IL,1447,lr_morgan,1955,0.69,Morgan,10,7,7
|
||||
IL,1447,lr_morgan,1959,0.69,Morgan,10,7,7
|
||||
IL,1447,lr_morgan,1961,0.69,Morgan,10,7,7
|
||||
IL,1447,lr_morgan,1965,0.69,Morgan,10,7,7
|
||||
IL,1447,lr_morgan,1969,0.69,Morgan,10,7,7
|
||||
IL,1447,lr_morgan,1973,0.69,Morgan,10,7,7
|
||||
IL,1489,lr_morgan,1949,0.8795000000000001,Morgan,10,9,9
|
||||
IL,1489,lr_morgan,1951,0.8795000000000001,Morgan,10,9,9
|
||||
IL,1489,lr_morgan,1955,0.8795000000000001,Morgan,10,9,9
|
||||
IL,1489,lr_morgan,1959,0.8795000000000001,Morgan,10,9,9
|
||||
IL,1655,lr_morgan,1949,0.98,Morgan,10,10,9
|
||||
IL,1655,lr_morgan,1951,0.98,Morgan,10,10,9
|
||||
IL,1655,lr_morgan,1955,0.98,Morgan,10,10,9
|
||||
IL,1655,lr_morgan,1959,0.98,Morgan,10,10,9
|
||||
IL,1655,lr_morgan,1961,0.98,Morgan,10,10,9
|
||||
IS,363,lr_morgan,1946,0.995,Morgan,10,10,9
|
||||
IS,363,lr_morgan,1949,0.995,Morgan,10,10,9
|
||||
IS,363,lr_morgan,1953,0.995,Morgan,10,10,9
|
||||
IS,363,lr_morgan,1956,0.995,Morgan,10,10,9
|
||||
IS,363,lr_morgan,1959,0.995,Morgan,10,10,9
|
||||
IS,363,lr_morgan,1963,0.995,Morgan,10,10,9
|
||||
IS,363,lr_morgan,1967,0.995,Morgan,10,10,9
|
||||
IS,363,lr_morgan,1971,0.995,Morgan,10,10,9
|
||||
IS,964,lr_morgan,1946,0.7299,Morgan,10,7,9
|
||||
IS,964,lr_morgan,1949,0.7299,Morgan,10,7,9
|
||||
IS,964,lr_morgan,1953,0.7299,Morgan,10,7,9
|
||||
IS,964,lr_morgan,1956,0.7299,Morgan,10,7,9
|
||||
IS,964,lr_morgan,1959,0.7299,Morgan,10,7,9
|
||||
IS,964,lr_morgan,1963,0.7299,Morgan,10,7,9
|
||||
IS,964,lr_morgan,1967,0.7299,Morgan,10,7,9
|
||||
IS,964,lr_morgan,1971,0.7299,Morgan,10,7,9
|
||||
IS,1249,lr_morgan,1946,0.005,Morgan,10,0,9
|
||||
IS,1249,lr_morgan,1949,0.005,Morgan,10,0,9
|
||||
IS,1249,lr_morgan,1953,0.005,Morgan,10,0,9
|
||||
IS,1249,lr_morgan,1956,0.005,Morgan,10,0,9
|
||||
IS,1249,lr_morgan,1959,0.005,Morgan,10,0,9
|
||||
IS,1249,lr_morgan,1963,0.005,Morgan,10,0,9
|
||||
IS,1249,lr_morgan,1967,0.005,Morgan,10,0,9
|
||||
IS,1249,lr_morgan,1971,0.005,Morgan,10,0,9
|
||||
IS,1325,lr_morgan,1946,0.3778,Morgan,10,4,9
|
||||
IS,1325,lr_morgan,1949,0.3778,Morgan,10,4,9
|
||||
IS,1325,lr_morgan,1953,0.3778,Morgan,10,4,9
|
||||
IS,1325,lr_morgan,1956,0.3778,Morgan,10,4,9
|
||||
IS,1325,lr_morgan,1959,0.3778,Morgan,10,4,9
|
||||
IS,1325,lr_morgan,1963,0.3778,Morgan,10,4,9
|
||||
IS,1325,lr_morgan,1967,0.3778,Morgan,10,4,9
|
||||
IS,1325,lr_morgan,1971,0.3778,Morgan,10,4,9
|
||||
IS,1517,lr_morgan,1967,0.11410000000000001,Morgan,10,1,9
|
||||
IS,1517,lr_morgan,1971,0.11410000000000001,Morgan,10,1,9
|
||||
IT,394,lr_morgan,1946,0.4218,Morgan,10,4,12
|
||||
IT,394,lr_morgan,1948,0.4218,Morgan,10,4,12
|
||||
IT,394,lr_morgan,1953,0.4218,Morgan,10,4,12
|
||||
IT,394,lr_morgan,1958,0.4218,Morgan,10,4,12
|
||||
IT,394,lr_morgan,1963,0.4218,Morgan,10,4,12
|
||||
IT,394,lr_morgan,1968,0.4218,Morgan,10,4,12
|
||||
IT,394,lr_morgan,1972,0.4218,Morgan,10,4,12
|
||||
IT,742,lr_morgan,1946,0.2281,Morgan,10,2,12
|
||||
IT,742,lr_morgan,1948,0.2281,Morgan,10,2,12
|
||||
IT,742,lr_morgan,1953,0.2281,Morgan,10,2,12
|
||||
IT,742,lr_morgan,1958,0.2281,Morgan,10,2,12
|
||||
IT,742,lr_morgan,1963,0.2281,Morgan,10,2,12
|
||||
IT,742,lr_morgan,1972,0.2281,Morgan,10,2,12
|
||||
IT,934,lr_morgan,1946,0.5716,Morgan,10,6,12
|
||||
IT,934,lr_morgan,1948,0.5716,Morgan,10,6,12
|
||||
IT,934,lr_morgan,1953,0.5716,Morgan,10,6,12
|
||||
IT,934,lr_morgan,1958,0.5716,Morgan,10,6,12
|
||||
IT,934,lr_morgan,1963,0.5716,Morgan,10,6,12
|
||||
IT,934,lr_morgan,1968,0.5716,Morgan,10,6,12
|
||||
IT,934,lr_morgan,1972,0.5716,Morgan,10,6,12
|
||||
IT,1126,lr_morgan,1948,0.36119999999999997,Morgan,10,4,12
|
||||
IT,1126,lr_morgan,1953,0.36119999999999997,Morgan,10,4,12
|
||||
IT,1126,lr_morgan,1958,0.36119999999999997,Morgan,10,4,12
|
||||
IT,1126,lr_morgan,1963,0.36119999999999997,Morgan,10,4,12
|
||||
IT,1126,lr_morgan,1972,0.36119999999999997,Morgan,10,4,12
|
||||
IT,1461,lr_morgan,1946,0.7292000000000001,Morgan,10,7,12
|
||||
IT,1461,lr_morgan,1948,0.7292000000000001,Morgan,10,7,12
|
||||
IT,1461,lr_morgan,1953,0.7292000000000001,Morgan,10,7,12
|
||||
IT,1461,lr_morgan,1958,0.7292000000000001,Morgan,10,7,12
|
||||
IT,1461,lr_morgan,1963,0.7292000000000001,Morgan,10,7,12
|
||||
IT,1461,lr_morgan,1968,0.7292000000000001,Morgan,10,7,12
|
||||
IT,1461,lr_morgan,1972,0.7292000000000001,Morgan,10,7,12
|
||||
LU,186,lr_morgan,1945,0.36219999999999997,Morgan,10,4,7
|
||||
LU,186,lr_morgan,1948,0.36219999999999997,Morgan,10,4,7
|
||||
LU,186,lr_morgan,1951,0.36219999999999997,Morgan,10,4,7
|
||||
LU,186,lr_morgan,1954,0.36219999999999997,Morgan,10,4,7
|
||||
LU,186,lr_morgan,1959,0.36219999999999997,Morgan,10,4,7
|
||||
LU,186,lr_morgan,1964,0.36219999999999997,Morgan,10,4,7
|
||||
LU,186,lr_morgan,1968,0.36219999999999997,Morgan,10,4,7
|
||||
LU,300,lr_morgan,1945,0.9333,Morgan,10,9,5
|
||||
LU,300,lr_morgan,1948,0.9333,Morgan,10,9,5
|
||||
LU,300,lr_morgan,1951,0.9333,Morgan,10,9,5
|
||||
LU,300,lr_morgan,1954,0.9333,Morgan,10,9,5
|
||||
LU,300,lr_morgan,1959,0.9333,Morgan,10,9,5
|
||||
LU,300,lr_morgan,1964,0.9333,Morgan,10,9,5
|
||||
LU,300,lr_morgan,1968,0.9333,Morgan,10,9,5
|
||||
LU,539,lr_morgan,1945,0.8576,Morgan,10,9,7
|
||||
LU,539,lr_morgan,1948,0.8576,Morgan,10,9,7
|
||||
LU,539,lr_morgan,1951,0.8576,Morgan,10,9,7
|
||||
LU,539,lr_morgan,1954,0.8576,Morgan,10,9,7
|
||||
LU,539,lr_morgan,1959,0.8576,Morgan,10,9,7
|
||||
LU,539,lr_morgan,1964,0.8576,Morgan,10,9,7
|
||||
LU,539,lr_morgan,1968,0.8576,Morgan,10,9,7
|
||||
LU,1647,lr_morgan,1945,0.005,Morgan,10,0,7
|
||||
LU,1647,lr_morgan,1948,0.005,Morgan,10,0,7
|
||||
LU,1647,lr_morgan,1951,0.005,Morgan,10,0,7
|
||||
LU,1647,lr_morgan,1954,0.005,Morgan,10,0,7
|
||||
LU,1647,lr_morgan,1959,0.005,Morgan,10,0,7
|
||||
LU,1647,lr_morgan,1964,0.005,Morgan,10,0,7
|
||||
LU,1647,lr_morgan,1968,0.005,Morgan,10,0,7
|
||||
NL,163,lr_morgan,1946,0.5556,Morgan,10,6,14
|
||||
NL,163,lr_morgan,1948,0.5556,Morgan,10,6,14
|
||||
NL,163,lr_morgan,1952,0.5556,Morgan,10,6,14
|
||||
NL,163,lr_morgan,1956,0.5556,Morgan,10,6,14
|
||||
NL,163,lr_morgan,1959,0.5556,Morgan,10,6,14
|
||||
NL,163,lr_morgan,1963,0.5556,Morgan,10,6,14
|
||||
NL,163,lr_morgan,1967,0.5556,Morgan,10,6,14
|
||||
NL,163,lr_morgan,1971,0.5556,Morgan,10,6,14
|
||||
NL,163,lr_morgan,1972,0.5556,Morgan,10,6,14
|
||||
NL,459,lr_morgan,1946,0.005,Morgan,10,0,14
|
||||
NL,459,lr_morgan,1948,0.005,Morgan,10,0,14
|
||||
NL,828,lr_morgan,1946,0.7609999999999999,Morgan,10,8,14
|
||||
NL,828,lr_morgan,1948,0.7609999999999999,Morgan,10,8,14
|
||||
NL,828,lr_morgan,1952,0.7609999999999999,Morgan,10,8,14
|
||||
NL,828,lr_morgan,1956,0.7609999999999999,Morgan,10,8,14
|
||||
NL,828,lr_morgan,1959,0.7609999999999999,Morgan,10,8,14
|
||||
NL,828,lr_morgan,1963,0.7609999999999999,Morgan,10,8,14
|
||||
NL,828,lr_morgan,1967,0.7609999999999999,Morgan,10,8,14
|
||||
NL,828,lr_morgan,1971,0.7609999999999999,Morgan,10,8,14
|
||||
NL,828,lr_morgan,1972,0.7609999999999999,Morgan,10,8,14
|
||||
NL,921,lr_morgan,1971,0.4604,Morgan,10,5,14
|
||||
NL,921,lr_morgan,1972,0.4604,Morgan,10,5,14
|
||||
NL,1102,lr_morgan,1946,0.6647,Morgan,10,7,14
|
||||
NL,1102,lr_morgan,1948,0.6647,Morgan,10,7,14
|
||||
NL,1102,lr_morgan,1952,0.6647,Morgan,10,7,14
|
||||
NL,1102,lr_morgan,1956,0.6647,Morgan,10,7,14
|
||||
NL,1102,lr_morgan,1959,0.6647,Morgan,10,7,14
|
||||
NL,1102,lr_morgan,1963,0.6647,Morgan,10,7,14
|
||||
NL,1102,lr_morgan,1967,0.6647,Morgan,10,7,14
|
||||
NL,1102,lr_morgan,1971,0.6647,Morgan,10,7,14
|
||||
NL,1102,lr_morgan,1972,0.6647,Morgan,10,7,14
|
||||
NL,1178,lr_morgan,1946,0.9634999999999999,Morgan,10,10,13
|
||||
NL,1178,lr_morgan,1948,0.9634999999999999,Morgan,10,10,13
|
||||
NL,1234,lr_morgan,1946,0.2669,Morgan,10,3,14
|
||||
NL,1234,lr_morgan,1948,0.2669,Morgan,10,3,14
|
||||
NL,1234,lr_morgan,1952,0.2669,Morgan,10,3,14
|
||||
NL,1234,lr_morgan,1956,0.2669,Morgan,10,3,14
|
||||
NL,1234,lr_morgan,1959,0.2669,Morgan,10,3,14
|
||||
NL,1234,lr_morgan,1963,0.2669,Morgan,10,3,14
|
||||
NL,1234,lr_morgan,1967,0.2669,Morgan,10,3,14
|
||||
NL,1234,lr_morgan,1971,0.2669,Morgan,10,3,14
|
||||
NL,1234,lr_morgan,1972,0.2669,Morgan,10,3,14
|
||||
NL,1390,lr_morgan,1946,0.5125,Morgan,10,5,14
|
||||
NL,1390,lr_morgan,1948,0.5125,Morgan,10,5,14
|
||||
NL,1390,lr_morgan,1952,0.5125,Morgan,10,5,14
|
||||
NL,1390,lr_morgan,1956,0.5125,Morgan,10,5,14
|
||||
NL,1390,lr_morgan,1959,0.5125,Morgan,10,5,14
|
||||
NL,1390,lr_morgan,1963,0.5125,Morgan,10,5,14
|
||||
NL,1390,lr_morgan,1967,0.5125,Morgan,10,5,14
|
||||
NL,1390,lr_morgan,1971,0.5125,Morgan,10,5,14
|
||||
NL,1390,lr_morgan,1972,0.5125,Morgan,10,5,14
|
||||
NL,1581,lr_morgan,1971,0.1967,Morgan,10,2,11
|
||||
NL,1581,lr_morgan,1972,0.1967,Morgan,10,2,11
|
||||
NO,448,lr_morgan,1945,0.3529,Morgan,10,4,20
|
||||
NO,448,lr_morgan,1949,0.3529,Morgan,10,4,20
|
||||
NO,448,lr_morgan,1953,0.3529,Morgan,10,4,20
|
||||
NO,448,lr_morgan,1957,0.3529,Morgan,10,4,20
|
||||
NO,448,lr_morgan,1961,0.3529,Morgan,10,4,20
|
||||
NO,448,lr_morgan,1965,0.3529,Morgan,10,4,20
|
||||
NO,448,lr_morgan,1969,0.3529,Morgan,10,4,20
|
||||
NO,448,lr_morgan,1973,0.3529,Morgan,10,4,20
|
||||
NO,503,lr_morgan,1945,0.995,Morgan,10,10,20
|
||||
NO,503,lr_morgan,1949,0.995,Morgan,10,10,20
|
||||
NO,503,lr_morgan,1953,0.995,Morgan,10,10,20
|
||||
NO,503,lr_morgan,1957,0.995,Morgan,10,10,20
|
||||
NO,503,lr_morgan,1961,0.995,Morgan,10,10,20
|
||||
NO,503,lr_morgan,1965,0.995,Morgan,10,10,20
|
||||
NO,503,lr_morgan,1969,0.995,Morgan,10,10,20
|
||||
NO,503,lr_morgan,1973,0.995,Morgan,10,10,20
|
||||
NO,705,lr_morgan,1945,0.6907,Morgan,10,7,19
|
||||
NO,705,lr_morgan,1949,0.6907,Morgan,10,7,19
|
||||
NO,705,lr_morgan,1953,0.6907,Morgan,10,7,19
|
||||
NO,705,lr_morgan,1957,0.6907,Morgan,10,7,19
|
||||
NO,705,lr_morgan,1961,0.6907,Morgan,10,7,19
|
||||
NO,705,lr_morgan,1965,0.6907,Morgan,10,7,19
|
||||
NO,705,lr_morgan,1969,0.6907,Morgan,10,7,19
|
||||
NO,705,lr_morgan,1973,0.6907,Morgan,10,7,19
|
||||
NO,1072,lr_morgan,1945,0.7813,Morgan,10,8,20
|
||||
NO,1072,lr_morgan,1949,0.7813,Morgan,10,8,20
|
||||
NO,1072,lr_morgan,1953,0.7813,Morgan,10,8,20
|
||||
NO,1072,lr_morgan,1957,0.7813,Morgan,10,8,20
|
||||
NO,1072,lr_morgan,1961,0.7813,Morgan,10,8,20
|
||||
NO,1072,lr_morgan,1965,0.7813,Morgan,10,8,20
|
||||
NO,1072,lr_morgan,1969,0.7813,Morgan,10,8,20
|
||||
NO,1072,lr_morgan,1973,0.7813,Morgan,10,8,20
|
||||
NO,1079,lr_morgan,1945,0.005,Morgan,10,0,20
|
||||
NO,1079,lr_morgan,1949,0.005,Morgan,10,0,20
|
||||
NO,1079,lr_morgan,1953,0.005,Morgan,10,0,20
|
||||
NO,1079,lr_morgan,1957,0.005,Morgan,10,0,20
|
||||
NO,1173,lr_morgan,1945,0.6426999999999999,Morgan,10,6,20
|
||||
NO,1173,lr_morgan,1949,0.6426999999999999,Morgan,10,6,20
|
||||
NO,1173,lr_morgan,1953,0.6426999999999999,Morgan,10,6,20
|
||||
NO,1173,lr_morgan,1957,0.6426999999999999,Morgan,10,6,20
|
||||
NO,1173,lr_morgan,1961,0.6426999999999999,Morgan,10,6,20
|
||||
NO,1173,lr_morgan,1965,0.6426999999999999,Morgan,10,6,20
|
||||
NO,1173,lr_morgan,1969,0.6426999999999999,Morgan,10,6,20
|
||||
NO,1173,lr_morgan,1973,0.6426999999999999,Morgan,10,6,20
|
||||
SE,199,lr_morgan,1948,0.6456999999999999,Morgan,10,6,19
|
||||
SE,199,lr_morgan,1952,0.6456999999999999,Morgan,10,6,19
|
||||
SE,199,lr_morgan,1956,0.6456999999999999,Morgan,10,6,19
|
||||
SE,199,lr_morgan,1958,0.6456999999999999,Morgan,10,6,19
|
||||
SE,199,lr_morgan,1960,0.6456999999999999,Morgan,10,6,19
|
||||
SE,199,lr_morgan,1964,0.6456999999999999,Morgan,10,6,19
|
||||
SE,199,lr_morgan,1968,0.6456999999999999,Morgan,10,6,19
|
||||
SE,199,lr_morgan,1970,0.6456999999999999,Morgan,10,6,19
|
||||
SE,199,lr_morgan,1973,0.6456999999999999,Morgan,10,6,19
|
||||
SE,487,lr_morgan,1948,0.3251,Morgan,10,3,20
|
||||
SE,487,lr_morgan,1952,0.3251,Morgan,10,3,20
|
||||
SE,487,lr_morgan,1956,0.3251,Morgan,10,3,20
|
||||
SE,487,lr_morgan,1958,0.3251,Morgan,10,3,20
|
||||
SE,487,lr_morgan,1960,0.3251,Morgan,10,3,20
|
||||
SE,487,lr_morgan,1964,0.3251,Morgan,10,3,20
|
||||
SE,487,lr_morgan,1968,0.3251,Morgan,10,3,20
|
||||
SE,487,lr_morgan,1970,0.3251,Morgan,10,3,20
|
||||
SE,487,lr_morgan,1973,0.3251,Morgan,10,3,20
|
||||
SE,690,lr_morgan,1948,0.995,Morgan,10,10,20
|
||||
SE,690,lr_morgan,1952,0.995,Morgan,10,10,20
|
||||
SE,690,lr_morgan,1956,0.995,Morgan,10,10,20
|
||||
SE,690,lr_morgan,1958,0.995,Morgan,10,10,20
|
||||
SE,690,lr_morgan,1960,0.995,Morgan,10,10,20
|
||||
SE,690,lr_morgan,1964,0.995,Morgan,10,10,20
|
||||
SE,690,lr_morgan,1968,0.995,Morgan,10,10,20
|
||||
SE,690,lr_morgan,1970,0.995,Morgan,10,10,20
|
||||
SE,690,lr_morgan,1973,0.995,Morgan,10,10,20
|
||||
SE,830,lr_morgan,1948,0.005,Morgan,10,0,20
|
||||
SE,830,lr_morgan,1952,0.005,Morgan,10,0,20
|
||||
SE,830,lr_morgan,1956,0.005,Morgan,10,0,20
|
||||
SE,830,lr_morgan,1958,0.005,Morgan,10,0,20
|
||||
SE,830,lr_morgan,1960,0.005,Morgan,10,0,20
|
||||
SE,830,lr_morgan,1964,0.005,Morgan,10,0,20
|
||||
SE,830,lr_morgan,1968,0.005,Morgan,10,0,20
|
||||
SE,830,lr_morgan,1970,0.005,Morgan,10,0,20
|
||||
SE,830,lr_morgan,1973,0.005,Morgan,10,0,20
|
||||
SE,1274,lr_morgan,1948,0.7444,Morgan,10,7,20
|
||||
SE,1274,lr_morgan,1952,0.7444,Morgan,10,7,20
|
||||
SE,1274,lr_morgan,1956,0.7444,Morgan,10,7,20
|
||||
SE,1274,lr_morgan,1958,0.7444,Morgan,10,7,20
|
||||
SE,1274,lr_morgan,1960,0.7444,Morgan,10,7,20
|
||||
SE,1274,lr_morgan,1964,0.7444,Morgan,10,7,20
|
||||
SE,1274,lr_morgan,1968,0.7444,Morgan,10,7,20
|
||||
SE,1274,lr_morgan,1970,0.7444,Morgan,10,7,20
|
||||
SE,1274,lr_morgan,1973,0.7444,Morgan,10,7,20
|
||||
|
@@ -1,161 +0,0 @@
|
||||
country,period,party_abbrev,party_name,position,n_surveys,sd
|
||||
DNK,1919-1939,SOCd,Social Democrats,0.0,19,0.0
|
||||
DNK,1919-1939,RAD,Radicals,33.94,19,4.62
|
||||
DNK,1919-1939,LIB,Liberals,71.87,19,7.99
|
||||
DNK,1919-1939,CONS,Conservatives,100.0,19,0.0
|
||||
DNK,1945-1973,COMM,Communists,0.0,22,0.0
|
||||
DNK,1945-1973,LS,Left Socialists,6.5,22,4.17
|
||||
DNK,1945-1973,SOCL,Socialists (SF),19.54,22,5.93
|
||||
DNK,1945-1973,SOCd,Social Democrats,41.49,22,7.19
|
||||
DNK,1945-1973,RAD,Radicals,61.85,22,6.23
|
||||
DNK,1945-1973,LC,Liberal Center,67.9,18,8.27
|
||||
DNK,1945-1973,LIB,Liberals,81.98,22,6.46
|
||||
DNK,1945-1973,JUST,Justice Party,84.08,17,13.38
|
||||
DNK,1945-1973,CONS,Conservatives,100.0,22,0.0
|
||||
FIN,1919-1939,SKDL,Communist,0.0,12,0.0
|
||||
FIN,1919-1939,SOCd,Social Democrats,24.92,12,2.8
|
||||
FIN,1919-1939,PROG,National Progressives,57.5,12,4.68
|
||||
FIN,1919-1939,AGR,Agrarian Union,59.32,12,4.46
|
||||
FIN,1919-1939,SWPP,Swedish People's Party,67.79,12,6.57
|
||||
FIN,1919-1939,CONS,Finnish Conservative Party,91.96,12,3.9
|
||||
FIN,1919-1939,NPF,Finnish Patriotic Movement,100.0,12,0.0
|
||||
FIN,1945-1973,PDEM,Democratic League,0.0,15,0.0
|
||||
FIN,1945-1973,SDWS,Workers Smallholders SD League,21.15,15,6.73
|
||||
FIN,1945-1973,SOCd,Social Democrats,25.78,15,3.41
|
||||
FIN,1945-1973,CENT,Center Party,57.76,13,4.39
|
||||
FIN,1945-1973,FRP,Finnish Rural Party,64.11,13,16.91
|
||||
FIN,1945-1973,LIB,Finnish People Party/Liberal League,70.34,15,5.5
|
||||
FIN,1945-1973,SWPP,Swedish People's Party,79.75,15,6.23
|
||||
FIN,1945-1973,CONS,Finnish Conservative Party,98.55,15,2.89
|
||||
ISL,1919-1939,COMM,Communist People Alliance,0.0,6,0.0
|
||||
ISL,1919-1939,SOCd,Social Democratic Party,21.01,6,4.25
|
||||
ISL,1919-1939,PROG,Progressives/Farmers Party,62.11,6,12.23
|
||||
ISL,1919-1939,LIB,Liberal Party,63.02,6,10.81
|
||||
ISL,1919-1939,INDP,Independence Party,81.28,6,5.23
|
||||
ISL,1919-1939,CONS,Conservative Party,100.0,6,0.0
|
||||
ISL,1945-1973,COMM,Communist People Alliance,0.0,9,0.0
|
||||
ISL,1945-1973,LLIB,Liberal Left,11.41,9,3.89
|
||||
ISL,1945-1973,SOCd,Social Democratic Party,37.78,9,8.8
|
||||
ISL,1945-1973,PROG,Progressive Party,72.99,9,7.7
|
||||
ISL,1945-1973,INDP,Independence Party,100.0,9,0.0
|
||||
NOR,1919-1939,LAB,Labor Party,0.0,19,0.0
|
||||
NOR,1919-1939,LIB,Liberal Party,57.71,19,7.47
|
||||
NOR,1919-1939,AGR,Agrarian Party,70.61,19,8.64
|
||||
NOR,1919-1939,CONS,Conservative Party,100.0,19,0.0
|
||||
NOR,1945-1973,COMM,Communist Party,0.0,20,0.0
|
||||
NOR,1945-1973,SOCL,Socialist People Party,7.45,20,4.16
|
||||
NOR,1945-1973,LAB,Labor Party,35.29,20,5.05
|
||||
NOR,1945-1973,LIB,Liberal Party,64.27,20,6.84
|
||||
NOR,1945-1973,CHPP,Christian People Party,69.07,19,8.84
|
||||
NOR,1945-1973,CENT,Center Party,78.13,20,0.0
|
||||
NOR,1945-1973,CONS,Conservative Party,100.0,20,0.0
|
||||
SWE,1919-1939,COMM,Communist Party,0.0,15,0.0
|
||||
SWE,1919-1939,SOCd,Social Democratic Party,25.85,15,5.38
|
||||
SWE,1919-1939,AGR,Agrarian Party,58.57,15,5.43
|
||||
SWE,1919-1939,LIB,Liberal Party,74.19,15,4.41
|
||||
SWE,1919-1939,CONS,Conservative Party,100.0,15,0.0
|
||||
SWE,1945-1973,COMM,Communist Party,0.0,20,0.0
|
||||
SWE,1945-1973,SOCd,Social Democratic Party,32.51,20,6.17
|
||||
SWE,1945-1973,CENT,Center/Agrarian Party,64.57,19,3.34
|
||||
SWE,1945-1973,LIB,Liberal/People Party,74.44,20,6.2
|
||||
SWE,1945-1973,CONS,Conservative Party,100.0,20,0.0
|
||||
NLD,1919-1939,CPN,Communist Party,0.0,6,0.0
|
||||
NLD,1919-1939,SOCd,Social Democratic Party (SDAP),18.32,6,5.41
|
||||
NLD,1919-1939,RAD,Radical Party,47.04,6,3.14
|
||||
NLD,1919-1939,KVP,Catholic Party,56.05,6,6.44
|
||||
NLD,1919-1939,CHU,Christian Historical Union,69.2,6,7.59
|
||||
NLD,1919-1939,ULIB,United Liberal Party,69.7,6,3.13
|
||||
NLD,1919-1939,FLIB,Free Liberal Party,70.83,6,6.14
|
||||
NLD,1919-1939,LIB,Liberal Party,71.94,6,4.1
|
||||
NLD,1919-1939,ARP,Anti-Revolutionary Party,72.43,6,9.1
|
||||
NLD,1919-1939,ECUM,Ecumenical Party,76.25,2,19.45
|
||||
NLD,1919-1939,SGP,Political Reformed Party,88.5,6,1.32
|
||||
NLD,1919-1939,NSB,National Social Movement,100.0,6,0.0
|
||||
NLD,1945-1973,CPN,Communist Party,0.0,14,0.0
|
||||
NLD,1945-1973,PSP,Pacifist Socialist Party,7.66,14,4.65
|
||||
NLD,1945-1973,PPR,Political Radicals,19.67,11,4.98
|
||||
NLD,1945-1973,PVDA,Labor Party,26.69,14,4.91
|
||||
NLD,1945-1973,D66,Radical Democrats,39.11,13,4.06
|
||||
NLD,1945-1973,DS70,Social Democratic splinter,46.04,14,6.15
|
||||
NLD,1945-1973,KVP,Catholic Party,51.25,14,2.08
|
||||
NLD,1945-1973,ARP,Anti-Revolutionary Party,55.56,14,8.58
|
||||
NLD,1945-1973,CHU,Christian Historical Union,66.47,14,5.65
|
||||
NLD,1945-1973,VVD,Liberal Party,76.1,14,5.82
|
||||
NLD,1945-1973,SGP,Political Reform Party,96.35,13,3.84
|
||||
NLD,1945-1973,GPV,Reformed Political Association,96.7,12,3.88
|
||||
NLD,1945-1973,BP,Peasant Party (Poujadist),96.82,11,4.46
|
||||
BEL,1919-1939,COMM,Communist Party,0.0,11,0.0
|
||||
BEL,1919-1939,POB,Social Democratic Party,25.11,11,5.48
|
||||
BEL,1919-1939,CATH,Catholic Party,67.85,11,9.78
|
||||
BEL,1919-1939,LIB,Liberal Party,78.84,10,8.27
|
||||
BEL,1919-1939,FNAT,Flemish Nationalist parties,80.78,11,11.93
|
||||
BEL,1919-1939,REX,Rexist,98.72,10,3.14
|
||||
BEL,1945-1973,COMM,Communist Party,0.0,17,0.0
|
||||
BEL,1945-1973,PSB,Socialist Party,31.93,17,5.25
|
||||
BEL,1945-1973,RW,Rassemblement Wallon,53.65,16,9.73
|
||||
BEL,1945-1973,PSC,Christian Social Party,70.9,17,6.59
|
||||
BEL,1945-1973,FDF,Front Democratique Wallon,71.89,17,13.85
|
||||
BEL,1945-1973,VOLK,Volksunie,83.21,17,6.64
|
||||
BEL,1945-1973,PLP,Liberal Party,100.0,17,0.0
|
||||
FRA,1946-1958,PCF,Communist Party,0.0,23,0.0
|
||||
FRA,1946-1958,SFIO,Socialist Party,23.65,23,4.61
|
||||
FRA,1946-1958,MRP,Popular Republican Movement,43.12,23,6.73
|
||||
FRA,1946-1958,RDA,Radical Party,43.37,20,6.73
|
||||
FRA,1946-1958,UDSR,Democratic Socialist Union,44.62,20,6.68
|
||||
FRA,1946-1958,RAD,Radical Democratic Assembly,50.94,22,5.3
|
||||
FRA,1946-1958,RS,Social Republicans,66.52,23,9.15
|
||||
FRA,1946-1958,RPF,Rally of the French People,70.0,23,7.25
|
||||
FRA,1946-1958,AR,Republican Action,72.93,20,3.74
|
||||
FRA,1946-1958,ARS,Republican Social Action,77.38,16,6.83
|
||||
FRA,1946-1958,RI,Independent Republicans,82.62,19,8.05
|
||||
FRA,1946-1958,CNIP,National Center of Independents,83.5,19,5.1
|
||||
FRA,1946-1958,PUS,Pro-Gaullist faction,85.0,10,5.14
|
||||
FRA,1946-1958,PAYS,Peasant Party,85.23,14,6.55
|
||||
FRA,1946-1958,AP,Popular Action,85.4,11,4.34
|
||||
FRA,1946-1958,PRL,Republican Liberty Party,87.56,17,5.66
|
||||
FRA,1946-1958,POUJ,Poujadists,100.0,22,0.0
|
||||
DEU,1919-1930,KPD,Communist Party,0.0,15,0.0
|
||||
DEU,1919-1930,SDAP,Social Democratic Party,25.58,15,4.62
|
||||
DEU,1919-1930,DDP,Democratic Party,45.57,15,4.79
|
||||
DEU,1919-1930,DZP,Center Party,51.25,15,6.35
|
||||
DEU,1919-1930,BVP,Bavarian People's Party,63.17,11,5.63
|
||||
DEU,1919-1930,DVP,German People's Party,65.17,15,4.79
|
||||
DEU,1919-1930,RDMW,Economic Party,70.64,11,5.93
|
||||
DEU,1919-1930,LVP,Rural People's Party,80.35,9,6.53
|
||||
DEU,1919-1930,DNVP,German National People's Party,88.17,15,3.68
|
||||
DEU,1919-1930,NAZI,National Socialist Party,100.0,15,0.0
|
||||
ITA,1946-1975,PCI,Communist Party,3.08,12,3.37
|
||||
ITA,1946-1975,PSIU,Socialist Party of Proletarian Unity,3.61,12,4.0
|
||||
ITA,1946-1975,PSI,Socialist Party (Nenni),22.81,12,3.11
|
||||
ITA,1946-1975,PSDI,Social Democratic Party,36.12,12,3.77
|
||||
ITA,1946-1975,PRI,Republican Party,42.18,12,2.37
|
||||
ITA,1946-1975,DC,Christian Democratic Party,57.16,12,5.44
|
||||
ITA,1946-1975,PLI,Liberal Party,72.92,12,3.02
|
||||
ITA,1946-1975,MON,Monarchists,91.68,12,2.41
|
||||
ITA,1946-1975,MSI,Italian Social Movement,100.0,12,0.0
|
||||
LUX,1945-1973,COMM,Communist Party,0.0,7,0.0
|
||||
LUX,1945-1973,SOCd,Socialist Party,36.22,7,12.83
|
||||
LUX,1945-1973,CSOC,Christian Social Party,85.76,7,13.47
|
||||
LUX,1945-1973,GRPD,Democratic Group,93.33,5,11.55
|
||||
ISR,1949-1973,RAKA,Rakah,0.0,10,0.0
|
||||
ISR,1949-1973,MAKI,Maki,3.46,10,2.79
|
||||
ISR,1949-1973,MAPM,Mapam,18.04,10,5.85
|
||||
ISR,1949-1973,MADT,Mapam Ahdut Haavoda,26.78,10,9.24
|
||||
ISR,1949-1973,ADUT,Ahdut Haavoda,34.92,10,12.63
|
||||
ISR,1949-1973,MAAR,Maarach,46.79,10,8.39
|
||||
ISR,1949-1973,LAB,Labor Alignment,48.08,10,6.65
|
||||
ISR,1949-1973,MAPI,Mapai,48.27,10,6.99
|
||||
ISR,1949-1973,PAUG,Poalei Agudat,55.82,6,5.24
|
||||
ISR,1949-1973,RAFI,Rafi,60.42,7,6.71
|
||||
ISR,1949-1973,PROG,Progressives,65.0,8,5.38
|
||||
ISR,1949-1973,ILIB,Independent Liberals,65.8,9,7.55
|
||||
ISR,1949-1973,NRP,National Religious Party,69.0,7,8.21
|
||||
ISR,1949-1973,URF,United Religious Front,77.0,5,10.63
|
||||
ISR,1949-1973,LIB,Liberals,78.57,9,10.35
|
||||
ISR,1949-1973,NATL,National List,79.67,6,10.87
|
||||
ISR,1949-1973,TORA,Torah,85.29,6,0.67
|
||||
ISR,1949-1973,LIKD,Likud,87.39,6,11.04
|
||||
ISR,1949-1973,ZION,General Zionists,87.95,9,3.35
|
||||
ISR,1949-1973,GHAL,Gahal,90.69,8,4.71
|
||||
ISR,1949-1973,AGDT,Agudat Israel,96.25,5,2.75
|
||||
ISR,1949-1973,HRUT,Herut,98.0,9,2.71
|
||||
|
@@ -1,732 +0,0 @@
|
||||
partyfacts_id,party_name_english,party_name_short
|
||||
3,Social Democratic Party,SDP
|
||||
4,We Ourselves,SF
|
||||
6,Liberal-Socialists of Chile,UCC
|
||||
10,The Greens,B90/Gruene
|
||||
14,Radical Party,PR
|
||||
18,Estonian United People’s Party,EÜRP
|
||||
29,Social Democratic Party of Switzerland,SPS/PSS
|
||||
34,Communist Party,PCI
|
||||
42,Movement for a Better Hungary,Jobbik
|
||||
43,List Dedecker,LDD
|
||||
45,Democrats 66,D’66
|
||||
48,Communist Party of Greece,KKE
|
||||
49,Open Flemish Liberals and Democrats,openVLD
|
||||
50,South Schleswig Voters’ Union,SSW
|
||||
53,Christian Democrats,K
|
||||
54,Party for Democracy,PPD
|
||||
57,Democratic Left Alliance,SLD
|
||||
59,Democratic Change,CD
|
||||
63,Christian Democratic Movement,KDH
|
||||
64,Lithuanian Social Democratic Party,LSDP
|
||||
72,Croatian Peasant Party,HSS
|
||||
78,Democratic Centre,DC
|
||||
81,Canarian Coalition-New Canaries,CCa-PNC-NC
|
||||
82,Union of the Democratic Centre,EDIK
|
||||
86,The Left. Party of Democratic Socialism,L-PDS
|
||||
96,Slovenian National Party,SNS
|
||||
97,People-Animals-Nature,PAN
|
||||
101,Progress Party,FrP
|
||||
102,Labour Party,DP
|
||||
109,Worker's Party of the Land of Israel,Mapai
|
||||
110,Estonian People's Union,ERL
|
||||
118,National Party,PN
|
||||
120,Social Democratic Party,PSD
|
||||
150,Progressive Party,Progressive
|
||||
152,New Democratic Party,NDP
|
||||
155,People's Democratic Party,PDP
|
||||
162,Communist Party of Chile,PC
|
||||
163,Anti-Revolutionary Party,ARP
|
||||
169,United Workers' Party,MAPAM
|
||||
171,Liberal Democratic Party,LDP
|
||||
172,Reformatory Political Federation,RPF
|
||||
176,For Human Rights in a United Latvia,PCTVL
|
||||
177,Czech Social Democratic Party,ČSSD
|
||||
190,Democratic Party of Albania,PD
|
||||
193,Homeland Union,TS
|
||||
194,Social Christian Reformist Party,PRSC
|
||||
199,Centre Party,CP
|
||||
208,Workers' Party,WP
|
||||
209,Humanist Party,PH
|
||||
212,Liberal Alliance,NY
|
||||
214,Croatian Social-Liberal Party,HSLS
|
||||
216,Democratic Revolutionary Party,PRD
|
||||
223,"Tradition, Responsibility, Prosperity 09",TOP09
|
||||
225,Party of Brazilian Social Democracy,PSDB
|
||||
232,Progressive Conservative Party,PCP
|
||||
235,Israel is Our Home,YB
|
||||
237,Order and Justice,PTT
|
||||
246,Patriotic Society Party,PSP
|
||||
247,United Left,IU
|
||||
249,Liberal People's Party,LKP
|
||||
253,Croatian Party of Rights,HSP
|
||||
257,National Restoration Party,PRN
|
||||
258,Bridge,Most-Hid
|
||||
259,Italian Renewal,RI
|
||||
263,Bulgarian People's Union,BNS
|
||||
271,The Left,DL
|
||||
275,Party of Liberty and Progress,PVV/PLP
|
||||
276,Social Democratic Party,PSD
|
||||
277,Danish Communist Party,DKP
|
||||
279,Daisy - Democracy is Freedom,M-DL
|
||||
281,Walloon Rally,RW
|
||||
285,Liberal National Party of Queensland,LNP
|
||||
292,Alliance of Independent Social Democrats,SNSD
|
||||
298,Party of Freedom,PVV
|
||||
300,Democratic Party,DP/PD
|
||||
304,Christian Democratic Union,KDS
|
||||
306,Justice and Development Party,AKP
|
||||
308,Swiss People's Party,SVP/UDC
|
||||
310,Portuguese Communist Party,PCP
|
||||
311,Direction-Social Democracy,Smer
|
||||
312,Political Spring,Pola
|
||||
329,Socialist People's Party,SF
|
||||
335,Democratic Unionist Party,DUP
|
||||
338,Nationalist Party of Australia,NAT
|
||||
340,Communist Party of Slovakia,KSS
|
||||
349,Party of the Hungarian Coalition,SMK/MKP
|
||||
351,True Path Party,DYP
|
||||
352,People's New Party,PNP
|
||||
356,Workers' Party,PT
|
||||
357,Party for Bosnia and Herzegovina,SBiH
|
||||
362,Colombian Liberal Party,PLC
|
||||
363,Independence Party,Sj
|
||||
378,Ecologist Greens,OP
|
||||
379,Social Democratic Party,SD
|
||||
382,Liberal Party,PL
|
||||
383,Social Democratic Party of Germany,SPD
|
||||
390,Christian Democratic Party,PDC
|
||||
394,Italian Republican Party,PRI
|
||||
405,Francophone Christian Social Party and Flemish Christian People's Party,PSC/CVP
|
||||
409,Sweden Democrats,SD
|
||||
421,Democratic Front for Peace and Equality,HADASH
|
||||
424,Australian Labor Party,ALP
|
||||
431,Democratic Party of Albanians,DPA/PDSh
|
||||
432,Democratic Party,Democrats
|
||||
433,National Front,FN
|
||||
434,Progressive and Independent Liberal Party,ILP
|
||||
437,Social Democrat Radical Party,PRSD
|
||||
441,People's Party,PP
|
||||
442,Movement towards Socialism - Political Instrument for the Sovereignty of the Peoples,MAS-IPSP
|
||||
444,Liberal Party of Switzerland,LPS/PLS
|
||||
446,Mexican Green Ecologist Party,PVEM
|
||||
447,United Arab List,Ra'am
|
||||
448,Labour Party,Ap
|
||||
455,Sephardi Torah Guardians,Shas
|
||||
456,Green Ecology Party,MP
|
||||
457,Left Green Movement,VGF
|
||||
458,Brazilian Labour Party,PTB
|
||||
459,Communist Party of the Netherlands,CPN
|
||||
463,Austrian Freedom Party,FPÖ
|
||||
466,Civic Democratic Party,ODS
|
||||
467,Democratic Party of Pensioners of Slovenia,DeSUS
|
||||
469,Democratic Coalition,DK
|
||||
472,Slovenian Democratic Party,SDS
|
||||
474,For Real,Zares
|
||||
479,Green Union,VL
|
||||
480,Belgian Socialist Party,BSP/PSB
|
||||
481,National Liberal Party,PNL
|
||||
484,Forward,Kadima
|
||||
487,Social Democratic Labour Party,SAP
|
||||
491,Res Publica Party,ERP
|
||||
492,Social Democratic Federation,SDF
|
||||
495,National Coalition,KK
|
||||
496,Democratic Movement,MoDem
|
||||
500,Francophone Socialist Party,PS
|
||||
503,Conservative Party,H
|
||||
506,National Alliance 'All For Latvia! - For Fatherland and Freedom/LNNK',NA
|
||||
509,Rally for the Republic,RPR
|
||||
513,Istrian Democratic Assembly,IDS
|
||||
514,Popular Action,AP
|
||||
516,Progressive Left Coalition,SYN
|
||||
525,Women's Alliance,Kv
|
||||
528,Green!,Groen!
|
||||
529,Peruvian Aprista Party,PAP
|
||||
533,Estonian Center Party,K
|
||||
536,Conservative People's Party,KF
|
||||
537,Social Democratic Party of Bosnia and Herzegovina,SDP BiH
|
||||
539,Christian Social People's Party,CSV/PCS
|
||||
540,Liberal Party,Liberal
|
||||
546,Lithuanian Democratic Labour Party,LDDP
|
||||
553,Flemish Bloc,VB
|
||||
554,Liberal Reformation Party,PRL
|
||||
556,Election Action of Lithuania's Poles,LLRA/AWPL
|
||||
557,Change,SHINUI
|
||||
560,Movement for a Democratic Slovakia,HZDS
|
||||
561,Party of Radical Change,PCR
|
||||
562,Labour Party,Labour
|
||||
563,Democratic Coalition,DISY
|
||||
573,Free Democratic Party,FDP
|
||||
575,Union for Peru,UPP
|
||||
591,New Zealand First Party,NZF
|
||||
594,Democratic Alliance Party,AD
|
||||
598,Proletarian Unity Party for Communism The Manifesto + Proletarian Unity Party,PdUP
|
||||
599,Alliance for the Future of Austria,BZÖ
|
||||
601,United Kingdom Independence Party,UKIP
|
||||
602,Polish Peasants' Party,PSL
|
||||
605,Liberal Forum,LIF
|
||||
614,Democratic Alliance,AD
|
||||
615,Alignment,AMT
|
||||
622,Christian Democratic and Flemish,CD&V
|
||||
623,Justicialist Party,PJ
|
||||
631,Federal Democratic Union,EDU/UDF
|
||||
633,Humanist Democratic Centre,cdH
|
||||
635,Democratic Party,DiKo
|
||||
638,Renaissance Movement,Tehiya
|
||||
641,Union of Israel,AI
|
||||
644,Slovenian Christian Democrats,SKD
|
||||
645,Party of the Civic Alliance,PAC
|
||||
651,Christian Democrats,Kd
|
||||
655,Socialist Party,PS
|
||||
656,Kotleba – People's Party Our Slovakia,ĽSNS
|
||||
669,Swiss Labour Party,PdAS/PdTS
|
||||
671,For Fatherland and Freedom,TB
|
||||
674,United Albanian Right,DBSH
|
||||
690,Moderate Coalition Party,MSP
|
||||
696,Alliance for Change,PAN
|
||||
698,"Democratic, Federalist, Independent",DéFI
|
||||
699,Nationalist Party,PN
|
||||
703,Christian Democrats in Finland,KD
|
||||
705,Christian People's Party,KrF
|
||||
714,50Plus,50PLUS
|
||||
719,Socialist Left Party,SV
|
||||
722,Navarrese People's Union,UPN
|
||||
723,Brazilian Socialist Party,PSB
|
||||
724,Socialist Party of Macedonia,SPM
|
||||
727,Self-Defence of the Polish Republic,SRP
|
||||
730,Slovak National Party,SNS
|
||||
732,Legality Movement Party,PLL
|
||||
736,Japanese Communist Party,JCP
|
||||
737,Popular Republican Movement,MRP
|
||||
741,Latvian Social Democratic Alliance,LSDA
|
||||
742,Italian Socialist Party,PSI
|
||||
745,Crossroads - non-aligned movement for Zionist Renewal,Tzomet
|
||||
752,ACT New Zealand,ACT
|
||||
756,Christian-Democrat and Flemish / New Flemish Alliance,CD+NVA
|
||||
757,Bulgarian Socialist Party,BSP
|
||||
759,Party of U,PU
|
||||
760,Citizens for European Development of Bulgaria,GERB
|
||||
762,Social Democratic and Labour Party,SDLP
|
||||
764,Slovenian People's Party,SLS
|
||||
768,List Di Pietro - Italy of Values,IdV
|
||||
789,Reform Movement,MR
|
||||
794,New Democracy,ND
|
||||
797,Democratic Left,ID
|
||||
799,Croatian People's Party - Liberal Democrats,HNS
|
||||
800,Centre Democrats,CD
|
||||
802,Democratic Party,PD
|
||||
808,Labour Party,PL
|
||||
809,Republican Party,Republicans
|
||||
813,National Alliance,AN
|
||||
815,National Salvation Party,MSP
|
||||
819,Albanian Republican Party,PRSH
|
||||
821,Estonian Reform Party,ER
|
||||
824,Christian Democratic Party,KDS
|
||||
827,Pachakutik Plurinational Unity Movement - New Country,MUPP-NP
|
||||
828,People's Party for Freedom and Democracy,VVD
|
||||
830,Left Party,V
|
||||
838,Social Democratic Party of Albania,PSD
|
||||
840,Agrarian Party of Albania,PASH
|
||||
842,Libertarian Movement Party,PML
|
||||
848,Catalan Republican Left,ERC
|
||||
851,Green Federation,FdV
|
||||
858,Ecological and Environmental Movement,KOP
|
||||
863,Electoral Action ‘Solidarity',AWS
|
||||
867,Democratic Socialist Party,DSP
|
||||
878,Democrats of the Left,DS
|
||||
886,Ecologist Party 'The Greens',PEV
|
||||
888,New Italian Socialist Party,NPSI
|
||||
894,Democratic Liberal Party,DLP
|
||||
896,Popular Democratic Union,UDP
|
||||
898,Social Democratic Party,SDP
|
||||
901,Finnish Centre,SK
|
||||
907,New Communist Party,RAKAH
|
||||
908,"National Coalition Party ""Pro Patria""",RKI
|
||||
910,Alliance of Free Democrats,SzDSz
|
||||
911,New Zealand Democratic Party,NZDP
|
||||
919,Democratic Party,SD
|
||||
921,Democratic Socialists '70,DS‘70
|
||||
924,Progressive Democrats,PD
|
||||
928,National Renewal,RN
|
||||
931,Green Party,GPC
|
||||
932,Independents' Party,DU
|
||||
934,Italian Popular Party,PPI
|
||||
940,United Future New Zealand,UF
|
||||
946,Aragonese Party,PAR
|
||||
949,Solidarity Party,PS
|
||||
950,Social Christian Party,PSC
|
||||
952,Movement for an Autonomous Democracy - Society for Moravia-Silesia,HSD-SMS
|
||||
953,National Union,IL
|
||||
962,Christian Democratic Centre / United Christian Democrats,CCD/CDU
|
||||
963,We Ourselves,SF
|
||||
964,Progressive Party,F
|
||||
965,Popular Orthodox Rally,LAOS
|
||||
975,Liberal Democracy of Slovenia,LDS
|
||||
982,Movement for Rights and Freedoms,DPS
|
||||
983,Democratic Party,DS
|
||||
986,Scottish National Party,SNP
|
||||
987,Christian Democratic Party,PDC
|
||||
990,Australian Democrats,AD
|
||||
1002,The Party of Wales,PC
|
||||
1004,Conservative Party of Canada,CP
|
||||
1006,Green Party of Switzerland,GPS/PES
|
||||
1008,Civic Democratic Alliance,ODA
|
||||
1009,Democratic Labour Party,PDT
|
||||
1011,Galician Nationalist Bloc,BNG
|
||||
1013,National Popular Front,ELAM
|
||||
1022,Danish People's Party,DF
|
||||
1024,Party of the Land,CnT
|
||||
1027,Bulgarian Business Bloc,BBB
|
||||
1028,Social Democrats' Movement,EDEK
|
||||
1033,Party for Democratic Prosperity,PDP
|
||||
1038,Democratic Alliance,DA
|
||||
1040,Estonian Greens,EER
|
||||
1043,Latvian Way Union,LC
|
||||
1044,Left Wing Alliance,VAS
|
||||
1049,New Zealand Labour Party,Labour
|
||||
1053,Israel for Immigration,YBA
|
||||
1055,Soldiers of Destiny,FF
|
||||
1056,Concord Centre,SC
|
||||
1067,Welfare Party,RP
|
||||
1072,Centre Party,Sp
|
||||
1075,United Torah Judaism,UTJ
|
||||
1076,Progressive Party of the Working People,AKEL
|
||||
1077,Coexistence,ESWS
|
||||
1079,Norwegian Communist Party,NKP
|
||||
1083,Union for a New Majority - Gaullists/Conservatives,RPF
|
||||
1096,Finnish People's Democratic Union,SKDL
|
||||
1099,Green Party of Aotearoa New Zealand,Greens
|
||||
1102,Christian Historical Union,CHU
|
||||
1104,Union of Labour,UP
|
||||
1105,Hungarian Democratic Alliance of Romania,UDMR/RMDSz
|
||||
1114,Alternative Democratic Reform Party,ADR
|
||||
1119,New Labour Party,NLP
|
||||
1123,Protestant People's Party of Switzerland,EVP/PEV
|
||||
1126,Italian Democratic Socialist Party,PSDI
|
||||
1131,Institutional Renewal Party of National Action,PRIAN
|
||||
1134,Justice Party,RF
|
||||
1136,Left Socialist Party,VS
|
||||
1138,Green Alternative,GAP
|
||||
1150,Social Democratic Party,SDE
|
||||
1156,Social Credit,Socred
|
||||
1157,Christian Democratic Appeal,CDA
|
||||
1160,Democratic Left,DIMAR
|
||||
1163,Democratic Social Party,PDS
|
||||
1164,Social Democratic League of Workers and Smallholders,TPSL
|
||||
1166,Serbian Democratic Party,SDS
|
||||
1173,Liberal Party,V
|
||||
1178,Reformed Political Party,SGP
|
||||
1183,United Democratic Forces,ODS
|
||||
1185,Lithuanian Centre Union,LCS
|
||||
1190,Motherland Party,ANAP
|
||||
1193,Liberal and Centre Union,LiCS
|
||||
1194,Independents' Alliance,LdU/AdI
|
||||
1195,Democrats for a Strong Bulgaria,DSB
|
||||
1199,Social Christian Unity Party,PUSC
|
||||
1204,Liberals,V
|
||||
1209,Australian Greens,Greens
|
||||
1215,Alternative for a Republic of Equals,ARI
|
||||
1219,African National Congress,ANC
|
||||
1220,Democratic Union for Integration,DUI/BDI
|
||||
1221,League,L
|
||||
1224,Liberal Party,FF
|
||||
1225,Dominican Liberation Party,PLD
|
||||
1229,Swedish People's Party,RKP/SFP
|
||||
1231,FDP. The Liberals,FDP/PLR
|
||||
1234,Labour Party,PvdA
|
||||
1241,Labor Party,PT
|
||||
1242,Party of the Democratic Left,SDľ
|
||||
1246,Independent Republicans | Liberal Democracy,IR|DL
|
||||
1247,Citizen's Action Party,PAC
|
||||
1248,Centre Democrats,CDS
|
||||
1249,People's Alliance,Ab
|
||||
1251,French Communist Party,PCF
|
||||
1252,Broad Front,FA
|
||||
1253,Social Democratic Populist Party,SHP
|
||||
1271,Union of the Democratic Centre/Centrist Bloc,UCD
|
||||
1274,Liberals,L
|
||||
1287,Pirates,Pi
|
||||
1288,Family of the Irish,FG
|
||||
1294,Independent Smallholders' Party,FKgP
|
||||
1299,Estonian National Independence Party,ERSP
|
||||
1303,Finnish Social Democrats,SSDP
|
||||
1305,Greater Romania Party,PRM
|
||||
1310,Left Bloc,BE
|
||||
1311,Freedom Party of Switzerland,FPS
|
||||
1324,Basque Solidarity,EA
|
||||
1325,Social Democratic Party,A
|
||||
1326,Basque Left,EE
|
||||
1329,Austrian People's Party,ÖVP
|
||||
1331,Citizens' Movement,CD
|
||||
1338,Spanish Socialist Workers' Party,PSOE
|
||||
1345,New Alliance Party,PANAL
|
||||
1351,Democratic Revolutionary Party,PRD
|
||||
1354,Republican Party,CnP
|
||||
1357,Lithuanian Liberal Union,LLS
|
||||
1358,Citizens' Rights Movement,RATZ
|
||||
1359,Social Democratic Party,PSD
|
||||
1363,Socialist Party,SP
|
||||
1366,Ulster Unionist Party,UUP
|
||||
1367,National Liberation Party,PLN
|
||||
1369,South Tyrolean People’s Party,SVP
|
||||
1373,Romanian Ecological Party,PER
|
||||
1375,Christian Democratic Union,CDU
|
||||
1384,Austrian Social Democratic Party,SPÖ
|
||||
1386,Freedom and Solidarity,SaS
|
||||
1388,Liberal Democrats,LibDems
|
||||
1390,Catholic People's Party,KVP
|
||||
1396,The Alliance - Social Democratic Party of Iceland,S
|
||||
1398,Unity of Labour,AHA
|
||||
1403,Social Democratic Party,SD
|
||||
1404,Communist Refoundation Party,PRC
|
||||
1405,Popular Democracy - Christian Democratic Union,DP - UDC
|
||||
1408,Hungarian Socialist Party,MSzP
|
||||
1412,Christian Democratic People's Party,KDNP
|
||||
1415,Conservative Democratic Party of Switzerland,BDP/PBD
|
||||
1417,Israel Communist Party,Maki
|
||||
1419,Colorado Party,PC
|
||||
1424,Peoples' Union,VU
|
||||
1428,Quebec Bloc,BQ
|
||||
1431,Croatian Democratic Union,HDZ
|
||||
1436,Israeli Labour Party,HaAvoda
|
||||
1439,German Minority,MN
|
||||
1441,Dominican Revolutionary Party,PRD
|
||||
1447,National Religious Party,Mafdal
|
||||
1448,Socialist Party,SP
|
||||
1449,Pannella-Sgarbi List,PR
|
||||
1450,Ecuadorian Roldosist Party,PRE
|
||||
1451,Romanian National Unity Party,PUNR
|
||||
1454,Party of Democratic Action,SDA
|
||||
1459,Christian Union,CU
|
||||
1461,Italian Liberal Party,PLI
|
||||
1467,Party for the Animals,PvdD
|
||||
1472,Centre Democrats,CD
|
||||
1474,Institutional Revolutionary Party,PRI
|
||||
1478,Socialist Party,PS
|
||||
1479,Democratic Party of Slovenia,DSS
|
||||
1480,Popular Monarchist Party,PPM
|
||||
1489,General Zionists,GZ
|
||||
1490,Lithuanian Peasant and Green Union,LVŽS
|
||||
1494,Greens of Slovenia,ZS
|
||||
1497,Andalusian Party,PA
|
||||
1502,German Party,DP
|
||||
1507,Danish Social-Liberal Party,RV
|
||||
1508,Social-Democratic League of Macedonia,SDSM
|
||||
1515,New Clean Government Party,NKP
|
||||
1516,Labour Party,Labour
|
||||
1517,Union of Liberals and Leftists,SFVM
|
||||
1519,Centre Right,CeD
|
||||
1524,New Liberal Club,NLC
|
||||
1527,Red-Green Unity List,EL
|
||||
1528,List Pim Fortuyn,LPF
|
||||
1531,New Era,JL
|
||||
1533,The Greens,Groen
|
||||
1540,Democratic Labor Party,DLP
|
||||
1545,The Left,LINKE
|
||||
1554,Green Party,SZ
|
||||
1556,Coalition Party,KE
|
||||
1563,Ecologists,ECOLO
|
||||
1564,Aragonist Council,CHA
|
||||
1565,Law and Justice,PiS
|
||||
1567,Conservative Party,Conservatives
|
||||
1577,Colombian Conservative Party,PCC
|
||||
1581,Radical Political Party,PPR
|
||||
1586,Socialist Party Different - Spirit,sp.a-SPIRIT
|
||||
1597,Hungarian Justice and Life Party,MIÉP
|
||||
1599,Independent Democratic Union,UDI
|
||||
1600,Democratic Renewal Party,PRD
|
||||
1601,Progress Party,FP
|
||||
1602,Reformed Political League,GPV
|
||||
1610,National Action Party,MHP
|
||||
1615,Confederation for an Independent Poland,KPN
|
||||
1618,New Slovenian Christian People's Party,Nsi
|
||||
1626,Go Italy,FI
|
||||
1629,Union for a New Majority - Conservatives/Gaullists,PRL
|
||||
1630,Inkatha Freedom Party,IFP
|
||||
1635,Party of Italian Communists,PdCI
|
||||
1636,Union for Human Rights Party,PBDNJ
|
||||
1637,Basque Nationalist Party,PNV/EAJ
|
||||
1647,Communist Party of Luxembourg,KPL/PCL
|
||||
1650,Politics Can Be Different,LMP
|
||||
1651,Independent Greeks,ANEL
|
||||
1655,Freedom,Herut
|
||||
1657,Association for the Republic - Republican Party of Czechoslovakia,SPR-RSČ
|
||||
1659,The Greens,GRÜNE
|
||||
1660,Golden Dawn,XA
|
||||
1661,Ticino League,LdT
|
||||
1663,National Democratic Assembly,BaLaD
|
||||
1664,Homeland,Moledet
|
||||
1671,Amaiur,Amaiur
|
||||
1673,Party of Democratic Progress of the Republika Srpska,PDP RS
|
||||
1682,Democratic Social Movement,DIKKI
|
||||
1688,Popular Democratic Movement,MDP
|
||||
1689,True Finns,PS
|
||||
1691,Alliance of Federation of Young Democrats - Christian Democratic People's Party,FiDeSz-KDNP
|
||||
1696,National Alliance,AN
|
||||
1697,Hungarian Democratic Forum,MDF
|
||||
1702,Latvian Farmers' Union,LZS
|
||||
1705,United People Alliance,APU
|
||||
1715,Democratic Party,PD
|
||||
1716,Maori Party,Maori
|
||||
1719,Harmony for Latvia - Rebirth of the Economy,SLAT
|
||||
1726,Hungarian Social Democratic Party,MSzDP
|
||||
1728,Communist Party of Bohemia and Moravia,KSČM
|
||||
1729,Albanian Socialist Party,PSS
|
||||
1731,Christian Social Union,CSU
|
||||
1739,Liberal Party of Canada,LP
|
||||
1740,Democratic Left Party,DSP
|
||||
1744,Liberal Movement,LRLS
|
||||
1746,Liberal Democratic Party,LDP
|
||||
1750,Christian Democratic National Peasants’ Party,PNŢCD
|
||||
1753,Workers' Party of Belgium,PTB/PVDA
|
||||
1755,People's Party,TP
|
||||
1757,Reform Party of Canada,RPC
|
||||
1758,Union / Centre,UC
|
||||
1759,Green Liberal Party,GLP
|
||||
1767,Christian Democratic Centre,CCD
|
||||
1768,League of Polish Families,LPR
|
||||
1775,Green Party,Greens
|
||||
1777,Your Party,YP
|
||||
1783,Left Radical Party,PRG
|
||||
1789,Latvian National Independence Movement,LNNK
|
||||
1790,Alliance Union-PRO,PRO
|
||||
1793,National Union Attack,ATAKA
|
||||
1794,Green Party of England and Wales,GPEW
|
||||
1800,New Union Social Liberals,NS
|
||||
1804,Democratic Party of Japan,DPJ
|
||||
1808,Christian Democratic People's Party of Switzerland,CVP/PDC
|
||||
1816,Alliance 90/The Greens,B90/Gruene
|
||||
1817,European Party,EVROKO
|
||||
1819,Swiss Democrats,SD/DS
|
||||
1823,Liberal Party,PL
|
||||
1824,New Zealand National Party,National
|
||||
1963,Green Party,MDG
|
||||
1966,United National Party,UNP
|
||||
1968,Flemish Interest,VB
|
||||
1970,The New Austria and Liberal Forum,NEOS
|
||||
1976,Alternative for Germany,AfD
|
||||
1989,Authentic Party of the Mexican Revolution,PARM
|
||||
1991,Azerbaijan National Independence Party,AMİP
|
||||
1992,Azerbaijan Popular Front,AXC
|
||||
1995,New Azerbaijan Party,YAP
|
||||
1997,Katter's Australian Party,KAT
|
||||
1998,Liberal Party,LP
|
||||
2007,Rule of Law,OEK
|
||||
2009,National Democratic Union,AZhM
|
||||
2013,Republican Party of Armenia,HHK
|
||||
2018,Communist Party of Armenia,HKK
|
||||
2020,Armenian Revolutionary Federation,HHD
|
||||
2030,Party of Communists of Belarus,PKB
|
||||
2046,Five Star Movement,M5S
|
||||
2047,Czech Pirate Party,Piráti
|
||||
2048,Pirate Party,Þ
|
||||
2057,National Front for the Salvation of Bulgaria,NFSB
|
||||
2080,Japan Innovation Party,JIP
|
||||
2130,Ordinary People and Independent Personalities,OľaNO
|
||||
2141,ANO 2011,ANO
|
||||
2148,Citizens’ Union of Georgia,SMK
|
||||
2153,Georgian Labour Party,SLP
|
||||
2159,Industry will save Georgia,MGS
|
||||
2161,National Democratic Party,EDP
|
||||
2162,New Rights,AM
|
||||
2168,Union for the Democratic Revival,DAP
|
||||
2169,Union of Georgian Traditionalists,KTK
|
||||
2172,United National Movement,ENM
|
||||
2175,Serbian Radical Party,SRS
|
||||
2176,Serbian Renewal Movement,SPO
|
||||
2178,Socialist Party of Serbia,SPS
|
||||
2186,Democratic Community of Magyars of Vojvodina,DZVM
|
||||
2189,Democratic Party,DS
|
||||
2193,G17plus,G17+
|
||||
2196,Liberal Democratic Party,LDP
|
||||
2197,New Democracy,ND
|
||||
2199,Party for Democratic Activity,PVD/PDD
|
||||
2203,Alliance of Vojvodina Hungarians,VMSZ
|
||||
2207,Popular Movement of Ukraine,Rukh
|
||||
2210,Social Democratic Party of Ukraine,SDPU
|
||||
2211,Bloc Socialist Party of Ukraine and Peasant Party of Ukraine,SPU-SelPU
|
||||
2220,Communist Party of Ukraine,KPU
|
||||
2228,Juliya Tymoshenko Election Bloc,BYuT
|
||||
2231,Our Ukraine - People's Self-Defense,NU-NS
|
||||
2235,Agrarian Party of Russia,APR
|
||||
2236,Communist Party of the Russian Federation,KPRF
|
||||
2244,Just Russia,SR
|
||||
2245,Zhirinovsky Bloc,BZ
|
||||
2247,Our Home - Russia,NDR
|
||||
2252,Russian United Democratic Party 'Yabloko',Yabloko
|
||||
2253,Russia’s Democratic Choice,DVR
|
||||
2255,Union of Right Forces,SPS
|
||||
2257,Women of Russia,ZR
|
||||
2260,Party of Communists of the Republic of Moldova,PCRM
|
||||
2264,Christian Democratic People’s Party,PPCD
|
||||
2265,Democratic Party of Moldova,PDM
|
||||
2271,Liberal Democratic Party of Moldova,PLDM
|
||||
2272,Liberal Party,PL
|
||||
2280,Brothers of Italy,FDI
|
||||
2305,Democratic Party,DP
|
||||
2306,Liberty Forward Party,LFP
|
||||
2307,New Frontier Party,NFP
|
||||
2346,New Serbia,NS
|
||||
2347,Croatian Democratic Assembly of Slavonia and Baranja,HDSSB
|
||||
2348,Independent Democratic Serbian Party,SDSS
|
||||
2415,Autonomy Liberty Democracy Aosta Valley,ALD
|
||||
2447,New Social Democratic Party,NSDP
|
||||
2449,Liberal Party,LP
|
||||
2458,Together 2014 -Dialogue for Hungary Electoral Alliance,E14-PM
|
||||
2517,Bright Future,Bf
|
||||
2538,Commitment-Q,PRC
|
||||
2545,United Liberal Party,ULD
|
||||
2546,Democratic Labour Party,DLP
|
||||
2547,Democratic Party - including Platform Party,DP
|
||||
2548,Millenium Democratic Party,MDP
|
||||
2553,Party of Socialists of the Republic of Moldova,PSRM
|
||||
2645,Independent Social Alliance,ASI
|
||||
2874,Broad Front for Democracy,FAD
|
||||
2915,Yugoslav Left,JUL
|
||||
2988,Georgian Dream,GD
|
||||
3098,Modern Centre Party,SMC
|
||||
3104,Socialist People's Party of Montenegro,SNP CG
|
||||
3114,Party of Alenka Bratušek,SAB
|
||||
3128,There is a Future,YA
|
||||
3131,Meretz,MERETZ
|
||||
3143,Croatian Labourists - Labour Party,HL
|
||||
3162,Democratic Party of Socialists of Montenegro,DPS CG
|
||||
3163,For a Better Life,DZB
|
||||
3164,Liberal Alliance of Montenegro,LSCG
|
||||
3168,Croatian Democratic Union 1990,HDZ 1990
|
||||
3171,Alliance for a Better Future of Bosnia and Herzegovina,SBB BiH
|
||||
3173,Justice and Reconciliation Party,SPP
|
||||
3176,Party of Democratic Action,SDA
|
||||
3177,Serbian Progressive Party,SNS
|
||||
3185,Social Democratic Party of Montenegro,SDP CG
|
||||
3187,Alternative for Bulgarian Revival,ABV
|
||||
3194,Latvian Association of Regions,LRa
|
||||
3203,We Can,Podemos
|
||||
3210,People's Movement Party,PMP
|
||||
3217,Citizens - Party of the Citizens,C's
|
||||
3218,Voice,VOX
|
||||
3225,Free,L
|
||||
3229,Union of Democrats and Independents,UDI
|
||||
3252,New Serbian Democracy,NOVA
|
||||
3255,Bosniak Party,BS
|
||||
3266,All-Ukrainian Union 'Fatherland',Batkivshchyna
|
||||
3267,All-Ukrainian Union ‘Freedom',ВО/Свобода
|
||||
3271,Free Party,EVA
|
||||
3273,All of Us,Kulanu
|
||||
3645,People's Party,NS
|
||||
3671,New Space,NE
|
||||
3698,Red Party,R
|
||||
3783,Heritage,HePa
|
||||
3890,Armenia Alliance,HD
|
||||
3904,alliance: HDZ-HK~HNZ,HDZ-HK~HNZ
|
||||
3908,Gergiovden-VMRO / VMRO-Bulgarian National Movement,G-VMRO; VMRO-BND
|
||||
3915,Approve Dignity,FA
|
||||
3916,Colombian Coalition,CC
|
||||
3955,Labour - Gesher,Avoda-Gesher
|
||||
3973,Coalition Civic Option for Macedonia,GROM
|
||||
3979,Commitment for Mexico,AM
|
||||
3982,Democratic Coalition,DK
|
||||
3995,Opposition Action Alliance,AAO
|
||||
3997,Alliance Possible Peru,PP
|
||||
4011,We must,MORAMO
|
||||
4020,alliance: CP / VLSSP,CP / VLSSP
|
||||
4044,Proud and Sovereign Fatherland Alliance Movement,Alianza PAIS
|
||||
4070,Alternativ,A
|
||||
4094,Conservative People's Party of Estonia,EKRE
|
||||
4182,Front for Loyalty and Union of the Democratic Centre,FPL + UCeDé
|
||||
4205,Prosperous Armenia,BHK
|
||||
4214,People’s Force,FP
|
||||
4258,Internal Macedonian Revolutionary Organization-People's Party,VMRO-NP
|
||||
4269,Creating Opportunities,CREO
|
||||
4364,Liberal Democracy,DL
|
||||
4373,Justice Party,AP
|
||||
4400,Democratic and Popular Union,UDP
|
||||
4405,Liberal Party,PR
|
||||
4418,National Integration Party,PIN
|
||||
4546,Congress of the People,COPE
|
||||
4547,Democratic Party,DP
|
||||
4548,Economic Freedom Fighters,EEF
|
||||
4628,Republicans,Rep
|
||||
4630,Modern,.N
|
||||
4631,Kukiz'15,K
|
||||
4714,United Left,ZL
|
||||
4758,Democratic Party,DP
|
||||
4766,Movement for Changes,PzP
|
||||
4778,European Solidarity,BPP
|
||||
4779,Opposition Bloc,OB
|
||||
4795,Democratic Convergence of Catalonia,CDC
|
||||
4852,Democratic Alliance - 19th of April Movement,DA M19
|
||||
4865,Bridge of Independent Lists,MOST
|
||||
4866,People's Party - Reformists,NS-R
|
||||
4870,Social Democrats,DS
|
||||
4873,We Are Family,SR
|
||||
5414,Lanka Equal Society Party,LSS
|
||||
5453,Centre Alliance,NXT
|
||||
5454,Reform Party,Vidreisn
|
||||
5468,United Reform Action,URA
|
||||
5486,Serbian People's Party,SNS
|
||||
5553,Front for a Country in Solidarity,FREPASO
|
||||
5650,Europe Ecology - The Greens,EELV
|
||||
5848,Simeon II Coalition,KSII
|
||||
5852,People’s Party,FlF
|
||||
5855,Forum for Democracy,FvD
|
||||
5856,DENK,DENK
|
||||
5857,Renaissance,REM|R
|
||||
5858,Indomitable France,FI
|
||||
5879,Democratic Center,CD
|
||||
5926,Green Alliance,AV
|
||||
5939,Portugal Ahead,PàF
|
||||
5969,Save Romania Union,USR
|
||||
5976,Social Democratic Party 'Harmony',SDPS
|
||||
6042,Peoples' Democratic Party,HDP
|
||||
6087,Democratic Front,DF
|
||||
6110,National Regeneration Movement,MORENA
|
||||
6113,Social Encounter Party,PES
|
||||
6114,Alliance of Patriots of Georgia,APG
|
||||
6125,Freedom and Direct Democracy,SPD
|
||||
6131,The Left,L
|
||||
6135,Constitutional Democratic Party of Japan,CDP
|
||||
6150,Democratic Movement of Serbia,DEPOS
|
||||
6159,Civic Coalition,CC
|
||||
6560,Justice Party,JP
|
||||
6561,Democratic Party,DPK
|
||||
6648,Federal Peronism / Dissident Peronism,PF-PJ
|
||||
6691,Communist Party of Sri Lanka,CP
|
||||
6804,Lithuanian Christian Democratic Party,LKDP
|
||||
7049,Together for Change,JxC
|
||||
7339,The New Right,NB
|
||||
7348,European Realistic Disobedience Front,MeRA25
|
||||
7421,Together for Catalonia,JxCat
|
||||
7565,Centre Party,M
|
||||
7599,Blue and White,KL
|
||||
7619,National Alliance,NA
|
||||
7909,Movement for Change,KINAL
|
||||
7912,Joint List,JL
|
||||
8031,In Common We Can,ECP
|
||||
8054,Democrats of the Left,DS
|
||||
8058,Forza Italia,FI
|
||||
8168,The Republicans,LR
|
||||
8176,Geneva Citizens' Movement,MCG
|
||||
8182,Enough,CH
|
||||
8241,Solidarity–People Before Profit,PBPS
|
||||
8393,Development/For!,AP!
|
||||
8640,Liberal Iniciative,IL
|
||||
8842,Coalition of the Social Democratic Party of Croatia and the Croatian Social-liberal Party,SDP-HSLS
|
||||
9001,Ivica Dacic - Prime Minister of Serbia,SPS/JS/ZS
|
||||
9095,Rightwards,Y
|
||||
218,Polo Democratico Alternativo,PDA
|
||||
284,Unified Democratic Coalition,CDU
|
||||
568,Nationalist Revolutionary Movement,MNR
|
||||
751,SNK European Democrats,SNK-ED
|
||||
1036,Likud,Likud
|
||||
1060,Republican People's Party,CHP
|
||||
1308,Social Democratic Centre,CDS-PP
|
||||
1665,Coalition for Bulgaria,BSP
|
||||
1674,VMRO-DPMNE,VMRO-DPMNE
|
||||
1724,Radical Civic Union,UCR
|
||||
1985,Popular Socialist Party,PPS
|
||||
2234,Party of Regions,PR
|
||||
2256,United Russia,ER
|
||||
3677,Jewish Home,HaBayit
|
||||
4717,Democratic Front,DF
|
||||
7031,Left Ecology Freedom,SEL
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
||||
6b9aeda20489000983e459e4eb19d2788ed035eaab5deb9a5e010338670b2ff1 party_2d_election_year_panel_v0.zip
|
||||
8f3973011fb57818656199d020d00d9a666c9414b085a3d66feb1124b629caab party_2d_annual_model_output_v0.zip
|
||||
b99f7ef0e8a4c821183a2a0f957752303479e78e5afb685f173fd17f60039b3e party_2d_diagnostics_report_v0.pdf
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+107
-107
@@ -1,107 +1,107 @@
|
||||
manifesto_pf_id,manifesto_name,expert_pf_id,expert_name,country,relationship,status,detection_method
|
||||
3889,PJ,6648,PF-PJ,AR,Peronist faction no independent manifesto,implemented,manual
|
||||
6161,FAP,1365,PS,AR,"LLM: PS (Socialist Party) was a core constituent of FAP (Frente Amplio Progresista), which published joint manifestos.",implemented,llm_verified
|
||||
6161,FAP,6160,FR,AR,"LLM: FR (Frente Renovador) joined FAP in some elections, but also ran independently; likely constituent in FAP manifestos.",implemented,llm_verified
|
||||
6161,FAP,6554,FPCyS,AR,"LLM: FPCyS (Frente Progresista, Cívico y Social) included PS and others; manifestos often under FAP or similar coalitions.",implemented,llm_verified
|
||||
486,LPA,1998,LP,AU,"LLM: The Liberal Party (LP, PF ID: 1998) is the predecessor and constituent of the Liberal Party of Australia (LPA, PF ID: 486); manifestos are published under LPA, not LP.",implemented,llm_verified
|
||||
1743,NPA,338,NAT,AU,"LLM: The National Party (NAT) is the predecessor and constituent of the National Party of Australia (NPA, PF ID: 1743), which is the name used for joint manifestos after the party's rebranding; manifestos are published under NPA, not NAT.",implemented,llm_verified
|
||||
1760,HDZ BiH,3904,HDZ-HK~HNZ,BA,HDZ-led coalition variants,implemented,manual
|
||||
36,N-VA,756,CD+NVA,BE,cartel list,implemented,manual
|
||||
604,CD/V,622,CD&V,BE,same party duplicate PF ID,implemented,manual
|
||||
604,CD/V,756,CD+NVA,BE,"LLM: CD+NVA refers to the joint electoral lists of CD&V and N-VA (mainly 2003-2007); during this period, they published joint manifestos under the CD/V (PF ID: 604) label in the text data.",implemented,llm_verified
|
||||
1680,sp.a,1586,sp.a-SPIRIT,BE,merger,implemented,manual
|
||||
374,NDSV,5848,KSII,BG,"LLM: KSII is the coalition led by NDSV (374); manifestos published under NDSV, not KSII.",implemented,llm_verified
|
||||
482,SDS,3908,G-VMRO; VMRO-BND,BG,bloc constituent (progtype=8),implemented,progtype_8
|
||||
1765,ONS,3908,G-VMRO; VMRO-BND,BG,bloc constituent (progtype=8),implemented,progtype_8
|
||||
5649,Patriotic Front - NFSB and VMRO,2057,NFSB,BG,bloc constituent (progtype=8),implemented,progtype_8
|
||||
5649,Patriotic Front - NFSB and VMRO,3908,G-VMRO; VMRO-BND,BG,bloc constituent (progtype=8),implemented,progtype_8
|
||||
360,FDP/PLR,1231,FDP/PLR,CH,same party duplicate PF ID,implemented,manual
|
||||
6061,Alliance,928,RN,CL,core coalition member joint CMP manifesto,implemented,manual
|
||||
6061,Alliance,1599,UDI,CL,core coalition member joint CMP manifesto,implemented,manual
|
||||
1707,STAN,751,SNK-ED,CZ,"LLM: SNK-ED ran joint lists and published manifestos together with STAN (PF ID: 1707) in parliamentary elections, notably in 2006, under the SNK-ED–STAN label.",implemented,llm_verified
|
||||
2138,LB,1041,KSC,CZ,bloc constituent (progtype=8),implemented,progtype_8
|
||||
6202,KDU-ČSL-US-DEU,104,US-DEU,CZ,bloc constituent (progtype=8),implemented,progtype_8
|
||||
211,CDU/CSU,1375,CDU,DE,constituent,implemented,manual
|
||||
211,CDU/CSU,1731,CSU,DE,constituent,implemented,manual
|
||||
1816,B90/Grüne,10,Die Grünen,DE,merger,implemented,manual
|
||||
3925,RED-ID,797,ID,EC,constituent of alliance,implemented,manual
|
||||
685,RP,491,ERP,EE,LLM: ERP (Res Publica) published joint manifestos as 'RP' (PF ID: 685) in the text data; Res Publica is the Estonian name for the same party.,implemented,llm_verified
|
||||
779,I/ERSP,908,RKI,EE,bloc constituent (progtype=8),implemented,progtype_8
|
||||
779,I/ERSP,1299,ERSP,EE,merger,implemented,manual
|
||||
139,CiU,4795,CDC,ES,constituent,implemented,manual
|
||||
8271,Compromís–Podemos–EUPV,5623,CC,ES,LLM: CC (Compromís) published joint manifestos as part of Compromís–Podemos–EUPV (PF ID: 8271) in general elections.,implemented,llm_verified
|
||||
213,MoDem,496,MoDem,FR,same party duplicate PF ID,implemented,manual
|
||||
1108,EELV,5650,EELV,FR,same party duplicate PF ID,implemented,manual
|
||||
1595,UMP,4628,Les Républicains,FR,UMP renamed 2015,implemented,manual
|
||||
1595,UMP,8168,LR,FR,same as Les Républicains duplicate PF ID,implemented,manual
|
||||
1468,PASOK,7909,KINAL,GR,PASOK-dominated umbrella rebranded 2022,implemented,manual
|
||||
7347,EL,378,OP,GR,LLM: Oikologoi Prasinoi (OP) ran jointly with MeRA25 in 2019 as part of the 'MeRA25-Alliance for Breakup' and did not publish a separate manifesto; their program was subsumed under MeRA25.,implemented,llm_verified
|
||||
1475,SDP,8842,SDP-HSLS,HR,joint list SDP dominant,implemented,manual
|
||||
2522,Kukuriku,78,DC,HR,"LLM: DC (Democratic Centre) was a constituent of the Kukuriku coalition, which published joint manifestos under the Kukuriku name (PF ID: 2522) in 2011 and 2015.",implemented,llm_verified
|
||||
3648,ZL,8036,HKDU,HR,bloc constituent (progtype=5),implemented,progtype_5
|
||||
3918,DA-IDS-RDS,513,IDS,HR,constituent of alliance,implemented,manual
|
||||
242,PBP,8241,PBPS,IE,LLM: PBPS (Solidarity–People Before Profit) publishes joint manifestos under PBP (PF ID: 242) in the text data; this is a union.,implemented,llm_verified
|
||||
201,UdC,1758,UC,IT,LLM: Unione di Centro (UC/UDC) is a constituent of UdC (PF ID: 201) in the text data; they publish joint manifestos under UdC.,implemented,llm_verified
|
||||
1212,SEL,7031,SEL,IT,LLM: Sinistra Ecologia Libertà (SEL) is present in both datasets and publishes manifestos under SEL (PF ID: 1212) in text data.,implemented,llm_verified
|
||||
1737,Olive Tree,878,DS,IT,bloc constituent (progtype=8),implemented,progtype_8
|
||||
6241,House of Freedom,813,AN,IT,bloc constituent (progtype=8),implemented,progtype_8
|
||||
6241,House of Freedom,1519,CeD,IT,bloc constituent (progtype=8),implemented,progtype_8
|
||||
1967,SLFP,4020,CP / VLSSP,LK,"LLM: CP/VLSSP often contested as part of the SLFP-led United Front and People's Alliance, typically under joint manifestos with SLFP, but sometimes ran separately; medium confidence due to occasional independent runs.",implemented,llm_verified
|
||||
1967,SLFP,5414,LSS,LK,"LLM: LSSP was a core constituent of the SLFP-led United Front and People's Alliance, publishing joint manifestos with SLFP.",implemented,llm_verified
|
||||
1967,SLFP,6691,CP,LK,"LLM: CP was a constituent of the SLFP-led United Front and People's Alliance, publishing joint manifestos with SLFP.",implemented,llm_verified
|
||||
197,BSDK,168,LRS,LT,bloc constituent (progtype=8),implemented,progtype_8
|
||||
197,BSDK,1747,LMP-NDP,LT,bloc constituent (progtype=8),implemented,progtype_8
|
||||
377,LTS,1410,LLaS,LT,bloc constituent (progtype=8),implemented,progtype_8
|
||||
5779,SK,1407,LZP,LT,bloc constituent (progtype=8),implemented,progtype_8
|
||||
186,LSAP/POSL,898,SDP,LU,same party duplicate PF ID,implemented,manual
|
||||
708,LNNK-LZP,1296,LZP,LV,name fragment of LNNK-LZP,implemented,name_fragment
|
||||
1704,TB-LNNK,671,TB,LV,constituent of alliance,implemented,manual
|
||||
1704,TB-LNNK,1789,LNNK,LV,constituent of alliance,implemented,manual
|
||||
1704,TB-LNNK,7619,NATBLNNK,LV,"LLM: NATBLNNK is a constituent of TB-LNNK (1704), which published joint manifestos as a union.",implemented,llm_verified
|
||||
7622,ACUM,7904,PAS,MD,bloc constituent (progtype=8),implemented,progtype_8
|
||||
3254,DSCG,3253,HGI,ME,LLM: HGI (Croatian Civic Initiative) is a small Croatian minority party that typically runs on joint lists with DSCG (Democratic Union of Croats) in Montenegro; manifestos are published under DSCG.,implemented,llm_verified
|
||||
1537,GL,1533,Groen,NL,"LLM: Groen was a constituent party of GroenLinks (GL, PF ID: 1537), which published joint manifestos after its formation; Groen did not publish separate manifestos after joining the union.",implemented,llm_verified
|
||||
716,Alliance,1119,NLP,NZ,LLM: NLP (NewLabour Party) was a founding constituent of the Alliance and published joint manifestos under the Alliance name.,implemented,llm_verified
|
||||
4219,C90,5130,P2000,PE,"LLM: P2000 (Perú 2000) was a bloc including Cambio 90 (C90); manifestos were published under the C90/NM/P2000 bloc, which is represented as C90 (PF ID: 4219) in text data.",implemented,llm_verified
|
||||
1458,WAK,70,ZChN,PL,bloc constituent (progtype=8),implemented,progtype_8
|
||||
8268,UW,1566,D|W|U,PL,"LLM: D|W|U refers to Unia Wolności (UW) and its predecessors/successors, which published manifestos under the UW name (PF ID: 8268) in the text data.",implemented,llm_verified
|
||||
192,CDR,645,PAC,RO,bloc constituent (progtype=8),implemented,progtype_8
|
||||
1347,PSD-PUR,1443,PU|PC,RO,name fragment of PSD-PUR,implemented,name_fragment
|
||||
5941,USL,120,PSD,RO,PSD was the lead constituent of USL coalition (2012 joint manifesto),implemented,manual
|
||||
5941,USL,481,PNL,RO,PNL was a core constituent of USL coalition (2012 joint manifesto),implemented,manual
|
||||
5941,USL,1541,UNPR,RO,LLM: UNPR was a constituent of the USL (PF ID: 5941) coalition and did not publish its own manifesto; manifestos were issued under the USL name.,implemented,llm_verified
|
||||
6153,PSD-PC,1443,PU|PC,RO,name fragment of PSD-PC,implemented,name_fragment
|
||||
8626,LDP/LSV/SDS,4769,LSV,RS,name fragment of LDP/LSV/SDS,implemented,name_fragment
|
||||
205,SV,200,SDSS,SK,bloc constituent (progtype=8),implemented,progtype_8
|
||||
226,SDK,200,SDSS,SK,bloc constituent (progtype=8),implemented,progtype_8
|
||||
1617,SDKÚ-DS,983,DS,SK,DS merged into SDKÚ-DS,implemented,manual
|
||||
6629,DÚS,707,DUS,SK,LLM: DUS (Demokratická únia Slovenska) is the same as DÚS (PF ID: 6629) in the manifesto data; manifestos are published under the union name.,implemented,llm_verified
|
||||
1658,FA,3671,NE,UY,"LLM: NE (Nuevo Espacio) is a well-known constituent party of the Frente Amplio (FA) coalition, which publishes joint manifestos under the FA name.",implemented,llm_verified
|
||||
301,"SYRIZA, SYN; SYRIZA, Syriza, SYN/SYRIZA",1682,DIKKI,GR,"LLM (bloc-centric): DIKKI was a constituent member of the SYRIZA bloc in the 2007 election, running under its banner and publishing joint manifestos.",implemented,llm_verified
|
||||
676,"KDU, KDU-ČSL, KDU-CSL, KDU/CSL, KDUCSL, KDU–CSL, KDU–Č, KDU- ČSL, CSL",824,KDS,CZ,LLM (bloc-centric): KDS (Christian Democratic Party) is explicitly listed as a constituent member of the 'Christian and Democratic Union - Czech People's Party' bloc in the PartyFacts comments and published joint manifestos with it.,implemented,llm_verified
|
||||
701,"ZZS, LZS",1702,LZS,LV,"LLM (bloc-centric): Latvijas Zemnieku savienība (LZS) was a core constituent member of the Greens' and Farmers’ Union (ZZS) bloc in 2002, publishing joint manifestos and running under the bloc's banner.",implemented,llm_verified
|
||||
852,"V, Unity, UNITY, VIENOTIBA, JV, PS",1531,JL,LV,LLM (bloc-centric): Jaunais laiks (JL) was a founding constituent of the Unity (Vienotība) bloc in 2010 and published joint manifestos under its banner.,implemented,llm_verified
|
||||
2190,"DSS, DSS/NS",2346,NS,RS,"LLM (bloc-centric): New Serbia (NS) was a verified constituent member of the 'Democratic Party of Serbia/New Serbia' bloc in the 2008 elections, publishing joint manifestos with DSS.",implemented,llm_verified
|
||||
2530,"FpV, FPV, FPV-PJ, AFplV, FplV",623,PJ,AR,"LLM (bloc-centric): The Justicialist Party (PJ) was the principal and founding constituent of the Front for Victory (FpV) bloc, running under its banner and publishing joint manifestos in all relevant elections.",implemented,llm_verified
|
||||
3906,NA,356,PT,BR,"LLM (bloc-centric): PT (Partido dos Trabalhadores) was the leading party and consistent constituent of this left/progressive bloc across all listed elections, publishing joint manifestos under its banner.",implemented,llm_verified
|
||||
3906,NA,723,PSB,BR,"LLM (bloc-centric): PSB (Partido Socialista Brasileiro) was a frequent coalition partner and constituent member of this bloc, including joint manifestos in several elections (notably 2002, 2006, 2010, 2014, and 2022).",implemented,llm_verified
|
||||
3906,NA,1009,PDT,BR,"LLM (bloc-centric): PDT (Partido Democrático Trabalhista) was a constituent member of this bloc in multiple elections, including joint manifestos (notably 2010, 2018, and 2022).",implemented,llm_verified
|
||||
3906,NA,4405,"PR, PR (2), PR / PL, PR/PL, PR PL, PL/PR",BR,"LLM (bloc-centric): PR (Partido da República) was a constituent member of the bloc in the 2010 and 2014 elections, publishing joint manifestos with the bloc.",implemented,llm_verified
|
||||
3906,NA,458,PTB,BR,"LLM (bloc-centric): PTB (Partido Trabalhista Brasileiro) was a constituent member of the bloc in the 2002 and 2006 elections, participating in joint manifestos.",implemented,llm_verified
|
||||
3906,NA,1823,PL,BR,"LLM (bloc-centric): PL (Partido Liberal) was a constituent member of the bloc in the 2002 election, publishing a joint manifesto.",implemented,llm_verified
|
||||
4550,"C, Concertacion, CPD",6,PS,CL,"LLM (bloc-centric): The Socialist Party of Chile (PS) was a founding and continuous member of the Concertación/CPD, running on joint lists and publishing joint manifestos.",implemented,llm_verified
|
||||
4550,"C, Concertacion, CPD",54,PPD,CL,"LLM (bloc-centric): The Party for Democracy (PPD) was a core constituent of the Concertación/CPD, participating in all its joint electoral platforms and manifestos.",implemented,llm_verified
|
||||
4550,"C, Concertacion, CPD",390,PDC,CL,"LLM (bloc-centric): The Christian Democratic Party (PDC) was a principal founding member of the Concertación/CPD, running under its banner and signing joint manifestos.",implemented,llm_verified
|
||||
4550,"C, Concertacion, CPD",437,PRSD,CL,"LLM (bloc-centric): The Radical Social Democratic Party (PRSD) was a constituent member of the Concertación/CPD, participating in joint electoral lists and manifestos.",implemented,llm_verified
|
||||
8999,"ZMS, Aleksandar V..., PS-TN, Serbia is Wi..., ally",3177,SNS,RS,LLM (bloc-centric): The Serbian Progressive Party (SNS) was the leading and founding constituent of the 'Aleksandar Vučić – Serbia wins / For Our Children / Serbia Must Not Stop' bloc in all listed elections and published joint manifestos under this banner.,implemented,llm_verified
|
||||
1117,PO,4630,.N,PL,Nowoczesna was core constituent of Koalicja Obywatelska (KO) in 2019 under PO CMP code (progtype=8),implemented,manual
|
||||
4550,Concertacion,162,PC,CL,Communist Party of Chile was constituent of Nueva Mayoría (2013-2017) under Concertación PF ID,implemented,manual
|
||||
4550,Concertacion,209,PH,CL,Humanist Party was Concertación constituent (2005-2009),implemented,manual
|
||||
5668,EH Bildu,1671,Amaiur,ES,Amaiur (2011) predecessor to EH Bildu; expert data 2014-2024 covers EH Bildu years,implemented,manual
|
||||
6241,CdL,1767,CCD,IT,CdL coalition constituent (1994-2008),implemented,manual
|
||||
3979,Salvemos a México,1474,PRI,MX,PRI-PVEM electoral coalition (2006-2012) under various names,implemented,manual
|
||||
3979,Salvemos a México,446,PVEM,MX,PRI-PVEM electoral coalition (2006-2012) under various names,implemented,manual
|
||||
7912,Joint List,421,Hadash,IL,Arab party coalition (2015-2021); Hadash is core constituent,implemented,manual
|
||||
7912,Joint List,1663,Balad,IL,Arab party coalition (2015-2021); Balad is constituent,implemented,manual
|
||||
365,PdL,1626,FI,IT,merger constituent,implemented,manual
|
||||
365,PdL,813,AN,IT,merger constituent,implemented,manual
|
||||
manifesto_pf_id,manifesto_name,expert_pf_id,expert_name,country,status
|
||||
3889,PJ,6648,PF-PJ,AR,implemented
|
||||
6161,FAP,1365,PS,AR,implemented
|
||||
6161,FAP,6160,FR,AR,implemented
|
||||
6161,FAP,6554,FPCyS,AR,implemented
|
||||
486,LPA,1998,LP,AU,implemented
|
||||
1743,NPA,338,NAT,AU,implemented
|
||||
1760,HDZ BiH,3904,HDZ-HK~HNZ,BA,implemented
|
||||
36,N-VA,756,CD+NVA,BE,implemented
|
||||
604,CD/V,622,CD&V,BE,implemented
|
||||
604,CD/V,756,CD+NVA,BE,implemented
|
||||
1680,sp.a,1586,sp.a-SPIRIT,BE,implemented
|
||||
374,NDSV,5848,KSII,BG,implemented
|
||||
482,SDS,3908,G-VMRO; VMRO-BND,BG,implemented
|
||||
1765,ONS,3908,G-VMRO; VMRO-BND,BG,implemented
|
||||
5649,Patriotic Front - NFSB and VMRO,2057,NFSB,BG,implemented
|
||||
5649,Patriotic Front - NFSB and VMRO,3908,G-VMRO; VMRO-BND,BG,implemented
|
||||
360,FDP/PLR,1231,FDP/PLR,CH,implemented
|
||||
6061,Alliance,928,RN,CL,implemented
|
||||
6061,Alliance,1599,UDI,CL,implemented
|
||||
1707,STAN,751,SNK-ED,CZ,implemented
|
||||
2138,LB,1041,KSC,CZ,implemented
|
||||
6202,KDU-ČSL-US-DEU,104,US-DEU,CZ,implemented
|
||||
211,CDU/CSU,1375,CDU,DE,implemented
|
||||
211,CDU/CSU,1731,CSU,DE,implemented
|
||||
1816,B90/Grüne,10,Die Grünen,DE,implemented
|
||||
3925,RED-ID,797,ID,EC,implemented
|
||||
685,RP,491,ERP,EE,implemented
|
||||
779,I/ERSP,908,RKI,EE,implemented
|
||||
779,I/ERSP,1299,ERSP,EE,implemented
|
||||
139,CiU,4795,CDC,ES,implemented
|
||||
8271,Compromís–Podemos–EUPV,5623,CC,ES,implemented
|
||||
213,MoDem,496,MoDem,FR,implemented
|
||||
1108,EELV,5650,EELV,FR,implemented
|
||||
1595,UMP,4628,Les Républicains,FR,implemented
|
||||
1595,UMP,8168,LR,FR,implemented
|
||||
1468,PASOK,7909,KINAL,GR,implemented
|
||||
7347,EL,378,OP,GR,implemented
|
||||
1475,SDP,8842,SDP-HSLS,HR,implemented
|
||||
2522,Kukuriku,78,DC,HR,implemented
|
||||
3648,ZL,8036,HKDU,HR,implemented
|
||||
3918,DA-IDS-RDS,513,IDS,HR,implemented
|
||||
242,PBP,8241,PBPS,IE,implemented
|
||||
201,UdC,1758,UC,IT,implemented
|
||||
1212,SEL,7031,SEL,IT,implemented
|
||||
1737,Olive Tree,878,DS,IT,implemented
|
||||
6241,House of Freedom,813,AN,IT,implemented
|
||||
6241,House of Freedom,1519,CeD,IT,implemented
|
||||
1967,SLFP,4020,CP / VLSSP,LK,implemented
|
||||
1967,SLFP,5414,LSS,LK,implemented
|
||||
1967,SLFP,6691,CP,LK,implemented
|
||||
197,BSDK,168,LRS,LT,implemented
|
||||
197,BSDK,1747,LMP-NDP,LT,implemented
|
||||
377,LTS,1410,LLaS,LT,implemented
|
||||
5779,SK,1407,LZP,LT,implemented
|
||||
186,LSAP/POSL,898,SDP,LU,implemented
|
||||
708,LNNK-LZP,1296,LZP,LV,implemented
|
||||
1704,TB-LNNK,671,TB,LV,implemented
|
||||
1704,TB-LNNK,1789,LNNK,LV,implemented
|
||||
1704,TB-LNNK,7619,NATBLNNK,LV,implemented
|
||||
7622,ACUM,7904,PAS,MD,implemented
|
||||
3254,DSCG,3253,HGI,ME,implemented
|
||||
1537,GL,1533,Groen,NL,implemented
|
||||
716,Alliance,1119,NLP,NZ,implemented
|
||||
4219,C90,5130,P2000,PE,implemented
|
||||
1458,WAK,70,ZChN,PL,implemented
|
||||
8268,UW,1566,D|W|U,PL,implemented
|
||||
192,CDR,645,PAC,RO,implemented
|
||||
1347,PSD-PUR,1443,PU|PC,RO,implemented
|
||||
5941,USL,120,PSD,RO,implemented
|
||||
5941,USL,481,PNL,RO,implemented
|
||||
5941,USL,1541,UNPR,RO,implemented
|
||||
6153,PSD-PC,1443,PU|PC,RO,implemented
|
||||
8626,LDP/LSV/SDS,4769,LSV,RS,implemented
|
||||
205,SV,200,SDSS,SK,implemented
|
||||
226,SDK,200,SDSS,SK,implemented
|
||||
1617,SDKÚ-DS,983,DS,SK,implemented
|
||||
6629,DÚS,707,DUS,SK,implemented
|
||||
1658,FA,3671,NE,UY,implemented
|
||||
301,"SYRIZA, SYN; SYRIZA, Syriza, SYN/SYRIZA",1682,DIKKI,GR,implemented
|
||||
676,"KDU, KDU-ČSL, KDU-CSL, KDU/CSL, KDUCSL, KDU–CSL, KDU–Č, KDU- ČSL, CSL",824,KDS,CZ,implemented
|
||||
701,"ZZS, LZS",1702,LZS,LV,implemented
|
||||
852,"V, Unity, UNITY, VIENOTIBA, JV, PS",1531,JL,LV,implemented
|
||||
2190,"DSS, DSS/NS",2346,NS,RS,implemented
|
||||
2530,"FpV, FPV, FPV-PJ, AFplV, FplV",623,PJ,AR,implemented
|
||||
3906,NA,356,PT,BR,implemented
|
||||
3906,NA,723,PSB,BR,implemented
|
||||
3906,NA,1009,PDT,BR,implemented
|
||||
3906,NA,4405,"PR, PR (2), PR / PL, PR/PL, PR PL, PL/PR",BR,implemented
|
||||
3906,NA,458,PTB,BR,implemented
|
||||
3906,NA,1823,PL,BR,implemented
|
||||
4550,"C, Concertacion, CPD",6,PS,CL,implemented
|
||||
4550,"C, Concertacion, CPD",54,PPD,CL,implemented
|
||||
4550,"C, Concertacion, CPD",390,PDC,CL,implemented
|
||||
4550,"C, Concertacion, CPD",437,PRSD,CL,implemented
|
||||
8999,"ZMS, Aleksandar V..., PS-TN, Serbia is Wi..., ally",3177,SNS,RS,implemented
|
||||
1117,PO,4630,.N,PL,implemented
|
||||
4550,Concertacion,162,PC,CL,implemented
|
||||
4550,Concertacion,209,PH,CL,implemented
|
||||
5668,EH Bildu,1671,Amaiur,ES,implemented
|
||||
6241,CdL,1767,CCD,IT,implemented
|
||||
3979,Salvemos a México,1474,PRI,MX,implemented
|
||||
3979,Salvemos a México,446,PVEM,MX,implemented
|
||||
7912,Joint List,421,Hadash,IL,implemented
|
||||
7912,Joint List,1663,Balad,IL,implemented
|
||||
365,PdL,1626,FI,IT,implemented
|
||||
365,PdL,813,AN,IT,implemented
|
||||
|
||||
|
@@ -0,0 +1,17 @@
|
||||
# Diagnostics
|
||||
|
||||
This folder contains the repository diagnostics report for the Scientific Data Data Descriptor. It is generated from the model-ready inputs and the completed model/post-estimation outputs, so it can only be rerun after the estimation workflow has produced party-position, convergence, and validation artifacts.
|
||||
|
||||
Regenerate from the repository root with:
|
||||
|
||||
```bash
|
||||
Rscript diagnostics/generate_diagnostics.R
|
||||
```
|
||||
|
||||
If model outputs are stored outside the repository root, point the script to them:
|
||||
|
||||
```bash
|
||||
PARTY2D_OUTPUTS_DIR=/path/to/outputs Rscript diagnostics/generate_diagnostics.R
|
||||
```
|
||||
|
||||
Generated files are written to `diagnostics/generated/`. The PDF report is also copied to `data/releases/` for the release bundle. PDF rendering uses R Markdown/Pandoc and requires a LaTeX engine such as `pdflatex`.
|
||||
@@ -0,0 +1,609 @@
|
||||
#!/usr/bin/env Rscript
|
||||
|
||||
suppressPackageStartupMessages(library(tidyverse))
|
||||
|
||||
find_repo_root <- function() {
|
||||
args <- commandArgs(trailingOnly = FALSE)
|
||||
file_arg <- "--file="
|
||||
script_arg <- args[startsWith(args, file_arg)][1]
|
||||
if (!is.na(script_arg)) {
|
||||
return(normalizePath(file.path(dirname(sub(file_arg, "", script_arg)), "..")))
|
||||
}
|
||||
if (file.exists("data/text_data.csv")) return(normalizePath(getwd()))
|
||||
stop("Cannot find repository root. Run from the party2d repository root.")
|
||||
}
|
||||
|
||||
repo_root <- find_repo_root()
|
||||
setwd(repo_root)
|
||||
|
||||
release_version <- Sys.getenv("PARTY2D_RELEASE_VERSION", "v0")
|
||||
outputs_dir <- Sys.getenv("PARTY2D_OUTPUTS_DIR", "outputs")
|
||||
if (!grepl("^/", outputs_dir)) outputs_dir <- file.path(repo_root, outputs_dir)
|
||||
if (!dir.exists(outputs_dir)) {
|
||||
stop("Model output directory not found: ", outputs_dir, ". Run estimation/validation first or set PARTY2D_OUTPUTS_DIR.")
|
||||
}
|
||||
review_package_dir <- Sys.getenv("PARTY2D_REVIEW_PACKAGE_DIR", file.path(dirname(repo_root), "archive", "review_package"))
|
||||
if (!grepl("^/", review_package_dir)) review_package_dir <- file.path(repo_root, review_package_dir)
|
||||
|
||||
generated_dir <- file.path(repo_root, "diagnostics", "generated")
|
||||
release_dir <- file.path(repo_root, "data", "releases")
|
||||
dir.create(generated_dir, recursive = TRUE, showWarnings = FALSE)
|
||||
dir.create(release_dir, recursive = TRUE, showWarnings = FALSE)
|
||||
|
||||
required_inputs <- c(
|
||||
"data/text_data.csv",
|
||||
"data/expert.csv",
|
||||
"data/lr_data.csv",
|
||||
"data/union_mapping.csv",
|
||||
"data/party_families.csv"
|
||||
)
|
||||
missing_inputs <- required_inputs[!file.exists(required_inputs)]
|
||||
if (length(missing_inputs) > 0) {
|
||||
stop("Missing required model input files: ", paste(missing_inputs, collapse = ", "))
|
||||
}
|
||||
|
||||
latest_file <- function(path, pattern) {
|
||||
if (!dir.exists(path)) return(NA_character_)
|
||||
files <- list.files(path, pattern = pattern, full.names = TRUE)
|
||||
if (length(files) == 0) return(NA_character_)
|
||||
sort(files)[length(files)]
|
||||
}
|
||||
|
||||
read_if_exists <- function(path) {
|
||||
if (is.na(path) || !file.exists(path)) return(tibble())
|
||||
readr::read_csv(path, show_col_types = FALSE)
|
||||
}
|
||||
|
||||
review_file <- function(...) {
|
||||
path <- file.path(review_package_dir, ...)
|
||||
if (file.exists(path)) path else NA_character_
|
||||
}
|
||||
|
||||
public_dimension <- function(x) {
|
||||
dplyr::recode(as.character(x),
|
||||
economic_lr = "economic left-right",
|
||||
galtan = "cultural cosmopolitan--traditionalist",
|
||||
Economic = "economic left-right",
|
||||
Cultural = "cultural cosmopolitan--traditionalist",
|
||||
`Economic Left-Right` = "economic left-right",
|
||||
.default = as.character(x)
|
||||
)
|
||||
}
|
||||
|
||||
infer_dimension <- function(type_low, type_high) {
|
||||
dplyr::case_when(
|
||||
type_low %in% c("pro_market", "pro_welfare", "left", "right") |
|
||||
type_high %in% c("pro_market", "pro_welfare", "left", "right") ~ "economic left-right",
|
||||
type_low %in% c("cosmopolitan", "traditional") |
|
||||
type_high %in% c("cosmopolitan", "traditional") ~ "cultural cosmopolitan--traditionalist",
|
||||
TRUE ~ "general left-right"
|
||||
)
|
||||
}
|
||||
|
||||
is_reversed_for_reporting <- function(type_high) {
|
||||
type_high %in% c("pro_welfare", "left", "cosmopolitan")
|
||||
}
|
||||
|
||||
fmt_num <- function(x, digits = 3) {
|
||||
ifelse(is.na(x), "NA", formatC(x, digits = digits, format = "f"))
|
||||
}
|
||||
|
||||
display_path <- function(path) {
|
||||
if (is.na(path) || !nzchar(path)) return("not available")
|
||||
normalized <- normalizePath(path, mustWork = FALSE)
|
||||
root_prefix <- paste0(normalizePath(repo_root, mustWork = FALSE), .Platform$file.sep)
|
||||
if (startsWith(normalized, root_prefix)) return(sub(root_prefix, "", normalized, fixed = TRUE))
|
||||
basename(path)
|
||||
}
|
||||
|
||||
md_table <- function(df, n = Inf) {
|
||||
if (nrow(df) == 0) return("_No rows available._\n")
|
||||
df <- head(df, n)
|
||||
df <- mutate(df, across(everything(), as.character))
|
||||
header <- paste0("| ", paste(names(df), collapse = " | "), " |")
|
||||
sep <- paste0("| ", paste(rep("---", ncol(df)), collapse = " | "), " |")
|
||||
rows <- apply(df, 1, function(x) paste0("| ", paste(x, collapse = " | "), " |"))
|
||||
paste(c(header, sep, rows), collapse = "\n")
|
||||
}
|
||||
|
||||
text_data <- read_csv("data/text_data.csv", show_col_types = FALSE)
|
||||
expert <- read_csv("data/expert.csv", show_col_types = FALSE)
|
||||
lr_data <- read_csv("data/lr_data.csv", show_col_types = FALSE)
|
||||
union_mapping <- read_csv("data/union_mapping.csv", show_col_types = FALSE)
|
||||
party_families <- read_csv("data/party_families.csv", show_col_types = FALSE)
|
||||
|
||||
excluded_poldem <- text_data %>%
|
||||
filter(project == "PolDem", str_detect(str_to_lower(var), "reform"))
|
||||
if (nrow(excluded_poldem) > 0) {
|
||||
stop("Excluded PolDem reform item is present in data/text_data.csv. Final-model diagnostics must be regenerated after removing it.")
|
||||
}
|
||||
|
||||
annual_release <- file.path(release_dir, paste0("party_2d_annual_model_output_", release_version, ".csv.gz"))
|
||||
panel_release <- file.path(release_dir, paste0("party_2d_election_year_panel_", release_version, ".csv.gz"))
|
||||
model_positions_file <- latest_file(file.path(outputs_dir, "estimations", "latest"), "^party_positions_.*\\.csv$")
|
||||
if (is.na(model_positions_file)) {
|
||||
stop("No post-estimation party-position output found under ", outputs_dir, ". Run model estimation/post-estimation first, or set PARTY2D_OUTPUTS_DIR to an outputs directory.")
|
||||
}
|
||||
positions <- read_csv(model_positions_file, show_col_types = FALSE)
|
||||
|
||||
item_rows <- bind_rows(
|
||||
text_data %>%
|
||||
mutate(source_file = "text_data.csv") %>%
|
||||
group_by(source_file, item = var, source = project, type_low, type_high) %>%
|
||||
summarise(observations = n(), party_years = n_distinct(party, year), parties = n_distinct(party), countries = n_distinct(country), min_year = min(year), max_year = max(year), .groups = "drop"),
|
||||
expert %>%
|
||||
mutate(source_file = "expert.csv") %>%
|
||||
group_by(source_file, item = var, source = project, type_low, type_high) %>%
|
||||
summarise(observations = n(), party_years = n_distinct(party, year), parties = n_distinct(party), countries = n_distinct(country), min_year = min(year), max_year = max(year), .groups = "drop"),
|
||||
lr_data %>%
|
||||
mutate(source_file = "lr_data.csv", type_low = NA_character_, type_high = NA_character_) %>%
|
||||
group_by(source_file, item = var, source = project, type_low, type_high) %>%
|
||||
summarise(observations = n(), party_years = n_distinct(party, year), parties = n_distinct(party), countries = n_distinct(country), min_year = min(year), max_year = max(year), .groups = "drop")
|
||||
) %>%
|
||||
mutate(
|
||||
dimension = infer_dimension(type_low, type_high),
|
||||
higher_values_indicate = if_else(is.na(type_high), "source-coded left-right", type_high),
|
||||
reversed_for_reporting = if_else(is_reversed_for_reporting(type_high), "yes", "no")
|
||||
) %>%
|
||||
select(source_file, item, source, dimension, type_low, type_high, higher_values_indicate, reversed_for_reporting, observations, party_years, parties, countries, min_year, max_year) %>%
|
||||
arrange(source_file, source, dimension, item)
|
||||
|
||||
source_coverage <- bind_rows(
|
||||
text_data %>% transmute(source_file = "text_data.csv", source = project, item = var, party, country, year),
|
||||
expert %>% transmute(source_file = "expert.csv", source = project, item = var, party, country, year),
|
||||
lr_data %>% transmute(source_file = "lr_data.csv", source = project, item = var, party, country, year)
|
||||
) %>%
|
||||
group_by(source_file, source) %>%
|
||||
summarise(items = n_distinct(item), observations = n(), party_years = n_distinct(party, year), parties = n_distinct(party), countries = n_distinct(country), min_year = min(year), max_year = max(year), .groups = "drop") %>%
|
||||
arrange(source_file, source)
|
||||
|
||||
party_year_source_coverage <- bind_rows(
|
||||
text_data %>% distinct(party, country, year) %>% mutate(has_text = TRUE, has_expert = FALSE, has_general_lr = FALSE),
|
||||
expert %>% distinct(party, country, year) %>% mutate(has_text = FALSE, has_expert = TRUE, has_general_lr = FALSE),
|
||||
lr_data %>% distinct(party, country, year) %>% mutate(has_text = FALSE, has_expert = FALSE, has_general_lr = TRUE)
|
||||
) %>%
|
||||
group_by(party, country, year) %>%
|
||||
summarise(has_text = any(has_text), has_expert = any(has_expert), has_general_lr = any(has_general_lr), n_source_types = has_text + has_expert + has_general_lr, .groups = "drop") %>%
|
||||
arrange(year, country, party)
|
||||
|
||||
alliance_union_harmonization <- bind_rows(
|
||||
tibble(metric = "constituent_mappings", category = "all", value = nrow(union_mapping)),
|
||||
tibble(metric = "unique_union_or_alliance_ids", category = "all", value = n_distinct(union_mapping$manifesto_pf_id)),
|
||||
tibble(metric = "unique_constituent_party_ids", category = "all", value = n_distinct(union_mapping$expert_pf_id)),
|
||||
union_mapping %>% count(country, name = "value") %>% transmute(metric = "mappings_by_country", category = country, value),
|
||||
union_mapping %>% count(status, name = "value") %>% transmute(metric = "mappings_by_status", category = status, value)
|
||||
)
|
||||
|
||||
party_col <- if ("party_id" %in% names(positions)) "party_id" else "party"
|
||||
party_family_coverage <- positions %>%
|
||||
transmute(partyfacts_id = .data[[party_col]], country, year) %>%
|
||||
inner_join(party_families, by = "partyfacts_id") %>%
|
||||
group_by(family) %>%
|
||||
summarise(parties = n_distinct(partyfacts_id), party_years = n(), countries = n_distinct(country), min_year = min(year), max_year = max(year), .groups = "drop") %>%
|
||||
arrange(desc(party_years))
|
||||
|
||||
convergence_summary_file <- latest_file(file.path(outputs_dir, "diagnostics"), "^convergence_summary_.*\\.csv$")
|
||||
convergence_detail_file <- latest_file(file.path(outputs_dir, "diagnostics"), "^convergence_diagnostics_.*\\.csv$")
|
||||
if (is.na(convergence_summary_file) || is.na(convergence_detail_file)) {
|
||||
stop("Convergence diagnostics not found under ", outputs_dir, ". Run the model diagnostics before generating the report.")
|
||||
}
|
||||
model_convergence_summary <- read_if_exists(convergence_summary_file) %>%
|
||||
identity()
|
||||
model_convergence_by_dimension <- read_if_exists(convergence_detail_file) %>%
|
||||
group_by(dimension) %>%
|
||||
summarise(parameters = n(), mean_rhat = mean(rhat, na.rm = TRUE), max_rhat = max(rhat, na.rm = TRUE), min_ess_bulk = min(ess_bulk, na.rm = TRUE), mean_ess_bulk = mean(ess_bulk, na.rm = TRUE), .groups = "drop") %>%
|
||||
mutate(dimension = public_dimension(dimension)) %>%
|
||||
arrange(dimension)
|
||||
|
||||
convergent_summary_file <- latest_file(file.path(outputs_dir, "validation", "latest"), "^convergent_summary_.*\\.csv$")
|
||||
discriminant_summary_file <- latest_file(file.path(outputs_dir, "validation", "latest"), "^discriminant_summary_.*\\.csv$")
|
||||
uncertainty_summary_file <- latest_file(file.path(outputs_dir, "validation", "latest"), "^uncertainty_cic_summary_.*\\.csv$")
|
||||
external_validation_file <- latest_file(file.path(outputs_dir, "validation", "latest"), "^external_validation_.*\\.csv$")
|
||||
construct_families_file <- latest_file(file.path(outputs_dir, "validation", "latest"), "^construct_families_.*\\.csv$")
|
||||
construct_unstable_file <- latest_file(file.path(outputs_dir, "validation", "latest"), "^construct_unstable_.*\\.csv$")
|
||||
if (any(is.na(c(convergent_summary_file, discriminant_summary_file, uncertainty_summary_file, external_validation_file, construct_families_file, construct_unstable_file)))) {
|
||||
stop("Validation diagnostics not found under ", outputs_dir, ". Run validation before generating the report.")
|
||||
}
|
||||
|
||||
convergent_summary <- read_if_exists(convergent_summary_file) %>%
|
||||
mutate(diagnostic = "convergent validity", dimension = public_dimension(dimension))
|
||||
discriminant_summary <- read_if_exists(discriminant_summary_file) %>%
|
||||
mutate(diagnostic = "discriminant validity", model_dim = public_dimension(model_dim), expert_dim = public_dimension(expert_dim))
|
||||
uncertainty_summary <- read_if_exists(uncertainty_summary_file) %>%
|
||||
mutate(diagnostic = "posterior predictive coverage", dimension = public_dimension(dimension))
|
||||
|
||||
external_validation_correlations <- read_if_exists(external_validation_file) %>%
|
||||
group_by(var, dimension) %>%
|
||||
summarise(n = n(), pearson_r = cor(expert_val, model_val, use = "complete.obs"), mean_absolute_error = mean(abs_error, na.rm = TRUE), coverage_95 = mean(covered_95, na.rm = TRUE), .groups = "drop") %>%
|
||||
mutate(dimension = public_dimension(dimension)) %>%
|
||||
arrange(dimension, var)
|
||||
construct_family_positions <- read_if_exists(construct_families_file) %>%
|
||||
rename(mean_cultural = mean_galtan, sd_cultural = sd_galtan) %>%
|
||||
arrange(mean_economic)
|
||||
construct_temporal_stability <- read_if_exists(construct_unstable_file) %>%
|
||||
mutate(dimension = public_dimension(dimension)) %>%
|
||||
arrange(desc(annual_change))
|
||||
source_composition_balance <- read_if_exists(review_file("validation", "source_composition_balance.csv")) %>%
|
||||
mutate(dimension = public_dimension(dimension))
|
||||
robustness_sensitivity <- read_if_exists(review_file("validation", "table10_sensitivity.csv")) %>%
|
||||
mutate(
|
||||
dimension = public_dimension(dimension),
|
||||
across(everything(), ~ na_if(as.character(.x), "[INSERT VALUE]"))
|
||||
) %>%
|
||||
select(specification, ablated_source, dimension, matched_n, correlation_with_production,
|
||||
mean_abs_difference, median_abs_difference, p95_abs_difference,
|
||||
mean_interval_width_production, mean_interval_width_ablation)
|
||||
|
||||
posterior_uncertainty <- positions %>%
|
||||
summarise(
|
||||
rows = n(),
|
||||
parties = n_distinct(.data[[party_col]]),
|
||||
countries = n_distinct(country),
|
||||
min_year = min(year),
|
||||
max_year = max(year),
|
||||
mean_economic_se = mean(economic_lr_se, na.rm = TRUE),
|
||||
median_economic_se = median(economic_lr_se, na.rm = TRUE),
|
||||
mean_cultural_se = mean(galtan_se, na.rm = TRUE),
|
||||
median_cultural_se = median(galtan_se, na.rm = TRUE)
|
||||
)
|
||||
|
||||
write_csv(item_rows, file.path(generated_dir, "item_coverage.csv"))
|
||||
write_csv(source_coverage, file.path(generated_dir, "source_coverage.csv"))
|
||||
write_csv(party_year_source_coverage, file.path(generated_dir, "party_year_source_coverage.csv"))
|
||||
write_csv(item_rows, file.path(generated_dir, "item_coding_orientation.csv"))
|
||||
write_csv(filter(item_rows, reversed_for_reporting == "yes"), file.path(generated_dir, "reversed_items.csv"))
|
||||
write_csv(alliance_union_harmonization, file.path(generated_dir, "alliance_union_harmonization.csv"))
|
||||
write_csv(party_family_coverage, file.path(generated_dir, "party_family_coverage.csv"))
|
||||
write_csv(model_convergence_summary, file.path(generated_dir, "model_convergence_summary.csv"))
|
||||
write_csv(model_convergence_by_dimension, file.path(generated_dir, "model_convergence_by_dimension.csv"))
|
||||
write_csv(convergent_summary, file.path(generated_dir, "posterior_validation_convergent_summary.csv"))
|
||||
write_csv(discriminant_summary, file.path(generated_dir, "posterior_validation_discriminant_summary.csv"))
|
||||
write_csv(uncertainty_summary, file.path(generated_dir, "posterior_validation_uncertainty_summary.csv"))
|
||||
write_csv(external_validation_correlations, file.path(generated_dir, "external_validation_correlations.csv"))
|
||||
write_csv(construct_family_positions, file.path(generated_dir, "construct_family_positions.csv"))
|
||||
write_csv(construct_temporal_stability, file.path(generated_dir, "construct_temporal_stability_flags.csv"))
|
||||
write_csv(source_composition_balance, file.path(generated_dir, "source_composition_balance.csv"))
|
||||
write_csv(robustness_sensitivity, file.path(generated_dir, "robustness_sensitivity.csv"))
|
||||
write_csv(posterior_uncertainty, file.path(generated_dir, "posterior_uncertainty_summary.csv"))
|
||||
|
||||
item_counts <- item_rows %>% count(source_file, dimension, name = "items")
|
||||
source_counts <- source_coverage %>% select(source_file, source, items, observations, party_years, parties, countries, min_year, max_year)
|
||||
reversed_items <- filter(item_rows, reversed_for_reporting == "yes") %>% select(item, source, dimension, higher_values_indicate, observations, min_year, max_year)
|
||||
conv_display <- model_convergence_summary %>% select(-any_of("source_file"))
|
||||
conv_dim_display <- model_convergence_by_dimension %>% select(-any_of("source_file")) %>% mutate(across(where(is.numeric), ~ round(.x, 3)))
|
||||
val_display <- bind_rows(
|
||||
convergent_summary %>% transmute(diagnostic, dimension, n, pearson_r = round(r_pearson, 3), spearman_r = round(r_spearman, 3), mae = round(mae, 3), coverage = NA_real_),
|
||||
uncertainty_summary %>% transmute(diagnostic, dimension, n, pearson_r = NA_real_, spearman_r = NA_real_, mae = NA_real_, coverage = round(cic, 3))
|
||||
)
|
||||
|
||||
report_lines <- c(
|
||||
"# Diagnostics report",
|
||||
"",
|
||||
paste0("Generated: ", format(Sys.time(), "%Y-%m-%d %H:%M:%S %Z")),
|
||||
paste0("Release: ", release_version),
|
||||
paste0("Model positions source: `", display_path(model_positions_file), "`"),
|
||||
"",
|
||||
"## Purpose",
|
||||
"",
|
||||
"The purpose of this report is to provide the appendix-style diagnostics that document how the released party-position estimates are constructed, checked, and validated. The main article reports the central validation evidence; this report keeps the larger technical tables with the release so readers can inspect item coverage, source coverage, coding orientation, harmonization, convergence, posterior uncertainty, and validation details in one reproducible place.",
|
||||
"",
|
||||
"## Overview",
|
||||
"",
|
||||
"This report follows the structure of the technical appendix material: data and item coverage, coding and scale orientation, party-union harmonization, construct checks, model convergence, and validation. It is generated from the model-ready inputs and completed model outputs; it is not part of the raw-data setup workflow.",
|
||||
"",
|
||||
"## Data and item coverage",
|
||||
"",
|
||||
"The model combines text-coded item counts, dimension-specific expert placements, and general left-right expert placements. Text items enter as positive/sample counts, expert items enter as aggregated ratings with scale and expert-count information, and general left-right ratings anchor the relationship between the two dimensions.",
|
||||
"",
|
||||
md_table(item_counts),
|
||||
"",
|
||||
"### Source coverage",
|
||||
"",
|
||||
md_table(source_counts),
|
||||
"",
|
||||
"## Data coding and item orientation",
|
||||
"",
|
||||
"All indicators are oriented toward the two reported dimensions: economic left-right and cultural cosmopolitan--traditionalist. For interpretability, generated diagnostics report whether higher observed values point toward the public high pole or are reversed for reporting. Original source variable names are preserved in the tables.",
|
||||
"",
|
||||
"### Reversed items",
|
||||
"",
|
||||
md_table(reversed_items),
|
||||
"",
|
||||
"## Party unions and electoral coalitions",
|
||||
"",
|
||||
"Alliance and union labels are handled through constituent mappings so the released party identifiers represent individual parties. Shared text evidence can inform constituent parties through the union mapping while expert data continue to constrain individual parties directly.",
|
||||
"",
|
||||
md_table(alliance_union_harmonization %>% head(30)),
|
||||
"",
|
||||
"## Party-family coverage",
|
||||
"",
|
||||
"Party-family classifications are used for construct-validity diagnostics and coverage summaries. The table below reports coverage in the completed model output by family code.",
|
||||
"",
|
||||
md_table(party_family_coverage),
|
||||
"",
|
||||
"### Construct-validity family means",
|
||||
"",
|
||||
"Substantive party-family means provide a construct-validity check: families should follow the expected ordering on the economic left-right and cultural cosmopolitan--traditionalist dimensions.",
|
||||
"",
|
||||
md_table(construct_family_positions %>% select(family_name, n_parties, n_obs, mean_economic, sd_economic, mean_cultural, sd_cultural) %>% mutate(across(where(is.numeric), ~ round(.x, 3)))),
|
||||
"",
|
||||
"### Temporal-stability flags",
|
||||
"",
|
||||
"The model permits movement through random walks, but unusually large one-year changes are flagged for inspection rather than treated as automatic errors.",
|
||||
"",
|
||||
md_table(construct_temporal_stability %>% select(party_id, country, dimension, year_from, year_to, val_from, val_to, annual_change) %>% mutate(across(where(is.numeric), ~ round(.x, 3))), n = 20),
|
||||
"",
|
||||
"## Model convergence diagnostics",
|
||||
"",
|
||||
if (nrow(model_convergence_summary) > 0) "Convergence is assessed using split R-hat and effective sample size over monitored parameters." else "Convergence summary files were not found in the configured outputs directory.",
|
||||
"",
|
||||
md_table(conv_display),
|
||||
"",
|
||||
"### Convergence by parameter group",
|
||||
"",
|
||||
md_table(conv_dim_display),
|
||||
"",
|
||||
"## Posterior uncertainty",
|
||||
"",
|
||||
"The completed party-position output reports posterior standard errors and interval endpoints for both dimensions. These summaries describe the typical uncertainty in the release file used by the report.",
|
||||
"",
|
||||
md_table(posterior_uncertainty %>% mutate(across(where(is.numeric), ~ round(.x, 3)))),
|
||||
"",
|
||||
"## Validation diagnostics",
|
||||
"",
|
||||
"The validation diagnostics combine convergent and discriminant comparisons with expert surveys, posterior predictive coverage, construct checks, and out-of-sample validation when the corresponding outputs are available.",
|
||||
"",
|
||||
md_table(val_display),
|
||||
"",
|
||||
"### Discriminant validity",
|
||||
"",
|
||||
md_table(discriminant_summary %>% select(-any_of("source_file")) %>% mutate(across(where(is.numeric), ~ round(.x, 3)))),
|
||||
"",
|
||||
"### External validation correlations",
|
||||
"",
|
||||
md_table(external_validation_correlations %>% select(-any_of("source_file")) %>% mutate(across(where(is.numeric), ~ round(.x, 3)))),
|
||||
"",
|
||||
"## Evidence-composition balance",
|
||||
"",
|
||||
"Evidence-composition balance checks whether estimates informed by different nearby source combinations are systematically shifted relative to rows with both text and expert evidence. The reported differences are adjusted differences on the unit scale relative to the overlapping text-and-expert reference category.",
|
||||
"",
|
||||
md_table(source_composition_balance),
|
||||
"",
|
||||
"## Robustness and sensitivity checks",
|
||||
"",
|
||||
"Sensitivity checks compare the released election-year estimates with source-ablation, segmentation-threshold, and item-screening variants where available. Correlations near one and small absolute differences indicate that the released estimates are stable to the corresponding design choice.",
|
||||
"",
|
||||
md_table(robustness_sensitivity),
|
||||
"",
|
||||
"## Generated tables",
|
||||
"",
|
||||
paste0("- `", list.files(generated_dir, pattern = "\\.csv$"), "`"),
|
||||
""
|
||||
)
|
||||
|
||||
pdf_source <- file.path(generated_dir, "diagnostics_report.Rmd")
|
||||
pdf_file <- file.path(generated_dir, "diagnostics_report.pdf")
|
||||
release_pdf <- file.path(release_dir, paste0("party_2d_diagnostics_report_", release_version, ".pdf"))
|
||||
pdf_lines <- c(
|
||||
"---",
|
||||
"title: \"Diagnostics report\"",
|
||||
paste0("date: \"", format(Sys.time(), "%Y-%m-%d"), "\""),
|
||||
"output:",
|
||||
" pdf_document:",
|
||||
" toc: true",
|
||||
" number_sections: true",
|
||||
" latex_engine: pdflatex",
|
||||
"geometry: margin=0.75in",
|
||||
"fontsize: 10pt",
|
||||
"header-includes:",
|
||||
" - \\usepackage{booktabs}",
|
||||
" - \\usepackage{longtable}",
|
||||
" - \\usepackage{array}",
|
||||
" - \\usepackage{pdflscape}",
|
||||
" - \\setlength{\\tabcolsep}{4pt}",
|
||||
" - \\renewcommand{\\arraystretch}{1.12}",
|
||||
"---",
|
||||
"",
|
||||
"```{r setup, include=FALSE}",
|
||||
"knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)",
|
||||
"print_table <- function(x, n = Inf, size = 'footnotesize') {",
|
||||
" if (nrow(x) == 0) { cat('No rows available.\\n'); return(invisible(NULL)) }",
|
||||
" x <- head(x, n)",
|
||||
" x <- mutate(x, across(everything(), as.character))",
|
||||
" x[is.na(x)] <- ''",
|
||||
" names(x) <- gsub('_', ' ', names(x), fixed = TRUE)",
|
||||
" cat(paste0(\"\\n\\\\begingroup\\\\\", size, \"\\n\"))",
|
||||
" print(knitr::kable(x, format = 'latex', booktabs = TRUE, longtable = FALSE, digits = 3))",
|
||||
" cat(\"\\n\\\\endgroup\\n\")",
|
||||
"}",
|
||||
"short_dim <- function(x) dplyr::recode(as.character(x), 'cultural cosmopolitan--traditionalist' = 'cultural', 'economic left-right' = 'economic', .default = as.character(x))",
|
||||
"```",
|
||||
"",
|
||||
paste0("Generated: ", format(Sys.time(), "%Y-%m-%d %H:%M:%S %Z")),
|
||||
"",
|
||||
paste0("Release: ", release_version),
|
||||
"",
|
||||
paste0("Model positions source: `", display_path(model_positions_file), "`"),
|
||||
"",
|
||||
"# Purpose",
|
||||
"",
|
||||
"The purpose of this report is to provide the appendix-style diagnostics that document how the released party-position estimates are constructed, checked, and validated. The main article reports the central validation evidence; this report keeps the larger technical tables with the release so readers can inspect item coverage, source coverage, coding orientation, harmonization, convergence, posterior uncertainty, and validation details in one reproducible place.",
|
||||
"",
|
||||
"# Overview",
|
||||
"",
|
||||
"This report follows the structure of the technical appendix material: data and item coverage, coding and scale orientation, party-union harmonization, construct checks, model convergence, and validation. It is generated from the model-ready inputs and completed model outputs; it is not part of the raw-data setup workflow.",
|
||||
"",
|
||||
"# Data and item coverage",
|
||||
"",
|
||||
"The model combines text-coded item counts, dimension-specific expert placements, and general left-right expert placements. Text items enter as positive/sample counts, expert items enter as aggregated ratings with scale and expert-count information, and general left-right ratings anchor the relationship between the two dimensions.",
|
||||
"",
|
||||
"```{r item-counts, results='asis'}",
|
||||
"print_table(item_counts %>% mutate(dimension = short_dim(dimension)))",
|
||||
"```",
|
||||
"",
|
||||
"## Source coverage",
|
||||
"",
|
||||
"```{r source-coverage, results='asis'}",
|
||||
"print_table(source_counts %>% transmute(file = recode(source_file, text_data.csv = 'text', expert.csv = 'expert', lr_data.csv = 'general LR'), source, items, obs = observations, party_years, parties, countries, years = paste0(min_year, '--', max_year)), size = 'scriptsize')",
|
||||
"```",
|
||||
"",
|
||||
"Full item-level coverage and coding-orientation details are provided as generated CSV files listed at the end of this report.",
|
||||
"",
|
||||
"# Data coding and item orientation",
|
||||
"",
|
||||
"All indicators are oriented toward the two reported dimensions: economic left-right and cultural cosmopolitan--traditionalist. For interpretability, generated diagnostics report whether higher observed values point toward the public high pole or are reversed for reporting. Original source variable names are preserved in the tables.",
|
||||
"",
|
||||
"## Reversed items",
|
||||
"",
|
||||
"```{r reversed-items, results='asis'}",
|
||||
"print_table(reversed_items %>% count(source, dimension = short_dim(dimension), higher_values_indicate, name = 'items'))",
|
||||
"```",
|
||||
"",
|
||||
"# Party unions and electoral coalitions",
|
||||
"",
|
||||
"Alliance and union labels are handled through constituent mappings so the released party identifiers represent individual parties. Shared text evidence can inform constituent parties through the union mapping while expert data continue to constrain individual parties directly.",
|
||||
"",
|
||||
"```{r union-summary, results='asis'}",
|
||||
"print_table(alliance_union_harmonization %>% transmute(metric, category, value), n = 40)",
|
||||
"```",
|
||||
"",
|
||||
"# Party-family and construct coverage",
|
||||
"",
|
||||
"Party-family classifications are used for construct-validity diagnostics and coverage summaries. The table below reports coverage in the completed model output by family code.",
|
||||
"",
|
||||
"```{r family-coverage, results='asis'}",
|
||||
"print_table(party_family_coverage %>% transmute(family, parties, party_years, countries, years = paste0(min_year, '--', max_year)))",
|
||||
"```",
|
||||
"",
|
||||
"## Construct-validity family means",
|
||||
"",
|
||||
"Substantive party-family means provide a construct-validity check: families should follow the expected ordering on the economic left-right and cultural cosmopolitan--traditionalist dimensions.",
|
||||
"",
|
||||
"```{r construct-family, results='asis'}",
|
||||
"print_table(construct_family_positions %>% transmute(family = family_name, parties = n_parties, obs = n_obs, econ_mean = round(mean_economic, 3), econ_sd = round(sd_economic, 3), cult_mean = round(mean_cultural, 3), cult_sd = round(sd_cultural, 3)), size = 'scriptsize')",
|
||||
"```",
|
||||
"",
|
||||
"## Temporal-stability flags",
|
||||
"",
|
||||
"The model permits movement through random walks, but unusually large one-year changes are flagged for inspection rather than treated as automatic errors.",
|
||||
"",
|
||||
"```{r temporal-stability, results='asis'}",
|
||||
"print_table(construct_temporal_stability %>% transmute(party = party_id, country, dim = short_dim(dimension), from = year_from, to = year_to, start = round(val_from, 3), end = round(val_to, 3), annual_change = round(annual_change, 3)), n = 12, size = 'scriptsize')",
|
||||
"```",
|
||||
"",
|
||||
"# Model convergence diagnostics",
|
||||
"",
|
||||
"Convergence is assessed using split R-hat and effective sample size over monitored parameters.",
|
||||
"",
|
||||
"```{r convergence-summary, results='asis'}",
|
||||
"print_table(conv_display)",
|
||||
"```",
|
||||
"",
|
||||
"## Convergence by parameter group",
|
||||
"",
|
||||
"```{r convergence-dim, results='asis'}",
|
||||
"print_table(conv_dim_display %>% mutate(dimension = short_dim(dimension)))",
|
||||
"```",
|
||||
"",
|
||||
"# Posterior uncertainty",
|
||||
"",
|
||||
"The completed party-position output reports posterior standard errors and interval endpoints for both dimensions. These summaries describe the typical uncertainty in the release file used by the report.",
|
||||
"",
|
||||
"```{r posterior-uncertainty, results='asis'}",
|
||||
"print_table(posterior_uncertainty %>% transmute(rows, parties, countries, years = paste0(min_year, '--', max_year), mean_econ_se = round(mean_economic_se, 3), median_econ_se = round(median_economic_se, 3), mean_cult_se = round(mean_cultural_se, 3), median_cult_se = round(median_cultural_se, 3)), size = 'scriptsize')",
|
||||
"```",
|
||||
"",
|
||||
"# Validation diagnostics",
|
||||
"",
|
||||
"The validation diagnostics combine convergent and discriminant comparisons with expert surveys, posterior predictive coverage, construct checks, and out-of-sample validation when the corresponding outputs are available.",
|
||||
"",
|
||||
"```{r validation-summary, results='asis'}",
|
||||
"print_table(val_display %>% mutate(dimension = short_dim(dimension)), size = 'scriptsize')",
|
||||
"```",
|
||||
"",
|
||||
"## Discriminant validity",
|
||||
"",
|
||||
"```{r discriminant, results='asis'}",
|
||||
"print_table(discriminant_summary %>% transmute(type, model = short_dim(model_dim), expert = expert_dim, n, pearson = round(r_pearson, 3), spearman = round(r_spearman, 3)))",
|
||||
"```",
|
||||
"",
|
||||
"## External validation correlations",
|
||||
"",
|
||||
"```{r external-validation, results='asis'}",
|
||||
"print_table(external_validation_correlations %>% transmute(item = var, dim = short_dim(dimension), n, r = round(pearson_r, 3), mae = round(mean_absolute_error, 3), coverage = round(coverage_95, 3)))",
|
||||
"```",
|
||||
"",
|
||||
"# Evidence-composition balance",
|
||||
"",
|
||||
"Evidence-composition balance checks whether estimates informed by different nearby source combinations are systematically shifted relative to rows with both text and expert evidence. The reported differences are adjusted differences on the unit scale relative to the overlapping text-and-expert reference category.",
|
||||
"",
|
||||
"```{r source-balance, results='asis'}",
|
||||
"print_table(source_composition_balance %>% transmute(dim = short_dim(dimension), evidence = recode(source_composition_class, both_direct_or_nearby = 'both', text_only_direct_or_nearby = 'text only', expert_only_direct_or_nearby = 'expert only', temporal_propagation = 'temporal'), ref = recode(reference_class, both_direct_or_nearby = 'both'), n, adj_diff = round(adjusted_difference, 3)))",
|
||||
"```",
|
||||
"",
|
||||
"# Robustness and sensitivity checks",
|
||||
"",
|
||||
"Sensitivity checks compare the released election-year estimates with source-ablation, segmentation-threshold, and item-screening variants where available. Correlations near one and small absolute differences indicate that the released estimates are stable to the corresponding design choice.",
|
||||
"",
|
||||
"```{r robustness-sensitivity, results='asis'}",
|
||||
"print_table(robustness_sensitivity %>% transmute(spec = specification, source = ablated_source, dim = short_dim(dimension), n = matched_n, r = round(as.numeric(correlation_with_production), 3), mean_abs = round(as.numeric(mean_abs_difference), 3), median_abs = round(as.numeric(median_abs_difference), 3), p95_abs = round(as.numeric(p95_abs_difference), 3)), size = 'scriptsize')",
|
||||
"```",
|
||||
"",
|
||||
"# Generated tables",
|
||||
"",
|
||||
paste0("- `", list.files(generated_dir, pattern = "\\.csv$"), "`")
|
||||
)
|
||||
writeLines(pdf_lines, pdf_source)
|
||||
if (!requireNamespace("rmarkdown", quietly = TRUE)) {
|
||||
stop("The rmarkdown package is required to render the diagnostics PDF.")
|
||||
}
|
||||
rmarkdown::render(
|
||||
input = pdf_source,
|
||||
output_format = rmarkdown::pdf_document(toc = TRUE, number_sections = TRUE),
|
||||
output_file = basename(pdf_file),
|
||||
output_dir = generated_dir,
|
||||
quiet = TRUE,
|
||||
envir = environment()
|
||||
)
|
||||
invisible(file.copy(pdf_file, release_pdf, overwrite = TRUE))
|
||||
unlink(c(
|
||||
pdf_source,
|
||||
file.path(generated_dir, "diagnostics_report.log"),
|
||||
file.path(generated_dir, "diagnostics_report.aux"),
|
||||
file.path(generated_dir, "diagnostics_report.out"),
|
||||
file.path(generated_dir, "diagnostics_report.toc"),
|
||||
file.path(generated_dir, "diagnostics_report.tex")
|
||||
), force = TRUE)
|
||||
|
||||
generated_readme <- c(
|
||||
"# Generated diagnostics",
|
||||
"",
|
||||
"These files are generated by:",
|
||||
"",
|
||||
"```bash",
|
||||
"Rscript diagnostics/generate_diagnostics.R",
|
||||
"```",
|
||||
"",
|
||||
"The command requires completed model/post-estimation outputs. If those outputs are outside the repository root, set `PARTY2D_OUTPUTS_DIR` before running the script.",
|
||||
"",
|
||||
"The report file is `diagnostics_report.pdf`; the same PDF is copied into `data/releases/` for the release files."
|
||||
)
|
||||
writeLines(generated_readme, file.path(generated_dir, "README.md"))
|
||||
|
||||
sha_file <- file.path(release_dir, "SHA256SUMS")
|
||||
release_files_for_sha <- c(
|
||||
paste0("party_2d_election_year_panel_", release_version, ".csv.gz"),
|
||||
paste0("party_2d_annual_model_output_", release_version, ".csv.gz"),
|
||||
basename(release_pdf)
|
||||
)
|
||||
existing_release_files <- release_files_for_sha[file.exists(file.path(release_dir, release_files_for_sha))]
|
||||
sha_lines <- vapply(existing_release_files, function(f) {
|
||||
old <- getwd()
|
||||
on.exit(setwd(old), add = TRUE)
|
||||
setwd(release_dir)
|
||||
system2("sha256sum", f, stdout = TRUE)
|
||||
}, character(1))
|
||||
writeLines(sha_lines, sha_file)
|
||||
|
||||
message("Diagnostics written to diagnostics/generated")
|
||||
message("Release diagnostics PDF written to ", release_pdf)
|
||||
@@ -0,0 +1,11 @@
|
||||
# Generated diagnostics
|
||||
|
||||
These files are generated by:
|
||||
|
||||
```bash
|
||||
Rscript diagnostics/generate_diagnostics.R
|
||||
```
|
||||
|
||||
The command requires completed model/post-estimation outputs. If those outputs are outside the repository root, set `PARTY2D_OUTPUTS_DIR` before running the script.
|
||||
|
||||
The report file is `diagnostics_report.pdf`; the same PDF is copied into `data/releases/` for the release files.
|
||||
@@ -0,0 +1,39 @@
|
||||
metric,category,value
|
||||
constituent_mappings,all,106
|
||||
unique_union_or_alliance_ids,all,76
|
||||
unique_constituent_party_ids,all,100
|
||||
mappings_by_country,AR,5
|
||||
mappings_by_country,AU,2
|
||||
mappings_by_country,BA,1
|
||||
mappings_by_country,BE,4
|
||||
mappings_by_country,BG,5
|
||||
mappings_by_country,BR,6
|
||||
mappings_by_country,CH,1
|
||||
mappings_by_country,CL,8
|
||||
mappings_by_country,CZ,4
|
||||
mappings_by_country,DE,3
|
||||
mappings_by_country,EC,1
|
||||
mappings_by_country,EE,3
|
||||
mappings_by_country,ES,3
|
||||
mappings_by_country,FR,4
|
||||
mappings_by_country,GR,3
|
||||
mappings_by_country,HR,4
|
||||
mappings_by_country,IE,1
|
||||
mappings_by_country,IL,2
|
||||
mappings_by_country,IT,8
|
||||
mappings_by_country,LK,3
|
||||
mappings_by_country,LT,4
|
||||
mappings_by_country,LU,1
|
||||
mappings_by_country,LV,6
|
||||
mappings_by_country,MD,1
|
||||
mappings_by_country,ME,1
|
||||
mappings_by_country,MX,2
|
||||
mappings_by_country,NL,1
|
||||
mappings_by_country,NZ,1
|
||||
mappings_by_country,PE,1
|
||||
mappings_by_country,PL,3
|
||||
mappings_by_country,RO,6
|
||||
mappings_by_country,RS,3
|
||||
mappings_by_country,SK,4
|
||||
mappings_by_country,UY,1
|
||||
mappings_by_status,implemented,106
|
||||
|
@@ -0,0 +1,8 @@
|
||||
family,n_parties,n_obs,mean_economic,sd_economic,mean_cultural,sd_cultural,family_name
|
||||
com,49,1241,0.12001647469327872,0.0901861773223108,0.3834027613298184,0.18041637351915937,Communist/Far Left
|
||||
eco,30,723,0.26720980626115975,0.11467133878653364,0.2514849926574344,0.09223964864606182,Green/Ecological
|
||||
soc,86,2892,0.3305567447692131,0.1240506242334158,0.3777170994931328,0.13783788204153472,Social Democratic
|
||||
chr,41,1596,0.5961213268671609,0.11930537492981286,0.5293978691891922,0.13964161332639527,Christian Democratic
|
||||
right,50,975,0.6222552715406671,0.18991001824381296,0.720426765976975,0.15147355617267264,Radical Right
|
||||
con,82,2425,0.6519453485719768,0.17791542785462533,0.5375091531921928,0.14258881749137706,Conservative
|
||||
lib,81,2063,0.6569946895012412,0.15224833699588255,0.37069062594934565,0.13158056834168683,Liberal
|
||||
|
@@ -0,0 +1,60 @@
|
||||
party_id,country,dimension,year_from,year_to,val_from,val_to,change,annual_change
|
||||
556,LT,cultural cosmopolitan--traditionalist,2019,2020,0.77107951125,0.5289456789999999,0.24213383225000007,0.24213383225000007
|
||||
1663,IL,cultural cosmopolitan--traditionalist,2021,2022,0.1423029388125,0.35615504375,0.2138521049375,0.2138521049375
|
||||
455,IL,cultural cosmopolitan--traditionalist,1997,1998,0.456850958125,0.6432782493750001,0.18642729125000007,0.18642729125000007
|
||||
455,IL,cultural cosmopolitan--traditionalist,1996,1997,0.27663313025,0.456850958125,0.180217827875,0.180217827875
|
||||
8393,LV,cultural cosmopolitan--traditionalist,2018,2019,0.4386382122500001,0.2627366591625,0.17590155308750005,0.17590155308750005
|
||||
281,BE,cultural cosmopolitan--traditionalist,1977,1978,0.6706878695,0.843416257375,0.172728387875,0.172728387875
|
||||
556,LT,cultural cosmopolitan--traditionalist,2001,2002,0.318926108375,0.49125159325,0.172325484875,0.172325484875
|
||||
964,IS,economic left-right,2016,2017,0.691268056,0.520838928125,0.17042912787499995,0.17042912787499995
|
||||
298,NL,cultural cosmopolitan--traditionalist,2018,2019,0.760919900625,0.592874692125,0.16804520850000004,0.16804520850000004
|
||||
901,FI,economic left-right,1992,1993,0.486145510375,0.64721287575,0.161067365375,0.161067365375
|
||||
467,SI,cultural cosmopolitan--traditionalist,2018,2019,0.563748886625,0.4041139849999999,0.15963490162500005,0.15963490162500005
|
||||
1221,IT,economic left-right,2007,2008,0.559621162375,0.400493563,0.15912759937500004,0.15912759937500004
|
||||
901,FI,economic left-right,1991,1992,0.327277968125,0.486145510375,0.15886754225,0.15886754225
|
||||
455,IL,cultural cosmopolitan--traditionalist,1998,1999,0.6432782493750001,0.7970417803750001,0.15376353099999995,0.15376353099999995
|
||||
1221,IT,economic left-right,2006,2007,0.7086087693750001,0.559621162375,0.14898760700000002,0.14898760700000002
|
||||
2211,UA,economic left-right,2006,2007,0.416653024,0.5619799204999999,0.1453268964999999,0.1453268964999999
|
||||
631,CH,economic left-right,2018,2019,0.613235049875,0.7569515025,0.143716452625,0.143716452625
|
||||
298,NL,cultural cosmopolitan--traditionalist,2019,2020,0.592874692125,0.734536642,0.14166194987500005,0.14166194987500005
|
||||
556,LT,cultural cosmopolitan--traditionalist,2000,2001,0.180505337875,0.318926108375,0.1384207705,0.1384207705
|
||||
1417,IL,cultural cosmopolitan--traditionalist,1968,1969,0.49841048887499995,0.635275993875,0.13686550500000003,0.13686550500000003
|
||||
81,ES,cultural cosmopolitan--traditionalist,1999,2000,0.44213168437499994,0.30819645050000005,0.1339352338749999,0.1339352338749999
|
||||
1417,IL,cultural cosmopolitan--traditionalist,1967,1968,0.364764852,0.49841048887499995,0.13364563687499997,0.13364563687499997
|
||||
901,FI,economic left-right,1993,1994,0.64721287575,0.78024709825,0.13303422250000008,0.13303422250000008
|
||||
409,SE,economic left-right,2018,2019,0.4993397851250001,0.6246204093750001,0.12528062425000003,0.12528062425000003
|
||||
48,GR,cultural cosmopolitan--traditionalist,1999,2000,0.471858772375,0.594323158,0.122464385625,0.122464385625
|
||||
212,DK,cultural cosmopolitan--traditionalist,2014,2015,0.339423171125,0.459806116125,0.12038294500000002,0.12038294500000002
|
||||
2415,IT,cultural cosmopolitan--traditionalist,2006,2007,0.6143681051250001,0.49546903375,0.11889907137500004,0.11889907137500004
|
||||
1369,IT,cultural cosmopolitan--traditionalist,2013,2014,0.7406959332499999,0.6231419237500002,0.11755400949999972,0.11755400949999972
|
||||
5852,IS,cultural cosmopolitan--traditionalist,2018,2019,0.336059923125,0.45280653625,0.116746613125,0.116746613125
|
||||
1417,IL,cultural cosmopolitan--traditionalist,1966,1967,0.2487840847,0.364764852,0.11598076729999995,0.11598076729999995
|
||||
828,NL,cultural cosmopolitan--traditionalist,2019,2020,0.399398152875,0.5144400794999999,0.11504192662499996,0.11504192662499996
|
||||
2415,IT,cultural cosmopolitan--traditionalist,2007,2008,0.49546903375,0.3804985986625,0.1149704350875,0.1149704350875
|
||||
828,NL,cultural cosmopolitan--traditionalist,2020,2021,0.5144400794999999,0.6280684987500001,0.11362841925000022,0.11362841925000022
|
||||
573,DE,cultural cosmopolitan--traditionalist,2024,2025,0.34241723825000003,0.4558404575,0.11342321924999998,0.11342321924999998
|
||||
1424,BE,economic left-right,1977,1978,0.7125746831249999,0.825810219125,0.11323553600000004,0.11323553600000004
|
||||
1173,NO,cultural cosmopolitan--traditionalist,2018,2019,0.353365422125,0.46349993075,0.11013450862499996,0.11013450862499996
|
||||
1651,GR,economic left-right,2013,2014,0.441388039625,0.551427035875,0.11003899624999997,0.11003899624999997
|
||||
1660,GR,cultural cosmopolitan--traditionalist,2012,2013,0.70537148075,0.8146704603749999,0.1092989796249999,0.1092989796249999
|
||||
433,FR,economic left-right,2018,2019,0.433590134625,0.542142367875,0.10855223325000002,0.10855223325000002
|
||||
1002,GB,cultural cosmopolitan--traditionalist,2014,2015,0.3184758865,0.2101810030625,0.10829488343750002,0.10829488343750002
|
||||
623,AR,economic left-right,1989,1990,0.4145806991249999,0.5228341057499999,0.10825340662499994,0.10825340662499994
|
||||
1305,RO,economic left-right,2000,2001,0.553705481625,0.446037918375,0.10766756325,0.10766756325
|
||||
298,NL,cultural cosmopolitan--traditionalist,2020,2021,0.734536642,0.84215486075,0.10761821875,0.10761821875
|
||||
1359,PT,economic left-right,2004,2005,0.495169041875,0.602184326875,0.10701528500000002,0.10701528500000002
|
||||
1651,GR,economic left-right,2012,2013,0.3355888995,0.441388039625,0.10579914012500002,0.10579914012500002
|
||||
623,AR,economic left-right,1990,1991,0.5228341057499999,0.62815575375,0.1053216480000001,0.1053216480000001
|
||||
1305,RO,economic left-right,2001,2002,0.446037918375,0.3412955855,0.104742332875,0.104742332875
|
||||
455,IL,cultural cosmopolitan--traditionalist,1991,1992,0.5368312063749999,0.432172542875,0.10465866349999992,0.10465866349999992
|
||||
2415,IT,cultural cosmopolitan--traditionalist,2008,2009,0.3804985986625,0.2762634036875,0.104235194975,0.104235194975
|
||||
599,AT,economic left-right,2008,2009,0.4633838822500001,0.567595171125,0.10421128887499996,0.10421128887499996
|
||||
669,CH,cultural cosmopolitan--traditionalist,2016,2017,0.514819538625,0.410640874875,0.10417866374999996,0.10417866374999996
|
||||
5852,IS,cultural cosmopolitan--traditionalist,2017,2018,0.23270289265,0.336059923125,0.10335703047499996,0.10335703047499996
|
||||
669,CH,cultural cosmopolitan--traditionalist,2015,2016,0.617986882875,0.514819538625,0.10316734425000008,0.10316734425000008
|
||||
48,GR,cultural cosmopolitan--traditionalist,2010,2011,0.569647428,0.6723034049999999,0.10265597699999984,0.10265597699999984
|
||||
1221,IT,economic left-right,2008,2009,0.400493563,0.50303734575,0.10254378275000003,0.10254378275000003
|
||||
1651,GR,economic left-right,2014,2015,0.551427035875,0.6535508147500001,0.10212377887500013,0.10212377887500013
|
||||
1221,IT,economic left-right,2009,2010,0.50303734575,0.604409204875,0.10137185912500002,0.10137185912500002
|
||||
975,SI,economic left-right,1990,1991,0.579305296625,0.6803467895000002,0.1010414928750002,0.1010414928750002
|
||||
338,AU,economic left-right,1992,1993,0.791994626125,0.6916490538750002,0.10034557224999983,0.10034557224999983
|
||||
|
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
var,dimension,n,pearson_r,mean_absolute_error,coverage_95
|
||||
culsup_vparty,cultural cosmopolitan--traditionalist,536,0.8121247297636631,0.12821713597308768,0.3843283582089552
|
||||
galtan_ches,cultural cosmopolitan--traditionalist,222,0.9588005926603757,0.07875607868037135,0.5225225225225225
|
||||
gender_vparty,cultural cosmopolitan--traditionalist,545,0.5626122704047269,0.16947520363543578,0.28990825688073396
|
||||
immig_vparty,cultural cosmopolitan--traditionalist,537,0.7429394940511392,0.10311559715251396,0.4897579143389199
|
||||
lgbt_vparty,cultural cosmopolitan--traditionalist,541,0.7941178030023652,0.09410224229993068,0.5508317929759704
|
||||
relig_vparty,cultural cosmopolitan--traditionalist,548,0.6757229503671286,0.30309927660661495,0.04744525547445255
|
||||
lrecon_ches,economic left-right,223,0.9739626905522167,0.05518814853885153,0.8116591928251121
|
||||
lrecon_poppa,economic left-right,74,0.9799670973969279,0.0660246477855859,0.6621621621621622
|
||||
lrecon_vparty,economic left-right,534,0.8664105550524236,0.08828332773956499,0.6741573033707865
|
||||
welf_vparty,economic left-right,534,0.6821895613302613,0.17587920065205523,0.36329588014981273
|
||||
|
@@ -0,0 +1,33 @@
|
||||
source_file,item,source,dimension,type_low,type_high,higher_values_indicate,reversed_for_reporting,observations,party_years,parties,countries,min_year,max_year
|
||||
expert.csv,galtan_ches,CHES,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,1319,1319,389,44,1999,2024
|
||||
expert.csv,lrecon_ches,CHES,economic left-right,pro_welfare,pro_market,pro_market,no,1320,1320,390,44,1999,2024
|
||||
expert.csv,libcon_gps,GPS,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,269,269,269,61,2019,2019
|
||||
expert.csv,lrecon_gps,GPS,economic left-right,pro_welfare,pro_market,pro_market,no,269,269,269,62,2019,2019
|
||||
expert.csv,lrecon_poppa,POPPA,economic left-right,pro_welfare,pro_market,pro_market,no,413,413,225,31,2018,2023
|
||||
expert.csv,culsup_vparty,V-Party,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,3076,3076,589,65,1970,2019
|
||||
expert.csv,gender_vparty,V-Party,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,3043,3043,586,65,1970,2019
|
||||
expert.csv,immig_vparty,V-Party,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,3076,3076,589,65,1970,2019
|
||||
expert.csv,lgbt_vparty,V-Party,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,3076,3076,589,65,1970,2019
|
||||
expert.csv,relig_vparty,V-Party,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,3076,3076,589,65,1970,2019
|
||||
expert.csv,lrecon_vparty,V-Party,economic left-right,pro_welfare,pro_market,pro_market,no,3075,3075,588,65,1970,2019
|
||||
expert.csv,welf_vparty,V-Party,economic left-right,pro_welfare,pro_market,pro_market,no,3066,3066,585,65,1970,2019
|
||||
lr_data.csv,lr_ches,CHES,general left-right,NA,NA,source-coded left-right,no,1320,1320,390,44,1999,2024
|
||||
lr_data.csv,lr_morgan,Morgan,general left-right,NA,NA,source-coded left-right,no,471,471,72,11,1945,1973
|
||||
lr_data.csv,lr_poppa,POPPA,general left-right,NA,NA,source-coded left-right,no,416,416,225,31,2018,2023
|
||||
text_data.csv,conservative_morality_manifesto,Manifesto Project,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,4501,4501,713,65,1920,2025
|
||||
text_data.csv,internationalism_manifesto,Manifesto Project,cultural cosmopolitan--traditionalist,traditional,cosmopolitan,cosmopolitan,yes,4501,4501,713,65,1920,2025
|
||||
text_data.csv,multiculturalism_manifesto,Manifesto Project,cultural cosmopolitan--traditionalist,traditional,cosmopolitan,cosmopolitan,yes,4501,4501,713,65,1920,2025
|
||||
text_data.csv,national_identity_manifesto,Manifesto Project,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,4501,4501,713,65,1920,2025
|
||||
text_data.csv,economic_intervention_manifesto,Manifesto Project,economic left-right,pro_market,pro_welfare,pro_welfare,yes,4501,4501,713,65,1920,2025
|
||||
text_data.csv,economic_liberalization_manifesto,Manifesto Project,economic left-right,pro_welfare,pro_market,pro_market,no,4501,4501,713,65,1920,2025
|
||||
text_data.csv,market_regulation_manifesto,Manifesto Project,economic left-right,pro_welfare,pro_market,pro_market,no,4501,4501,713,65,1920,2025
|
||||
text_data.csv,social_services_manifesto,Manifesto Project,economic left-right,pro_market,pro_welfare,pro_welfare,yes,4501,4501,713,65,1920,2025
|
||||
text_data.csv,cultlib_poldem,PolDem,cultural cosmopolitan--traditionalist,traditional,cosmopolitan,cosmopolitan,yes,299,299,78,15,1972,2017
|
||||
text_data.csv,defense_poldem,PolDem,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,243,243,67,15,1972,2017
|
||||
text_data.csv,euro_poldem,PolDem,cultural cosmopolitan--traditionalist,traditional,cosmopolitan,cosmopolitan,yes,93,93,44,13,1978,2017
|
||||
text_data.csv,europe_poldem,PolDem,cultural cosmopolitan--traditionalist,traditional,cosmopolitan,cosmopolitan,yes,217,217,66,15,1972,2017
|
||||
text_data.csv,immig_poldem,PolDem,cultural cosmopolitan--traditionalist,traditional,cosmopolitan,cosmopolitan,yes,236,236,67,14,1972,2017
|
||||
text_data.csv,nationalism_poldem,PolDem,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,131,131,60,15,1974,2017
|
||||
text_data.csv,security_poldem,PolDem,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,265,265,78,15,1972,2017
|
||||
text_data.csv,ecolib_poldem,PolDem,economic left-right,pro_welfare,pro_market,pro_market,no,361,361,85,15,1972,2017
|
||||
text_data.csv,welfare_poldem,PolDem,economic left-right,pro_market,pro_welfare,pro_welfare,yes,349,349,83,15,1972,2017
|
||||
|
@@ -0,0 +1,33 @@
|
||||
source_file,item,source,dimension,type_low,type_high,higher_values_indicate,reversed_for_reporting,observations,party_years,parties,countries,min_year,max_year
|
||||
expert.csv,galtan_ches,CHES,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,1319,1319,389,44,1999,2024
|
||||
expert.csv,lrecon_ches,CHES,economic left-right,pro_welfare,pro_market,pro_market,no,1320,1320,390,44,1999,2024
|
||||
expert.csv,libcon_gps,GPS,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,269,269,269,61,2019,2019
|
||||
expert.csv,lrecon_gps,GPS,economic left-right,pro_welfare,pro_market,pro_market,no,269,269,269,62,2019,2019
|
||||
expert.csv,lrecon_poppa,POPPA,economic left-right,pro_welfare,pro_market,pro_market,no,413,413,225,31,2018,2023
|
||||
expert.csv,culsup_vparty,V-Party,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,3076,3076,589,65,1970,2019
|
||||
expert.csv,gender_vparty,V-Party,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,3043,3043,586,65,1970,2019
|
||||
expert.csv,immig_vparty,V-Party,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,3076,3076,589,65,1970,2019
|
||||
expert.csv,lgbt_vparty,V-Party,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,3076,3076,589,65,1970,2019
|
||||
expert.csv,relig_vparty,V-Party,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,3076,3076,589,65,1970,2019
|
||||
expert.csv,lrecon_vparty,V-Party,economic left-right,pro_welfare,pro_market,pro_market,no,3075,3075,588,65,1970,2019
|
||||
expert.csv,welf_vparty,V-Party,economic left-right,pro_welfare,pro_market,pro_market,no,3066,3066,585,65,1970,2019
|
||||
lr_data.csv,lr_ches,CHES,general left-right,NA,NA,source-coded left-right,no,1320,1320,390,44,1999,2024
|
||||
lr_data.csv,lr_morgan,Morgan,general left-right,NA,NA,source-coded left-right,no,471,471,72,11,1945,1973
|
||||
lr_data.csv,lr_poppa,POPPA,general left-right,NA,NA,source-coded left-right,no,416,416,225,31,2018,2023
|
||||
text_data.csv,conservative_morality_manifesto,Manifesto Project,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,4501,4501,713,65,1920,2025
|
||||
text_data.csv,internationalism_manifesto,Manifesto Project,cultural cosmopolitan--traditionalist,traditional,cosmopolitan,cosmopolitan,yes,4501,4501,713,65,1920,2025
|
||||
text_data.csv,multiculturalism_manifesto,Manifesto Project,cultural cosmopolitan--traditionalist,traditional,cosmopolitan,cosmopolitan,yes,4501,4501,713,65,1920,2025
|
||||
text_data.csv,national_identity_manifesto,Manifesto Project,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,4501,4501,713,65,1920,2025
|
||||
text_data.csv,economic_intervention_manifesto,Manifesto Project,economic left-right,pro_market,pro_welfare,pro_welfare,yes,4501,4501,713,65,1920,2025
|
||||
text_data.csv,economic_liberalization_manifesto,Manifesto Project,economic left-right,pro_welfare,pro_market,pro_market,no,4501,4501,713,65,1920,2025
|
||||
text_data.csv,market_regulation_manifesto,Manifesto Project,economic left-right,pro_welfare,pro_market,pro_market,no,4501,4501,713,65,1920,2025
|
||||
text_data.csv,social_services_manifesto,Manifesto Project,economic left-right,pro_market,pro_welfare,pro_welfare,yes,4501,4501,713,65,1920,2025
|
||||
text_data.csv,cultlib_poldem,PolDem,cultural cosmopolitan--traditionalist,traditional,cosmopolitan,cosmopolitan,yes,299,299,78,15,1972,2017
|
||||
text_data.csv,defense_poldem,PolDem,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,243,243,67,15,1972,2017
|
||||
text_data.csv,euro_poldem,PolDem,cultural cosmopolitan--traditionalist,traditional,cosmopolitan,cosmopolitan,yes,93,93,44,13,1978,2017
|
||||
text_data.csv,europe_poldem,PolDem,cultural cosmopolitan--traditionalist,traditional,cosmopolitan,cosmopolitan,yes,217,217,66,15,1972,2017
|
||||
text_data.csv,immig_poldem,PolDem,cultural cosmopolitan--traditionalist,traditional,cosmopolitan,cosmopolitan,yes,236,236,67,14,1972,2017
|
||||
text_data.csv,nationalism_poldem,PolDem,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,131,131,60,15,1974,2017
|
||||
text_data.csv,security_poldem,PolDem,cultural cosmopolitan--traditionalist,cosmopolitan,traditional,traditional,no,265,265,78,15,1972,2017
|
||||
text_data.csv,ecolib_poldem,PolDem,economic left-right,pro_welfare,pro_market,pro_market,no,361,361,85,15,1972,2017
|
||||
text_data.csv,welfare_poldem,PolDem,economic left-right,pro_market,pro_welfare,pro_welfare,yes,349,349,83,15,1972,2017
|
||||
|
@@ -0,0 +1,9 @@
|
||||
dimension,parameters,mean_rhat,max_rhat,min_ess_bulk,mean_ess_bulk
|
||||
cultural cosmopolitan--traditionalist,17585,1.0006424726753271,1.0063876592524996,810.5088684922246,6889.24553993031
|
||||
economic left-right,17585,1.0003816350246089,1.0041031832256586,670.7084347577414,5573.455663381927
|
||||
lr_country_offset,65,1.0007983450724103,1.0042741902159762,1078.1975001602086,5434.867801353405
|
||||
lr_decade_offset,8,1.0003240812347383,1.0011721739400503,2069.6763143867825,3372.015629437053
|
||||
lr_sigma,3,1.0010806271267045,1.001817706171186,1956.6110527635497,2582.401306906664
|
||||
lr_source_offset,3,1.0001329930739762,1.0002839044194227,3477.5194916377077,3814.373810300655
|
||||
lr_weight,3,1.0023083674707072,1.0023587853631075,1540.8061256188755,1560.2173784478186
|
||||
mean_sigma,6,1.00453801817315,1.0092946499280384,534.8105812273362,918.5017536375844
|
||||
|
@@ -0,0 +1,7 @@
|
||||
metric,count,percentage
|
||||
R-hat < 1.01,35258,100
|
||||
R-hat 1.01-1.05,0,0
|
||||
R-hat > 1.05,0,0
|
||||
ESS > 1000,34853,98.85
|
||||
ESS 400-1000,405,1.15
|
||||
ESS < 400,0,0
|
||||
|
@@ -0,0 +1,11 @@
|
||||
family,parties,party_years,countries,min_year,max_year
|
||||
soc,86,2892,37,1944,2025
|
||||
con,82,2425,34,1944,2024
|
||||
lib,81,2063,35,1944,2025
|
||||
chr,41,1596,24,1945,2025
|
||||
com,49,1241,27,1944,2025
|
||||
right,50,975,26,1946,2025
|
||||
eco,30,723,24,1960,2024
|
||||
agr,12,592,10,1944,2024
|
||||
spec,25,520,14,1949,2024
|
||||
other,2,40,2,1992,2024
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
||||
rows,parties,countries,min_year,max_year,mean_economic_se,median_economic_se,mean_cultural_se,median_cultural_se
|
||||
17585,708,65,1944,2025,0.06480914153714339,0.06297344495207625,0.05830289918910167,0.05511815999995913
|
||||
|
@@ -0,0 +1,3 @@
|
||||
dimension,r_pearson,r_spearman,ci_lower,ci_upper,mae,rmse,n,diagnostic
|
||||
economic left-right,0.9040661964265828,0.9011355686083358,0.8986678208050985,0.9091907336941026,0.07569891833571618,0.09876331318961644,4637,convergent validity
|
||||
cultural cosmopolitan--traditionalist,0.9598645558100498,0.96729961069876,0.9555654780202564,0.96375540322017,0.07890038540202159,0.0987420458613568,1425,convergent validity
|
||||
|
@@ -0,0 +1,5 @@
|
||||
model_dim,expert_dim,r_pearson,r_spearman,n,type,diagnostic
|
||||
economic left-right,economic,0.9040661964265828,0.9011355686083358,4637,convergent,discriminant validity
|
||||
cultural cosmopolitan--traditionalist,economic,0.42228411618900114,0.4352014815908644,4637,discriminant,discriminant validity
|
||||
cultural cosmopolitan--traditionalist,cultural cosmopolitan--traditionalist,0.9598645558100498,0.96729961069876,1425,convergent,discriminant validity
|
||||
economic left-right,cultural cosmopolitan--traditionalist,0.39267427502305646,0.3979530504947876,1425,discriminant,discriminant validity
|
||||
|
@@ -0,0 +1,3 @@
|
||||
dimension,cic,cic_pct,ci_lower,ci_upper,n,covered,diagnostic
|
||||
economic left-right,0.8987256874580818,89.9,0.8916705123992721,0.9053701433508112,7455,6700,posterior predictive coverage
|
||||
cultural cosmopolitan--traditionalist,0.8477379496750113,84.8,0.8420030513784423,0.8533009527490912,15539,13173,posterior predictive coverage
|
||||
|
@@ -0,0 +1,10 @@
|
||||
source_file,item,source,dimension,type_low,type_high,higher_values_indicate,reversed_for_reporting,observations,party_years,parties,countries,min_year,max_year
|
||||
text_data.csv,internationalism_manifesto,Manifesto Project,cultural cosmopolitan--traditionalist,traditional,cosmopolitan,cosmopolitan,yes,4501,4501,713,65,1920,2025
|
||||
text_data.csv,multiculturalism_manifesto,Manifesto Project,cultural cosmopolitan--traditionalist,traditional,cosmopolitan,cosmopolitan,yes,4501,4501,713,65,1920,2025
|
||||
text_data.csv,economic_intervention_manifesto,Manifesto Project,economic left-right,pro_market,pro_welfare,pro_welfare,yes,4501,4501,713,65,1920,2025
|
||||
text_data.csv,social_services_manifesto,Manifesto Project,economic left-right,pro_market,pro_welfare,pro_welfare,yes,4501,4501,713,65,1920,2025
|
||||
text_data.csv,cultlib_poldem,PolDem,cultural cosmopolitan--traditionalist,traditional,cosmopolitan,cosmopolitan,yes,299,299,78,15,1972,2017
|
||||
text_data.csv,euro_poldem,PolDem,cultural cosmopolitan--traditionalist,traditional,cosmopolitan,cosmopolitan,yes,93,93,44,13,1978,2017
|
||||
text_data.csv,europe_poldem,PolDem,cultural cosmopolitan--traditionalist,traditional,cosmopolitan,cosmopolitan,yes,217,217,66,15,1972,2017
|
||||
text_data.csv,immig_poldem,PolDem,cultural cosmopolitan--traditionalist,traditional,cosmopolitan,cosmopolitan,yes,236,236,67,14,1972,2017
|
||||
text_data.csv,welfare_poldem,PolDem,economic left-right,pro_market,pro_welfare,pro_welfare,yes,349,349,83,15,1972,2017
|
||||
|
@@ -0,0 +1,7 @@
|
||||
specification,ablated_source,dimension,matched_n,correlation_with_production,mean_abs_difference,median_abs_difference,p95_abs_difference,mean_interval_width_production,mean_interval_width_ablation
|
||||
Source ablation,V Party,economic left-right,4248,0.954,0.05,0.033,0.159,NA,NA
|
||||
Source ablation,V Party,cultural cosmopolitan--traditionalist,4248,0.898,0.08,0.062,0.228,0.202,0.323
|
||||
Gap threshold 5 years,NA,economic left-right,4244,0.999,0.003,0.002,0.007,NA,NA
|
||||
Gap threshold 5 years,NA,cultural cosmopolitan--traditionalist,4244,0.999,0.002,0.001,0.006,NA,NA
|
||||
Gap threshold 10 years,NA,economic left-right,4265,0.999,0.006,0.006,0.011,NA,NA
|
||||
Gap threshold 10 years,NA,cultural cosmopolitan--traditionalist,4265,1,0.003,0.002,0.006,NA,NA
|
||||
|
@@ -0,0 +1,7 @@
|
||||
dimension,source_composition_class,reference_class,n,adjusted_difference
|
||||
economic left-right,text_only_direct_or_nearby,both_direct_or_nearby,4916,0.014
|
||||
economic left-right,expert_only_direct_or_nearby,both_direct_or_nearby,4916,-0.015
|
||||
economic left-right,temporal_propagation,both_direct_or_nearby,4916,-0.046
|
||||
cultural cosmopolitan--traditionalist,text_only_direct_or_nearby,both_direct_or_nearby,4916,0.017
|
||||
cultural cosmopolitan--traditionalist,expert_only_direct_or_nearby,both_direct_or_nearby,4916,0.038
|
||||
cultural cosmopolitan--traditionalist,temporal_propagation,both_direct_or_nearby,4916,-0.042
|
||||
|
@@ -0,0 +1,10 @@
|
||||
source_file,source,items,observations,party_years,parties,countries,min_year,max_year
|
||||
expert.csv,CHES,2,2639,1320,390,44,1999,2024
|
||||
expert.csv,GPS,2,538,271,271,62,2019,2019
|
||||
expert.csv,POPPA,1,413,413,225,31,2018,2023
|
||||
expert.csv,V-Party,7,21488,3076,589,65,1970,2019
|
||||
lr_data.csv,CHES,1,1320,1320,390,44,1999,2024
|
||||
lr_data.csv,Morgan,1,471,471,72,11,1945,1973
|
||||
lr_data.csv,POPPA,1,416,416,225,31,2018,2023
|
||||
text_data.csv,Manifesto Project,8,36008,4501,713,65,1920,2025
|
||||
text_data.csv,PolDem,9,2194,406,93,15,1972,2017
|
||||
|
@@ -1,240 +0,0 @@
|
||||
# Data Coding Principles for 4D Latent Trait Model
|
||||
|
||||
## V4 Implementation (Current Version)
|
||||
|
||||
**As of V4 (2025-11-18), manifesto items implement the bipolar bridge structure described in this document.**
|
||||
|
||||
**Key Changes from V3.x**:
|
||||
- ✅ Manifesto items now load on TWO dimensions (bipolar bridges)
|
||||
- ✅ Data format: `type_high` and `type_low` columns replace single `type`
|
||||
- ✅ Stan model: Unified `Gamma_man` matrix replaces per-dimension arrays
|
||||
- ✅ Measurement consistency: Manifesto items match expert data structure
|
||||
|
||||
**Why V4?**
|
||||
- Better identification (each observation informs two dimensions)
|
||||
- Estimated correlations (not imposed by construction)
|
||||
- No double-counting (each quasi-sentence counted once)
|
||||
|
||||
See CHANGELOG.md for full V4 migration details.
|
||||
|
||||
---
|
||||
|
||||
## Model Structure Overview
|
||||
|
||||
The model estimates **four unipolar latent dimensions**:
|
||||
- **pro_market**: Support for market liberalization
|
||||
- **pro_welfare**: Support for welfare state expansion
|
||||
- **cosmopolitan**: Support for internationalism, diversity, openness
|
||||
- **traditional**: Support for nationalism, security, traditional values
|
||||
|
||||
These are **separate dimensions**, not two bipolar scales. Correlations between dimensions (e.g., cosmopolitan-traditional) are **estimated empirically**, not imposed by construction.
|
||||
|
||||
---
|
||||
|
||||
## Item Types and Loading Structure
|
||||
|
||||
### 1. Bipolar Bridge Items
|
||||
|
||||
**Definition**: Items where the sample includes mentions of BOTH sides of an issue, and "positive" counts mentions favoring one pole.
|
||||
|
||||
**Structure**:
|
||||
- `sample` = mentions of issue (any direction)
|
||||
- `positive` = mentions favoring one pole
|
||||
- `positive/sample` ratio varies from 0 to 1
|
||||
|
||||
**Loading**: Should load on **ONE dimension only**
|
||||
|
||||
**Examples**:
|
||||
|
||||
**Manifesto Data**:
|
||||
```
|
||||
var: "Multiculturalism"
|
||||
type: "cosmopolitan"
|
||||
sample: per607 (pro-multiculturalism) + per608 (anti-multiculturalism)
|
||||
positive: per607 (pro-multiculturalism)
|
||||
```
|
||||
- High ratio → high cosmopolitan (party favors multiculturalism)
|
||||
- Low ratio → low cosmopolitan (party opposes multiculturalism)
|
||||
- Anti-multiculturalism is **implicitly measured** as (sample - positive)
|
||||
|
||||
**PolDem Data**:
|
||||
```
|
||||
var: "Immigration (Media)"
|
||||
type: "cosmopolitan"
|
||||
sample: all immigration mentions (direction != 0)
|
||||
positive: pro-immigration mentions (direction > 0)
|
||||
```
|
||||
- High ratio → high cosmopolitan (media coverage shows party supporting immigration)
|
||||
- Low ratio → low cosmopolitan (media coverage shows party opposing immigration)
|
||||
|
||||
### 2. Why One Loading Suffices for Bipolar Items
|
||||
|
||||
**Question**: Shouldn't anti-immigration also load on traditional?
|
||||
|
||||
**Answer**: No, because:
|
||||
|
||||
1. **Both poles are already captured**: The bipolar structure means low cosmopolitan (anti-immigration) is automatically measured
|
||||
2. **Avoids double-counting**: Each mention/quasi-sentence contributes to exactly ONE item
|
||||
3. **Empirical correlations emerge naturally**: If anti-immigration parties also score high on nationalism/law-and-order, the **posterior correlation** between cosmopolitan and traditional will reflect this
|
||||
4. **More flexible model**: Cosmopolitan-traditional relationship is **estimated**, not imposed
|
||||
|
||||
**Imposed vs. Estimated Correlation**:
|
||||
- If we double-load immigration on both cosmopolitan (negative) and traditional (positive), we **force** them to be opposites
|
||||
- By loading only on cosmopolitan, we let the data reveal whether anti-immigration parties are also nationalist (empirical question)
|
||||
|
||||
---
|
||||
|
||||
## Coding Decision Rules
|
||||
|
||||
### Rule 1: Each Manifesto Code Appears in ONE Item Only
|
||||
|
||||
**Good** (current structure):
|
||||
```
|
||||
"Multiculturalism" (cosmopolitan):
|
||||
- per607 (Positive), per608 (Negative)
|
||||
|
||||
"National Identity" (traditional):
|
||||
- per601 (Positive), per107 (Negative)
|
||||
```
|
||||
- per607/per608 only in cosmopolitan
|
||||
- per601/per107 only in traditional
|
||||
- Correlation between dimensions is empirical
|
||||
|
||||
**Bad** (double-loading):
|
||||
```
|
||||
"Multiculturalism" (cosmopolitan):
|
||||
- per607 (Positive), per601 (Negative)
|
||||
|
||||
"National Identity" (traditional):
|
||||
- per601 (Positive), per607 (Negative)
|
||||
```
|
||||
- per601 and per607 counted twice
|
||||
- Imposes perfect negative correlation between cosmopolitan/traditional
|
||||
|
||||
### Rule 2: Stance Assignment Within Items
|
||||
|
||||
Within each item (var), codes are assigned stance based on:
|
||||
- **Positive**: Codes indicating support for the item's construct
|
||||
- **Negative**: Codes indicating opposition to the item's construct
|
||||
|
||||
**Example - "Internationalism" (cosmopolitan)**:
|
||||
- per107 (Internationalism positive): stance = "Positive"
|
||||
- per109 (Internationalism negative): stance = "Negative"
|
||||
- Result: High per107 / low per109 → high cosmopolitan score
|
||||
|
||||
### Rule 3: PolDem Direction Mapping
|
||||
|
||||
PolDem uses `direction` variable (-1, 0, +1):
|
||||
- `direction > 0`: Support for the issue as coded
|
||||
- `direction < 0`: Opposition to the issue
|
||||
- `direction == 0`: Ambivalent (exclude from analysis)
|
||||
|
||||
**Aggregation**:
|
||||
```r
|
||||
poldem_processed %>%
|
||||
filter(direction != 0) %>% # exclude neutral
|
||||
group_by(party, year, country, issue_cat) %>%
|
||||
summarise(
|
||||
sample = n(), # all non-neutral mentions
|
||||
positive = sum(direction > 0) # supportive mentions only
|
||||
)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Special Cases
|
||||
|
||||
### Immigration (Direction Ambiguity)
|
||||
|
||||
**Codebook says**: "Opposition to restrictive immigration"
|
||||
|
||||
**Interpretation needed**: Does `direction = +1` mean:
|
||||
- A) Support for "opposition to restrictions" → pro-immigration (cosmopolitan)
|
||||
- B) Support for "restrictions" → anti-immigration (traditional)
|
||||
|
||||
**Resolution**: Must manually inspect sample sentences before finalizing coding.
|
||||
|
||||
If interpretation A is correct:
|
||||
```r
|
||||
issue_cat == "immig" & direction > 0 → positive for cosmopolitan
|
||||
issue_cat == "immig" & direction < 0 → negative for cosmopolitan
|
||||
```
|
||||
|
||||
If interpretation B is correct:
|
||||
```r
|
||||
issue_cat == "immig" & direction > 0 → negative for cosmopolitan
|
||||
issue_cat == "immig" & direction < 0 → positive for cosmopolitan
|
||||
# (REVERSED)
|
||||
```
|
||||
|
||||
### Europe/Euro Items
|
||||
|
||||
EU integration naturally maps to cosmopolitan-traditional dimension:
|
||||
|
||||
**Manifesto Data**:
|
||||
- Add new items using per108 (EU integration positive) and per106 (EU integration negative)
|
||||
- Create separate vars: "EU Integration Support" (cosmopolitan), "Euroskepticism" (traditional)
|
||||
|
||||
**PolDem Data**:
|
||||
```r
|
||||
"EU Integration Support (Media)" (cosmopolitan):
|
||||
issue_cat = "europe" or "euro"
|
||||
sample = all mentions
|
||||
positive = direction > 0 (pro-EU)
|
||||
|
||||
"Euroskepticism (Media)" (traditional):
|
||||
issue_cat = "europe" or "euro"
|
||||
sample = all mentions
|
||||
positive = direction < 0 (anti-EU)
|
||||
```
|
||||
|
||||
**Note**: Same sentences contribute to BOTH items, but counting opposite directions. This creates natural negative correlation between cosmopolitan/traditional.
|
||||
|
||||
**Alternative approach** (cleaner, recommended): Load only on cosmopolitan:
|
||||
```r
|
||||
"EU Position (Media)" (cosmopolitan):
|
||||
issue_cat = "europe" or "euro"
|
||||
sample = all mentions
|
||||
positive = direction > 0
|
||||
```
|
||||
This is sufficient if we treat EU as a bipolar cosmopolitan item.
|
||||
|
||||
---
|
||||
|
||||
## Data Structure Requirements
|
||||
|
||||
### Manifesto Data Format (party-year-var level)
|
||||
|
||||
Each row represents one item for one party-year:
|
||||
|
||||
| party | country | year | var | type | sample | positive | project |
|
||||
|-------|---------|------|-----|------|--------|----------|---------|
|
||||
| 211 | DE | 2013 | Multiculturalism | cosmopolitan | 45 | 23 | Manifesto |
|
||||
| 211 | DE | 2013 | National Identity | traditional | 67 | 58 | Manifesto |
|
||||
| 211 | DE | 2013 | Economic Intervention | pro_welfare | 102 | 78 | Manifesto |
|
||||
|
||||
- **var**: Item name (e.g., "Multiculturalism", "Economic Intervention")
|
||||
- **type**: Dimension it loads on (pro_market, pro_welfare, cosmopolitan, traditional)
|
||||
- **sample**: Total quasi-sentences mentioning this issue
|
||||
- **positive**: Quasi-sentences with positive stance toward this item
|
||||
|
||||
### PolDem Data Format (same structure)
|
||||
|
||||
| party | country | year | var | type | sample | positive | project |
|
||||
|-------|---------|------|-----|------|--------|----------|---------|
|
||||
| 211 | DE | 2013 | Immigration (Media) | cosmopolitan | 23 | 8 | PolDem |
|
||||
| 211 | DE | 2013 | Nationalism (Media) | traditional | 15 | 12 | PolDem |
|
||||
|
||||
Combined using `bind_rows()` to create unified dataset.
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
1. **Bipolar items load on one dimension only** - the ratio captures both poles
|
||||
2. **Each manifesto code appears in exactly one item** - no double-counting
|
||||
3. **Correlations between dimensions are estimated, not imposed** - more flexible model
|
||||
4. **Direction reversals are handled within items** - via stance assignment (Manifesto) or direction sign (PolDem)
|
||||
5. **All items must allow varying positive/sample ratios** - mix of positive and negative stances required
|
||||
|
||||
This structure preserves the conceptual independence of the four dimensions while allowing the data to reveal their empirical relationships.
|
||||
@@ -1,73 +0,0 @@
|
||||
# Full model run operations
|
||||
|
||||
This note describes how to launch, monitor, and summarize the long full model
|
||||
run that generates the posterior estimates.
|
||||
|
||||
Do not start a full run until raw-data and Stan-data preflight checks pass.
|
||||
|
||||
## Hardware note for runtime reporting
|
||||
|
||||
The production run should record elapsed time for this workstation as:
|
||||
|
||||
```text
|
||||
Hardware: 4 cores of an AMD Ryzen 9 7945HX
|
||||
```
|
||||
|
||||
After the run, record the wall-time reported by `src/sh/show_run_progress.sh` or
|
||||
`outputs/model_outputs/latest/run_*/diagnostics/run_metrics.json`.
|
||||
|
||||
## Launch with durable logging
|
||||
|
||||
From the repository root:
|
||||
|
||||
```bash
|
||||
mkdir -p outputs/logs
|
||||
ts="$(date +%Y%m%d_%H%M%S)"
|
||||
STAN_REFRESH=100 \
|
||||
nohup bash run_estimation.sh full \
|
||||
> "outputs/logs/full_run_${ts}.log" 2>&1 &
|
||||
echo $! > "outputs/logs/full_run_${ts}.pid"
|
||||
```
|
||||
|
||||
The wrapper configures local raw data, local R libraries, project-local temp
|
||||
space, and the writable project-local CmdStan copy by default.
|
||||
|
||||
## Monitor during the run
|
||||
|
||||
Live log tail:
|
||||
|
||||
```bash
|
||||
tail -f outputs/logs/full_run_<timestamp>.log
|
||||
```
|
||||
|
||||
Convenience progress command:
|
||||
|
||||
```bash
|
||||
bash src/sh/show_run_progress.sh
|
||||
```
|
||||
|
||||
Stan progress is printed every `STAN_REFRESH` iterations (default `100`) and is
|
||||
captured in the durable log.
|
||||
|
||||
## Inspect after completion
|
||||
|
||||
After a successful run, the chain CSVs are under:
|
||||
|
||||
```text
|
||||
outputs/model_outputs/latest/run_<timestamp>/chains/
|
||||
```
|
||||
|
||||
Run diagnostics and Stan logs are archived under:
|
||||
|
||||
```text
|
||||
outputs/model_outputs/latest/run_<timestamp>/diagnostics/
|
||||
```
|
||||
|
||||
Use:
|
||||
|
||||
```bash
|
||||
bash src/sh/show_run_progress.sh
|
||||
```
|
||||
|
||||
to print the latest run status, wall time, sampler configuration, divergences,
|
||||
tree-depth hits, and command-configuration verification status.
|
||||
@@ -1,67 +0,0 @@
|
||||
# Raw data sources and local-only setup
|
||||
|
||||
The public replication repository includes processed inputs under `data/`, but it
|
||||
does not redistribute licensed or third-party raw source files. Raw files needed
|
||||
to regenerate processed inputs should be kept in a local-only directory outside
|
||||
the replication git repository.
|
||||
|
||||
Recommended local layout:
|
||||
|
||||
```text
|
||||
_local/raw/
|
||||
poldem/poldem-election_all.csv
|
||||
manifesto/MPDataset_MPDS2025a.csv
|
||||
```
|
||||
|
||||
The scripts read `PARTY2D_RAW_DATA_DIR` when it is set. For another location, use:
|
||||
|
||||
```bash
|
||||
export PARTY2D_RAW_DATA_DIR=/path/to/local/raw
|
||||
```
|
||||
|
||||
## Required raw inputs
|
||||
|
||||
| Source | Raw file | Local path below `$PARTY2D_RAW_DATA_DIR` | Used by | Redistribution |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| PolDem Election Campaigns, all issues | `poldem-election_all.csv` | `poldem/poldem-election_all.csv` | `src/r/00c_process_poldem.R` | Not redistributed in this repo |
|
||||
| Manifesto Project Dataset | `MPDataset_MPDS2025a.csv` | `manifesto/MPDataset_MPDS2025a.csv` | `src/r/00a_process_manifesto.R` if `data/manifesto_data.csv` is regenerated | Not redistributed in this repo |
|
||||
|
||||
## PolDem download
|
||||
|
||||
Dataset: `poldem-election_all` from the PolDem Election Campaigns collection.
|
||||
|
||||
- Overview: <https://poldem.eui.eu/data-overview/>
|
||||
- Download page: <https://poldem.eui.eu/download/election-campaigns/>
|
||||
- CSV URL used locally on 2026-06-11:
|
||||
<https://poldem.eui.eu/downloads/cosa/poldem-election_all.csv>
|
||||
|
||||
Observed checksum after download on 2026-06-11:
|
||||
|
||||
```text
|
||||
sha256 2cd8c9108b1b0b9c1b6594bb21acee709c70259cd02f450bc69fc09b505fc9fb
|
||||
```
|
||||
|
||||
## Preflight check
|
||||
|
||||
From the repository root, run:
|
||||
|
||||
```bash
|
||||
bash src/sh/check_raw_data.sh
|
||||
```
|
||||
|
||||
This checks required local raw inputs and prints byte sizes and SHA-256 checksums.
|
||||
|
||||
## Processed files kept in this repository
|
||||
|
||||
The processed files under `data/` are intended to be part of this repository,
|
||||
including:
|
||||
|
||||
- `data/poldem_data.csv`
|
||||
- `data/manifesto_data.csv`
|
||||
- `data/text_data.csv`
|
||||
- `data/expert.csv`
|
||||
- `data/lr_data.csv`
|
||||
- `data/model_data.csv`
|
||||
|
||||
These files document the analysis-ready inputs while avoiding redistribution of
|
||||
the underlying raw source data.
|
||||
@@ -1,357 +0,0 @@
|
||||
# Party Union Mapping
|
||||
|
||||
## Individual Party Guarantee
|
||||
|
||||
**Every `party_id` in the output CSV represents an individual political party, never an electoral alliance or bloc.**
|
||||
|
||||
Electoral alliances and blocs are handled in one of two ways:
|
||||
1. **Decomposed via mean-constituent averaging** (N=123 mappings): Shared manifesto data feeds into individual constituent party estimates. The output contains the constituents, not the alliance.
|
||||
2. **Excluded with documented justification** (see "Excluded Alliance Labels" below): Alliance labels with no mappable constituents are dropped from the output.
|
||||
|
||||
A systematic audit of all output parties is provided by `scripts/audit_party_types.py`, which produces `scripts/party_type_audit.csv` classifying every party with evidence. Post-estimation verification in `02_post_estimation.jl` hard-fails if any union/alliance PF ID appears in the output.
|
||||
|
||||
## Overview
|
||||
|
||||
Expert surveys often rate individual constituent parties separately, while manifesto data is published under a union/coalition/merged party name. This document maps individual party PartyFacts IDs to the union PartyFacts IDs used in `text_data.csv`.
|
||||
|
||||
**Direction:** Individual party (expert data) → Union (manifesto/text data)
|
||||
|
||||
## Model Integration (V4 Mean-Constituent Model)
|
||||
|
||||
The V4 Stan model (`stan_model_2dim_v4.stan`) uses these mappings to produce **individual party estimates** for all constituent parties. Instead of collapsing expert data onto the union ID, V4 gives every constituent its own latent position (theta) and links shared manifesto data to the **mean** of constituent thetas.
|
||||
|
||||
### How it works
|
||||
|
||||
1. **Each constituent gets its own segment and random walk.** CDU (1375) and CSU (1731) each have independent theta trajectories. The union ID (211) gets NO segment.
|
||||
|
||||
2. **Manifesto observations constrain the mean.** A CDU/CSU manifesto in year t enters the likelihood as:
|
||||
```
|
||||
pos = mean(theta[dim, rr_CDU_t], theta[dim, rr_CSU_t])
|
||||
```
|
||||
The observation is counted once (no double-counting), but it pulls both constituents' thetas via their average.
|
||||
|
||||
3. **Expert data constrains individuals directly.** A CHES rating of CDU in 2019 maps to `theta[dim, rr_CDU_2019]` with no averaging. This is what identifies the *difference* between constituents.
|
||||
|
||||
4. **Identification depends on data availability:**
|
||||
- **Periods with individual expert data** (e.g., CHES 1999-2024): Constituent estimates separate meaningfully. CSU appears more conservative on galtan than CDU, matching known ground truth.
|
||||
- **Periods without individual expert data** (e.g., 1950s-1990s): Only the shared manifesto constrains the mean. The random walk prior pulls constituents toward similar values, so CDU ≈ CSU with wide credible intervals on the gap. The estimates gradually differentiate as expert data appears.
|
||||
|
||||
5. **Backwards compatible.** With an empty `union_mapping.csv`, all observations have `n_const=1` and V4 reduces exactly to V3.
|
||||
|
||||
### Data flow
|
||||
|
||||
```
|
||||
R pipeline (00_data-management.R):
|
||||
- text_data keeps union PF IDs (211) for manifesto rows
|
||||
- expert/lr_data keeps individual PF IDs (1375, 1731)
|
||||
- Expert filtering: party in text_data OR party in constituent_parties
|
||||
|
||||
Julia pipeline:
|
||||
02_data_loading.jl → loads union_mapping.csv → builds union_to_constituents dict
|
||||
03_data_preparation.jl → creates segments for CONSTITUENTS (not unions)
|
||||
→ builds flat arrays: n_const_man[], const_offset_man[], const_rr_man[]
|
||||
04_model_execution.jl → passes constituent arrays to Stan
|
||||
|
||||
Stan model (stan_model_2dim_v4.stan):
|
||||
- Manifesto likelihood: averages theta over constituents per observation
|
||||
- Expert likelihoods: same averaging (nc=1 for individual obs = direct lookup)
|
||||
- No new parameters vs V3 — only data block and likelihood computation change
|
||||
```
|
||||
|
||||
### Output
|
||||
|
||||
Post-estimation produces individual party rows (CDU=1375 and CSU=1731 as separate rows) with a `union_party_id` column (= 211 for both, NA for standalone parties). The anchor party is CDU (1375) instead of CDU/CSU (211).
|
||||
|
||||
### Scale impact (smoke test, post-1990 data)
|
||||
|
||||
- 471 parties → 483 segments, 461 with valid segments (vs ~449 without unions)
|
||||
- 708 union manifesto observations with multi-constituent averaging (3.2% of 21,991 total)
|
||||
- 23,427 total constituent entries in flat arrays
|
||||
- 9,870 segment-year positions (R)
|
||||
- No new model parameters (theta simply covers more segment-years)
|
||||
- Negligible performance impact: `nc=1` fast path for >96% of observations
|
||||
|
||||
### Data quality (verified 2026-02-08)
|
||||
|
||||
- **No double-counting**: No constituents appear in text_data alongside their union
|
||||
- **Union IDs verified absent from output** via post-estimation check in `02_post_estimation.jl`
|
||||
- **No chain mappings**: No PF ID serves as both union target and constituent of another union
|
||||
- **No duplicate rows** in text_data after deduplication
|
||||
- **All flagged-for-review parties** in audit script are confirmed individual parties (false positives from name patterns)
|
||||
|
||||
## Detection Methodology
|
||||
|
||||
`scripts/diagnose_party_mismatches.R` uses a multi-signal approach, ranked by reliability:
|
||||
|
||||
### Phase 1: MARPOR `progtype` variable (definitive)
|
||||
|
||||
The raw Manifesto Project data (`MPDataset_MPDS2025a.csv`) contains a `progtype` variable classifying each manifesto entry:
|
||||
|
||||
| progtype | Meaning | Relevance |
|
||||
|----------|---------|-----------|
|
||||
| 1 | Party's own manifesto | Individual party, no union issue |
|
||||
| **2** | **Programme of 2+ parties (individual tracking)** | Joint manifesto: each constituent gets its own CMP code with identical scores |
|
||||
| 3 | Electoral manifesto by a single party | Individual party |
|
||||
| **4** | **Estimated from another party's programme** | Party had no manifesto, inherited another party's scores |
|
||||
| **5** | **Average of member parties' manifestos** | MARPOR computed average from constituent parties |
|
||||
| 6 | Other | Miscellaneous |
|
||||
| **8** | **Party bloc programme** | Bloc-level CMP code representing multiple parties |
|
||||
| 9 | Non-standard text | Various sources |
|
||||
|
||||
**Phase 1a (progtype=2):** Group by `(country, date)` where progtype=2 to find which CMP codes shared a joint manifesto at each election. Map each to PF IDs. If some are in text_data and others are expert-only, create constituent mappings.
|
||||
|
||||
**Phase 1b (progtype=5):** Average-of-members entries have their own CMP code. Find constituents via PartyFacts "composed of:" comments and manifesto party names.
|
||||
|
||||
**Phase 1c (progtype=8):** Bloc-level entries have their own CMP code. Find constituents via PartyFacts "composed of:" comments and manifesto party names.
|
||||
|
||||
**Phase 1d (progtype=4):** Proxy entries where MARPOR estimated from another party. Currently detects 0 expert-only parties with progtype=4.
|
||||
|
||||
### Phase 2: PartyFacts metadata enrichment
|
||||
|
||||
**Phase 2a (comment parsing):** Search text_data party comments for "composed of:" patterns. Match mentioned abbreviations against expert-only parties using word-boundary matching.
|
||||
|
||||
**Phase 2b (parlgov "+" notation):** parlgov uses "+" to denote unions (e.g., "CDU+CSU", "CCD+CDU"). Parse fragments and match against expert-only parties.
|
||||
|
||||
**Phase 2c (name fragment matching):** For text_data parties with "/" or "-" in names, split into fragments and match against expert-only parties. **Bilingual disambiguation:** if all fragments resolve to the same PF ID, the "/" separates language variants (e.g., Swiss SPS/PSS), not constituents.
|
||||
|
||||
### Phase 3: LLM verification (optional)
|
||||
|
||||
For remaining unmatched expert-only parties, uses gpt-4.1 via GESIS OpenWebUI with enriched prompts containing: all name_short values across datasets, year ranges, PartyFacts comments, progtype history, and the full list of text_data parties in the same country. Skip with `--skip-llm` flag.
|
||||
|
||||
### Matching safeguards
|
||||
|
||||
- **Word-boundary matching:** Uses `\b` regex boundaries to prevent substring false positives (e.g., "DS" matching "NDSI")
|
||||
- **Minimum 2-character terms:** Single-letter abbreviations (e.g., "K", "G") are excluded from matching
|
||||
- **Deduplication:** When the same mapping is detected by multiple methods, the highest-reliability method is kept (manual > progtype > comments > parlgov > name_fragment > LLM)
|
||||
- **Idempotent:** The script strips `detection_method` from existing mappings on re-run
|
||||
|
||||
## How This Was Built
|
||||
|
||||
1. **Original 36 mappings** (2026-02-06/07): String matching + LLM + RA verification + independent research
|
||||
2. **Expanded with progtype** (2026-02-07): Rewrote `scripts/diagnose_party_mismatches.R` to use MARPOR progtype (types 2, 4, 5, 8), PartyFacts comments, parlgov "+", and bilingual-aware name matching
|
||||
3. **LLM verification with gpt-4.1** (2026-02-07): Ran enriched prompts through gpt-4.1 via GESIS OpenWebUI for 345 remaining expert-only parties. Found 32 additional verified constituent mappings across 25 countries.
|
||||
4. **Bloc-centric LLM sweep** (2026-02-07): For each of 38 unmapped progtype=8 bloc parties in text_data, sent targeted gpt-4.1 queries asking which expert-only parties are actual constituents. Found 17 new mappings (Brazil PT-led coalitions, Chilean Concertación, Serbian blocs, Latvian unions, etc.).
|
||||
5. **Manual research** (2026-02-07): Verified remaining unmapped blocs. Added 4 manual mappings (PL: .N→KO; CL: PC→Concertación, PH→Concertación; ES: Amaiur→EH Bildu). Confirmed remaining 27 blocs have no mappable expert-only constituents (constituents either already in text_data, not in expert surveys, or in fluid coalitions).
|
||||
6. **Temporary election coalitions** (2026-02-08): Systematic analysis of progtype=2 joint manifesto groups. Grouped by identical CMP content (all 142 per* columns) to separate left and right coalitions within the same election. Found 9 unmapped expert-only parties that shared manifestos with text_data parties (Italy 2001/2006/2013, France 2017). Added CCD→CdL from orphan analysis (1 manual). Total: 10 new mappings.
|
||||
7. **Individual party guarantee cleanup** (2026-02-08): Removed 11 progtype_2/progtype_2_joint entries that mapped real individual parties as unions of zero-data coalition partners. Removed 2 chain mappings (union→union→constituent). Added 4 new mappings for genuine alliances (MX: Salvemos a México→{PRI, PVEM}; IL: Joint List→{Hadash, Balad}). Documented classification decisions for all 15 dual-progtype parties and 4 pure bloc labels. Added post-estimation verification check and audit script.
|
||||
|
||||
## Mapping Table
|
||||
|
||||
The canonical mapping is in `data/union_mapping.csv` with columns:
|
||||
- `manifesto_pf_id` — PartyFacts ID of union (in text_data)
|
||||
- `manifesto_name` — Union display name
|
||||
- `expert_pf_id` — PartyFacts ID of individual constituent (in expert_raw)
|
||||
- `expert_name` — Individual party display name
|
||||
- `country` — ISO2 country code
|
||||
- `relationship` — Description of the relationship
|
||||
- `status` — `implemented` (active in pipeline) or `pending` (awaiting implementation)
|
||||
- `detection_method` — How detected: `manual`, `progtype_2`, `progtype_2_joint`, `progtype_5`, `progtype_8`, `progtype_4`, `composed_comment`, `parlgov_plus`, `name_fragment`, `llm_verified`
|
||||
|
||||
## Detection Method Breakdown
|
||||
|
||||
| Method | Count | Description |
|
||||
|--------|-------|-------------|
|
||||
| llm_verified | 48 | gpt-4.1 verified (party-centric + bloc-centric) |
|
||||
| manual | 45 | Hand-verified mappings (includes MX/IL bloc mappings, CCD→CdL) |
|
||||
| progtype_8 | 23 | Bloc-level CMP entries matched to expert-only constituents |
|
||||
| name_fragment | 4 | "/" or "-" name splitting matched to expert-only parties |
|
||||
| composed_comment | 2 | PartyFacts "composed of:" comments |
|
||||
| progtype_5 | 1 | Average-of-members entries (Croatia ZL) |
|
||||
|
||||
**Total: 123 rows** mapping 116 unique expert parties to 87 union parties across 41 countries
|
||||
|
||||
## Bloc Coverage
|
||||
|
||||
Of 49 progtype=8 bloc parties in text_data, 22 (44.9%) have at least one constituent mapped. The remaining 27 have no mappable expert-only constituents because:
|
||||
- Actual constituents already have their own text_data entries (e.g., KDNP, Yesh Atid, TB-LNNK)
|
||||
- Actual constituents are not in expert surveys (e.g., Hadash, Ra'am, Balad, VS, DKP)
|
||||
- Coalition membership is too fluid for static mapping (Panama, Colombia, Israel shifting coalitions)
|
||||
- The entry is a single party coded as a bloc (e.g., German Minority, Red-Green Unity List)
|
||||
|
||||
## Temporary Election Coalitions (progtype=2) — REMOVED
|
||||
|
||||
The progtype=2 joint manifesto mappings (Italy 2001/2006/2013, France 2017, Belgium 1971) were removed in the 2026-02-08 cleanup because they mapped real individual parties as "unions" of tiny coalition partners with zero data. See "Removed Mappings" below for details.
|
||||
|
||||
The CCD(1767)→CdL(6241) mapping from orphan analysis remains, as CCD was a genuine long-term CdL constituent (progtype=1 in 1996, part of CdL bloc from 2001).
|
||||
|
||||
## Unmappable Expert-Only Parties
|
||||
|
||||
These parties appear in expert surveys but have no manifesto union to map to. Verified against `text_data_unfiltered.csv` (pre-temporal-filter, 1238 parties) on 2026-02-07.
|
||||
|
||||
**Filter retest results:** 54 of the 80 original RA task parties have manifesto data in the unfiltered text_data, but all were dropped by the temporal continuity filter (requires ≥3 years with gaps ≤6). These parties have their own CMP data but too few observations. They are correctly handled via union mapping (where applicable) or excluded (where standalone). See `scripts/party_mismatch_ra_task.csv` for full year-level detail.
|
||||
|
||||
| Expert PF ID | Name | Country | Manifesto years (unfiltered) | Expert years | Why unmappable |
|
||||
|-------------|------|---------|------------------------------|--------------|----------------|
|
||||
| 5623 | Compromís | ES | 0 (CMP codes map to different PF IDs) | 2 (2018, 2023) | No manifesto data under PF ID 5623. CMP codes 33098/33093/33914 are separate PartyFacts entries. |
|
||||
| 4363 | FDG (Front de Gauche) | FR | 1 (2012) | 1 (2014) | 1 CMP year only. PCF (1251) already has its own expert data. |
|
||||
| 5731 | NNP | ZA | 0 | 1 (1999) | Apartheid party that dissolved into ANC 2005. Ideologically incompatible mapping. |
|
||||
| 5553 | FREPASO | AR | 1 (1995) | 4 (1995-2001) | 1 CMP year only. Independent party; Alianza (1999) was separate CMP entity. |
|
||||
| 8122 | CF (Consenso Federal) | AR | 1 (2019) | 2 (2019-2020) | 1 CMP year only. One-off coalition. |
|
||||
| 4182 | FPL+UCeDé | AR | 1 (2003) | 3 (1987-1991) | 1 CMP year only. Incoherent entity (UCeDé 1987 ≠ FPL coalition 2003). |
|
||||
| 6160 | FR (Frente Renovador) | AR | 0 | 4 (2013-2019) | No CMP code at all. Major ideological shift 2013→2019. |
|
||||
| 5879 | CD (Centro Democrático) | CO | 1 (2014) | 3 (2014-2019) | 1 CMP year only. Uribe's party, independent. |
|
||||
| 4411 | PNI/PPN | CR | 0 | 1 (1974) | No CMP code. Defunct 1970s party. |
|
||||
| 7412 | EK/DEK | CY | 0 | 1 (1970) | No CMP code. Defunct 1970 far-right party. |
|
||||
| 3935 | United Opposition | GE | 1 (2008) | 1 (2008) | 1 CMP year only. Was anti-UNM alliance (not led by UNM). |
|
||||
|
||||
## Rejected Mappings
|
||||
|
||||
These were proposed by the RA but found incorrect during independent research:
|
||||
|
||||
| Individual PF ID | Name | Proposed target | Why wrong |
|
||||
|-----------------|------|-----------------|-----------|
|
||||
| 5623 | CC/Compromís | 81 (CCa-PNC-NC) | Name coincidence. Compromís is a Valencian left party; CCa is a Canarian right party. |
|
||||
| 4363 | FDG | 1251 (PCF) | FDG was a multi-party alliance (PCF + Parti de Gauche). PCF already has its own 2014 expert data. Mapping FDG→PCF would double-count. |
|
||||
| 5731 | NNP | 1219 (ANC) | The NNP (ex-apartheid National Party) dissolved into ANC in 2005 as political capitulation. NNP positions are diametrically opposed to ANC on every dimension. |
|
||||
|
||||
## Completeness Audit (2026-02-08)
|
||||
|
||||
Systematic analysis of 631 orphan expert parties (with 4+ observations) across 46 countries (excluding FPTP systems like UK, US, Canada where party unions are not a meaningful concept). Cross-referenced with MARPOR progtype data and PartyFacts metadata.
|
||||
|
||||
### Methodology
|
||||
|
||||
1. **Progtype=2 sweep**: Identified all 93 MARPOR entries with progtype=2. Grouped into 27 content-identical subgroups. Found 12 expert-only parties with progtype=2 data; 10 were mappable (mapped above), 2 had no matching text_data party in their coalition.
|
||||
|
||||
2. **Orphan analysis**: For each of 46 countries, identified expert-only parties not in text_data and not already mapped. Examined PartyFacts metadata (names, comments, ideology tags) and MARPOR progtype history for each.
|
||||
|
||||
3. **Coalition verification**: For Italian orphans specifically, checked each party's MARPOR entries for progtype=2/8 membership and ideological alignment with existing text_data coalition parties.
|
||||
|
||||
### Major standalone orphan parties (not coalition members)
|
||||
|
||||
These are significant parties with substantial expert data but no manifesto/union data. They are genuinely standalone — not missed union constituents.
|
||||
|
||||
| Country | Party | PF ID | Expert obs | Why standalone |
|
||||
|---------|-------|-------|-----------|----------------|
|
||||
| AT | BZÖ | 599 | 7 | Splinter from FPÖ; own CMP data filtered out |
|
||||
| BE | PTB/PVDA | 1753 | 14 | Independent far-left; never part of any coalition |
|
||||
| CZ | ANO | 2141 | 13 | Babiš party; own CMP data exists but too recent |
|
||||
| CZ | Piráti | 2047 | 10 | Standalone; own CMP data exists |
|
||||
| FR | REM/R | 5857 | 10 | Macron's party; too new for sufficient CMP data |
|
||||
| FR | FI | 5858 | 8 | Mélenchon's party; standalone |
|
||||
| IT | M5S | 2046 | 13 | Five Star Movement; progtype=1 only, standalone |
|
||||
| IT | FDI | 2280 | 10 | Fratelli d'Italia; progtype=1 only, standalone |
|
||||
| RO | USD | 120 | 23 | Social democratic bloc; own CMP code exists |
|
||||
| SK | OĽaNO | 2130 | 13 | Populist party; standalone |
|
||||
| CO | PCC | 1577 | 19 | Conservative party; own CMP code exists but filtered |
|
||||
| BR | PSDB | 225 | 13 | Social democrats; standalone (not PT coalition) |
|
||||
|
||||
### Inactive union mappings
|
||||
|
||||
These union targets exist in `union_mapping.csv` but are NOT in text_data, making their constituent mappings inactive:
|
||||
|
||||
| Union PF ID | Name | Country | Constituents | Why inactive |
|
||||
|-------------|------|---------|-------------|--------------|
|
||||
| 1212 | SEL | IT | SEL(7031) | 1212 not in text_data |
|
||||
| 1737 | Olive Tree | IT | PCI(34), DS(878) | 1737 not in text_data; only 2 MARPOR years |
|
||||
|
||||
Note: 962 (CCD+CDU→CDU-Italy) was removed from the mapping entirely because it created a chain (962 is both a constituent of UdC and a union target). See "Removed Mappings" below.
|
||||
|
||||
### Conclusion
|
||||
|
||||
The 123 mappings comprehensively cover: (1) all permanent unions with separate expert data, (2) all progtype=8 bloc parties with mappable expert-only constituents, and (3) CCD as an additional Italian coalition member identified through orphan analysis. Remaining orphan expert parties are genuinely standalone parties whose manifesto data was either filtered out by temporal continuity requirements or does not exist.
|
||||
|
||||
## Removed Mappings (2026-02-08)
|
||||
|
||||
### 11 progtype=2 joint manifesto entries removed
|
||||
|
||||
These entries mapped real individual parties (with substantial text and expert data) as "unions" of temporary coalition partners that had zero text data AND zero expert data. Every constituent had no information to contribute, making the mapping harmful (it reduced real parties to averages with phantom partners).
|
||||
|
||||
| Union PF ID | Union Name | Constituent PF ID | Constituent | Country | Why removed |
|
||||
|---|---|---|---|---|---|
|
||||
| 8054 | DS | 279 | M-DL | IT | M-DL has 0 text, 0 expert data; DS has 120 text, 3 expert |
|
||||
| 1404 | PRC | 1635 | PdCI | IT | PdCI has 0 text, 0 expert data; PRC has 58 text, 15 expert |
|
||||
| 1404 | PRC | 1711 | RnP | IT | RnP has 0 text, 0 expert data |
|
||||
| 6241 | CdL | 888 | NPSI | IT | NPSI has 0 text, 0 expert data; CdL's progtype_8 mappings (AN, CeD, FI) remain |
|
||||
| 6241 | CdL | 2415 | ALD | IT | ALD has 0 text, 0 expert data |
|
||||
| 768 | IdV | 115 | P-UDEUR | IT | P-UDEUR has 0 text, 0 expert data; IdV has 26 text, 8 expert |
|
||||
| 768 | IdV | 1369 | SVP | IT | SVP has 0 text, 0 expert data (under this PF ID) |
|
||||
| 1221 | Lega | 365 | PdL | IT | PdL has 0 text, 0 expert data; Lega has 77 text, 24 expert |
|
||||
| 1595 | UMP | 3229 | UDI | FR | UDI has 0 text, 0 expert data; UMP has 66 text, 18 expert |
|
||||
| 49 | openVLD | 622 | CD&V | BE | CD&V is a large party (own PF ID); mapping created false dependency |
|
||||
| 554 | PRL | 622 | CD&V | BE | Same issue: CD&V already has its own data pipeline |
|
||||
|
||||
### 2 chain mapping entries removed
|
||||
|
||||
These created chain dependencies (union A → union B → constituents), which the pipeline does not support:
|
||||
|
||||
| Union PF ID | Union Name | Constituent PF ID | Constituent | Country | Why removed |
|
||||
|---|---|---|---|---|---|
|
||||
| 962 | CCD+CDU | 763 | CDU (Italy) | IT | 962 is itself a constituent of UdC (201). CDU-Italy (763) has 0 data. Chain: 201→962→763. |
|
||||
| 5939 | PàF | 1742 | AD | PT | 5939 is itself a constituent of CDS-PP (1308). AD (1742) has 0 data. Chain: 1308→5939→1742. |
|
||||
|
||||
## New Mappings Added (2026-02-08)
|
||||
|
||||
| Union PF ID | Union Name | Constituent PF ID | Constituent | Country | Rationale |
|
||||
|---|---|---|---|---|---|
|
||||
| 3979 | Salvemos a México | 1474 | PRI | MX | PRI-PVEM electoral coalition (2006-2012); PRI has extensive text + expert data |
|
||||
| 3979 | Salvemos a México | 446 | PVEM | MX | PVEM is second constituent; has its own text + expert data |
|
||||
| 7912 | Joint List | 421 | Hadash | IL | Arab party coalition (2015-2021); Hadash has CHES 2022 data |
|
||||
| 7912 | Joint List | 1663 | Balad | IL | Balad is constituent; has CHES 2022 data |
|
||||
|
||||
## Excluded Alliance Labels
|
||||
|
||||
These party IDs appear in text_data as bloc/alliance labels but are NOT decomposed via union mapping because no constituent has data in the pipeline:
|
||||
|
||||
| PF ID | Name | Country | Text data | Expert data | Why excluded |
|
||||
|---|---|---|---|---|---|
|
||||
| 3995 | Alianza Acción Opositora | PA | 48 obs | 0 | No expert survey coverage for Panama. No constituents identifiable in pipeline. |
|
||||
|
||||
Note: Several other progtype=8 bloc parties in text_data also have no mapped constituents (see "Bloc Coverage" below), but they remain in the output either because (a) they have their own expert data (e.g., 2988 Georgian Dream, 3916 Alianza Grande) or (b) they function as individual parties despite bloc coding (e.g., 1527 Enhedslisten, 1439 German Minority).
|
||||
|
||||
## Classification Decisions
|
||||
|
||||
### Dual-progtype parties (both progtype=1 and progtype=8)
|
||||
|
||||
These 15 parties have MARPOR entries under both individual (progtype=1/3) and bloc (progtype=8) codes. Each was individually reviewed.
|
||||
|
||||
**Classified as individual parties (no action needed):**
|
||||
|
||||
| PF ID | Name | Country | Evidence |
|
||||
|---|---|---|---|
|
||||
| 57 | SLD | PL | Dominant Polish left party; bloc coding reflects coalition leadership, not alliance status |
|
||||
| 81 | CCa | ES | Canarian regionalist party; single party with local coalition leadership |
|
||||
| 1056 | SC | LV | Latvian party; dual coding reflects different election formats |
|
||||
| 1150 | SDE | EE | Estonian Social Democrats; individual party |
|
||||
| 1396 | Samfylkingin | IS | Icelandic Social Democratic Alliance; merged into single party |
|
||||
| 1439 | MN | PL | German Minority in Poland; single ethnic party coded as bloc |
|
||||
| 1527 | Enhedslisten | DK | Red-Green Alliance; functions as single party since 1989 |
|
||||
| 1691 | FiDeSz-KDNP | HU | FiDeSz dominant; KDNP (1412) has separate PF ID and data |
|
||||
| 2172 | ENM | GE | United National Movement; single party with bloc-era coding |
|
||||
| 2228 | BYuT | UA | Tymoshenko bloc; functions as single Ukrainian party |
|
||||
| 2252 | Yabloko | RU | Russian liberal party; individual entity |
|
||||
|
||||
**Classified as individual parties after research:**
|
||||
|
||||
| PF ID | Name | Country | Decision | Evidence |
|
||||
|---|---|---|---|---|
|
||||
| 506 | VL-TB/LNNK | LV | Individual (merger party) | National Alliance formed 2010 by merger of VL and TB/LNNK. Post-merger, functions as single party. MARPOR data 2010-2022. TB/LNNK (1704) has separate pre-merger data (1998-2014). Not mapped as union because 1704 is already a union target with its own constituents; mapping would create a chain. |
|
||||
| 1586 | sp.a-SPIRIT | BE | Already handled | Already mapped as constituent of sp.a (1680) in union_mapping.csv. 0 text, 0 expert data under this PF ID. |
|
||||
| 7599 | Kahol Lavan | IL | Individual party | Short-lived centrist party (2019-2020). Has own expert data (CHES 2021, V-Party 2019). Unified entity, not a multi-party alliance. |
|
||||
| 2988 | Georgian Dream | GE | Individual party | Despite progtype=8 coding, functions as a single party-movement. Has own expert data (GPS 2019, V-Party 2012/2016). |
|
||||
| 3916 | Alianza Grande | CO | Individual party (catch-all PF ID) | PF ID covers multiple Colombian coalitions. Has own expert data (CHES 2020). No separate constituent expert data exists. |
|
||||
|
||||
**Classified as alliance and mapped:**
|
||||
|
||||
| PF ID | Name | Country | Decision | Evidence |
|
||||
|---|---|---|---|---|
|
||||
| 7912 | Joint List | IL | Alliance → mapped to Hadash (421), Balad (1663) | Arab party coalition (2015-2021). GPS explicitly names 4 constituents. Hadash and Balad have separate CHES 2022 data and their own text_data. |
|
||||
| 3979 | Salvemos a México | MX | Alliance → mapped to PRI (1474), PVEM (446) | PRI-PVEM electoral coalition. Both constituents have extensive text and expert data. |
|
||||
|
||||
## Audit Methodology
|
||||
|
||||
The audit script `scripts/audit_party_types.py` systematically checks every party in the output CSV:
|
||||
|
||||
1. **Union mapping check**: Verifies no `manifesto_pf_id` from `union_mapping.csv` appears in output (hard fail).
|
||||
2. **Constituent check**: Identifies parties that are `expert_pf_id` in the mapping (expected: these are individual constituents of unions).
|
||||
3. **Expert data check**: Flags parties with no expert survey data (text-only entities).
|
||||
4. **Name pattern check**: Scans PartyFacts names for alliance indicators (keywords: alliance, coalition, bloc, front, union, alianza, frente; characters: +, /, &).
|
||||
5. **Classification**: Each party gets one of: `individual_party`, `flagged_for_review`, `error_union_in_output`.
|
||||
|
||||
**To re-run after data updates:**
|
||||
```bash
|
||||
python3 scripts/audit_party_types.py
|
||||
```
|
||||
|
||||
Output: `scripts/party_type_audit.csv` with columns: `party_id`, `name`, `country`, `in_union_mapping_as_union`, `in_union_mapping_as_constituent`, `has_expert_data`, `name_flags`, `classification`, `evidence`.
|
||||
|
||||
**Post-estimation verification** (`02_post_estimation.jl`): After extracting estimates, loads all `manifesto_pf_id` values from `union_mapping.csv` and checks none appear in the output `party_id` column. If any do, the script errors with a hard fail.
|
||||
@@ -1,28 +1,28 @@
|
||||
file_name,variable_name,label,description,type,allowed_values,range_min,range_max,missing_value_code,unit,scale_direction,constructed_from,construction_rule,notes
|
||||
party_2d_election_year_panel_vN.csv.gz,party_id,PartyFacts party identifier,Identifier for the individual party,integer,,,,,identifier,,PartyFacts crosswalk,Assigned during party harmonization,
|
||||
party_2d_election_year_panel_vN.csv.gz,party_name_english,English party name,Party name from the harmonized output,string,,,,,name,,Party metadata,,
|
||||
party_2d_election_year_panel_vN.csv.gz,party_name_short,Short party name,Short party label from the harmonized output,string,,,,,name,,Party metadata,,May be missing
|
||||
party_2d_election_year_panel_vN.csv.gz,country,Country code,ISO2 or historical country-code identifier,string,,,,,identifier,,Source metadata and PartyFacts,,
|
||||
party_2d_election_year_panel_vN.csv.gz,year,Calendar year,Calendar year of the election-year estimate,integer,,1944,2025,,year,,Election and model-year metadata,,
|
||||
party_2d_election_year_panel_vN.csv.gz,segment_num,Party segment number,Segment number within party after splitting at long evidence gaps,integer,,1,,,segment,,Party history segmentation,Main segment is coded 1,
|
||||
party_2d_election_year_panel_vN.csv.gz,union_party_id,Union or alliance PartyFacts identifier,Identifier of parent union or alliance where applicable,integer,,,,,identifier,,Alliance mapping,,Missing if party is not represented through a union or alliance
|
||||
party_2d_election_year_panel_vN.csv.gz,in_union,Union membership indicator,Indicator that the row is associated with a union or alliance,boolean,0;1,0,1,,indicator,,Alliance mapping,,
|
||||
party_2d_election_year_panel_vN.csv.gz,pervote,Vote share,Vote share at the election year,numeric,,0,100,,percent,,Election metadata,,
|
||||
party_2d_election_year_panel_vN.csv.gz,economic_lr,Economic left-right posterior mean,Posterior mean of economic left-right position,numeric,,0,1,,unit interval,0=left; 1=right,Posterior draws,Mean after inverse-logit transformation,
|
||||
party_2d_election_year_panel_vN.csv.gz,galtan,Cultural posterior mean,Posterior mean of cultural position,numeric,,0,1,,unit interval,0=cosmopolitan/socially liberal; 1=traditionalist/nationalist,Posterior draws,Mean after inverse-logit transformation,
|
||||
party_2d_election_year_panel_vN.csv.gz,economic_lr_se,Economic posterior standard error,Posterior standard deviation for economic_lr,numeric,,0,,,unit interval,,Posterior draws,Standard deviation over posterior draws,
|
||||
party_2d_election_year_panel_vN.csv.gz,galtan_se,Cultural posterior standard error,Posterior standard deviation for galtan,numeric,,0,,,unit interval,,Posterior draws,Standard deviation over posterior draws,
|
||||
party_2d_election_year_panel_vN.csv.gz,economic_lr_q025,Economic lower posterior interval,2.5 percent posterior quantile for economic_lr,numeric,,0,1,,unit interval,0=left; 1=right,Posterior draws,Quantile over posterior draws,
|
||||
party_2d_election_year_panel_vN.csv.gz,economic_lr_q975,Economic upper posterior interval,97.5 percent posterior quantile for economic_lr,numeric,,0,1,,unit interval,0=left; 1=right,Posterior draws,Quantile over posterior draws,
|
||||
party_2d_election_year_panel_vN.csv.gz,galtan_q025,Cultural lower posterior interval,2.5 percent posterior quantile for galtan,numeric,,0,1,,unit interval,0=cosmopolitan/socially liberal; 1=traditionalist/nationalist,Posterior draws,Quantile over posterior draws,
|
||||
party_2d_election_year_panel_vN.csv.gz,galtan_q975,Cultural upper posterior interval,97.5 percent posterior quantile for galtan,numeric,,0,1,,unit interval,0=cosmopolitan/socially liberal; 1=traditionalist/nationalist,Posterior draws,Quantile over posterior draws,
|
||||
party_2d_election_year_panel_vN.csv.gz,election_id,Election identifier,Election identifier where available,string,,,,,identifier,,Election metadata,,Missing where no election identifier is available
|
||||
party_2d_election_year_panel_vN.csv.gz,election_date,Election date,Election date where available,date,,,,,date,,Election metadata,,Missing in current processed election metadata
|
||||
party_2d_election_year_panel_vN.csv.gz,has_text,Text support indicator,Indicator for direct or nearby text evidence,boolean,0;1,0,1,,indicator,,Source-support construction,Nearby threshold documented in source_support_dictionary.csv,
|
||||
party_2d_election_year_panel_vN.csv.gz,has_expert,Expert support indicator,Indicator for direct or nearby expert evidence,boolean,0;1,0,1,,indicator,,Source-support construction,Nearby threshold documented in source_support_dictionary.csv,
|
||||
party_2d_election_year_panel_vN.csv.gz,n_text_sources,Number of text sources,Number of distinct text source families contributing direct or nearby evidence,integer,,0,,,count,,Source-support construction,,
|
||||
party_2d_election_year_panel_vN.csv.gz,n_expert_sources,Number of expert sources,Number of distinct expert source families contributing direct or nearby evidence,integer,,0,,,count,,Source-support construction,,
|
||||
party_2d_election_year_panel_vN.csv.gz,nearest_text_distance,Nearest text distance,Absolute distance in years to nearest text observation used to inform trajectory,numeric,,0,,,years,,Source-support construction,,Missing if no text observation exists for the party-country key
|
||||
party_2d_election_year_panel_vN.csv.gz,nearest_expert_distance,Nearest expert distance,Absolute distance in years to nearest expert observation used to inform trajectory,numeric,,0,,,years,,Source-support construction,,Missing if no expert observation exists for the party-country key
|
||||
party_2d_election_year_panel_vN.csv.gz,source_support_class,Source-support class,Summary class of text/expert support,string,both_direct_or_nearby; text_only_direct_or_nearby; expert_only_direct_or_nearby; temporal_propagation,,,,categorical,,Source-support construction,,
|
||||
party_2d_annual_model_output_vN.csv.gz,all fields,Annual model output fields,Same model-output fields as the production annual party-position file plus no source-support augmentation,mixed,,,,,,,Posterior processing,,Secondary model output
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),party_id,PartyFacts party identifier,Identifier for the individual party,integer,,,,,identifier,,PartyFacts crosswalk,Assigned during party harmonization,
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),party_name_english,English party name,Party name from the harmonized output,string,,,,,name,,Party metadata,,
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),party_name_short,Short party name,Short party label from the harmonized output,string,,,,,name,,Party metadata,,May be missing
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),country,Country code,ISO2 or historical country-code identifier,string,,,,,identifier,,Source metadata and PartyFacts,,
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),year,Calendar year,Calendar year of the election-year estimate,integer,,1944,2025,,year,,Election and model-year metadata,,
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),segment_num,Party segment number,Segment number within party after splitting at long evidence gaps,integer,,1,,,segment,,Party history segmentation,Main segment is coded 1,
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),union_party_id,Union or alliance PartyFacts identifier,Identifier of parent union or alliance where applicable,integer,,,,,identifier,,Alliance mapping,,Missing if party is not represented through a union or alliance
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),in_union,Union membership indicator,Indicator that the row is associated with a union or alliance,boolean,0;1,0,1,,indicator,,Alliance mapping,,
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),pervote,Vote share,Vote share at the election year,numeric,,0,100,,percent,,Election metadata,,
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),economic_lr,Economic left-right posterior mean,Posterior mean of economic left-right position,numeric,,0,1,,unit interval,0=left; 1=right,Posterior draws,Mean after inverse-logit transformation,
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),galtan,Cultural cosmopolitan--traditionalist posterior mean,Posterior mean of cultural cosmopolitan--traditionalist position,numeric,,0,1,,unit interval,0=cosmopolitan; 1=traditionalist,Posterior draws,Mean after inverse-logit transformation,
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),economic_lr_se,Economic posterior standard error,Posterior standard deviation for economic_lr,numeric,,0,,,unit interval,,Posterior draws,Standard deviation over posterior draws,
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),galtan_se,Cultural posterior standard error,Posterior standard deviation for the cultural estimate,numeric,,0,,,unit interval,,Posterior draws,Standard deviation over posterior draws,
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),economic_lr_q025,Economic lower posterior interval,2.5 percent posterior quantile for economic_lr,numeric,,0,1,,unit interval,0=left; 1=right,Posterior draws,Quantile over posterior draws,
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),economic_lr_q975,Economic upper posterior interval,97.5 percent posterior quantile for economic_lr,numeric,,0,1,,unit interval,0=left; 1=right,Posterior draws,Quantile over posterior draws,
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),galtan_q025,Cultural lower posterior interval,2.5 percent posterior quantile for the cultural estimate,numeric,,0,1,,unit interval,0=cosmopolitan; 1=traditionalist,Posterior draws,Quantile over posterior draws,
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),galtan_q975,Cultural upper posterior interval,97.5 percent posterior quantile for the cultural estimate,numeric,,0,1,,unit interval,0=cosmopolitan; 1=traditionalist,Posterior draws,Quantile over posterior draws,
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),election_id,Election identifier,Election identifier where available,string,,,,,identifier,,Election metadata,,Missing where no election identifier is available
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),election_date,Election date,Election date where available,date,,,,,date,,Election metadata,,Missing in current processed election metadata
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),has_text,Text support indicator,Indicator for direct or nearby text evidence,boolean,0;1,0,1,,indicator,,Source-support construction,Nearby threshold documented in source_support_dictionary.csv,
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),has_expert,Expert support indicator,Indicator for direct or nearby expert evidence,boolean,0;1,0,1,,indicator,,Source-support construction,Nearby threshold documented in source_support_dictionary.csv,
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),n_text_sources,Number of text sources,Number of distinct text source families contributing direct or nearby evidence,integer,,0,,,count,,Source-support construction,,
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),n_expert_sources,Number of expert sources,Number of distinct expert source families contributing direct or nearby evidence,integer,,0,,,count,,Source-support construction,,
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),nearest_text_distance,Nearest text distance,Absolute distance in years to nearest text observation used to inform trajectory,numeric,,0,,,years,,Source-support construction,,Missing if no text observation exists for the party-country key
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),nearest_expert_distance,Nearest expert distance,Absolute distance in years to nearest expert observation used to inform trajectory,numeric,,0,,,years,,Source-support construction,,Missing if no expert observation exists for the party-country key
|
||||
party_2d_election_year_panel_vN.csv (inside party_2d_election_year_panel_vN.zip),source_support_class,Source-support class,Summary class of text/expert support,string,both_direct_or_nearby; text_only_direct_or_nearby; expert_only_direct_or_nearby; temporal_propagation,,,,categorical,,Source-support construction,,
|
||||
party_2d_annual_model_output_vN.csv (inside party_2d_annual_model_output_vN.zip),all fields,Annual model output fields,Same model-output fields as the production annual party-position file plus no source-support augmentation,mixed,,,,,,,Posterior processing,,Secondary model output
|
||||
|
||||
|
+14
-7
@@ -17,27 +17,33 @@ export PARTY2D_RAW_DATA_DIR="${PARTY2D_RAW_DATA_DIR:-$repo_root/_local/raw}"
|
||||
export TMPDIR="${TMPDIR:-$repo_root/_local/tmp}"
|
||||
mkdir -p "$TMPDIR"
|
||||
|
||||
required_model_inputs=(
|
||||
"data/text_data.csv"
|
||||
"data/expert.csv"
|
||||
"data/lr_data.csv"
|
||||
"data/union_mapping.csv"
|
||||
"data/party_families.csv"
|
||||
)
|
||||
|
||||
if [ "$MODE" = "dry-run" ]; then
|
||||
echo "Checking commands..."
|
||||
command -v bash >/dev/null
|
||||
command -v Rscript >/dev/null
|
||||
command -v julia >/dev/null
|
||||
echo "Checking key files..."
|
||||
test -f Project.toml
|
||||
test -f Manifest.toml
|
||||
test -f models/stan_model_2dim_v6.stan
|
||||
test -f data/text_data.csv
|
||||
test -f data/expert.csv
|
||||
test -f data/lr_data.csv
|
||||
test -f data/model_data.csv
|
||||
for input in "${required_model_inputs[@]}"; do
|
||||
test -f "$input"
|
||||
done
|
||||
echo "Checking shell syntax..."
|
||||
bash -n scripts/01_prepare_data.sh
|
||||
bash -n scripts/02_fit_model.sh
|
||||
bash -n scripts/03_extract_estimates.sh
|
||||
bash -n scripts/04_enrich_estimates.sh
|
||||
bash -n scripts/05_validate_estimates.sh
|
||||
echo "Checking R syntax..."
|
||||
Rscript -e 'files <- list.files("src/r", pattern="\\.R$", full.names=TRUE); invisible(lapply(files, parse))'
|
||||
bash -n data-setup/run_data_setup.sh
|
||||
bash -n data-setup/check_raw_data.sh
|
||||
echo "Checking Julia project can instantiate without running model code..."
|
||||
julia --project=. -e 'import Pkg; Pkg.instantiate(); println("Julia project OK")'
|
||||
echo "Dry run passed. No model fitting was run."
|
||||
@@ -54,3 +60,4 @@ fi
|
||||
|
||||
bash scripts/03_extract_estimates.sh
|
||||
bash scripts/04_enrich_estimates.sh
|
||||
bash scripts/05_validate_estimates.sh
|
||||
|
||||
@@ -4,4 +4,25 @@ set -euo pipefail
|
||||
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
|
||||
cd "$repo_root"
|
||||
|
||||
Rscript -e 'setwd("data"); source("../src/r/00_data-management.R")'
|
||||
required_model_inputs=(
|
||||
"data/text_data.csv"
|
||||
"data/expert.csv"
|
||||
"data/lr_data.csv"
|
||||
"data/union_mapping.csv"
|
||||
"data/party_families.csv"
|
||||
)
|
||||
|
||||
missing=0
|
||||
for input in "${required_model_inputs[@]}"; do
|
||||
if [ ! -s "$input" ]; then
|
||||
echo "Missing model-ready input: $input" >&2
|
||||
missing=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$missing" -ne 0 ]; then
|
||||
echo "Regenerate model inputs with data-setup/run_data_setup.sh, or restore the included data/ files." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Model-ready data inputs are present."
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
## Executes the complete pipeline: data loading → preparation → model fitting
|
||||
##
|
||||
## Supports two model versions:
|
||||
## - "2dim": 2D bipolar model (V1) - estimates economic_lr and galtan directly
|
||||
## - "2dim": 2D bipolar model (V1) - estimates economic left-right and cultural cosmopolitan--traditionalist positions directly
|
||||
## - "4dim": 4D unipolar model (V10) - estimates 4 traits, derives 2 scales
|
||||
##
|
||||
## Default is 2D model (better identification, faster convergence)
|
||||
@@ -40,7 +40,7 @@ println(" Adapt delta: $(ADAPT_DELTA)")
|
||||
println(" Max depth: $(MAX_DEPTH)")
|
||||
println(" Start year: $(START_YEAR)")
|
||||
if MODEL_VERSION == "2dim"
|
||||
println("\n 2D MODEL: Estimates economic_lr and galtan directly")
|
||||
println("\n 2D MODEL: Estimates economic left-right and cultural cosmopolitan--traditionalist positions directly")
|
||||
println(" (Half the parameters, better convergence)")
|
||||
else
|
||||
println("\n 4D MODEL: Estimates 4 traits, derives 2 scales")
|
||||
@@ -256,7 +256,7 @@ function run_model(;
|
||||
println(" Expert dimension-specific observations: $(dat_4dim["N_exp_dim"])")
|
||||
println(" Expert general L-R observations: $(dat_4dim["N_exp_lr"])")
|
||||
if MODEL_VERSION == "2dim"
|
||||
println(" Dimensions estimated: 2 (economic_lr, galtan)")
|
||||
println(" Dimensions estimated: 2 (economic left-right, cultural cosmopolitan--traditionalist)")
|
||||
println(" Theta parameters: $(2 * data_prep.R) (2 × R)")
|
||||
else
|
||||
println(" Dimensions estimated: 4 (pro_market, pro_welfare, cosmopolitan, traditional)")
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
#!/usr/bin/env julia
|
||||
#=
|
||||
02_enrich_output.jl - Enrich party positions CSV with metadata
|
||||
02_enrich_output.jl - Enrich party positions CSV with model-input-derived metadata
|
||||
|
||||
Fast post-processing script that adds party names, union membership status,
|
||||
and election results to the model output CSV. Operates purely on CSV files
|
||||
(no chain loading). Takes seconds, not minutes.
|
||||
Fast post-processing script that adds union membership status from the model-ready
|
||||
inputs. Operates purely on CSV files (no chain loading). Takes seconds, not minutes.
|
||||
|
||||
Usage:
|
||||
julia 02_enrich_output.jl # enriches latest party_positions_*.csv
|
||||
julia 02_enrich_output.jl somefile.csv # enriches a specific file
|
||||
|
||||
Adds columns:
|
||||
party_name_english - Full English party name (from data/party_names.csv)
|
||||
party_name_short - Standard abbreviation
|
||||
in_union - 1 if party's union had a joint manifesto that year, 0 otherwise
|
||||
pervote - Vote share (%) at election years; missing for non-election years
|
||||
=#
|
||||
|
||||
using CSV
|
||||
@@ -40,32 +36,7 @@ function enrich(input_file::String)
|
||||
output = CSV.read(input_file, DataFrame)
|
||||
println(" Rows: $(nrow(output)), Columns: $(ncol(output))")
|
||||
|
||||
# --- Party names ---
|
||||
party_names_file = joinpath("data", "party_names.csv")
|
||||
if isfile(party_names_file)
|
||||
names_df = CSV.read(party_names_file, DataFrame)
|
||||
name_lookup = Dict{Int, Tuple{String, String}}()
|
||||
for row in eachrow(names_df)
|
||||
short = ismissing(row.party_name_short) ? "" : string(row.party_name_short)
|
||||
name_lookup[row.partyfacts_id] = (string(row.party_name_english), short)
|
||||
end
|
||||
output.party_name_english = [
|
||||
haskey(name_lookup, pid) ? name_lookup[pid][1] : ""
|
||||
for pid in output.party_id
|
||||
]
|
||||
output.party_name_short = [
|
||||
haskey(name_lookup, pid) ? name_lookup[pid][2] : ""
|
||||
for pid in output.party_id
|
||||
]
|
||||
n_named = count(x -> x != "", output.party_name_english)
|
||||
println(" Party names: $n_named / $(nrow(output)) rows matched")
|
||||
else
|
||||
output.party_name_english = fill("", nrow(output))
|
||||
output.party_name_short = fill("", nrow(output))
|
||||
println(" WARNING: data/party_names.csv not found")
|
||||
end
|
||||
|
||||
# --- Union mapping (for in_union + pervote fallback) ---
|
||||
# --- Union mapping (for in_union) ---
|
||||
union_mapping_file = joinpath("data", "union_mapping.csv")
|
||||
constituent_to_union = Dict{Int, Int}()
|
||||
if isfile(union_mapping_file)
|
||||
@@ -126,49 +97,6 @@ function enrich(input_file::String)
|
||||
println(" WARNING: Could not compute in_union (missing files)")
|
||||
end
|
||||
|
||||
# --- Election results (pervote) ---
|
||||
election_file = joinpath("data", "election_data.csv")
|
||||
output.pervote = Vector{Union{Float64, Missing}}(missing, nrow(output))
|
||||
|
||||
if isfile(election_file)
|
||||
election_df = CSV.read(election_file, DataFrame)
|
||||
|
||||
# Build lookup: (party_id, year) -> pervote
|
||||
election_lookup = Dict{Tuple{Int, Int}, Float64}()
|
||||
for row in eachrow(election_df)
|
||||
election_lookup[(row.party, row.year)] = row.pervote
|
||||
end
|
||||
|
||||
n_filled = 0
|
||||
for i in 1:nrow(output)
|
||||
pid = output.party_id[i]
|
||||
yr = output.year[i]
|
||||
|
||||
# Direct match (standalone party)
|
||||
if haskey(election_lookup, (pid, yr))
|
||||
output.pervote[i] = election_lookup[(pid, yr)]
|
||||
n_filled += 1
|
||||
elseif hasproperty(output, :union_party_id) && !ismissing(output.union_party_id[i])
|
||||
# Union constituent: look up by union PF ID
|
||||
uid = output.union_party_id[i]
|
||||
if haskey(election_lookup, (uid, yr))
|
||||
output.pervote[i] = election_lookup[(uid, yr)]
|
||||
n_filled += 1
|
||||
end
|
||||
elseif haskey(constituent_to_union, pid)
|
||||
# Fallback: use union mapping even if union_party_id column not populated
|
||||
uid = constituent_to_union[pid]
|
||||
if haskey(election_lookup, (uid, yr))
|
||||
output.pervote[i] = election_lookup[(uid, yr)]
|
||||
n_filled += 1
|
||||
end
|
||||
end
|
||||
end
|
||||
println(" pervote: $n_filled / $(nrow(output)) rows filled")
|
||||
else
|
||||
println(" WARNING: election_data.csv not found")
|
||||
end
|
||||
|
||||
# --- Reorder columns ---
|
||||
estimate_cols = Symbol[]
|
||||
for base in ["economic_lr", "galtan", "pro_market", "pro_welfare", "cosmopolitan", "traditional"]
|
||||
@@ -185,8 +113,7 @@ function enrich(input_file::String)
|
||||
output.country = replace(output.country, "MO" => "MK")
|
||||
|
||||
col_order = vcat(
|
||||
[:party_id, :party_name_english, :party_name_short, :country, :year, :segment_num,
|
||||
:union_party_id, :in_union, :pervote],
|
||||
[:party_id, :country, :year, :segment_num, :union_party_id, :in_union],
|
||||
estimate_cols
|
||||
)
|
||||
col_order = filter(c -> hasproperty(output, c), col_order)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
02_post_estimation.jl - Extract party position estimates from Stan model output
|
||||
|
||||
Supports both model versions:
|
||||
- 2D model (V1): Extracts economic_lr and galtan directly
|
||||
- 2D model (V1): Extracts economic left-right and cultural cosmopolitan--traditionalist positions directly
|
||||
- 4D model (V10): Extracts 4 traits + 2 derived scales
|
||||
|
||||
V10/V1 UPDATE: Handles segment-based indexing
|
||||
@@ -520,7 +520,7 @@ function extract_estimates(chains::DataFrame, segment_year_map::DataFrame, R::In
|
||||
|
||||
# Select quantities based on model version
|
||||
if model_version == "2dim"
|
||||
# 2D model: economic_lr and galtan are directly estimated
|
||||
# 2D model: economic left-right and cultural cosmopolitan--traditionalist positions are directly estimated
|
||||
# (general_lr is computed in Stan for anchoring but not extracted as output)
|
||||
quantities = ["economic_lr", "galtan"]
|
||||
test_col = "economic_lr.1"
|
||||
@@ -703,7 +703,7 @@ function validate_output(output::DataFrame, segment_info::Union{DataFrame, Nothi
|
||||
econ_marker = econ_ok ? "" : "*"
|
||||
galtan_marker = galtan_ok ? "" : "*"
|
||||
|
||||
@printf(" %-15s econ=%.2f%s [%.2f-%.2f] galtan=%.2f%s [%.2f-%.2f] %s\n",
|
||||
@printf(" %-15s economic=%.2f%s [%.2f-%.2f] cultural=%.2f%s [%.2f-%.2f] %s\n",
|
||||
anchor.name, mean_econ, econ_marker, anchor.econ[1], anchor.econ[2],
|
||||
mean_galtan, galtan_marker, anchor.galtan[1], anchor.galtan[2], status)
|
||||
end
|
||||
@@ -845,9 +845,9 @@ function save_output(output::DataFrame, metadata::Dict, segment_info::Union{Data
|
||||
if is_2d
|
||||
println(f, "Model: 2D Direct Bipolar")
|
||||
println(f, "")
|
||||
println(f, "Bipolar scales (0 = left/GAL, 1 = right/TAN):")
|
||||
println(f, "Bipolar scales (0 = left/cosmopolitan, 1 = right/traditionalist):")
|
||||
println(f, " economic_lr: Economic left-right position (directly estimated)")
|
||||
println(f, " galtan: GAL-TAN cultural position (directly estimated)")
|
||||
println(f, " galtan: Cultural cosmopolitan--traditionalist position (directly estimated)")
|
||||
# Note: general_lr is computed internally for cross-dimensional anchoring
|
||||
# but not reported as output (the two dimension-specific estimates are preferred)
|
||||
else
|
||||
@@ -856,12 +856,12 @@ function save_output(output::DataFrame, metadata::Dict, segment_info::Union{Data
|
||||
println(f, "Dimensions (0 = low, 1 = high):")
|
||||
println(f, " pro_market: Pro-market economic position")
|
||||
println(f, " pro_welfare: Pro-welfare state position")
|
||||
println(f, " cosmopolitan: Cosmopolitan/GAL cultural position")
|
||||
println(f, " traditional: Traditional/TAN cultural position")
|
||||
println(f, " cosmopolitan: Cosmopolitan cultural position")
|
||||
println(f, " traditional: Traditionalist cultural position")
|
||||
println(f, "")
|
||||
println(f, "Derived bipolar scales (0 = left/GAL, 1 = right/TAN):")
|
||||
println(f, "Derived bipolar scales (0 = left/cosmopolitan, 1 = right/traditionalist):")
|
||||
println(f, " economic_lr: Economic left-right (derived from pro_market - pro_welfare)")
|
||||
println(f, " galtan: GAL-TAN (derived from traditional - cosmopolitan)")
|
||||
println(f, " galtan: Cultural cosmopolitan--traditionalist (derived from traditional - cosmopolitan)")
|
||||
end
|
||||
println(f, "")
|
||||
println(f, "Uncertainty columns:")
|
||||
@@ -918,7 +918,7 @@ end
|
||||
|
||||
function main()
|
||||
println("="^60)
|
||||
println("POST-ESTIMATION: 4D Latent Trait Model (V10)")
|
||||
println("POST-ESTIMATION: Party-position model")
|
||||
println("="^60)
|
||||
println("Started: $(Dates.format(now(), "yyyy-mm-dd HH:MM:SS"))")
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ const EXPERT_VAR_TO_DIM = Dict(
|
||||
)
|
||||
|
||||
function load_and_preprocess_4dim_data(start_year=1950; data_dir::String=".")
|
||||
println("Loading 4D latent trait data files...")
|
||||
println("Loading party-position data files...")
|
||||
println("Start year filter: $start_year")
|
||||
data_dir != "." && println("Data directory: $data_dir")
|
||||
|
||||
@@ -274,4 +274,4 @@ end
|
||||
if abspath(PROGRAM_FILE) == @__FILE__
|
||||
text_data, expert_dim, expert_lr, year0, u2c, c2u = load_and_preprocess_4dim_data()
|
||||
println("4D data loading test completed successfully")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env julia
|
||||
#############################################################################
|
||||
## 04_model_execution_4dim.jl
|
||||
## Stan model compilation and execution for 4D latent trait model
|
||||
## Stan model compilation and execution for the party-position model
|
||||
## Based on v9 execution but adapted for four dimensions
|
||||
#############################################################################
|
||||
|
||||
@@ -601,7 +601,7 @@ function create_4dim_init_function(dat_4dim, J, P, R, T_year, N_ciy; model_versi
|
||||
# SOLUTION: Use explicit Vector{Vector} to guarantee correct JSON structure
|
||||
# V10: theta_init_raw has S rows (segments), not J rows (parties)
|
||||
base_init = Dict{String, Any}(
|
||||
# 4D latent trait parameters - Vector of Vectors for correct JSON
|
||||
# Four-trait legacy initialization branch - Vector of Vectors for correct JSON
|
||||
"theta_ncp" => [zeros(R) for _ in 1:4], # 4 rows of R elements
|
||||
"theta_init_raw" => [zeros(S) for _ in 1:4], # 4 rows of S elements (V10: segments)
|
||||
"sigma_theta_init" => ones(4), # SD per dimension
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
#############################################################################
|
||||
## 05_results_processing.jl
|
||||
## Extract and process 4D model results with diagnostics
|
||||
## Adapted from old_project for latent traits only (no election effects)
|
||||
## Extract and process model results without election effects
|
||||
#############################################################################
|
||||
|
||||
using StanSample, DataFrames, Statistics
|
||||
|
||||
function extract_model_results_4dim(stanmodel)
|
||||
"""
|
||||
Extract model results for 4D latent trait model
|
||||
Extract model results for the party-position model
|
||||
Simplified version - no election effects (pure latent traits)
|
||||
"""
|
||||
println("Extracting 4D model results...")
|
||||
@@ -17,7 +17,7 @@ function extract_model_results_4dim(stanmodel)
|
||||
try
|
||||
println("Model completed successfully - extracting results")
|
||||
|
||||
# For 4D latent trait model, we save the full stanmodel object
|
||||
# Save the full stanmodel object for downstream processing
|
||||
# Post-estimation will extract specific parameters later
|
||||
|
||||
return (
|
||||
|
||||
@@ -294,7 +294,7 @@ function generate_readme(
|
||||
|
||||
open(filepath, "w") do f
|
||||
write(f, "=" ^ 78 * "\n")
|
||||
write(f, "4D LATENT TRAIT MODEL - MODEL RUN RESULTS\n")
|
||||
write(f, "PARTY-POSITION MODEL - MODEL RUN RESULTS\n")
|
||||
write(f, "=" ^ 78 * "\n\n")
|
||||
|
||||
write(f, "Run ID: $run_id\n")
|
||||
|
||||
@@ -324,7 +324,7 @@ function validate_country_patterns(model::DataFrame)
|
||||
sort!(country_stats, :n_obs, rev=true)
|
||||
|
||||
@printf("%-4s %6s %6s %8s %8s %8s %8s\n",
|
||||
"CC", "Parties", "N", "Econ", "SD", "Galtan", "SD")
|
||||
"CC", "Parties", "N", "Econ", "SD", "Cult", "SD")
|
||||
println("-"^60)
|
||||
|
||||
for row in eachrow(country_stats[1:min(20, nrow(country_stats)), :])
|
||||
@@ -349,9 +349,9 @@ function validate_country_patterns(model::DataFrame)
|
||||
push!(issues, "right-skewed economy")
|
||||
end
|
||||
if row.mean_galtan < 0.35
|
||||
push!(issues, "cultural-skewed")
|
||||
push!(issues, "cosmopolitan-skewed")
|
||||
elseif row.mean_galtan > 0.65
|
||||
push!(issues, "TAN-skewed")
|
||||
push!(issues, "traditionalist-skewed")
|
||||
end
|
||||
println(" $(row.country): $(join(issues, ", "))")
|
||||
end
|
||||
|
||||
@@ -201,13 +201,13 @@ function validate_economic_lr(model::DataFrame, expert::DataFrame)
|
||||
end
|
||||
|
||||
function validate_galtan(model::DataFrame, expert::DataFrame)
|
||||
"""Validate galtan against CHES galtan and V-Party/GPS libcons"""
|
||||
"""Validate cultural cosmopolitan--traditionalist estimates against CHES and V-Party/GPS cultural measures"""
|
||||
|
||||
println("\n" * "="^60)
|
||||
println("CONVERGENT VALIDITY: galtan")
|
||||
println("CONVERGENT VALIDITY: cultural cosmopolitan--traditionalist")
|
||||
println("="^60)
|
||||
|
||||
# Filter expert data for GAL-TAN dimension
|
||||
# Filter expert data for cultural cosmopolitan--traditionalist dimension
|
||||
galtan_vars = filter(v -> occursin("galtan", v) || occursin("libcon", v), unique(expert.var))
|
||||
galtan_expert = filter(row -> row.var in galtan_vars, expert)
|
||||
|
||||
@@ -338,17 +338,17 @@ function validate_discriminant(model::DataFrame, expert::DataFrame)
|
||||
@printf(" Model Economic × Expert Economic: r = %.3f (convergent, n=%d)\n", r, nrow(merged_ee))
|
||||
end
|
||||
|
||||
# 2. Expert economic vs Model galtan (discriminant)
|
||||
# 2. Expert economic vs model cultural dimension (discriminant)
|
||||
merged_eg = innerjoin(econ_expert, model_gal, on=[:party, :year])
|
||||
if nrow(merged_eg) >= 10
|
||||
r = cor(merged_eg.val, merged_eg.galtan)
|
||||
push!(results, (model_dim="galtan", expert_dim="economic",
|
||||
r_pearson=r, r_spearman=corspearman(merged_eg.val, merged_eg.galtan),
|
||||
n=nrow(merged_eg), type="discriminant"))
|
||||
@printf(" Model GAL-TAN × Expert Economic: r = %.3f (discriminant, n=%d)\n", r, nrow(merged_eg))
|
||||
@printf(" Model Cultural × Expert Economic: r = %.3f (discriminant, n=%d)\n", r, nrow(merged_eg))
|
||||
end
|
||||
|
||||
# 3. Expert galtan vs Model galtan (convergent - already computed, include for matrix)
|
||||
# 3. Expert cultural vs model cultural dimension (convergent - already computed, include for matrix)
|
||||
galtan_vars = filter(v -> occursin("galtan", v) || occursin("libcon", v), unique(expert.var))
|
||||
galtan_expert = filter(row -> row.var in galtan_vars, expert)
|
||||
merged_gg = innerjoin(galtan_expert, model_gal, on=[:party, :year])
|
||||
@@ -357,22 +357,22 @@ function validate_discriminant(model::DataFrame, expert::DataFrame)
|
||||
push!(results, (model_dim="galtan", expert_dim="galtan",
|
||||
r_pearson=r, r_spearman=corspearman(merged_gg.val, merged_gg.galtan),
|
||||
n=nrow(merged_gg), type="convergent"))
|
||||
@printf(" Model GAL-TAN × Expert GAL-TAN: r = %.3f (convergent, n=%d)\n", r, nrow(merged_gg))
|
||||
@printf(" Model Cultural × Expert Cultural: r = %.3f (convergent, n=%d)\n", r, nrow(merged_gg))
|
||||
end
|
||||
|
||||
# 4. Expert galtan vs Model economic (discriminant)
|
||||
# 4. Expert cultural vs model economic dimension (discriminant)
|
||||
merged_ge = innerjoin(galtan_expert, model_econ, on=[:party, :year])
|
||||
if nrow(merged_ge) >= 10
|
||||
r = cor(merged_ge.val, merged_ge.economic_lr)
|
||||
push!(results, (model_dim="economic_lr", expert_dim="galtan",
|
||||
r_pearson=r, r_spearman=corspearman(merged_ge.val, merged_ge.economic_lr),
|
||||
n=nrow(merged_ge), type="discriminant"))
|
||||
@printf(" Model Economic × Expert GAL-TAN: r = %.3f (discriminant, n=%d)\n", r, nrow(merged_ge))
|
||||
@printf(" Model Economic × Expert Cultural: r = %.3f (discriminant, n=%d)\n", r, nrow(merged_ge))
|
||||
end
|
||||
|
||||
println()
|
||||
println("MTMM Matrix:")
|
||||
println(" Expert Economic Expert GAL-TAN")
|
||||
println(" Expert Economic Expert Cultural")
|
||||
for r in results
|
||||
if r.model_dim == "economic_lr" && r.expert_dim == "economic"
|
||||
@printf(" Model Economic: %.3f ", r.r_pearson)
|
||||
@@ -385,7 +385,7 @@ function validate_discriminant(model::DataFrame, expert::DataFrame)
|
||||
end
|
||||
for r in results
|
||||
if r.model_dim == "galtan" && r.expert_dim == "economic"
|
||||
@printf(" Model GAL-TAN: %.3f ", r.r_pearson)
|
||||
@printf(" Model Cultural: %.3f ", r.r_pearson)
|
||||
end
|
||||
end
|
||||
for r in results
|
||||
|
||||
@@ -87,7 +87,7 @@ function load_chains_selective(run_dir::String, needed_rr::Set{Int}, K::Int)
|
||||
# Build the set of column names we need
|
||||
needed_cols = Set{String}()
|
||||
|
||||
# theta columns: economic_lr.{rr} and galtan.{rr} for each unique rr
|
||||
# theta columns: economic_lr.{rr} and galtan.{rr} (cultural cosmopolitan--traditionalist) for each unique rr
|
||||
for rr in needed_rr
|
||||
push!(needed_cols, "economic_lr.$rr")
|
||||
push!(needed_cols, "galtan.$rr")
|
||||
@@ -384,6 +384,7 @@ function summarize_coverage(result::DataFrame, ci_level::Float64)
|
||||
|
||||
# Overall by dimension
|
||||
dim_names = Dict(1 => "economic_lr", 2 => "galtan")
|
||||
display_dim_names = Dict(1 => "economic left-right", 2 => "cultural cosmopolitan--traditionalist")
|
||||
|
||||
summary_rows = []
|
||||
for dim in sort(unique(result.dim_idx))
|
||||
@@ -394,8 +395,8 @@ function summarize_coverage(result::DataFrame, ci_level::Float64)
|
||||
ci = wilson_ci(ppc, n)
|
||||
dim_name = dim_names[dim]
|
||||
|
||||
println(@sprintf("\n %-15s: %.1f%% [%.1f%%, %.1f%%] (%d/%d)",
|
||||
dim_name, 100*ppc, 100*ci.lower, 100*ci.upper, n_covered, n))
|
||||
println(@sprintf("\n %-40s: %.1f%% [%.1f%%, %.1f%%] (%d/%d)",
|
||||
display_dim_names[dim], 100*ppc, 100*ci.lower, 100*ci.upper, n_covered, n))
|
||||
|
||||
push!(summary_rows, (
|
||||
dimension = dim_name,
|
||||
|
||||
@@ -26,33 +26,7 @@ if [[ -n "$latest_run" ]]; then
|
||||
metrics="$latest_run/diagnostics/run_metrics.json"
|
||||
if [[ -f "$metrics" ]]; then
|
||||
echo "Metrics: $metrics"
|
||||
echo "--- key metrics ---"
|
||||
py="$(command -v python3 || command -v python || true)"
|
||||
if [[ -z "$py" && -x /run/current-system/sw/bin/python3 ]]; then
|
||||
py=/run/current-system/sw/bin/python3
|
||||
fi
|
||||
if [[ -z "$py" ]]; then
|
||||
echo "No Python interpreter found for JSON summary; metrics file is available at: $metrics"
|
||||
exit 0
|
||||
fi
|
||||
"$py" - "$metrics" <<'PY'
|
||||
import json, sys
|
||||
path = sys.argv[1]
|
||||
with open(path) as f:
|
||||
m = json.load(f)
|
||||
print("status:", m.get("status"))
|
||||
cfg = m.get("config", {})
|
||||
print("chains:", cfg.get("num_chains"), "warmup:", cfg.get("num_warmup"), "samples:", cfg.get("num_samples"), "max_depth:", cfg.get("max_depth"), "refresh:", cfg.get("refresh"))
|
||||
timing = m.get("timing", {})
|
||||
if timing:
|
||||
print("walltime_minutes:", timing.get("walltime_minutes"))
|
||||
print("reported_warmup_seconds:", timing.get("reported_warmup_seconds"))
|
||||
print("reported_sampling_seconds:", timing.get("reported_sampling_seconds"))
|
||||
agg = m.get("aggregate", {})
|
||||
if agg:
|
||||
print("divergences:", agg.get("divergences"), "treedepth_hits:", agg.get("treedepth_hits"), "mean_leapfrog:", agg.get("mean_leapfrog"))
|
||||
print("cmdstan_config_verified:", m.get("cmdstan_config_verified"))
|
||||
PY
|
||||
echo "Open the JSON metrics file above for run-summary fields."
|
||||
else
|
||||
echo "No archived metrics yet. If the run is still sampling, watch the durable log with:"
|
||||
if [[ -n "$latest_log" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user