Git Product home page Git Product logo

twitter-dash's Introduction

Twitter Dashboard, Apache NiFi, Solr, Banana

Twitter dashboard using Apache NiFi, Solr and Banana

Apache NiFi/Twitter Dashboard

Getting Started

Creating an interactive dashboard for your data

Prerequisites

For this part we are going to need Solr, Banana and NiFi and we are going to create an interactive dashboard of the tweets.

Launch AWS Instance

From the AWS Marketplace launch an instance using the following AMI, https://aws.amazon.com/marketplace/fulfillment?productId=7bc7936e-10a8-42c7-ab44-ce435bd949a9&ref=cns_srchrow

This is the quickest way to get NiFi up and running.

Update System

sudo apt-get update && apt-get upgrade -y

Solr

First install Java.

Install Java

sudo apt-get update
sudo tar apt-get install -y default-jre || sudo yum install -y java-headless

Veryify that Java is installed.

java -version

Install Solr Standard

sudo wget http://apache.mirror.anlx.net/lucene/solr/7.0.0/solr-7.0.0.tgz
sudo tar xzf solr-7.0.0.tgz
sudo ./solr-7.0.0/bin/install_solr_service.sh solr-7.0.0.tgz

Create the Solr Collection for Tweets

sudo -i
cd /var/solr/data
mkdir tweets
cp -r _default/ /var/solr/data
mv _default/ tweets
chown -r solr:solr *
exit

sudo -u solr ./solr-7.0.0/bin/solr create_core -c tweets -d _default -s 1 -rf 1

Check the core has been created

http://hostname:8983/solr/#/~cores/tweets

Solr/Tweets Configuration

Edit solrconfig.xml by adding EEE MMM d HH:mm:ss Z yyyy under ParseDateFieldUpdateProcessorFactory so it looks like below. This is done to allow Solr to recognise the timestamp format of tweets.

sudo nano /opt/solr/server/configsets/_default/conf/solrconfig.xml
  <processor>
    <arr name="format">
      <str>EEE MMM d HH:mm:ss Z yyyy</str>

Apache NiFi/Twitter Dashboard

Banana

Banana is a tool to create dashboards to visualize data you have stored in Solr. Commonly used with Logstash for log data. Its a fork of kibana.

Run Solr at least once to create the webapp directory

Download Banana and install it.

cd /opt/solr/server/solr-webapp/webapp
sudo git clone https://github.com/lucidworks/banana

Replace the default dashboard with the Twitter dashboard

cd /opt/solr/server/solr-webapp/webapp/banana/src/app/dashboards
sudo mv default.json default.json.orig
wget https://raw.githubusercontent.com/abajwa-hw/ambari-nifi-service/master/demofiles/default.json

Browse to http://hostname:8983/solr/banana/src/index.html

Apache NiFi

Now create a data flow in NiFi to send the twitter data to Solr. Apache NiFi/Twitter Dashboard

Configure the PutSolrContentStream processor as follows, this will push the tweets to Solr. Apache NiFi/Solr Configuration Apache NiFi/Solr Configuration

Enable the flow and then check Solr.

Dashboard

Use the following URL to access the dashboard. http://hostname:8983/solr/banana/src/index.html#/dashboard

You will have a timeline of tweets in the dashboard. The dashboard is highly configurable, so have a play.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

  • Mark Craddock - Initial work
  • Neville de Mendonca - Initial work

See also the list of contributors who participated in this project.

License

TBD

Acknowledgments

https://community.hortonworks.com/articles/1282/sample-hdfnifi-flow-to-push-tweets-into-solrbanana.html https://blogs.apache.org/nifi/entry/indexing_tweets_with_nifi_and

twitter-dash's People

Contributors

mcraddock-ungp avatar

Watchers

 avatar  avatar

Forkers

rmdes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.