Geohashes form a grid, much like a matrix.
If I have a table with a geohash7 and a value, how could I calculate say the average of all the adjacentcells on BigQuery?
Sample source table
geohash7 | value |
---|---|
r1q6fh3 | 7 |
r1q6fh6 | 2 |
r1q6fh7 | 5 |
r1q6fh1 | 7 |
r1q6fh4 | 2 |
r1q6fh5 | 6 |
r1q6f5c | 4 |
r1q6f5f | 2 |
r1q6f5g | 7 |
Sample output table
geohash7 | value |
---|---|
r1q6fh4 | 4.6 |
... | ... |
Ideally in a scalable way as I want to run this over a large landmass.