Giter Club home page Giter Club logo

election-insights's Introduction

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.

screenshot

Deploy to Bluemix

prerequisite: create a Bluemix, and register for an Alchemy API Key.

There are two ways to deploy this to Bluemix:

Option 1: Click the button below:

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

Then:

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/config.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:

#!/bin/bash
npm install
npm run build

And your deploy should look like:

#!/bin/bash
cf push "${CF_APP}"

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

Contributing

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

License

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

election-insights's People

Contributors

kauffecup avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.