Extract the list of Members of Parliament, their Roles and their Contact Information

GitHub Repository | Scraping Target

This is a project to practice web scraping using R language

In This Project I Extracted the list of Members of Parliament, their Roles and their Contact Information

  • Target of Scraping is: Members Of Parliament
  • Result of scraping exist in file MPsData2023AfterExtraction.csv on github, an image of it below
  • The website also gives a link in the right bottom corner, to download csv file of this list
  • I downloaded the file and that was my initial dataset Here columns include(first name, last name, city, province,...)
  • Direct link to dataset Here
  • To scrape each member's role, contact information, I had to loop through the csv file list and scrape each member's page link, scraped his/her information and added them as columns to the dataset.
  • Last step was to write the new dataset on a new csv file and export (MPsData2023AfterExtraction.csv)
  • Direct link to the result final file Here
  • Code is in the filr named ScrapingAllTheMembersInfoPdfForGithub.pdf
  • Direct link to pdf file Here



Back to the top