CartoDB / observatory-extension

BSD 3-Clause "New" or "Revised" License
6 stars 4 forks source link

Check inconsistent behaviour when getting the available regions #294

Open ethervoid opened 7 years ago

ethervoid commented 7 years ago

UI is using the following query to get the possible regions and the number of mesurements we have for the dataset:

SELECT count(*) num_measurements, tag.key region_id, tag.value region_name FROM 
OBS_GetAvailableNumerators((SELECT ST_SetSRID(ST_Extent(the_geom), 4326) FROM (<%- 
query %>) q)) numers, Jsonb_Each(numers.numer_tags) tag WHERE tag.key like 'section%' 
GROUP BY tag.key, tag.value

@kevin-reilly reported:

Region

Using the lightrailstation dataset which is only in the US, the Region selector only presents that as an option when I click the pulldown. This is correct, but if there is only one selection, it should populate by default and not make me select it.

Using the Irish Counties dataset (which is only in Ireland...), when I select the Region menu, it only offers me "United Kingdom." I believe this should also offer me EU datasets as well.

I created a dataset called Dummy which only includes two points, one in Texas and one in Ireland. When I try to create an Analysis for this data set, the Region menu offers me United States, Canada, Spain, and the European Union but not the United Kingdom. This seems wrong.