Learn how to run your bot locally. Send it messages from Twitter to try it out.
- [Instructor] So the moment of truth has arrived, we actually need to run our bot. We just need to make sure that StockChatBot is set as the startup project, if it isn't, right click, set as startup project, and hit Start. And there you see it running as a console program, it says StockChatBot is running, and press a key to exit. So how do we try this out? Well, we go to Twitter, and I'm signed in not as StockChatBot but as me personally, and obviously you can use your own account and should do.
And then we need to simply send a tweet to our bot. We need a ticker symbol, a start date, and in US format, an end date. And we send it. Let's go and have a look at what the tweet is doing. The very first time you run this, you'll see a bunch of stuff. This is simply initialization stuff from R, second time you run it, that won't happen. And you'll also see we actually see GGPlot2 rendering.
Again, you wouldn't be able to ignore that normally because that would be sitting on a deployed Azure instance, but at the end, the important thing is the bot says it's replied. Let's have a look at Twitter. Yeah, it looks like we've got something. And there we go, here's our visualization, here's our summary, Microsoft hit a high of that, then, a low of that then, and overall gain or loss over a period was that, and there we've got a rather attractive visualization of the fate of that stock over that period.
And of course you can spend as much time as you'd like calling the various R functions to make that even prettier. Let's just try sending another one. And after a short delay, that'll come through on Twitter. So there we have a working bot.
- Defining values and calling functions in F#
- Defining and identifying discriminated unions
- Working with if-else expressions
- Writing unit test
- Using type providers to access data
- Analyzing data with collection functions
- Plotting data using the R type provider
- Using railway-oriented programming to handle errors
- Integrating with Twitter
- Deploying an F# application to Azure
Skill Level Intermediate
1. Get Started with F#
2. Build a Simple Parser with Unit Testing
3. Use F# CSV Type Provider to Get Data
4. Analyze Data with F# Collection Functions
5. Use RStats Provider and ggplot2 to Plot Data
6. Use BoxKite with Twitter
7. Deploy a Working Bot
Next steps1m 46s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.