All Projects → evanodell → parlitools

evanodell / parlitools

Licence: Unknown, MIT licenses found Licenses found Unknown LICENSE MIT LICENSE.md
A collection of useful tools for UK politics

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to parlitools

calltoaction
Call Congress with a tap
Stars: ✭ 16 (-27.27%)
Mutual labels:  politics
multi-task-defocus-deblurring-dual-pixel-nimat
Reference github repository for the paper "Improving Single-Image Defocus Deblurring: How Dual-Pixel Images Help Through Multi-Task Learning". We propose a single-image deblurring network that incorporates the two sub-aperture views into a multitask framework. Specifically, we show that jointly learning to predict the two DP views from a single …
Stars: ✭ 29 (+31.82%)
Mutual labels:  datasets
contact-officials
Form definitions powering Resistbot's electronic deliveries to elected officials in the United States.
Stars: ✭ 29 (+31.82%)
Mutual labels:  politics
mindsdb-examples
Examples for usage of Mindsdb https://www.mindsdb.com/
Stars: ✭ 25 (+13.64%)
Mutual labels:  datasets
datumaro
Dataset Management Framework, a Python library and a CLI tool to build, analyze and manage Computer Vision datasets.
Stars: ✭ 274 (+1145.45%)
Mutual labels:  datasets
spectrochempy
SpectroChemPy is a framework for processing, analyzing and modeling spectroscopic data for chemistry with Python
Stars: ✭ 34 (+54.55%)
Mutual labels:  datasets
radar
Estamos de mudança para o GitLab: https://gitlab.com/radar-parlamentar/radar.
Stars: ✭ 84 (+281.82%)
Mutual labels:  politics
newt
Natural World Tasks
Stars: ✭ 24 (+9.09%)
Mutual labels:  datasets
dw-jdbc
JDBC driver for data.world
Stars: ✭ 17 (-22.73%)
Mutual labels:  datasets
time-series-classification
Classifying time series using feature extraction
Stars: ✭ 75 (+240.91%)
Mutual labels:  datasets
mypolitics-classic
myPolitics Classic frontend
Stars: ✭ 25 (+13.64%)
Mutual labels:  politics
bumblebee
🚕 A spreadsheet-like data preparation web app that works over Optimus (Pandas, Dask, cuDF, Dask-cuDF, Spark and Vaex)
Stars: ✭ 120 (+445.45%)
Mutual labels:  datasets
datasets
The primary repository for all of the CORGIS Datasets
Stars: ✭ 19 (-13.64%)
Mutual labels:  datasets
cia
Citizen Intelligence Agency, open-source intelligence (OSINT) project
Stars: ✭ 79 (+259.09%)
Mutual labels:  politics
Salvini-Blocker
Simple Chrome extension that replaces Matteo Salvini's face with a cat.
Stars: ✭ 34 (+54.55%)
Mutual labels:  politics
Spatio-Temporal-papers
This project is a collection of recent research in areas such as new infrastructure and urban computing, including white papers, academic papers, AI lab and dataset etc.
Stars: ✭ 180 (+718.18%)
Mutual labels:  datasets
json2python-models
Generate Python model classes (pydantic, attrs, dataclasses) based on JSON datasets with typing module support
Stars: ✭ 119 (+440.91%)
Mutual labels:  datasets
Dataset-Sentimen-Analisis-Bahasa-Indonesia
Repositori ini merupakan kumpulan dataset terkait analisis sentimen Berbahasa Indonesia. Apabila Anda menggunakan dataset-dataset yang ada pada repositori ini untuk penelitian, maka cantumkanlah/kutiplah jurnal artikel terkait dataset tersebut. Dataset yang tersedia telah diimplementasikan dalam beberapa penelitian dan hasilnya telah dipublikasi…
Stars: ✭ 38 (+72.73%)
Mutual labels:  datasets
votacidade-app
Calculadora de afinidade para o Vota Cidade 2020
Stars: ✭ 12 (-45.45%)
Mutual labels:  politics
ake-datasets
Large, curated set of benchmark datasets for evaluating automatic keyphrase extraction algorithms.
Stars: ✭ 125 (+468.18%)
Mutual labels:  datasets

License: MIT CRAN_Status_Badge GitHub tag Travis-CI Build Status AppVeyor Build Status Coverage Status DOI

parlitools

A collection of useful tools for UK politics, including base maps and datasets. Initially inspired by Bhaskar Karambelkar’s tilegrams package, but with the ability to create a hexagonal map of UK parliamentary constituencies and local authorities. The package also includes functions for data retrieval of current MPs and their consituency details (as it requires calls to two different APIs, this function is not included in my hansard or mnis packages), and local government composition. There are inbuilt datasets from the 2015 and 2017 UK General Elections and 2011 Census, courtesy of the British Election Study, estimates of EU referendum votes from Chris Hanretty, and hex codes for different party colours.

The most up-to-date documentation will always be at http://docs.evanodell.com/parlitools/.

Installing

parlitools is available on CRAN. To install on CRAN run:

install.packages("parlitools")

Or, if you use pacman:

pacman::p_load(parlitools)

To install the development version from GitHub, run:

##install.packages("parlitools")
devtools::install_github("evanodell/parlitools")

Functions and Data

For more details see the full documentation or the vignettes.

Included Data

party_colour - A tibble with the ID, name and hex code for the official colour of a variety of political parties, taken from Wikipedia. Includes all political parties with MPs and a number without MPs. (Sources: https://en.wikipedia.org/wiki/Wikipedia:Index_of_United_Kingdom_political_parties_meta_attributes, mnis::ref_parties())

bes_2015 - A tibble with the British Election Study 2015 Constituency Results Version 2.2. For information on all the variables in this dataset, see the bes-2015 vignette (Source: http://www.britishelectionstudy.com/data-object/2015-bes-constituency-results-with-census-and-candidate-data/)

bes_2017 - A tibble with Great Britain constituencies results from the 2017 general election. This data can be linked to 2011 census information in census_11.

census_11 - A tibble with constituency-level census data.

leave_votes_west - The percentage of votes cast for leave in the 2016 EU referendum. Some constituencies have actual results and others only have estimates by Chris Hanretty; in cases where the actual cote count is known, both the estimates and the actual results are reported. (Sources: Hanretty, C. (2017). Areal interpolation and the UK’s referendum on EU membership. Journal of Elections, Public Opinion and Parties, 27(4), 466–483. https://doi.org/10.1080/17457289.2017.1287081, http://www.bbc.co.uk/news/uk-northern-ireland-36616830)

Data Retrieval Functions

current_mps - Uses functions from hansard and mnis to create a tibble with data on all current MPs, their party affiliation and their constituency.

mps_on_date - Uses functions from hansard and mnis to create a tibble with data on all MPs from a given date, their party affiliation and their constituency.

west_hex_map - A hexagonal cartogram, stored as a simple feature and data frame, of Westminster parliamentary constituencies. west_hex_map can be used to create maps like this:

local_hex_map - Hexagonal cartogram, A hexagonal cartogram, stored as a simple feature and data frame, of all Local Authorities in England, Wales and Scotland.

Using parlitools

For more details, please see the introductory vignette, using parlitools with cartogram, mapping local authorities and the vignette detailing British Election Study 2015 variables.

Data Sources

There are a variety of potentially relevant data sources and datasets on UK politics, far too many for me to include them all in this package.

  • Electoral Commission

    • Electoral results dating back to 2005.
  • British Election Study

    • A large selection of open data, including panel surveys, linked data and aggregated Twitter data, covering elections and referenda.
  • My hansard & mnis data retrieval packages for parliamentary APIs.

  • Open Council Data has data on the names, parties, and wards of all UK councillors, updated more or less weekly. parlitools uses this site to power the council_seats() function.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].