cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Example ThingWorx Analytics 8.1 Mashup

Regular Member

Example ThingWorx Analytics 8.1 Mashup

Put together a quick example mashup in support of a couple of analytics projects to demonstrate use of the new TWX Analytics 8.1 APIs within TWX mashup builder. The intention here is for use in POCs to provide a quick way of demonstrating customer-facing analytics outputs along with the more detailed view available in Analytics Builder.


Required pre-requisites are:

  • ThingWorx 8.1 + Analytics Extensions
  • ThingWorx Analytics Server 8.1
  • Carousel TWX UI widget (attached) imported into TWX
  • Data set(s) loaded with signals / profiles generated.

The demo can be installed by importing the attached entities file into TWX composer then launching the mashup 'EMEA.Analytics.CustomerInsightMashUp'.

A quick run through of the functionality ...

On launching the mashup, data sets and models are displayed for selection on the left hand-side.

1.PNG

On selecting dataset and model, signals are presented in two tabs - first an overview of all signals. The list on the left can be expanded by changing the value for 'Top <n> Contributing Features'.

2.PNG

On selecting a signal from the list, the 'Selected Signal Details' tab displays additional charting for value ranges, average goal etc. The number of 'bins' to display can be edited.

3.PNG

Similarly, profiles can be viewed from the 'Profiles' tab - each profile can be selected by dragging the upper carousel.

4.PNG

This is all done using the Analytics 8.1 "Things" in TWX along with an additional custom Thing with some scripted services (EMEA.Analytics.Helper).

Thanks to Arian Van Huelsen & Tanveer Saifee at PTC for their support; all comments / feedback welcome.

Tags (1)
10 REPLIES 10

Re: Example ThingWorx Analytics 8.1 Mashup

As at Analytics version 8.1, in case you're having a problem seeing Signals and Profiles using this mashup, please note that the Signals and Profiles need to be created from inside the model, not from the main Analytics Builder screen.

So you need to click Models, then select your model, then select View, now click Signals inside the model. If this has not previously been done for this model, you will see the message "No Signals exist for this Model, do you want to create them?". Click Yes and the Signals will be generated. The menu option is shown in the screenshot below:

1.PNG

If however you create the Signals and Profiles from the main Analytics Builder screen, then they will not be visible from EMEA.Analytics.CustomerInsightMashUp. So any Signals and Profiles created using the method shown in the screenshot below will not be visible in EMEA.Analytics.CustomerInsightMashUp:

3.PNG

Re: Example ThingWorx Analytics 8.1 Mashup

Hi,

Can you please provide the steps to install these extensions?

I am able to import the extension carousel-extension.zip but could not import other  Analytics 8.1 Eaxmple Customer Mashup.twx.zip

Please let me know how can i view the above mentioned mashups.

Re: Example ThingWorx Analytics 8.1 Mashup

In case anyone has the same issue - the second zip file is not an extension - unzip it and use 'import from file' within Composer.

Re: Example ThingWorx Analytics 8.1 Mashup

In case anyone gets this error: Could not load "PTC.AppSwitcher.Button". Reason: 404 - Entity Not Found : [PTC.AppSwitcher.Button]

The solution (Thanks Roy!) is to install TWX Utilities.

Re: Example ThingWorx Analytics 8.1 Mashup

Hi rclarke,

 

I find this example very interesting and helpfull but I can't make it work on my Thingworx 8.3 installation.

 

After importing the extension and mashup, and installing TWX Utilities, a can view in the mashup my datasets and models but I cannot see any data on the right side of the page, and no error is prompted (see attached)

 

I tried to create the signals from the analytics manager model but I don't have the option to do it, the only option I've got to create signals it is under analytics buider. 

Can someone tell me which are the steps that I have to make before to make this exercise work properly on my installation?

 

Thanks in advance.

 

Olatz

Re: Example ThingWorx Analytics 8.1 Mashup

Hello Olatz, there is no option to submit Signals jobs from Analytics Manager, only from Analytics Builder.

 

Also since the last couple of versions there are 2 places in Builder where you can submit the Signals job, highlighted in the attached screenshot. You can submit from inside the model (highlighted green) or from the main analytics Builder (highlighted red).

 

I think for this Example Mashup (EMEA.Analytics.CustomerInsightMashUp) it is better to submit Signals from inside the model (highlighted green) 

 

I hope that helps, regards Tanveer.

Re: Example ThingWorx Analytics 8.1 Mashup

Thanks Tanveer.

 

After creating the signals and profiles I am able to navigate in the mashup but I am getting the next error in the monitor when selecting "Selected signal detail":

 

[context: com.thingworx.webservices.context.HttpExecutionContext@2b6e425c][message: Execution error in service script [GetSignalDetails] :: TypeError: Cannot find function GetAverageGoalAMS in object com.thingworx.things.ConfiguredThing@7877421e. (GetSignalDetails#30)]

 

Editing the thing "EMEA.Analytics.Helper", in the service "GetSignalDetails" there is a call to:

            averageGoal = Things["TW_ML_Helper"].GetAverageGoalAMS({

 

But, editing the thing TW_ML_Helper, the service GetAverageGoalAMS doesn't exist, but there is a service called GetAverageGoalBySQLAMS. Should I change the call to the service that exist in my installation or do I miss something?

 

Thanks in advance.

 

Olatz.

Re: Example ThingWorx Analytics 8.1 Mashup

Hi Olatz,

 

I didn't see that error message before, but I think it might be related to your TWX version. I heard that TW_ML_Helper is intended only for use by Analytics Builder, not for other development purposes. Maybe the reason is that the services are changed without concern for backwards compatibility.

 

Rgds, Tanveer.

Re: Example ThingWorx Analytics 8.1 Mashup

Hi Tanvee.

 

I made the change to call to the service GetAverageGoalBySQLAMS. Now I am don't have error messages but I don't get the expected results (graphic detail in the mashup).

 

I was just trying an example to test my analytics installation and an example mashup. I didn't find any other good and complete example on internet about Thingworx Analytics.

I am starting with analytics on thingworx platform but a can't find any complete example to train myself and I am feeling a little bit lost. 

 

Thanks anyway.

 

Olatz