{"id":18635302,"url":"https://github.com/bbc-data-unit/eu-elections-2019","last_synced_at":"2026-05-02T03:08:37.791Z","repository":{"id":72157093,"uuid":"186970236","full_name":"BBC-Data-Unit/eu-elections-2019","owner":"BBC-Data-Unit","description":"2019 European elections: How many new MEPs might you get?","archived":false,"fork":false,"pushed_at":"2019-05-22T11:26:57.000Z","size":10240,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-17T13:08:09.966Z","etag":null,"topics":["api","elections","eu","gender","pay","politics","python","r","scraper","twitter"],"latest_commit_sha":null,"homepage":"https://www.bbc.co.uk/news/uk-england-48202795","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BBC-Data-Unit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-16T06:58:03.000Z","updated_at":"2019-05-22T11:26:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"1d9c5047-c06f-46eb-89cf-248198ca87d5","html_url":"https://github.com/BBC-Data-Unit/eu-elections-2019","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BBC-Data-Unit/eu-elections-2019","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBC-Data-Unit%2Feu-elections-2019","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBC-Data-Unit%2Feu-elections-2019/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBC-Data-Unit%2Feu-elections-2019/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBC-Data-Unit%2Feu-elections-2019/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BBC-Data-Unit","download_url":"https://codeload.github.com/BBC-Data-Unit/eu-elections-2019/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBC-Data-Unit%2Feu-elections-2019/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32521136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","elections","eu","gender","pay","politics","python","r","scraper","twitter"],"created_at":"2024-11-07T05:24:23.527Z","updated_at":"2026-05-02T03:08:37.759Z","avatar_url":"https://github.com/BBC-Data-Unit.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 2019 European elections: How many new MEPs might you get?\n\n![](https://ichef.bbci.co.uk/news/624/cpsprodpb/4249/production/_106996961_meppay2-nc.png)\n\nIn May 2019 we [published an analysis of data relating to the upcoming EU elections](https://www.bbc.co.uk/news/uk-england-48202795), \"some facts and figures about the choice voters have about who represents them in Brussels and Strasbourg.\"\n\nThe article was based on a range of analysis, including combining ONS data with information on MEP wages; a Python-based Twitter scraper and analysis in R; collating names and using a names gender API; and generating some visualisation using R.\n\n## Get the data \n\n* European Parliament: [Salaries and pensions](https://www.europarl.europa.eu/news/en/faq/13/salaries-and-pensions); [European elections: What pay can UK MEPs expect?](https://www.bbc.co.uk/news/uk-politics-48037162)\n* BBC: [2019 European elections: List of candidates](https://www.bbc.co.uk/news/uk-politics-48081172)\n* Spreadsheet: [MEPs standing and not standing](https://github.com/BBC-Data-Unit/eu-elections-2019/blob/master/MEPS%20STANDING%20NOT%20STANDING%20CHECKED.xlsx)\n* ONS: [Employee earnings in the UK: 2018](https://www.ons.gov.uk/employmentandlabourmarket/peopleinwork/earningsandworkinghours/bulletins/annualsurveyofhoursandearnings/2018)\n* Spreadsheet: [Matching earnings by region against MP salaries](https://github.com/BBC-Data-Unit/eu-elections-2019/blob/master/DATA%20FOR%20CHARTS.xlsx)\n* CSV: [MEP pay versus regional average](https://github.com/BBC-Data-Unit/eu-elections-2019/blob/master/mepspay.csv)\n* European Parliament: [Turnout and gender factsheet (PDF)](https://www.europarl.europa.eu/RegData/etudes/BRIE/2018/614733/EPRS_BRI(2018)614733_EN.pdf)\n* CSV: [Turnout by country](https://github.com/BBC-Data-Unit/eu-elections-2019/blob/master/mepturnout.csv)\n* CSV: [Female MEPs by country](https://github.com/BBC-Data-Unit/eu-elections-2019/blob/master/femalemeps.csv)\n* Spreadsheet: [MP names' gender - API results, analysis and checking](https://github.com/BBC-Data-Unit/eu-elections-2019/blob/master/candidatesnamesGENDEREDapi.xlsx)\n* Spreadsheet: [Checking numbers of candidates by party and region](https://github.com/BBC-Data-Unit/eu-elections-2019/blob/master/candidates%20check.xlsx)\n* CSV: [UK MEP Twitter accounts](https://github.com/BBC-Data-Unit/eu-elections-2019/blob/master/ukmepaccounts.csv)\n* CSV: [Word frequency comparison, lower case versus original case](https://github.com/BBC-Data-Unit/eu-elections-2019/blob/master/wordfrequpperandlower.csv) - this was used to check whether terms like 'EU' and 'UK' were from URLs or being used in reference to geography\n* Two datasets - 180,001 scraped tweets, and a dataset of all tweets by MEPs in the last 12 months - are too large to include here\n* Spreadsheet: [analysis of election spending data from Electoral Commission (not used in the final story)](https://github.com/BBC-Data-Unit/eu-elections-2019/blob/master/Euro%20Campaign%20Spending%20last3.xlsx)\n* CSV: [Donations during 2014 European election period](https://github.com/BBC-Data-Unit/eu-elections-2019/blob/master/donations%20during%20euro%202014%20period.csv) (unused, as it is not possible to distinguish between donations for EU or other elections)\n\n## Quotes and interviews\n\n* Julie Girling, independent MEP for the South West\n* Mary Honeyball, Labour Party MEP for London\n\n## Visualisation\n\n* Table: Number of parties standing vs number of seats for each region\n* Table: MEPs standing down by region\n* Bar chart: MEPs' pay compared with regional averages\n* Bar chart: Most common words tweeted by UK MEPs\n* Bar chart: Percentage of MEPs that are female by member state\n* Bar chart: Turnout in European elections 2014 by member state\n* Word cloud: [word frequency in MEP tweets](https://github.com/BBC-Data-Unit/eu-elections-2019/blob/master/meptweets_wordcloud.png)\n\n## Code and scripts\n\n* [Twitter scraper](https://github.com/BBC-Data-Unit/eu-elections-2019/blob/master/meptwitterscraper.py): the first part collects accounts from a list; the second part scrapes the most recent 3,300 tweets by each account on a list\n* [R Markdown: analysing MEP tweets](https://github.com/BBC-Data-Unit/eu-elections-2019/blob/master/meptweets.Rmd)\n* [Shell script: generating a word count from a text file](https://github.com/BBC-Data-Unit/eu-elections-2019/blob/master/wordfreq.sh) (unused). *Note: the text file is created by changing the .csv extension to .txt*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbc-data-unit%2Feu-elections-2019","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbc-data-unit%2Feu-elections-2019","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbc-data-unit%2Feu-elections-2019/lists"}