This demo uses the following components of GCP: kubernetes, docker, pubsub, Natural Language (sentiment analysis), BigQuery, and Data Studio
If you haven't already, clone the Github repository for this demo:
git clone https://github.com/NeudesicGCP/GCPTweetCapture.gitgcloud config set project neu-ncaaThe topics that are being captured are found in the file neu-ncaa/tweetcapture/pubsub/tweet-capture-docker-image/twitter-to-pubsub.py
nano twitter-to-pubsub.py(from /neu/tweetcapture/pubsub/tweetcapture-docker-image folder)
gcloud builds submit --tag gcr.io/neu-ncaa/tweetcapture-image .gcloud beta container --project "neu-ncaa" clusters create "ncaatweet-cluster" --zone "us-central1-a" --service-account "neu-ncaa-tweet-serviceaccount@neu-ncaa.iam.gserviceaccount.com"gcloud container clusters get-credentials ncaatweet-cluster --zone us-central1-a --project neu-ncaakubectl create -f twitter-stream.yamlkubectl create -f bigquery-controller.yamlkubectl get podskubectl delete deployment -l "name in (twitter-stream, bigquery-controller)"###################################################################################
pip install virtualenvvirtualenv twittersource twitter/bin/activatetwitter/bin/pip install google-cloud-languagepip install google-cloud-bigquerypython bigquery-sentiment-analysis-naturallanguage.py ncaa_tweets###################################################################################
This visualization in Google Data Studio uses several views in BigQuery that pull from the tweet and tweetsentiment tables
https://datastudio.google.com/open/1m4S2Hqn1BCi7ql_2sfCEzz6H7x0oiAEY###################################################################################
gcloud beta container --project "neu-ncaa" clusters delete "ncaatweet-cluster" --zone "us-central1-a"