Tutor task172 spring2025 ingest and analyze bitcoin prices using apache flink#200
Closed
tharun2k1 wants to merge 10 commits into
Closed
Conversation
tkpratardan
suggested changes
Apr 18, 2025
Contributor
tkpratardan
left a comment
There was a problem hiding this comment.
Good job!
Keep working in this branch. We can merge a checkpoint after some progress has been made.
this contain changes to bitcoin_flink_job.py and other docker changes
… InfluxDB Included: - `bitcoin_utils.py`: Core API for fetching BTC prices, computing metrics, writing to InfluxDB - `bitcoin.API.ipynb`: Demonstrates API class usage (streaming 10 data points) - `bitcoin.Fetch.ipynb`: Full pipeline including historical data, NeuralProphet forecast, plots - `docker-compose.yml`: Orchestrates InfluxDB and Jupyter app in a shared Docker network - `Dockerfile`: Builds the Python environment for Jupyter + required packages - `.env`: Stores runtime InfluxDB token and config (excluded token value for security) - `bitcoin.API.md`: Markdown docs explaining API functionality and usage - `bitcoin.fetch.md`: Markdown documentation for full pipeline demo (stream + forecast) - `README.md`: Complete setup, run, and usage guide with step-by-step instructions Excluded: - `.DS_Store`, `.ipynb_checkpoints/`, `build logs`, and other autogenerated/OS-specific files (via `.gitignore`) Ready for instructor review and reproduction on any system with Docker installed.
Collaborator
Author
|
Hi @tkpratardan @gpsaggese @Prahar08modi , I have completed the project. Kindly review it when you get a chance. |
…_Bitcoin_Prices_Using_Apache_Flink
…es_Using_Apache_Flink' of github.com:causify-ai/tutorials into TutorTask172_Spring2025_Ingest_and_Analyze_Bitcoin_Prices_Using_Apache_Flink
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue: Issue#172
Lind to folder : #folder
link to README.md
Project Title: Real-Time Bitcoin Price Analysis using PyFlink and InfluxDB
Overview:
This project demonstrates an end-to-end real-time Bitcoin price analysis pipeline. It streams live prices from the CoinGecko API, logs metrics to InfluxDB, fetches historical data for forecasting, and visualizes future trends using NeuralProphet.
Initail setup(Prerequisites)
Step 1: Clone the Repository
git clone https://github.com/[your-username]/tutorials.git
cd tutorials/DATA605/Spring2025/projects/TutorTask172_Spring2025_Ingest_and_Analyze_Bitcoin_Prices_Using_Apache_Flink/tutorial_template/docker_data605_style
Step 2: Docker Installation (If Not Installed)
Make sure Docker is installed.
Step 3: Build the Container Environment
Make the shell scripts executable and run the build script to build your custom Docker image:
chmod +x docker_*.sh
./docker_build.sh
Key Features:
🔁 Real-time Bitcoin price fetching with rolling metrics (MA, EMA, StdDev, etc.)
📥 Data storage in InfluxDB with Dockerized setup
📈 Forecasting using NeuralProphet with historical Yahoo Finance data
📊 Visual plots and seasonality analysis
✅ Clean modular structure using bitcoin_utils.py API
What's Included:
bitcoin_utils.py: Main API logic
bitcoin.API.ipynb: Shows how to use the streaming API
bitcoin.Fetch.ipynb: Full historical fetch → forecast → visualization pipeline
bitcoin.API.md and bitcoin.fetch.md: Technical documentation
docker-compose.yml, Dockerfile, .env: Complete deployment stack
README.md: Full setup guide with run instructions and explanation
Setup Requirements:
How to Run:
Described step-by-step in README.md (includes how to generate token, restart containers, and launch notebooks).
Why we use two Docker containers for clean separation of concerns:
Keeping them separate ensures:
Why Docker Network
Docker containers are isolated by default. To allow them to communicate (e.g., the app pushing data into InfluxDB), we connect them using a custom bridge network (flink_influx_network):
This makes sure:
Why Set Up InfluxDB and Generate Tokens
Docker Components
-Dockerfile – Sets up Python + Flink + all dependencies
-docker-compose.yml – Runs two containers: one for your app and one for InfluxDB
-.env file – Stores the secure InfluxDB token and config variables
Tools & Technologies Used:
Python Libraries used
🌐 APIs Used: