Skip to content

Live bitcoin price visualization using Apache Spark, Matplotlib and MongoDB

Notifications You must be signed in to change notification settings

alsabay/bitcoin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bitcoin

Prerequisites: MongoDB Apache Spark python3

Main Files:

  1. okcoinMongo.py - pulls bitcoin ticker data from okcoin.com, stores in MongoDB at 5 sec intervals.
  2. livegraph.py - plots bitcoin ticker data from MongoDB.
  3. live-sparkgraph.py - Plots bitcoin ticker prices. Runs as an apache spark process. Connects to MongoDB using the Stratio spark-mongodb package hosted at spark.packages.org

Instructions:

  1. Start MongoD in a terminal
  2. Start mongo console and type command "use okcoindb"
  3. In a separate terminal, run "python okcoinMongo.py"
  4. In another terminal, run "python livegraph.py"
  5. To run apache spark version, from a terminal window type below:

$ spark-submit --conf "spark.mongodb.input.uri=mongodb://127.0.0.1/test.myCollection?readPreference=primaryPreferred" --conf "spark.mongodb.output.uri=mongodb://127.0.0.1/test.myCollection" --packages org.mongodb.spark:mongo-spark-connector_2.11:2.0.0 live-sparkgraph.py

About

Live bitcoin price visualization using Apache Spark, Matplotlib and MongoDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages