Skip to content

mtoto/stream-go-shiny

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
db
 
 
 
 
 
 
 
 
 
 

Streaming Analytics Demo with NATS

This repo contains the assets to create a real-time Shiny app that visualizes tweets based on a certain keyword. Under the hood, we use the Twitter Streaming API to access the tweets and NATS Streaming to process and write them to a MySQL database. The Shiny app queries this database continously to update the data in the dashboard. All the components are containerized and can be deployed using Docker Compose. For more detail, see my blogpost about this project.

Getting started

You need to have Docker and Docker Compose installed on your machine. To run the the service, clone the repo and build the containers. By default, the keyword to filter the Twitter Stream is "trump". You can change it by updating the .env file.

git clone https://github.com/mtoto/stream-go-shiny.git
cd stream-go-shiny
docker-compose build

To start the service, run:

docker-compose -f docker-compose.yml up

It might take a couple of minutes for all the containers to stand up. You can check http://localhost/twitter for the dashboard, it should look something like this:

About

Minimal streaming service using NATS & shiny on top of Twitter Streaming API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published