We welcome contributions to improve the query that powers our BTC at Risk Tracker. Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Make your changes
- Test your changes using BigQuery:
- Sign up for Google Cloud Platform - the free tier includes 1TB of queries per month
- We recommend using BigQuery Studio - it provides a user-friendly interface for SQL development with features like syntax highlighting, query validation, and cost estimation
- Update the destination table reference in the query to match your setup:
CREATE OR REPLACE TABLE `your-project.your_dataset.your_table_name` AS
- Start with a small data sample by setting lower cutoff values:
DECLARE cutoff_month DATE DEFAULT '2011-01-01'; -- Early Bitcoin history DECLARE cutoff_block INT64 DEFAULT 100000; -- First ~100k blocks
- Once verified, test with a larger dataset by adjusting the cutoffs
- Monitor your query costs using the query validator before running
- Commit your changes (
git commit -am 'Add your feature') - Push to the branch (
git push origin feature/your-feature) - Create a new Pull Request
- Ensure your changes maintain or improve the query's performance
- Keep the query well-documented with clear comments
- Test changes with different block height and date ranges
- Maintain backward compatibility where possible
If you have questions about the query or need help with your contribution, please open an issue in the repository.