From b11289e093066b15a601163de6227d762e4005d3 Mon Sep 17 00:00:00 2001 From: flavis Date: Tue, 10 Aug 2021 17:53:45 +0200 Subject: [PATCH] =?UTF-8?q?replace=20=C3=9C=20with=20unicode=20equivalent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- R/analyze.R | 4 ++-- R/parse.R | 6 +++--- R/repair.R | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/R/analyze.R b/R/analyze.R index 84e7b19..51e289e 100644 --- a/R/analyze.R +++ b/R/analyze.R @@ -48,14 +48,14 @@ party_colors <- c( FDP="#FEEB34", "CDU/CSU"="#000000", SPD="#DF0B25", - "BÜNDNIS 90/DIE GRÜNEN"="#4A932B", + "B\u00DCNDNIS 90/DIE GR\u00DCNEN"="#4A932B", "DIE LINKE"="#BC3475", "AfD&Fraktionslos"="#AAAAFF", Fraktionslos="#AAAAAA" ) party_order <- factor(c("Fraktionslos", "AfD&Fraktionslos", - "DIE LINKE", "BÜNDNIS 90/DIE GRÜNEN", "SPD", "CDU/CSU", + "DIE LINKE", "B\u00DCNDNIS 90/DIE GR\u00DCNEN", "SPD", "CDU/CSU", "FDP", "AfD", NA_character_)) #' Bar chart visualizing fraction based data diff --git a/R/parse.R b/R/parse.R index d586aac..520c211 100644 --- a/R/parse.R +++ b/R/parse.R @@ -55,7 +55,7 @@ read_all <- function(path="inst/records/", pattern="-data\\.xml") { "SPD" = str_detect(fraction, "SPD"), "FDP" = str_detect(fraction, "FDP"), "DIE_LINKE" = str_detect(fraction, "DIE LINKE"), - "BUENDNIS_90_DIE_GRUENEN" = str_detect(fraction, "BÜNDNIS 90/DIE GRÜNEN"), + "BUENDNIS_90_DIE_GRUENEN" = str_detect(fraction, "B\u00DCNDNIS 90/DIE GR\u00DCNEN"), "AfD" = str_detect(fraction, "AfD")) %>% select(-fraction) -> applause @@ -172,8 +172,8 @@ parse_speech <- function(speech_xml, date) { comments = comments) } -fractionpattern <- "BÜNDNIS(SES)?\\W*90/DIE\\W*GRÜNEN|CDU/CSU|AfD|SPD|DIE LINKE|FDP|LINKEN" -fractionnames <- c("BÜNDNIS 90/DIE GRÜNEN", "CDU/CSU", "AfD", "SPD", "DIE LINKE", "FDP", +fractionpattern <- "B\u00DCNDNIS(SES)?\\W*90/DIE\\W*GR\u00DCNEN|CDU/CSU|AfD|SPD|DIE LINKE|FDP|LINKEN" +fractionnames <- c("B\u00DCNDNIS 90/DIE GR\u00DCNEN", "CDU/CSU", "AfD", "SPD", "DIE LINKE", "FDP", "Fraktionslos") parse_comment <- function(comment, speech_id, on_speaker) { diff --git a/R/repair.R b/R/repair.R index b7ca3fc..c52db56 100644 --- a/R/repair.R +++ b/R/repair.R @@ -1,7 +1,7 @@ fractions <- c("AFD" = "AfD", "AFD&FRAKTIONSLOS" = "AfD&Fraktionslos", - "BÜNDNIS90/" = "BÜNDNIS 90/DIE GRÜNEN", - "BÜNDNIS90/DIEGRÜNEN" = "BÜNDNIS 90/DIE GRÜNEN", + "B\u00DCNDNIS90/" = "B\u00DCNDNIS 90/DIE GR\u00DCNEN", + "B\u00DCNDNIS90/DIEGR\u00DCNEN" = "B\u00DCNDNIS 90/DIE GR\u00DCNEN", "FRAKTIONSLOS" = "Fraktionslos", "DIELINKE" = "DIE LINKE", "SPD" = "SPD",