bitcoin-dataset-script

1,645
0
Updated:
Files:1
Size:24.3 kB
Formats:csv
License:CC-BY-4.0

API Access

Access dataset files directly from scripts, code, or AI agents.

Browse dataset files
Dataset Files

Each file has a stable URL (r-link) that you can use directly in scripts, apps, or AI agents. These URLs are permanent and safe to hardcode.

/abeelha/bitcoin-dataset-script/
https://datahub.io/abeelha/bitcoin-dataset-script/_r/-/README.md
https://datahub.io/abeelha/bitcoin-dataset-script/_r/-/data/processed/bitcoin_prices.csv
https://datahub.io/abeelha/bitcoin-dataset-script/_r/-/data/raw/current_price_20250822_114249.json
https://datahub.io/abeelha/bitcoin-dataset-script/_r/-/data/raw/historical_data_20250822_114249.json
https://datahub.io/abeelha/bitcoin-dataset-script/_r/-/datapackage.json
Key Files

Start with these files — they give you everything you need to understand and access the dataset.

datapackage.jsonmetadata & schema
https://datahub.io/abeelha/bitcoin-dataset-script/_r/-/datapackage.json
README.mddocumentation
https://datahub.io/abeelha/bitcoin-dataset-script/_r/-/README.md
Typical Usage
  1. 1. Fetch datapackage.json to inspect schema and resources
  2. 2. Download data resources listed in datapackage.json
  3. 3. Read README.md for full context

Data Files

Explore with AI

Bitcoin Daily Prices

Download

Download CSV

About

Daily Bitcoin price, market cap, and volume data
Last updated
5 January 2026
Total rows
...
Format
CSV
File size
24.3 kB

About this dataset

🪙 Bitcoin Price Data Package

An automated Data Package for collecting, processing, and visualizing Bitcoin price data using the Frictionless Data standard.

Bitcoin Data Package Python

📊 Dataset Overview

This Data Package provides comprehensive Bitcoin market data including:

  • Daily price data (USD)
  • Market capitalization
  • 24-hour trading volume
  • Historical trends (1 year lookback)

Data is automatically collected from the CoinGecko API and follows the Frictionless Data Package standard.

image image

🚀 Quick Start

Prerequisites

pip install -r scripts/requirements.txt

Data Collection

# Collect Bitcoin price data
python scripts/collect_bitcoin_data.py

# Generate visualizations
python scripts/create_visualizations.py

Validation

# Validate the Data Package
frictionless validate datapackage.json

📁 Project Structure

bitcoin-price-datapackage/
├── datapackage.json              # Data Package descriptor
├── README.md                     # This file
├── data/
│   ├── raw/                     # Raw API responses
│   │   ├── current_price_*.json
│   │   └── historical_data_*.json
│   └── processed/               # Cleaned CSV data
│       └── bitcoin_prices.csv   # Main dataset
├── scripts/
│   ├── collect_bitcoin_data.py  # Data collection script
│   ├── create_visualizations.py # Visualization generator
│   └── requirements.txt         # Python dependencies
└── visualizations/
    ├── bitcoin_dashboard.html   # Interactive dashboard
    ├── bitcoin_price_chart.html # Price & volume chart
    ├── bitcoin_market_cap.html  # Market cap chart
    └── bitcoin_gauge.html       # Current price gauge

📈 Data Schema

FieldTypeDescription
datedateDate of price data (YYYY-MM-DD)
datetimedatetimeFull timestamp with time
pricenumberBitcoin price in USD
market_capintegerTotal market capitalization in USD
volumeinteger24-hour trading volume in USD

🎨 Visualizations

The package includes several interactive visualizations:

  1. 📊 Main Dashboard (bitcoin_dashboard.html)

    • Combined price, volume, and market cap charts
    • Key statistics and metrics
    • Real-time price gauge
  2. 📈 Price Chart (bitcoin_price_chart.html)

    • Daily price trends
    • Trading volume overlay
  3. 💰 Market Cap Chart (bitcoin_market_cap.html)

    • Market capitalization over time
  4. ⏱️ Price Gauge (bitcoin_gauge.html)

    • Current price vs yearly range

🔄 Automation

Manual Updates

python scripts/collect_bitcoin_data.py
python scripts/create_visualizations.py

Scheduled Updates

Using Cron (Linux/Mac)

# Add to crontab for daily updates at 9 AM
0 9 * * * cd /path/to/bitcoin-price-datapackage && python scripts/collect_bitcoin_data.py

Using GitHub Actions

Create .github/workflows/update-data.yml:

name: Update Bitcoin Data
on:
  schedule:
    - cron: "0 9 * * *" # Daily at 9 AM UTC
  workflow_dispatch:

jobs:
  update-data:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: "3.9"
      - name: Install dependencies
        run: pip install -r scripts/requirements.txt
      - name: Collect data
        run: python scripts/collect_bitcoin_data.py
      - name: Create visualizations
        run: python scripts/create_visualizations.py
      - name: Commit changes
        run: |
          git config --local user.email "action@github.com"
          git config --local user.name "GitHub Action"
          git add -A
          git commit -m "Update Bitcoin data $(date)" || exit 0
          git push

📊 Data Sources

🔍 Data Quality

Validation Checks

  • ✅ Schema validation with Frictionless
  • ✅ Data type verification
  • ✅ Missing value handling
  • ✅ Timestamp consistency
  • ✅ Price range validation

Error Handling

  • Network timeout handling
  • API rate limit respect
  • Data consistency checks
  • Graceful error recovery

📄 License

This Data Package is made available under the Creative Commons Attribution 4.0 International License.

Data Sources License

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run validation: frictionless validate datapackage.json
  5. Submit a pull request

📞 Support

🏷️ Version History

  • v1.0.0: Initial release with daily price collection and basic visualizations

Created as part of the Datopian tech onboarding process - turning awesome data into Frictionless Data Packages! 🚀