Kernel: R (R-Project)
Big-R-Query
https://cran.r-project.org/web/packages/bigrquery/README.html
The bigrquery packages provides an R interface to Google BigQuery. It makes it easy to retrieve metadata about your projects, datasets, tables and jobs, and provides a convenient wrapper for working with bigquery from R.
Here, we look for the lowest block IDs in the Bitcoin blockchain and want to know when they were.
Note for CoCalc: oauth 2.0 setup via httr requires a local browser (I don't know how to use this text based). So, run this in your local R instance and then upload the .httr-oauth file into your projects home directory.
In [1]:
Out[1]:
── Attaching packages ─────────────────────────────────────── tidyverse 1.2.1 ──
✔ ggplot2 2.2.1 ✔ purrr 0.2.4
✔ tibble 1.4.2 ✔ dplyr 0.7.4
✔ tidyr 0.8.0 ✔ stringr 1.2.0
✔ readr 1.1.1 ✔ forcats 0.2.0
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
Attaching package: ‘lubridate’
The following object is masked from ‘package:base’:
date
Asking BigQuery
In [2]:
Out[2]:
41.0 megabytes processed
Converting the timestamp strings to ISO formatted datetimes
In [3]:
Out[3]:
Look at row #4
this tells someone was really lucky to find such a low block ID back then in 2015!
In [4]:
Out[4]:
Slush pool, of course.
Always ahead of its time …
In [0]: