There is a lot happening right now in the world. It is easy to feel like the future is out of your control, but there is quite a bit you can do to have your voice heard. Like right now. There are so many petitions being created each day, but it can be difficult to find them. When people see a news headline for the first time, they often feel a certain way about it and want to find a way to give back to the communities. Giraffes spend most of their lives standing up, we hope this application can help you stand up for what you believe in!
What it does
We built giraffenews.tech flask application using JS, HTML & CSS. Our app shows users 9 news articles with 9 corresponding petitions every 5 minutes. This bite size approach will make contributing to causes that are relevant and important to the user more accessible. The timer is a reminder that actioning now is important. The backend analyses the top news articles every 5 minutes and the daily top 500 petitions, in order to show users causes they can support relating to the current events.
How I built it
We set up a google cloud platform compute engine on Ubuntu and made a Flask web app to connect the front end and back end. We collected top headlines from newsapi.org and utilized selenium to webscrape petition data from change.org, then we used sci-kit learn to compute cosine pairwise similarity between each petition and the news articles to determine matching. Cron jobs were set up on the compute engine to update headlines and recompute similarities.
Challenges I ran into
Initially we were having trouble getting our machine learning model to create meaningful connections, and while not perfect, we have improved the model over development significantly. Since the API for change.org was retired, we decided to opt for web scraping instead- learning and using selenium gave many headaches! But the end result was data we could use! Setting up the Compute engine was a completely new task and running the flask app for our purposes took many tutorials and many (MANY) stack overflow questions.
Accomplishments that I'm proud of
We are proud to have created a dynamic web application that updates petition results in real time for the user that comes out with meaningful results. Our team worked extremely hard to communicate throughout this event and everyone was deeply involved and informed on the events going on the front and back end development of this application.
What I learned
What's next for giraffenews.tech
Improving the machine learning model, perhaps using TensorFlow.js! Checking out different APIs