-
Notifications
You must be signed in to change notification settings - Fork 0
/
structure.qmd
71 lines (52 loc) · 3.7 KB
/
structure.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
fig-cap-location: top
---
```{r import, echo=FALSE, message=FALSE, warning=FALSE}
library(rio)
library(tidyverse)
# read in the version number
version_number <- readLines('VERSION')[1]
### dynamically construct the file paths
# directory
data_dir <- "_data/database"
# politician
politicians_file_path <- file.path(data_dir, paste0("politician_", version_number, ".csv"))
politician <- read.csv(politicians_file_path)
# mandate
mandate_file_path <- file.path(data_dir, paste0("mandate_", version_number, ".csv"))
mandate <- read.csv(mandate_file_path)
# ppg
ppg_file_path <- file.path(data_dir, paste0("ppg_", version_number, ".csv"))
ppg <- read.csv(ppg_file_path)
# ppg leadership
ppg_leadership_file_path <- file.path(data_dir, paste0("ppgleadership_", version_number, ".csv"))
ppg_leadership <- read.csv(ppg_leadership_file_path)
# presidency
presidency_file_path <- file.path(data_dir, paste0("presidency_", version_number, ".csv"))
presidency <- read.csv(presidency_file_path)
# committee
committee_file_path <- file.path(data_dir, paste0("committee_", version_number, ".csv"))
committee <- read.csv(committee_file_path)
# cabinet
cabinet_file_path <- file.path(data_dir, paste0("cabinet_", version_number, ".csv"))
cabinet <- read.csv(cabinet_file_path)
# rm process files
rm(cabinet_file_path, committee_file_path, data_dir,
mandate_file_path, politicians_file_path, ppg_file_path,
ppg_leadership_file_path)
```
# The Database (Version: `r version_number`)
The core element of the database is the ***Politicians*** dataset. It entails one observation for every individual politician who was a member of a German state parliament or cabinet between 1990 and 2022, including their name, a unique ID, and other non-varying information like gender, birthdate, and birthplace. Shedding light on these politicians' legislative mandates, roles and functions in state parliaments, StatePol provides the datasets ***Mandate***, ***PPG***, ***PPG-Leadership***, ***Presidency***, and ***Committee***. Data on executive offices held in state governments can be found in the ***Cabinet*** dataset.
Following the logic of a relational database, all these datasets can be combined as desired by the individual politicians unique individual ID variable. By connecting the datasets, users can supplement members' personal data with their affiliations in factions, cabinets, state parliament presidencies, committees, and faction leadership. In the following table the datasets are listed and the figure displays the logic of the database-structure.
## The Datasets
| Dataset | Description | Variables | Observations |
|:----------|:----------------------------------------------------------|:---------------------:|:-----------------------:|
| Politician | Information on the all individual parliamentarians | `r length(politician)`| `r nrow(politician)`|
| Mandate | Information on the mandates by mps | `r length(mandate)` | `r nrow(mandate)` |
| PPG | Lists the members of the parties / parliamentary factions | `r length(ppg)` | `r nrow(ppg)` |
| PPG-Leadership | Lists the members of the faction boards | `r length(ppg_leadership)` | `r nrow(ppg_leadership)` |
| Presidency | Lists the members of the presidiums | `r length(presidency)` | `r nrow(presidency)` |
| Committee | Lists the members of the committees | `r length(committee)` | `r nrow(committee)` |
| Cabinet | Lists the members of the cabinets | `r length(cabinet)` | `r nrow(cabinet)` |
## The Structure
![](images/datensatz_struktur.png){fig-align="center"}