Updated

๐Ÿช™ Bitcoin Price Data Package

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/
โ”œ README.md
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.jsonโ€” metadata & schema
https://datahub.io/abeelha/bitcoin-dataset-script/_r/-/datapackage.json
README.mdโ€” documentation
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 Previews

Bitcoin Daily Prices

Loading data...

Schema

nametypedescriptiontitle
datedateDate of price data (YYYY-MM-DD)Date
datetimedatetimeFull timestamp of price dataDateTime
pricenumberBitcoin price in US DollarsPrice (USD)
market_capintegerTotal market capitalization in USDMarket Capitalization
volumeinteger24-hour trading volume in USD24h Trading Volume

Data Files

FileDescriptionSizeLast modifiedDownload
bitcoin-prices
Daily Bitcoin price, market cap, and volume data24.3 kB3 months ago
bitcoin-prices
FilesSizeFormatCreatedUpdatedLicenseSource
124.3 kBcsv7 months ago7 months agoCreative Commons Attribution 4.0 InternationalCoinGecko API

๐Ÿช™ 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! ๐Ÿš€