Git Product home page Git Product logo

aecfeedr's Introduction

aecfeedr

R build status Codecov test coverage

Overview

aecfeedr is an R package for accessing and reading information from the Australian Electoral Commission's (AEC) FTP media feeds.

This package is under active early development and testing.

Installation

At this stage the package isn't available on CRAN. You can get the latest release version of the package from GitHub:

devtools::install_github("tobiasziegler/aecfeedr")

Or you can get the development version:

devtools::install_github("tobiasziegler/aecfeedr", ref = "develop")

Usage

At the moment the package only has functions to read and process the following feed files:

  • Preload data (Detailed granularity): read_preload_house_fp takes the preload results message and returns a list containing tibbles (data frames) with details of contests (divisions), polling places, candidates, and historic (previous election) votes by polling place and vote type.

  • Results count (Light verbosity, Detailed granularity): read_results_house takes the results messages from election night or subsequent counting and returns a list containing tibbles (data frames) with vote counts (first preferences and two candidate preferred) by polling place and vote type.

These two feeds allow you to produce detailed reporting, analysis and projection of the results based on vote counts at the polling place level.

There are also some helper functions available to construct the URLs for retrieving the messages from the AEC's FTP sites, to get a listing of files in a given directory, to download and unzip a feed file, and to write processed data to a database.

Examples

The AEC website provides an archive of feeds from past federal elections and by-elections back to 2007, which you can access for testing before using the package during a live election, or for historical analysis.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.