Merge branch 'master' of https://git.flavigny.de/christian/hateimparlament
This commit is contained in:
+16
-18
@@ -2,7 +2,7 @@
|
||||
% Please edit documentation in R/analyze.R
|
||||
\name{bar_plot_fractions}
|
||||
\alias{bar_plot_fractions}
|
||||
\title{plot data depending on fractions in a standardized, configurable way}
|
||||
\title{Bar chart visualizing fraction based data}
|
||||
\usage{
|
||||
bar_plot_fractions(
|
||||
tb,
|
||||
@@ -21,34 +21,32 @@ bar_plot_fractions(
|
||||
\arguments{
|
||||
\item{tb}{tibble}
|
||||
|
||||
\item{x_variable}{column in tb}
|
||||
\item{x_variable}{column in tb, default is fraction}
|
||||
|
||||
\item{y_variable}{column in tb}
|
||||
\item{y_variable}{column in tb, default is n}
|
||||
|
||||
\item{fill}{column in tb}
|
||||
\item{fill}{column in tb, default is fraction}
|
||||
|
||||
\item{title}{char}
|
||||
\item{title}{plot title}
|
||||
|
||||
\item{xlab}{char}
|
||||
\item{xlab}{label for x axis, default is fraction}
|
||||
|
||||
\item{ylab}{char}
|
||||
\item{ylab}{label for y axis, default is n}
|
||||
|
||||
\item{filllab}{char}
|
||||
\item{filllab}{default is 'Fraction'}
|
||||
|
||||
\item{flipped}{bool}
|
||||
\item{flipped}{if TRUE draw bars horizontally, else vertically. Default is TRUE}
|
||||
|
||||
\item{position}{char}
|
||||
\item{position}{default is 'dodge'}
|
||||
|
||||
\item{reorder}{bool
|
||||
\item{reorder}{Either reorder fraction factor by variable value or reorder fraction factor by party seat order in parliament (default).
|
||||
|
||||
plot data from tb in the following way: for each item in x_variable show the corresponding value in y_variable.
|
||||
Then color the plot depending on the fill value
|
||||
Give the plot a title, an x-label xlab as well as an y-label ylab
|
||||
Color the legend according to filllab
|
||||
Setting flipped to TRUE makes the bars horizontal
|
||||
Improve positioning details according to position
|
||||
and finally reorder x_variable (default ist to order fractions according to seat order)}
|
||||
Then color the plot depending on the fill value.
|
||||
Give the plot a title and a label for x-axis and y-axis,
|
||||
color the legend according to filllab and finally
|
||||
improve positioning details according to position}
|
||||
}
|
||||
\description{
|
||||
plot data depending on fractions in a standardized, configurable way
|
||||
Can be configured to also visualize data not related to fractions.
|
||||
}
|
||||
|
||||
@@ -8,6 +8,10 @@ fetch_all(download_dir = "data/records/", create = FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{download_dir}{character}
|
||||
|
||||
\item{create}{bool
|
||||
|
||||
if create is TRUE, the directory given in download_dir is created}
|
||||
}
|
||||
\description{
|
||||
This fetches all available records of the 19th legislative period of the german Bundestag.
|
||||
|
||||
+3
-3
@@ -9,12 +9,12 @@ join_speaker(tb, res, fraction_only = F)
|
||||
\arguments{
|
||||
\item{tb}{tibble}
|
||||
|
||||
\item{res}{tibble}
|
||||
\item{res}{list of tibbles}
|
||||
|
||||
\item{fraction_only}{bool
|
||||
\item{fraction_only}{if TRUE, only select fraction from the resulting joined tibble
|
||||
|
||||
left join speaker information from res$speaker into tb.
|
||||
if fraction_only is TRUE, only fraction is selected from the resulting joined tibble}
|
||||
if fraction_only}
|
||||
}
|
||||
\description{
|
||||
add information from speaker table to a tibble containing speaker id
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
\docType{data}
|
||||
\name{party_colors}
|
||||
\alias{party_colors}
|
||||
\title{lookup table for party colors}
|
||||
\title{lookup table for official party colors}
|
||||
\format{
|
||||
An object of class \code{character} of length 8.
|
||||
}
|
||||
@@ -11,6 +11,6 @@ An object of class \code{character} of length 8.
|
||||
party_colors
|
||||
}
|
||||
\description{
|
||||
lookup table for party colors
|
||||
lookup table for official party colors
|
||||
}
|
||||
\keyword{datasets}
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
% Please edit documentation in R/parse.R
|
||||
\name{read_from_csv}
|
||||
\alias{read_from_csv}
|
||||
\title{Read the needed tables for developing from a csv file.}
|
||||
\title{create a tibble from the csv file}
|
||||
\usage{
|
||||
read_from_csv(path = "data/csv/")
|
||||
}
|
||||
\arguments{
|
||||
\item{path}{char
|
||||
\item{path}{directory to read files from
|
||||
|
||||
Reading the tables from a csv is way faster than reading and repairing the data every single time}
|
||||
reading the tables from a csv is way faster than reading and repairing the data every single time}
|
||||
}
|
||||
\description{
|
||||
Read the needed tables for developing from a csv file.
|
||||
create a tibble from the csv file
|
||||
}
|
||||
|
||||
@@ -2,22 +2,19 @@
|
||||
% Please edit documentation in R/analyze.R
|
||||
\name{word_usage_by_date}
|
||||
\alias{word_usage_by_date}
|
||||
\title{Counts how many talks do match a given pattern and summarises by date}
|
||||
\title{Word usage summarised by date}
|
||||
\usage{
|
||||
word_usage_by_date(res, patterns, name, tidy = F)
|
||||
}
|
||||
\arguments{
|
||||
\item{res}{tibble}
|
||||
\item{res}{List of Tibbles to be analysed.}
|
||||
|
||||
\item{patterns}{char list}
|
||||
\item{patterns}{Words to look up.}
|
||||
|
||||
\item{name}{char ? what is name needed for??}
|
||||
\item{name}{?}
|
||||
|
||||
\item{tidy}{bool, default F
|
||||
|
||||
shorter summary if tidy=F
|
||||
if tidy is set to T, the resulting tibble is tidy}
|
||||
\item{tidy}{default is FALSE.}
|
||||
}
|
||||
\description{
|
||||
Counts how many talks do match a given pattern and summarises by date
|
||||
Counts how many talks do match a given pattern and summarises by date.
|
||||
}
|
||||
|
||||
+5
-7
@@ -2,19 +2,17 @@
|
||||
% Please edit documentation in R/parse.R
|
||||
\name{write_to_csv}
|
||||
\alias{write_to_csv}
|
||||
\title{Write the parsed and repaired results into a csv file to make loading and developing faster and easier}
|
||||
\title{Write the parsed and repaired results into separate csv files}
|
||||
\usage{
|
||||
write_to_csv(tables, path = "data/csv/", create = F)
|
||||
}
|
||||
\arguments{
|
||||
\item{tables}{tibble list}
|
||||
\item{tables}{list of tables to convert into a csv files.}
|
||||
|
||||
\item{path}{char}
|
||||
\item{path}{where to put the csv files.}
|
||||
|
||||
\item{create}{bool
|
||||
|
||||
if create is set to TRUE, the directory given in path is created}
|
||||
\item{create}{set TRUE if the path does not exist yet and you want to create it}
|
||||
}
|
||||
\description{
|
||||
Write the parsed and repaired results into a csv file to make loading and developing faster and easier
|
||||
Write the parsed and repaired results into separate csv files
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user