MEPs CSV file
would it be possible to have the information about the MEPs memberships in the CSV format ?
The website TTTP.eu is doing it pretty well.
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) `
@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?