Skip to content

govarthenan/live-election-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

🗳️ Live Election Dashboard for 2024 Sri Lankan Presidential Election

Python Ruff BeautifulSoup4 Plotly Dash

A real-time election results dashboard for the 2024 Sri Lankan presidential election, utilizing web scraping and data visualization techniques to display live updates.

🔗 Data Source

The live election data is sourced from the official Sri Lanka Elections Commission Results Website.

🚀 Features

  • Live Updates: Refreshes data every 60 seconds
  • Interactive Chart: Visualizes vote counts and percentages
  • Responsive Design: Works on desktop and mobile devices
  • Easy to Use: Simple setup and execution

📊 Preview

[Insert a screenshot or GIF of your dashboard here]

🛠️ Setup and Installation

  1. Clone the repository:

    git clone https://github.com/govarthenan/live-election-dashboard.git
    cd live-election-dashboard
  2. Create a virtual environment:

    python -m venv venv
  3. Activate the virtual environment:

    • On Windows:
      venv\Scripts\activate
    • On macOS and Linux:
      source venv/bin/activate
  4. Install the required packages:

    pip install -r requirements.txt

🖥️ Running the Application

To run the Live Election Dashboard, ensure you acitvated the virtual environment and then run the following command:

python main.py

Open your web browser and navigate to http://localhost:8050 to view the live dashboard.

🔧 Configuration

You can modify the number of candidates displayed by changing the num_pairs parameter in the scrape_data() function call within live-chart.py:

data = scrape_data(num_pairs=5) # Change this number to scrape more or fewer pairs

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

📝 License

This project is MIT licensed.

👨‍💻 Author

Govarthenan Rajadurai

🙏 Acknowledgements

  • Dash for the interactive web application framework
  • Plotly for the beautiful charts
  • Beautiful Soup for web scraping capabilities

Made with ❤️ and Python

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages