Git Product home page Git Product logo

hazmannaim / project-election-analysis Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 3.39 MB

This repository contains a comprehensive analysis of Malaysian General Election data. It includes web scraping scripts to extract election results from Wikipedia, data preparation scripts to clean and organize the extracted data, and data analysis scripts to calculate alliance performance, seat distribution, and margin-of-votes classification.

Jupyter Notebook 100.00%
beautifulsoup data-analysis data-science data-visualization election election-analysis election-data elections python webscrapping

project-election-analysis's Introduction

Hi ๐Ÿ‘‹, I'm Hazman Naim

A young analytics engineer with a strong physics background

hazmannaim

hazmannaim

  • ๐Ÿ”ญ Iโ€™m currently working on data engineering, analytics and machine learning

  • ๐ŸŒฑ Iโ€™m currently learning Deep Learning and AI Engineering

  • ๐Ÿ‘จโ€๐Ÿ’ป All of my projects are available at hazmannaim.github.io

  • ๐Ÿ’ฌ Ask me about Data Science, Machine Learning, AI and Astrophysics

  • ๐Ÿ“ซ How to reach me [email protected]

Connect with me:

hazmannaim astronomer.halaman

Languages and Tools:

bash c flask git html5 linux mysql opencv pandas postman python pytorch scikit_learn seaborn tensorflow

hazmannaim

ย hazmannaim

hazmannaim

project-election-analysis's People

Contributors

hazmannaim avatar

Stargazers

 avatar

Watchers

 avatar

project-election-analysis's Issues

Inconsistent Wikipedia Links for Election Data Scraping

Issue Description:

The current code scrapes election data based on Wikipedia links following the format: https://en.wikipedia.org/wiki/[constituency]. However, I encounter an issue when there are changes in seat names due to parliament redistribution. This results in discrepancies between the Wikipedia links for different election periods, causing the code to fail to scrape data for certain constituencies.

Expected Behavior:

The code should handle cases where seat names change due to parliament redistribution and adapt to the updated Wikipedia links accordingly. This will ensure accurate and consistent scraping of election results for all constituencies, regardless of changes in seat names.

Steps to Reproduce:

  • Obtain a list of constituencies with seat name changes due to parliament redistribution.
  • Attempt to scrape election data for each constituency using the provided Wikipedia link.
  • Observe that the code fails to retrieve data for constituencies with changed seat names.

Additional Information:

  • Example: In GE14, P.188 was known as Silam, while in GE15, it was renamed to Lahad Datu. As a result, the Wikipedia link for GE14 data (https://en.wikipedia.org/wiki/Silam_(federal_constituency)) differs from the link for GE15 data (https://en.wikipedia.org/wiki/Lahad_Datu_(federal_constituency)).
  • It is crucial to handle these changes programmatically to ensure the code remains robust and adaptable to future seat name modifications.
  • We may need to implement a mechanism to automatically detect and update the Wikipedia links based on the correct seat names for each election period.
  • This issue affects the accuracy and reliability of our election data scraping process, leading to incomplete or incorrect results for certain constituencies.

image

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.