|
|
il y a 4 ans | |
|---|---|---|
| R | il y a 4 ans | |
| inst | il y a 4 ans | |
| man | il y a 4 ans | |
| vignettes | il y a 4 ans | |
| .Rbuildignore | il y a 4 ans | |
| .gitignore | il y a 4 ans | |
| DESCRIPTION | il y a 4 ans | |
| NAMESPACE | il y a 4 ans | |
| README.md | il y a 4 ans | |
# everything works with devtools (loads some other packages too)
library(devtools)
# reload all package functions
load_all()
#write to CSV files to speed up loading
tables <- read_all()
tables <- repair(tables)
write_to_csv(tables)
We NEVER use source(...), etc.! Also NEVER use library(...). But to add new packages (as dependency), use:
use_package("my-good-old-package")
To make package imports available, you have to add them to R/hateimparlament-package.R
as @import <package>.
To reload / create documentation (calls roxygen)
document()
Build vignettes
rmarkdown::render("vignettes/bla.Rmd")
Before parsing, fetch.R must be run to download all protocols.
fetch_all("../inst/records/") # path to directory where records should be stored
parse.R parses all downloaded logs and creates 5 tibbles. repair.R then cleans up the errors in these tibbles.
read_all("../inst/records/") %>% repair()
structure: id , first_name , last_name , fraction , title , role_short, role_long.
Obtained from the <speaker list> entry at the end of the transcripts.
Structure: id , speaker
The speeches id is specified in the protocol and is unique.A speech is a <speech> entry in the session history. A speech always has a main speaker (the one standing at the front of the lectern).
Within a speech, there can be different speech entries:
Structure: speech_id , speaker , content.
These are the actual talk entries that appear within speeches.
speech_id: the speech in which the contribution appears.speaker: The speaker of the speech entry.content: The content of the speech.###comments
These are the interjections that appear during the speeches.
They have the following structure:
speech_id: The speech that was interrupted.on_speaker: The speaker who was interrupted.fractioncommenter: The person who interrupted the speech.comment: The content of the comment.###applause
The logical table shows which party applauded for which speaker with explicit speech and which did not.
structure: speech_id, on_speaker, CDU_CSU, SPD, FDP, DIE_LINKE, BUENDNIS_90_DIE_GRUENEN, AfD
analysis.R provides some functions to analyze the “Plenarprotokolle” and to create plots.
In the vignettes you can find different analyses of the protocols, for example: