moodlocator hwt

64
Hey there, This is a quick tutorial how to present my application. It will help you adding the Watson User Modeling Service Live. 1. Upload an alone standing application to Bluemix 2. Show how to use the alone standing application 0. Prepare 3. Add the User Modeling Service to it 4. Activate the User Modeling Service 6. Show how to use the new application If you do not know what my application does, check out my other slideshare presentation 5. Upload the application

Upload: jdihlmann

Post on 12-Jan-2017

234 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: MoodLocator HwT

Hey there,

This is a quick tutorial how to present my application. It will help you adding the Watson User Modeling Service Live.

1. Upload an alone standing application to Bluemix2. Show how to use the alone standing application

0. Prepare

3. Add the User Modeling Service to it4. Activate the User Modeling Service

6. Show how to use the new application

If you do not know what my application does, check out my other slideshare presentation

5. Upload the application

Page 2: MoodLocator HwT

There are some steps you have to do before you can present the application.

Instructions

- Go to github.com/JDihlmann/moodlocator and follow the steps in the section presentation- If you are presenting moodlocator you can start your presentation at any point you want,

but you have to do all steps behind the scene if you wouldn't show it.

Read the GitHub instructions until point 5

At this point I’m assuming you read the GitHub instructions and set up everything

- Before we upload our alone standing application we have to make some changes to it. The default of the moodlocator application is set to show the Watson User Modeling Service.

- To change this default value we have to open the code

0. Prepare

Page 3: MoodLocator HwT

Open the style.css file with a text editor you will find it in

/ node / public / stylesheets / style.css

Open style.css

Scroll to the bottom of the page

You will find something that looks like that, delete the text in line 449 and 452. I marked it red.

Before

After

Save your changes. Perfect to understand what it does, it enables or disables the white Watson User Modeling bar at the bottom of the page.

0. Prepare

Page 4: MoodLocator HwT

Open the app.js file with a text editor you will find it in

/ node / app.js

Open app.js

Scroll to line 189

You will find something that looks like that, add this bracket „ /* “ in line 190 and this bracket „ */ “ in line 211. I marked the position red where to add them.

0. Prepare

Page 5: MoodLocator HwT

Before

After

0. Prepare

Page 6: MoodLocator HwT

0. Prepare

Scroll to line 238

Stay in app.js

You will find something that looks like that, start in line 238 and delete everything what comes after it, till the end of the document.

Okay we prepared our application now lets start presenting

Save your changes

Page 7: MoodLocator HwT

MoodLocatorBluemix Demo

Page 8: MoodLocator HwT

Google Maps APILondon, United Kingdom

Page 9: MoodLocator HwT

Twitter Stream API

Berlin

London

User visited website 29 / 11 / 14 - 17:45

Page 10: MoodLocator HwT

Google & Twitter

London

Page 11: MoodLocator HwT

Structure

Stream APIMaps API

Lokal

Page 12: MoodLocator HwT

Live Demo

Page 13: MoodLocator HwT

Bluemix Homepage

Some of this steps you have already done,

you can show them to your listeners, but if you don’t want to you want have to do them again.

Page 14: MoodLocator HwT

Login

Page 15: MoodLocator HwT

Dashboard

Create an application

Page 16: MoodLocator HwT

Catalog

Page 17: MoodLocator HwT

Node.js

Choose Node.js

Page 18: MoodLocator HwT

Create App

Enter a unique name

Page 19: MoodLocator HwT

App Info

Page 20: MoodLocator HwT

1. Upload an alone standing application to Bluemix

Go back to GitHub and take a look at section 6

Page 21: MoodLocator HwT

Quick Start

We will follow these steps

Page 22: MoodLocator HwT

Terminal

Open your Terminal / CMD

Page 23: MoodLocator HwT

cd MoodLocator

Instead of „MoodlocaterPr“ write „node“

Page 24: MoodLocator HwT

Connect to Bluemix

Copy & Paste

Page 25: MoodLocator HwT

Login

Enter the password

Page 26: MoodLocator HwT

cf push

Instead of „moodlocator“ enter your application name

Your stand alone application is uploading. It may take 1minute

Page 27: MoodLocator HwT

Bluemix

.js

Maps API Stream API

Structure

Page 28: MoodLocator HwT

Twitter LocatorLondon, United Kingdom

UserName

Tweet Text Tweet Text Tweet Text

Tweet Text Tweet Text Tweet Text

Page 29: MoodLocator HwT

2. Show how to use the alone standing application

Page 30: MoodLocator HwT

App Info

Click on this link

Page 31: MoodLocator HwT

3. Add the User Modeling Service to it

Go back to GitHub and take a look at section 5

Page 32: MoodLocator HwT

Catalog

Open Bluemix Catalog

Page 33: MoodLocator HwT

Services

Search for Watson

Page 34: MoodLocator HwT

User Modelling

Choose the Watson User Modeling Service

Page 35: MoodLocator HwT

User Modeling Info

Click on View Docs

Page 36: MoodLocator HwT

User Modeling Docs

User Modeling Documentation

Page 37: MoodLocator HwT

View a Live Demo

Click on view a live demo

Page 38: MoodLocator HwT

Live Demo

Click on analyze

Page 39: MoodLocator HwT

Analyze

Page 40: MoodLocator HwT

User Modeling Info

Add it to your application

Page 41: MoodLocator HwT

Add Service Process

Hit ok

Page 42: MoodLocator HwT

User Modeling Doc

Scroll down

Page 43: MoodLocator HwT

View full Docs

Click on view full docs

Page 44: MoodLocator HwT

Watson Doc

Select sample application in Node.js

Page 45: MoodLocator HwT

Sample Application

Example code you can scroll in here

Page 46: MoodLocator HwT

© 2014 IBM CorporationJan-Niklas Dihlmann, 26 Novmeber 2014

Copy & Paste

IMPORTANT

You have to copy the exact same function you deleted before!

Page 47: MoodLocator HwT

COPY THIS PART

4. Activate the User Modeling Service

You have to copy the exact same thing ——>out of the Watson Documentation into your application

cmd c / strg c

Copy itSelect it

We will undo everything what we did for preparation

Page 48: MoodLocator HwT

Open the app.js file with a text editor you will find it in

/ node / app.js

Open app.js

Scroll to line 238Paste the whole code at the end of your document, where you deleted it before.

Stay in app.js

Scroll to line 189

You will find something that looks like that, delete this bracket „ /* “ in line 190 and this bracket „ */ “ in line 211. I marked the position red where to add them.

Page 49: MoodLocator HwT

Before

After

Save your changes

Page 50: MoodLocator HwT

Open the style.css file with a text editor you will find it in

/ node / public / stylesheets / style.css

Open style.css

Scroll to the bottom of the page

You will find something that looks like that, add this bracket „ /* “ in line 449 and this bracket „ */ “ in line 452. I marked the position red where to add them.

Before

After

Save your changes. Perfect to understand what it does, it enables or disables the white Watson User Modeling bar at the bottom of the page.

Page 51: MoodLocator HwT

Open the style.css file with a text editor you will find it in

/ node / public / stylesheets / style.css

Open style.css

Scroll to the bottom of the page

You will find something that looks like that, add this bracket „ /* “ in line 449 and this bracket „ */ “ in line 452. I marked the position red where to add them.

Before

After

Save your changes.

Page 52: MoodLocator HwT

5. Upload the application

Go back to GitHub and take a look at section 6

Page 53: MoodLocator HwT

Terminal

Open your Terminal / CMD

Page 54: MoodLocator HwT

cd MoodLocator

Instead of „MoodlocaterPr“ write „node“

Page 55: MoodLocator HwT

Connect to Bluemix

Copy & Paste

Page 56: MoodLocator HwT

Login

Enter the password

Page 57: MoodLocator HwT

cf push

Instead of „moodlocator“ enter your application name

Your stand alone application is uploading. It may take 1minute

Page 58: MoodLocator HwT

Bluemix

.js

Maps API Stream API

Structure

we added the User Modeling Service

Page 59: MoodLocator HwT

User Modeling Service

November 2014Jan-Niklas Dihlmann

Text - at least 100 Words

Get a fully character analysis from the author

of the text

Possible character of the author

BETA:Only english

Text

Page 60: MoodLocator HwT

User Modeling Service

November 2014Jan-Niklas Dihlmann

All Tweets from one city

Get a fully character analysis from all the

users combined who are twittering in this city

BETA:Only english

Tweets

Page 61: MoodLocator HwT

6. Show how to use the new application

Page 62: MoodLocator HwT

MoodLocator

November 2014Jan-Niklas Dihlmann

London, United Kingdom

Page 63: MoodLocator HwT

Tipp how to use

November 2014Jan-Niklas Dihlmann

- User Modeling Service is a BETA version, is only analyzing english words. Therefore choose a city where people twitter mostly in english.

- Choose big cities like London, New York, Johannesburg.

- When you hover over one Tweet, only hover over the next Tweet after the first one closes.

- Test it yourself, enter your current location and send a Tweet with text and geolocation. Try to find it. Have fun and enjoy it!

Page 64: MoodLocator HwT

Bluemix: moodlocator.mybluemix.com

MoodLocator

GitHub: /JDihlmann/moodlocator