What inspired us?
Given that the discourse between politicians and the general public has been, is, and will always be quintessential to democratic societies, it is concerning that there isn’t a centralized medium of information regarding political candidates and politicians alike. A user friendly place where anyone of any age can go and look up answers to questions like:
- Who’s participating in the upcoming municipal/provincial/federal elections?
- Which agendas do they support and which ones do they oppose?
- Do they have a political history? If so, then what policies/bills have they voted for/against in the past? How often did they keep their promise?
There seems to be such an obvious gap of information between those who are governing and those who are being governed, yet no one has stepped up to bridge this gap. Politics need not be such a confusing black box, but instead can be made to be easily accessible to everyone.
What is our project?
The Toronto Municipal elections are taking place in 2 months (June 2023). With over 50 candidates, one of them will emerge victorious as the Mayor of Toronto. It can prove to be quite a task to get a comprehensive grasp of any one candidate, with having to scour through news articles and videos with no clear direction about how to do so efficiently, let alone to do it for more than 50 candidates.
This is where we come in. Given the limited amount of time in our hands, we could not cover every candidate, but we did create an online database for the 6 most popular ones. Upon entering the website, a user can:
- Just pick a politician and they will be given the links to all the different social media accounts of the politician.
- Choose a politician, then choose a topic (or vice versa) and they are shown summaries of all the relevant news articles/videos.
- If the user would like to add information to the database themselves, they can simply submit the link to the webpage they want us to add, which will then automatically be added to our database within 30 seconds, if we don’t already have it.
How did we build it?
After the user chooses the politician and category, the frontend passes that information to the NodeJS server via a POST request. Node sends a request to our database in MongoDB, requesting the chosen content. This is then returned to the frontend as a JSON file.
To submit new sources to the database, the user would submit a link to the webpage via the frontend. If it's a YouTube video, a POST request to the YouTube Flask server will be sent, after which the YouTube video's transcript will be made and converted to a text file. It will then be sent to NodeJS where we use Cohere's natural language processing for summary and classification. We classify the candidates and the topics based on our training data. After processing everything, we add it to our database in MongoDB. If it's a news article instead, then it will be sent to NodeJS to be scraped with Puppeteer first and then summarized and classified by Cohere again before being added to our database.
What challenges did we run into?
- Getting our frontend server to efficiently communicate with the back end servers
- Scraping specifics from websites
- Finding reliable sources
- Adding functionalities to the webpage
- And many more..
What accomplishments are we proud of?
- Setting up the MangoDB database
- Database successfully incorporates new data submitted by the users automaticallly
- The website being relatively simple and easy to use
- Resolving the server communication problem
What did we learn?
- How to make POST requests between Python and JavaScript
- How to scrape transcripts from YouTube
- How to develop a website using the Flask framework for Python
- How to effectively train a large natural language processing model (Cohere)
What's next for Politics Simplified?
- Rank politicians for each category using the confidence numbers for each article/video already provided by Cohere
- Provide personalized rankings for each user: Survey the users about their political standings and provide them with the politicians ranked in accordance to how closely they match with the user's political views/agendas
- Improve our training data and user interface
- Set up the databases for other municipals and eventually branch out to the provincial and federal level elections

Log in or sign up for Devpost to join the conversation.