diff --git a/.gitignore b/.gitignore index a57b14f..07bb386 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ .hugo_build.lock *.json /data +backend/api_logs.txt *__pycache__* diff --git a/backend/app.py b/backend/app.py index a45ecf7..6fc5c89 100644 --- a/backend/app.py +++ b/backend/app.py @@ -64,17 +64,17 @@ def business_growth(): delta = today - datetime.timedelta(days=2) filtered_data = [item for item in filtered_data if item['cumulative_period_type'] == cumulative_period_type and delta <= datetime.datetime.strptime(item['date'], '%Y-%m-%d')] elif cumulative_period_type == "7 day": - delta = today - datetime.timedelta(days=7) + delta = today - datetime.timedelta(days=8) filtered_data = [item for item in filtered_data if item['cumulative_period_type'] == cumulative_period_type and delta <= datetime.datetime.strptime(item['date'], '%Y-%m-%d')] elif cumulative_period_type == "28 day": - delta = today - datetime.timedelta(days=28) + delta = today - datetime.timedelta(days=29) filtered_data = [item for item in filtered_data if item['cumulative_period_type'] == cumulative_period_type and delta <= datetime.datetime.strptime(item['date'], '%Y-%m-%d')] elif cumulative_period_type == "365 day": - delta = today - datetime.timedelta(days=365) + delta = today - datetime.timedelta(days=366) filtered_data = [item for item in filtered_data if item['cumulative_period_type'] == cumulative_period_type and delta <= datetime.datetime.strptime(item['date'], '%Y-%m-%d')] # Sort by date - sorted_data = sorted(filtered_data, key=lambda x: x['date'], reverse=True) + sorted_data = sorted(filtered_data, key=lambda x: x['date'], reverse=False) # Return json return Response(json.dumps(sorted_data), mimetype='application/json') diff --git a/content/data-lab/hashrate.md b/content/data-lab/hashrate.md index ba4b3a1..9762bbd 100644 --- a/content/data-lab/hashrate.md +++ b/content/data-lab/hashrate.md @@ -8,6 +8,6 @@ summary: "Timeseries chart showing the Bitcoin network hashrate and difficulty." tags: ["Bitcoin", "Stats", "Hashrate"] --- -The estimated hashrate and difficulty of the Bitcoin network, accompanied by the 28-day moving average. +This chart shows the estimated hashrate and difficulty of the Bitcoin network, accompanied by the 28-day moving average. This information is extracted from my node using the `bitcoin-cli getnetworkhashps` command. {{< chart src="/js/hashrate.js" >}} diff --git a/content/data-lab/miner-rewards.md b/content/data-lab/miner-rewards.md index 2140ed1..02830ce 100644 --- a/content/data-lab/miner-rewards.md +++ b/content/data-lab/miner-rewards.md @@ -9,6 +9,6 @@ draft: false tags: ["Bitcoin", "Stats"] --- -Total daily aggregated miner income denominated in USD for that day. +The following chart shows daily miner revenue in USD for the period selected in the dropdown. This information is based on the sum of bitcoin mined each day (i.e. the block-subsidy) plus the transaction fees. Price data is obtained from the CoinGecko. {{< chart src="/js/miner-rewards.js" >}} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index f18aee9..7d5b527 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,7 +1,7 @@