Giter Site home page Giter Site logo

mtwente / nordatlantisk-ft Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 3.01 MB

Voting Records of Greenlandic and Faroese MPs in Folketinget

Home Page: https://mtwente.github.io/nordatlantisk-ft/

License: Creative Commons Attribution 4.0 International

Shell 0.50% Markdown 16.18% HTML 3.33% SCSS 0.33% R 73.11% TeX 6.56%
folketinget greenland parliament-data political-science voting-data faroe-islands

nordatlantisk-ft's Introduction

Voting Records of Greenlandic and Faroese MPs in Folketinget

This repository contains voting records of Greenlandic and Faroese Members of Parliament (MPs) in Folketing, the Parliament of Denmark. The data in nordatlantisk-ft is openly available to everyone and is intended to support reproducible research.

GitHub issues GitHub forks GitHub stars GitHub license DOI Zotero

Repository Structure

The structure of this repository is based on the Open Research Data Template by @maehr, follows the Advanced Structure for Data Analysis of The Turing Way and is organized as follows:

  • analysis/: scripts and notebooks used to analyze the data
  • assets/: images, logos, etc. used in the README and other documentation
  • build/: built files, PDF outputs
  • data/: data files
  • docs/: documentation for the data and the repository
  • src/: source code for the data (e.g., scripts used to collect or process the data)
  • test/: tests for the data and source code
  • report.md: a report with basic insights into the data set

Additionally, there is a Zotero group library with a collection of scientific articles and news reports that are of relevance for studying the Northatlantic MPs' work in Folketinget.

Data Description

This repository contains voting records of Greenlandic and Faroese MPs. Voting records are available online starting October 2004.

For all MPs that were elected in either Greenland or the Faroe Islands since 2004, voting records were retrieved from Folketingets åbne data service (ODA). Because Folketinget seems to have changed their way of record keeping since 2004, the retrieved data had to be processed to consolidate different variables (e.g. extracting ballot results stored as one text string into four numeric variables).

In this repository, the raw data is available as csv files, and processed data is available as rds and csv files including metadata. Also included is the workflow to replicate and update the data set using R.

Descriptions of all variables are provided in the codebook. Take a first glance at the dataset in report.md.

Installation

Use the renv package to install all dependencies and set up a reproducible environment within the R project. To see which packages are loaded with renv for the workflow before installing them to the project library, run renv::dependencies().

renv::restore()

If you are running a recent Mac OS, you will have to install a Fortran compiler manually for compiling the packages before running renv::restore().

Build

This project uses the targets package for managing the workflow of building and updating the data set.

targets::tar_make()

Running tar_make() will execute the workflow as defined in _targets.R, skipping files ('targets') that have not changed since the last build process.

The targets pipeline is set to check for new voting records every twelve weeks only. To force running the scripts with the most recent data available, remove the cue arguments from the targets ballot_info and raw_voting_records in _targets.R.

You can use the scripts to assemble data sets with voting records of other members of Folketinget as well. To download voting records for other MPs, look up their ODA IDs at oda.ft.dk, add the IDs to the column MP_names$MP_id in the file available at ./data/processed/csv/MP_names.csv and then run targets::tar_make().

Use

This data is openly available to everyone and can be used for any research or educational purpose. If you use this data in your research, please cite as specified in CITATION.cff.

The following citation formats are also available through Zenodo:

Zenodo provides an API (REST & OAI-PMH) to access the data. For example, the following command will return the metadata for the most recent version of the data

curl -i https://zenodo.org/api/records/10517955

Support

This project is maintained by @mtwente. Please understand that we can't provide individual support via email. We also believe that help is much more valuable when it's shared publicly, so more people can benefit from it.

Type Platforms
🚨 Bug Reports GitHub Issue Tracker
📊 Report bad data GitHub Issue Tracker
📚 Docs Issue GitHub Issue Tracker
🎁 Feature Requests GitHub Issue Tracker
🛡 Report a security vulnerability See SECURITY.md
💬 General Questions GitHub Discussions

Roadmap

Contributing

All contributions to this repository are welcome! If you find errors or problems with the data, or if you want to add new data or features, please open an issue or pull request. Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

Versioning

We use SemVer for versioning. The available versions are listed in the tags on this repository.

Authors and acknowledgment

  • Moritz Twente - Initial work - mtwente

See also the list of contributors who contributed to this project.

Voting records and ballot results were retrieved from Folketinget's open data service under Folketinget's terms of service.

License

The data in this repository is released under the Creative Commons Attribution 4.0 International (CC BY 4.0) License - see the LICENSE.md file for details. By using this data, you agree to give appropriate credit to the original author(s) and to indicate if any modifications have been made.

nordatlantisk-ft's People

Contributors

dependabot[bot] avatar mtwente avatar

Stargazers

 avatar  avatar

Watchers

 avatar

nordatlantisk-ft's Issues

feat: match names to IDs in plots

Describe what feature you'd like. Pseudo-code, mockups, or screenshots of similar solutions are encouraged!

See e.g. this scatterplot: The data frame that is the result of the processing does not include the MPs' names. To match the names to the IDs, I could use dplyr::case_when() or, probably, other functions instead.

What type of pull request would this be?

Enhancement

Any links to similar examples or other references we should review?

feat: Use r-lib/actions for reproducible environment

Describe what feature you'd like. Pseudo-code, mockups, or screenshots of similar solutions are encouraged!

r-lib provides several Github Actions related to R projects/packages. I am going to look into whether it makes sense to use them for this project, e.g. for updating the renv lockfile and managing dependencies.

See https://github.com/r-lib/actions

What type of pull request would this be?

Enhancement

Any links to similar examples or other references we should review?

No response

Section anchors not working in github-flavored Markdown

Link to the Page

https://github.com/mtwente/nordatlantisk-ft/blob/main/report.md
https://github.com/mtwente/nordatlantisk-ft/blob/main/codebook.md

Describe the Issue

Linking sections and citations using hyperlinks with anchors stops working when converting the .Rmd document to github-flavored markdown for publishing, e.g. report.md#ref-folketinget_folketingets_2024.

Alternative: Use footnotes as in codebook.md

This also concerns all other inline references made using {#ref-title} anchors.

Are you able to create a Pull Request with the fix?

Yes

renv::restore() failing to restore project library

Current Behavior

Running renv::restore() to set up the package environment for running the pipeline is not working as expected on macOS Sonoma 14.2.1.

Reproduction / Steps To Reproduce

  • open R project using a recent Mac OS
  • run renv::restore()
  • renv downloads recorded packages successfully
  • compilation fails with this output:
ld: warning: search path '/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0' not found
ld: warning: search path '/opt/gfortran/lib' not found
ld: library 'gfortran' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Matrix.so] Error 1
ERROR: compilation failed for package ‘Matrix’
* removing ‘/Users/[username]/github/nordatlantisk-ft/renv/staging/1/Matrix’
install of package 'Matrix' failed [error code 1]

Solution: Manually install a Fortran compiler (and Xcode, if not already done), see https://cran.r-project.org/bin/macosx/tools/

Anything else?

No response

Simplify zotero badge

Describe what feature you'd like. Pseudo-code, mockups, or screenshots of similar solutions are encouraged!

The current zotero badge uses the following URL retrieved from the generator at https://shields.io/badges:

https://img.shields.io/badge/zotero-nordatlantisk--ft-red?style=flat&logo=zotero&logoColor=white&labelColor=565656&color=bb393c

However, this shorter version works as well:

https://img.shields.io/badge/zotero-REPO_NAME-bb393c?logo=zotero

What type of pull request would this be?

Enhancement

Any links to similar examples or other references we should review?

No response

bug: Links to Zenodo Metadata GeoJSON not working

Link to the Page

https://github.com/mtwente/nordatlantisk-ft/blob/main/README.md

Describe the Issue

The template provides links to several formats of Zenodo metadata for the repository. However, the URL for downloading metadata as GeoJSON does not work: https://zenodo.org/record/10517955/export/geojson. This appears to be a Zenodo issue, as all GeoJSON exports for three different records did just return:

Page not found
The page you are looking for could not be found

Solution: remove GeoJSON download from README.md

Are you able to create a Pull Request with the fix?

Yes

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.