You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package attempts to implement "parliament plots" - visual representations of the composition of legislatures that display seats colour-coded by party. The input is a data frame containing one row per party, with columns representing party name/label and number of seats, respectively.
15
22
23
+
This `R` package is a `ggplot2` extension and is now on CRAN. Please install the stable version in `R` by running:
Inspiration from this package comes from: [parliamentdiagram](https://github.com/slashme/parliamentdiagram), which
37
+
is used on Wikipedia, [parliament-svg](https://github.com/juliuste/parliament-svg), which is a javascript clone, and [a discussion on StackOverflow](http://stackoverflow.com/questions/42729174/creating-a-half-donut-or-parliamentary-seating-chart), which provided some of the code for part for the "arc" representations used in this package.
21
38
22
39
40
+
If you have any issues, please note the problem and inform us!
23
41
24
42
43
+
## Election data
25
44
45
+
`ggparliament` provides election data from the following countries.
26
46
27
47
48
+
```r
49
+
election_data %>%
50
+
distinct(year, country, house) %>%
51
+
arrange(country, year)
52
+
```
53
+
54
+
```
55
+
## year country house
56
+
## 1 2010 Australia Representatives
57
+
## 2 2010 Australia Senate
58
+
## 3 2013 Australia Representatives
59
+
## 4 2013 Australia Senate
60
+
## 5 2016 Australia Representatives
61
+
## 6 2016 Australia Senate
62
+
## 7 1990 Germany Bundestag
63
+
## 8 1994 Germany Bundestag
64
+
## 9 1998 Germany Bundestag
65
+
## 10 2002 Germany Bundestag
66
+
## 11 2005 Germany Bundestag
67
+
## 12 2009 Germany Bundestag
68
+
## 13 2013 Germany Bundestag
69
+
## 14 2017 Germany Bundestag
70
+
## 15 2007 Russia Duma
71
+
## 16 2011 Russia Duma
72
+
## 17 2016 Russia Duma
73
+
## 18 2010 UK Commons
74
+
## 19 2015 UK Commons
75
+
## 20 2017 UK Commons
76
+
## 21 2012 USA Senate
77
+
## 22 2012 USA Representatives
78
+
## 23 2014 USA Senate
79
+
## 24 2014 USA Representatives
80
+
## 25 2016 USA Senate
81
+
## 26 2016 USA Representatives
82
+
```
83
+
84
+
We also provide the following vignettes for further explanation:
85
+
86
+
1. Basic parliament plots
87
+
2. Labelling parties
88
+
3. Drawing the majority threshold line
89
+
4. Highlighting parties in power
90
+
5. Faceting legislatures
91
+
6. Emphasizing certain seats
92
+
7. Visualizaing overhang seats in MMP electoral systems
93
+
8. Arranging seat order in ggparliament plots.
94
+
95
+
Quick `ggparliament` examples can be viewed below.
96
+
97
+
## Semicircle parliament
98
+
99
+
### EU, France, United States, and so on...
100
+
101
+
102
+
### Plot of US House of Representatives
103
+
104
+
105
+
106
+
```r
107
+
#filter the election data for the most recent US House of Representatives
0 commit comments