Using a dataset in Watson - sql

I'm working on an university project with IBM Cloud Services. Me and my team have created our virtual assistant through the Watson Assistant service and now we want to use a kinda huge dataset with the assistant. We actually don't know how to implement this dataset and how to use the informations the user gives us to make a SELECT FROM our dataset. I hope for your replies

Here's one general way to accomplish what you're trying to do:
You'll need to collect context variables to determine what song information to send back to the user. One effective way to do this is with slots; here's a guide on that.
An example of context variables collected could look like this:
{
genre: "hiphop",
mood: "upbeat",
instrumental: false
}
So the bot knows from this info to return hiphop songs, with an upbeat tempo, that is not instrumental.
I think you might already have gotten this far, but the next step is going back to your data set to query it and return those list of songs.
There are a few different ways to accomplish that:
You could house the data set within Watson assistant as preset context variables; this probably wouldn't make sense because it's a large dataset. Would only really make sense if it was a few options.
You could query the dataset in an orchestration layer. A message would get sent back from Watson Assistant with an action to query the dataset, before it gets returned to the end user the orchestration layer would make that query and fill in the information returned. This is a little more complex because you need to build and manage that orchestration layer - though there are some services out there that can help with this. Here's a diagram of an orchestration layer with watson assitant:
You could make a query to the dataset from within Watson Assistant using IBM cloud functions. Once you have collected the information in a node, you instruct Watson Assistant to call a cloud function that queries your dataset. What's nice about this method is that everything is housed within WA and cloud functions (no need for an orchestration layer), though there are some limitations like timeouts because Watson Assistant as an API needs to respond "immediately." Here is some more information on making programmatic calls from a dialog node.
Hope this is helpful.

Related

Can I connect Life360 to MightyCall/Fare Harbor through Zapier? Or do I need to use APIs or?

Hi Overstock flow peoples,
I've been in the startup/digital marketing scene and know some things on analytics, html/css, and marketing automations and have recently picked up some SQL/Tableau. Im coming here looking for possibly help/recs on connecting a marketing system/inflow that uses Fare Harbor/Mighty Call/Life 360 and I'm wondering if I could automate things with Zapier (or some other platform), or if I'd have to do it all with development or using APIs or something.
I work with a company that does some travel taxiing/luggage help for travelers. Im looking to see if Zapier (or any other system) would be able to automate some tasks.
So clients book through Fare Harbor, their data goes into our system through Mighty Call, and we give updates to the clients on the drivers ETAs manually through Life360 (like the owner actually TEXTS people directly).
Would anyone here know if there's a way to use Zapier to automate the ETA/communication updates of Life360 through Zapier? (Or would I have to develop something completely on its own to do this?). Or know if there's any other type of software to do this immediately off the top of your head? (etc). Otherwise we have to text all these updates manually and we're trying to get away from doing things that way.
Sorry if this comes off as a rookie post, as its my first direct post on Stack Overflow, although I've used this website a number of times to configure CSS before and other ish (and this isnt my first rodeo). Any advice or direction that could be given would be IMMENSELY helpful.

How do I create a private and public API architecture

I got a project assigned where we already have an up and running website and one of our clients wants to be able to track statistics from the website.
We want to make this available to all our clients as soon as we finish the development. Note that each 'client' have their own 'subdomain' to say so. Eg. www.website.com/client1 , www.website.com/client2 , etc. And we want to track the usage separately for each of these clients.
We will need to create statistics based on the usage of our own platform, pull in data registered by Google Analytics and also pull in data from a 3rd party which they will offer by an API of their own (they have a 3rd party solution that uses the data accessible via our API).
All this data needs to be shown on a webpage with graphs and tables.
I wanted to make sure we choose the right architecture from the start, in order to avoid scalability issues later on.
Started reading about Private and Public API's lately.
For now, we do not have another (internal) application yet that would use our own statisics, it would just be the website using it. But in order to be able to scale-up later if needed, and another application would like to use the statistics I think a private API would benefit us greatly.
In order to allow 3rd parties to use the statistical data we chose to let out, I was thinking of creating a Public API.
Is a Private&Public API the correct way to go about this?
One of the questions I am stuck with is how does the architecture for these API's look like. Mostly, right now we already have a public API regarding vacancy data. This 'API' is basically just a PHP class (controller) inside our CodeIgniter solution. It gets called via its URL and returns a JSON object with the results. (e.g. www.website.com/api/vacancy/xxx)
In order to create a (proper) private & public API solution/architecture. Should the API be set free from the website (CodeIgniter)? What are the common go-to solutions for this?
Or is it fine to keep it in our current platform the way it is now? (and people call the stats API via www.website.com/api/stats/xxx for example?)
It's almost always right to go with microservices like architecture so your initial thoughts sounds reasonable. Acting like this will give the possibility to scale and deploy your api independently and also will help you avoid performance side effects to your site (and vice versa). Pay attention how you access your main site data from within the new api if you don't want to finish with a monolith application.
Regarding the API i would suggest you to implement protocol like oauth2 in order to achieve the flexibility you (might) need. Also you can use swagger to document and test your API.
All i said might helps you a lot but first you have to answer yourself do you really need to go so deep or you just need a simple solution.
I think multitenancy is the best choice. Generally speaking, multitenancy is when every customer has own database. Data is separate. The codebase is same and already exists. As I understood the project is in progress status. You do not redesign and rewrite anything.

Is there any service of Map and GPS Logger for IoT Devices as free?(like Azure Maps in Azure IoT Central)

I want to visualization latitude and longitude data taken from IoT Devices.
But I couldn't find service is able to plot GPS log data.
For example, AT&T M2X can visualization and log data that just sensor data (like humidity, temperature, and so on) but it can't visualize map from data.
At last found Azure Maps, but it needs to register the credit card.
If needed to pay for the amount of user data, but I want to start map visualization with no pay option setting first.
I desire service keeps below three points, 1. no need pay option setting first, 2. it can post data from HTTP protocol(GET/POST), 3. any kinds of map type is ok (google map, BingMap, OpenStreetMap, and so on)
I'm sorry that my English is so bad.
I look forward to your reply.
thanks.
Might want to take a look at Data Studio (Google Cloud Platform). To get you started (no money) you should be able to create a spreadsheet with comma separated lat/long values, import it into Data Studio and get a visualization on a map of those positions.
Check it out here.
I know you said being able to post via HTTP is a requirement (makes it harder to use this, but wanted to point it out as it's cool and I just learned about it too.
There's also the Maps API which can do it (I'm actually unsure of how "free" it is, but most of our APIs have free tiers for like, # of requests). This is do-able via HTTP.
Azure Maps is a part of Azure and the credit card is for Azure all up, not just Azure Maps. That said, Azure Maps also provides free monthly usage limits. Also, in Azure you can set a spending limit on your account. After adding your credit card, simply set your limit to 0 and you don't need to worry about paying. If you exceed the free limits, your account will simply stop working until the next month when you get a new set of free limits. Here is some documentation on how to set a spending limit in Azure: https://learn.microsoft.com/en-us/azure/billing/billing-spending-limit

What do the Google Analytics related API's buy me that the Google Analytics UI cannot achieve?

Long time ago, I took and passed the Google Analytics IQ certification test. At the time, I don't believe there were such things as Core Reporting API, Management API, and Metadata API (and probably some other Google Analytics related API's that I don't know about). Now that I am going through the Google Analytics IQ certification training course again (provided by Google, presented by Justin Curtoni?? I believe that's his name), I found that they now have Core Reporting API, Management API, and Metadata API.
I am a computer programmer by trade; so, I have no problem with programming using these API's. However, what I don't understand is, what do these API's buy me that the Google Analytics UI cannot offer? There is no reason to write a program that utilizes these API's simply because I can do it. To me, the existing Google Analytics UI has a lot of tools, reports, and other features that quite extensive. I am hoping that some of you can help me see something that I am probably missing.
The APIs are primarily for programmatic access. For example, if you need to create 1000 accounts all with the same property/view structure and then maybe add a few view filters to each of those accounts, you'll probably want to use the Management API. Doing that by hand would be a nightmare.
The same thing is true for the reporting API. Maybe you want to set up task that runs every monday morning and reports on the previous weeks data. And maybe you want to display that data on an internal dashboard for your company using some fancy charting library. You'd have to use the API to get the data.
Dashboards (executive summaries; managers often want nice visualizations instead of boring drill-downs)
Custom reports for user groups that do not have a Google Account or are not supposed to have access to full reports (e.g. Affiliates)
advanced filtering and aggregation (GA report cannot do everything)
You can combine analytics data with external data (e.g. you are not allowed to store personally identifiable information within GA; but you might store a custom key that allows you to link analytics data to customer data from you CRM or fulfillment system)
Machine-to-machine communication; I once did tracking for an airline that needed trend data on what people where searching for and what they where actually booking; that data was used to allocate/withdraw resources from busy/lame flights, and part of this was done by hooking up GA to their backend system
Take a look at the GA Partner Page. I would say the primary reason is to "liberate" GA Data from outside of GA itself. As Eike mentions, you can create dashboards and combine this data with other sources for a complete "View" of your online presence.
HI I guess there is no definite answer. Here are some things you can do with the APIs:
Automating AdWords CRO based on keyword ad and campaign performance.
Scoring leads based on Analytics data (Engagement with different items) and external data from a CRM.
Collecting unsampled data using multiple daily queries
Filtering using several dimension.
Tracking conversions for periods longer than supported by AdWords.
Looking at a funnel via segments
Analyzing funnels with non-linear structures
Create more robust alerts
Export data to BigQuery and analyse it together with data from other systems.
Create Machine learning apps for behavioural customizing your site.
Create a dashboard with data from multiple views
Use product recommendation to implements "better together" in an online store.
Automate creation of accounts and properties + their integration in a Hosting provider's console.
Cheers!!

GPS code for server

Is there any code for GPS receiver and for GPS net server available?
I want to build complete application: a client for the MS Win Pocket PDA and a server which shows position of my trucks on map. It is easy to find via internet code for GPS receiver (PDA) but I cannot find corresponding part code for server.
If I am understanding you correctly, you want the code to be able to render trucks on a map on your server.
If that is the case, I think that the approach you need depends on the language you are using. Plotting GPS coordinates on an X-Y plane is not a straight forward thing to do, reason being that if you where to cut the surface of the globe into pieces you would not end up with perfect squares, and would thus have to use a technique called Map Projections.
There are various readily available mechanisms provided by companies such a Google provided that you implement a web application. If on the other hand you where looking for a desktop application, SwingX provides a Java API which allows you to build GPS related desktop applications through the use of OpenStreetMaps.
So basically, you can have something as follows:
Create a concurrent server which accepts data from these PDA's and save it in the DB;
At a given period of time, pull the data from your database and refresh your desktop application or web page.
Edit: You can take a look at this tutorial to see how you can draw and plot on a map Using SwingX. If you shall be using Java, you might want to give a look at this previous SO post for more Java mapping API's.