resultatselection

Scraped data from https://resultatselection.belgium.be

https://github.com/joseparreiras/resultatselection

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.5%) to scientific vocabulary

Keywords

belgium dataset election opendata politics python scraping selenium selenium-webdriver
Last synced: 6 months ago · JSON representation ·

Repository

Scraped data from https://resultatselection.belgium.be

Basic Info
  • Host: GitHub
  • Owner: joseparreiras
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 1.4 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Topics
belgium dataset election opendata politics python scraping selenium selenium-webdriver
Created about 3 years ago · Last pushed about 3 years ago
Metadata Files
Readme Citation

README.md

Scraped data from Le Service public fédéral Intérieur

Open Issues Last Commit Language Git Forks

📝 Table of Contents

📌 About

This program downloads the election data available on the Service public fédéral Intérieur. This data contains the votes for each party in many Belgium elections since the 18s century at the municipality level. For more information go to their ℹ️ Info Page.

💾 Data

Data is stored in the data/ directory in the following pattern data/election_type/election_date/district_type.csv. The data is stored in a CSV file with the following columns:

Header | Type | Description ---------|----------|--------- Parti | str | Name of the party Nombre de sièges | int | Number of seats won by the party Nombre de voix | int | Number of votes won by the party type of district (e.g. "canton")| str | The district of the data date | int | The year of the election election | str | The election type

🚦 Getting Started

This code uses Selenium webdriver to download the data. You can find the installation instructions here. The required packages are listed in the requirements.txt file and you can install them from pip using the following command:

pip install -r requirements.txt

🦎 Geckodriver

Geckodriver is used to control the Firefox browser. You can download it from here or using homebrew on macOS:

brew install geckodriver

End with an example of getting some data out of the system or using it for a little demo.

📦 Package

The file resultat.py contains the functions that are used to download the data. The main function is download_election and you can find the documentation for it in the file. The second function get_download_url is used to get the download link for a specific election queue. It can be imported with:

python from resultat import *

🏃🏻‍♂️ Running

There are two programs to download the data. The first one is on get_results.py and downloads the data for a specific election queue. It should be better for people interested in donwnloading a single file. For this program I recommend running on terminal as it uses inquirer package which I have found some issues within Jupyter interactive terminals. You can do it with: python get_results.py After this, you will be asked to select the election type, date and district type you want to download.

The second program is on get_all.py and downloads all the data available on the website. This takes longer than the previous one since it scrapes the entire website for data. It can be run in a similar way: python get_all_results.py or you can use it on an interactive terminal.

☕️ Citation

If this code is useful for your research, please consider citing it as:

```bibtex

@software{resultatselection, author = {Antunes-Neto, Jose}, title = {{Scraped data from Le Service public fédéral Intérieur}}, url = {https://github.com/github/joseparreiras/resultatselection}, version = {1.0.0}, date = {2023-02-02} } ```

or refer to GitHub's "Cite this repository" button.

Owner

  • Name: José Antunes-Neto
  • Login: joseparreiras
  • Kind: user
  • Location: Evanston, IL
  • Company: Kellogg School of Management

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If this repo was important to you, please cite it as below:"
authors:
- family-names: "Antunes-Neto"
  given-names: "Jose"
title: "Scraped data from Le Service public fédéral Intérieur"
version: 1.0.0
date-released: 2023-02-02
url: "https://github.com/github/joseparreiras/resultatselection"

GitHub Events

Total
Last Year

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 12
  • Total Committers: 1
  • Avg Commits per committer: 12.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 12
  • Committers: 1
  • Avg Commits per committer: 12.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
José Antunes-Neto j****s@g****m 12

Issues and Pull Requests

Last synced: about 2 years ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

requirements.txt pypi
  • inquirer ==3.1.2
  • lxml ==4.9.1
  • pandas ==1.4.3
  • selenium ==4.8.0
  • tqdm ==4.64.0