Bubble is a web application that scrapes online sources for trending news, extracts the keywords, and uses them to generate word clouds based on how often each keyword appears. Clicking on any of the keywords redirects the user to a trending news article on the topic.
Our objective was to redesign a common feature of everyday life with simplicity, usability and attractiveness. Instead of showing images and descriptions like traditional news platforms, Bubble uses Google Natural Language Processing to summarize news articles into keywords. The results are displayed to the user in popularity-based word clouds in the following categories: General, Science & Technology, Canada, Politics, Entertainment, and Sports.
Click here to see the final product (it may take about 30 seconds to load if the Heroku web dyno has gone to sleep).
This application was created using:
- Node.js
- Express.js
- cheerio
- JQuery
- Google Cloud Natural Langauge API
- Bootstrap
- D3 Wordcloud, created by wvengen and licensed under the MIT License
Frontend: Annie Gao & Joseph Wang
This project was created at Hack the Valley 2019.
To run this app, you will need Google Cloud credentials. See this documentation for more information.
Download your Google Cloud API credentials and put them in auth.json
(or whatever you want to call it). Run this command in your terminal:
export GOOGLE_APPLICATION_CREDENTIALS="[PATH]"
e.g. export GOOGLE_APPLICATION_CREDENTIALS="auth.json"
Note: This variable only applies to your current shell session, so if you open a new session, you have to set the variable again.
In the root directory:
npm install
node server.js
The app should now be running at http://localhost:3000/
.
See this documentation for a refresher on how to deploy Node.js apps on Heroku.
If you don't have your environment variables configured on Heroku, go to Your Project > Settings > Reveal Config Vars. Create the GOOGLE_APPLICATION_CREDENTIALS
environment variable and set it to the path to your Google API credentials file.
GOOGLE_APPLICATION_CREDENTIALS=auth.json