Currently, the world is very divided and polarized in political views. Some people want radical change, while others want everything to stay the same. As a result, a lot of the news we read can be very bias and one-sided. When we heard about this, we were inspired to help inform people of what political stance a news article is taking, so they can better understand both sides of the story before making an informative opinion.

What it does

Neutral news allows users to choose a particular political category, like gun control or healthcare, and then gives six articles on the topic, which are separated depending on if they are conservative or liberal.

How I built it

For front end, we used HTML and Java Script to create a user friendly interface that is easy to understand. A simple drop down menu is located towards the center of the screen, prompting the user to chose a political category. The left side of the page will show all the liberal news relating to that topic, and the right the conservative. We also inserted buttons with links, images, and cards, all to create a simple yet interactive interface for our users.

On backend, we wrote a Python script that used machine learning to process past political speechs to train a model to determine whether an article was liberal or conservative. We got these speeches off of a dataset online and the articles from a news api called News Api. Then we connected the front end and back end so that the back end can send data to the front end and the user interface changes accordingly.

Challenges I ran into

We ran into many bugs in our code, some that were very minor and only took 3 minutes to solve, and others that were much harder to solve and took us hours at a time. Connecting the backend to frontend was also a huge challenge. We also ran into a few compatibility issues, and after hours of troubleshooting, we learned that one of the frameworks we were using was not compatible with another part of our code, so we had to add that desired functionality another way.

Accomplishments that I'm proud of

We are proud that our Python model could determine whether an article was liberal or conservative at a success rate of 78 percent. We are also happy by the way our interface showed up. Although it looks simple and straightforward, it took a lot of hard work and patience. Especially because we are novice web developers, this was definetely a big step for us.

What I learned

Because we have only been to one hackathon before this, our experience at LingHacks helped us learn a lot about the different aspects of coding and design. We learned about prioritizing our time to make sure we are able to do as much as we wanted with the project. We also gained more experience using Python, HTML, and Java Script.

What's next for Neutral News

In the future, we would like to expand the number of categories we offer on Neutral News. We would also like to turn it into a news feed, so that rather than just having six articles at a time, we can load a lot more articles from the api so that the user can just keep scrolling, similar to many social media websites.

Built With

Share this project: