Name: watson-news-intelligence-starter-kit
Owner: International Business Machines
Description: This Code Pattern demonstrates how to query news content to understand what people are saying or feeling about important topics.
Created: 2018-05-08 22:00:44.0
Updated: 2018-05-21 19:20:38.0
Pushed: 2018-05-21 19:20:37.0
Homepage: null
Size: 1939
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The Watson News Intelligence Code Pattern for Node.js visualizes the results of Discovery queries. The app searches Discovery News data to get insights from the news, including related concepts, entities, and sentiment trends.
When the reader has completed this Code Pattern, they will understand how to:
This Code Pattern is based on a Starter Kit. You can use this repo stand-alone by following the run locally instructions below, or use the Try the starter kit
button to take advantage of additional deployment options.
Press the above Try the starter kit
button.
Review/edit the details on the Create app
page and then click on Create
.
Optionally, click on Download code
to download the Starter Kit code. This will give you a zip file of generated code giving you additional options to run locally, including:
Running locally with Docker
Running locally and deploying to the IBM Cloud as a Cloud Foundry application
Click on the Deploy to Cloud
button to deploy directly to the IBM Cloud with the following options:
Provision the app to a Kubernetes cluster
Deploy the app as a Cloud Foundry app
If using these Starter Kit options, follow the instructions in the UI and/or the download.
NOTE: These steps are only needed when running locally instead of using the
Try the starter kit
button.
Clone the watson-news-intelligence-starter-kit
locally. In a terminal, run:
t clone https://github.com/markstur/watson-news-intelligence-starter-kit
Create the following services:
The credentials for IBM Cloud services (Discovery), can be found in the Services
menu in IBM Cloud,
by selecting the Service Credentials
option for the service.
Copy the Discovery credentials JSON into your local repos server/localdev-config.json
file.
server/localdev-config.json
:
atson_discovery_url": "https://gateway.watsonplatform.net/discovery/api",
atson_discovery_username": "a111aaaa-1a1a-111a-a11a-1aaa1111aaa1",
atson_discovery_password": "aaAAA1aaaAaa"
At the command line, go to your project directory.
Install the dependencies:
install
Start the app:
start
Point your browser to localhost:3000.
Enter a company name in the search bar to query Watson Discovery News through the app. Each panel on the page contains a visual presentation of insights derived from the API response. Press View Query
in each panel to view the parameters of the API request and the response in JSON form.
For your first search, enter the name of a company (or some news topic) and hit enter or click on the magnifying glass icon.
After your first search, you can change the search term, and you can specify the time period for your search.
The results will include the following sections.
Top Entities shows a word cloud showing frequently mentioned entities for your search term. The words are sized to indicate their significance. You can click on the tabs to show entities that are topics, companies, or people.
Top Stories shows the top news stories that matched your search. You can sort the articles by relevance or by date.
Sentiment Analysis shows the positive/neutral/negative sentiment breakdown of the news articles from a variety of news sources.
Anomaly Detection shows the number of articles over the specified time period and highlights anomalies, if any, with a red dot. You can hover over the chart to get additional details about each data point – including an example headline.
Co-Mentions & Trends shows entities that are commonly co-mentioned with your search entity and charts the trend for each entity pair. The chart tracks positive and negative sentiment for the pair over time. The total number of mentions and overall sentiment is also listed for each co-mentioned entity pair.
Example results from a week with Hawaiian volcano activity: