Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MEPs CSV file #15

Open
delahousse opened this issue Nov 15, 2022 · 3 comments
Open

MEPs CSV file #15

delahousse opened this issue Nov 15, 2022 · 3 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@delahousse
Copy link
Collaborator

would it be possible to have the information about the MEPs memberships in the CSV format ?

@CeriseGoutPelican
Copy link

The website TTTP.eu is doing it pretty well.

@scipima
Copy link

scipima commented Nov 21, 2022

Hi,
i leave here a script you can execute in R, with few dependencies, that provides you with a table with the list of MEPs, political groups, national party, and country.
Hope it helps, Marco

`

Libraries --------------------------------------------------------------------

library(XML)
library(xml2)
library(tidyverse)

###--------------------------------------------------------------------------###

Get MEPs ---------------------------------------------------------------------

get xml ----------------------------------------------------------------------

meps_list <- read_xml(x = "https://www.europarl.europa.eu/meps/en/full-list/xml")
mep_name <- xml_find_all(meps_list, ".//fullName") |> xml2::xml_text()
country <- xml_find_all(meps_list, ".//country") |> xml2::xml_text()
political_group <- xml_find_all(meps_list, ".//politicalGroup") |> xml2::xml_text()
id <- xml_find_all(meps_list, ".//id") |> xml2::xml_text()
national_party <- xml_find_all(meps_list, ".//nationalPoliticalGroup") |> xml2::xml_text()

append it together -----------------------------------------------------

meps_full_list <- dplyr::bind_cols(
country=country, mep_name=mep_name,
political_group=political_group,
id=id,
national_party=national_party)
`

@andrea-perego
Copy link
Contributor

@delahousse asked:

would it be possible to have the information about the MEPs memberships in the CSV format ?

Thanks for the question. We are actually looking into this.

The problem is that memberships are also associated with additional information (as start and end dates), as you can see in the RDF representation of the data.

Of course an option is to extend the tttp.eu approach cited by @CeriseGoutPelican , but the resulting number of columns will be cumbersome.

Do you have any suggestion?

@andrea-perego andrea-perego added enhancement New feature or request question Further information is requested feedback Issues stemming from external feedback and removed feedback Issues stemming from external feedback labels Dec 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants