BigQuery Geography Clustering

select
name,
min(temp) as min_temp,
max(temp) as max_temp
from `fh-bigquery.weather_gsod.all`
where st_within(point_gis, st_geogfromtext(‘POLYGON((-0.5191087546253357 51.69057940987663,-0.5850267233753357 51.530249275252345,-0.5685472311878357 51.33504597185959,-0.19226549290658568 51.2285324250183,0.20049573756216432 51.271511154557565,0.3185987649059143 51.55074848767514,0.2856397805309143 51.64628942375177,0.04943372584341432 51.72461916884517,-0.5191087546253357 51.69057940987663))’))
group by 1
name                min_temp  max_temp
ST JAMES PARK 26.3 83.2
KENLEY AIRFIELD 18.0 82.8
HEATHROW 18.6 83.4
CITY 22.3 92.2
BLACKWALL 37.0 62.2
NORTHOLT 18.4 84.1
BIGGIN HILL 15.5 90.3
PURLEY OAKS 23.0 81.7
LEAVESDEN 22.3 89.1
LONDON WEA CENTER 20.0 85.2
KEW-IN-LONDON 23.3 82.4
select
name,
min(temp) as min_temp,
max(temp) as max_temp
from `fh-bigquery.weather_gsod.all_geoclusterd`
where st_within(point_gis, st_geogfromtext(‘POLYGON((-0.5191087546253357 51.69057940987663,-0.5850267233753357 51.530249275252345,-0.5685472311878357 51.33504597185959,-0.19226549290658568 51.2285324250183,0.20049573756216432 51.271511154557565,0.3185987649059143 51.55074848767514,0.2856397805309143 51.64628942375177,0.04943372584341432 51.72461916884517,-0.5191087546253357 51.69057940987663))’))
group by 1
http://gismap.huq.io/

--

--

Italian by birth but citizen of the world by choice Researched network measurement and security Opensource aficionado Juggle billions of events into the cloud

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store