GithubHelp home page GithubHelp logo

byessilyurt / secim-tahminim Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.14 MB

This is a fun, interactive tool to visualize your predictions for the upcoming 2023 Turkey Elections.

Home Page: https://secim-tahminim.firebaseapp.com

HTML 2.69% CSS 5.96% JavaScript 91.36%

secim-tahminim's Introduction

See Demo This project is an interactive prediction tool for the 2023 Turkey Elections. The application allows users to visualize their election predictions, by choosing the winning party for each city, and specifying the vote percentage for each presidential candidate.

The main features of the application are:

  • The ability to paint each city in Turkey with a color representing the predicted winning party.
  • A summary of the predicted vote percentage for each presidential candidate.
  • A share feature that generates an image of the user's prediction, which can then be shared on social media platforms like Twitter.

The project is built using React, along with libraries such as React SVG for rendering SVG maps, HTML to Image for generating shareable images, and Tailwind CSS for styling.

Noteworthy Implementation Details:

  1. Interactive SVG Map: The app uses an SVG map of Turkey where each city is a clickable path. On clicking or touch-move over a city, the city is painted with the currently selected party's color.
  2. Presidential Vote Percentage: The app allows users to set the vote percentage for each presidential candidate. The percentages are adjustable such that they always sum up to 100%. This feature required careful state management to ensure that the user's inputs remain within the valid range.
  3. Image Generation for Sharing: One of the notable features is the ability to generate a shareable image of the user's prediction. The image generation uses the html-to-image library, and some interesting challenges were tackled to ensure proper rendering of images and handling of cross-browser compatibility issues.
  4. Social Media Sharing: The application integrates with social media platforms like Twitter, allowing users to directly share their predictions. Users are reminded to attach the downloaded image when sharing their prediction.
  5. Responsive Design: The application is designed with mobile-first approach and is responsive across different screen sizes.

secim-tahminim's People

Contributors

byessilyurt avatar

Stargazers

 avatar

Watchers

 avatar

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.