Data package containing tables, shapefiles, etc. for the 2013 and 2016 Australian elections and 2011 Australian census
R
Switch branches/tags
Nothing to show
Latest commit a9213ae Jul 9, 2017 Ben Marwick update readme with instructions for linux users
Permalink
Failed to load latest commit information.
R now just one NOTE about file sizes May 24, 2017
data-raw update the 2016 election data (merge labour to ALP) Apr 1, 2017
data cartogram (dot) for 2016 electorates Apr 1, 2017
man now just one NOTE about file sizes May 24, 2017
vignettes mapshaper available on CRAN now Jul 9, 2017
.Rbuildignore fix #15, document efforts on CRAN error in cran-comments.md Jul 9, 2017
.gitignore Kinda working Apr 1, 2017
.travis.yml readme to Rmd, add travis.yml Apr 24, 2016
CONDUCT.md add instructions about how to contribute Apr 24, 2016
CONTRIBUTING.md add instructions about how to contribute Apr 24, 2016
DESCRIPTION
NAMESPACE Automatic downloading of ShapeFiles from AEC website Apr 1, 2017
NEWS.md bump to a dev version Nov 25, 2016
README.Rmd update readme with instructions for linux users Jul 9, 2017
README.md update readme with instructions for linux users Jul 9, 2017
README_video_screenshot.png add screenshot of video to readme May 22, 2016
appveyor.yml add appveyer, remove html files May 19, 2016
cran-comments.md fix #15, document efforts on CRAN error in cran-comments.md Jul 9, 2017
eechidna.Rproj remove shapefile from vignettes folder to reduce package file size (c… May 22, 2016

README.md

eechidna

Travis-CI Build Status AppVeyor Build Status CRAN_Status_Badge

Exploring Election and Census Highly Informative Data Nationally for Australia

The R package eechidna provides data from the 2013 and 2016 Australian Federal Elections and 2011 Australian Census for each House of Representatives electorate, along with some tools for visualizing and analysing the data.

This package was developed during the rOpenSci auunconf event in Brisbane, Queensland, during 21-22 April 2016, and updated during the 2017 rOpenSci auunconf event. Peter Ellis' work on the NZ electoral data was an important inspiration for this package.

How to install

You can install the latest release of the package from CRAN like this

install.packages("eechidna")

Or you can install the development version from github, which may have some changes that are not yet on CRAN, using devtools, like this:

devtools::install_github("ropenscilabs/eechidna", 
                         build_vignettes = TRUE)
library(eechidna)

If you are using Linux, you may need some additional libraries for the mapping functions, you can get these with this line:

apt-get install libgdal-dev libgeos-dev -y

How to use

The most accessible and impressive part of this package is a highly interactive web app for exploring the election and census data together. This app uses the shiny framework, and can be run locally on your computer with the command eechidna::launchApp(). There is a video demo of the app here: https://vimeo.com/167367369, here's a screenshot:

In addition to the app, the package consists of several datasets, including the 2011 Australian Census, the 2013 and 2016 Australian Federal Elections (House of Representatives), and shapefiles for all Australian electoral districts.

We have two vignettes that show how to access these data in the package, and demonstrate how to analyse the data using R:

There are also two vignettes that demonstrate how to use the spatial data to make maps. Mapping election data for Australia is not trivial because of the extreme variation in electorate size. In these vignettes we show some methods for effectively visualising election data in Australia:

License

This package is free and open source software, licensed under GPL (>= 2).

Feedback, contributing, etc.

Please open and issue if you find something that doesn't work as expected or have questions or suggestions. Note that this project is released with a Guide to Contributing and a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Acknoweldgements

Thanks to Xiaoyue Cheng for her cartogram package which supplies the Dorling algorithm for this package. Thanks also to Andy Teucher for his rmapshaper package which has some key functions for working with shapefiles. Thanks to Scott Chamberlain and Yihui Xie for help with troubleshooting.


ropensci_footer