Description Usage Arguments Value Examples
View source: R/Arco_parlamentario.R
With this graph two parliamentary arcs will be obtained with the purpose of being able to compare the structure of them, that is to say, the results obtained in two different electoral processes.
1 2 3 4 5 6 7 8 9 10 11 | Arc_Comparacion(
Partidos1,
Partidos2,
Escanos1,
Escanos2,
cols = NULL,
repr = c("absolute", "proportion"),
titu1 = "Election1",
titu2 = "Election2",
titulo = "Poner un titulo"
)
|
Partidos1 |
It is a character vector with the names of the parties of the first process. |
Partidos2 |
It is a character vector with the names of the parties of the second process. |
Escanos1 |
It is an integer vector with the results of the first process. |
Escanos2 |
It is an integer vector with the results of the second process. |
cols |
It is a vector containing the colors to be used in the elaboration of the graph |
repr |
To indicate if you want a graph in absolute terms ("absolute") or to use relative terms ("proportion"). |
titu1 |
Title to be used for the first process |
titu2 |
Title to be used for the second process |
titulo |
Global title for the whole chart. |
A ggplot object is obtained containing two graphs representing the two parliamentary arcs to be compared.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | bt1 <- data.frame(parties = c("PP", "CSU", "SPD","IU"),
seats = c(200, 46, 153,58),
cols = c("black", "blue", "red","jjj"),
stringsAsFactors = FALSE)
bt2 <- data.frame(parties = c("PP", "CSU","UP1"),
seats = c(100, 146,200),
cols = c("green", "blue","GGG"),
stringsAsFactors = FALSE)
Arc_Comparacion(bt1$parties,bt2$parties, bt1$seats,
bt2$seats, cols=c("PP"="blue", "CSU"="red","SPD"="green",
"IU"="pink","UP1"="antiquewhite" ),
titu1 = "Abril-2019",titu2 = "Noviembre-2019",
titu = " Comparación de elecciones")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.