Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Election Insights

Currently hosted here

The Election Insights app uses Alchemy News API to display a bubble map of what's being talked about in real time and how people feel about them. The app uses Alchemy's taxonmy breakdown to focus specifically on the election, and uses Alchemy's entity breakdown and sentiment analaysis to display the data visually.

The size of the bubbles are dictated by how much they're being discussed and the color is dictated by the average sentiment around that entity.


Deploy to Bluemix


Create a Bluemix, and register for an Alchemy API Key.

Create a MongoLab account, and create your database

Once you have a MongoLab account and a database and run the command

cf cups mongolab_ei_jk -p '{"uri": "mongodb://username:password@yourdatabase/port/db_name"}'

(You can name your service whatever you want but you'll need to update the manifest file)

You can find out the link of your database by clicking on the "Tools" menu. On the top of the page you'll see something like.


There are two ways to deploy this to Bluemix:

Option 1: Click the button below:

Now all you gots to do is click this button!

Deploy to Bluemix

This will set up a build pipeline - every time you push to the jazzhub repo this will create, it will automatically trigger a build and deploy.

After the initial deploy is done, you'll need to go to your dashboard, go to the space that you choose for this application, go to the application itself,

Option 2: The manual route:

In Bluemix:

  1. Create a Node.js runtime
  2. Bind a Mongolabs service instance with the "sandbox" plan
  3. Bind Alchemy with your API key

Once this is set up add these to your manifest.yml:

host: newsinsights
name: newsinsights


npm install
npm run build
cf push "electioninsights"

(or whatever you named your app), and you'll be all set.

Running the app locally

All you need to do is:

npm install
npm run build
npm start

There's also a helper npm dev that kicks off the server and runs gulp dev which handles watchify and re-compiling less->css when files change.

Make server/VCAP_SERVICES.json that is the same structure as VCAP_SERVICES is on Bluemix. For example:

  "user-provided": [{
    "name": "AlchemyAPI-2e",
    "label": "user-provided",
    "credentials": {
      "apikey": "your-key-goes-here"
  "mongolab": [{
    "name": "MongoLab-bh",
    "label": "mongolab",
    "plan": "sandbox",
    "credentials": {
      "uri": "mongodb://yourmongouri"

Using IBM DevOps

Note: if you used the "Deploy to Bluemix" button, this will all be set up for you.

I like to use IBM DevOps to automatically build and deploy my code whenever I push to git. Your build stage should look like:

npm install
npm run build

And your deploy should look like:

cf push "${CF_APP}"

# view logs
#cf logs "${CF_APP}" --recent


Feel free to fork this repo and open a Pull Request or open an issue!


This app is licensed under the Apache 2.0 License. Full license text is available in LICENSE.

Contact Me

All of my contact information can be found here


Sentiment analysis and visualization on all things election




No releases published


No packages published