CartoDB / observatory-extension

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

GetAvailableGeometries should accept numgeoms parameters #309

Closed javitonino closed 7 years ago

javitonino commented 7 years ago

GetAvailableGeometries does not take a numgeoms parameters, so when calculating geometry scores it defaults to 3k geometries. See: https://github.com/CartoDB/observatory-extension/blob/develop/src/pg/sql/41_observatory_augmentation.sql#L143-L144 https://github.com/CartoDB/observatory-extension/blob/develop/src/pg/sql/42_observatory_exploration.sql#L541-L543

As a result, we tend to score the highest small-ish geometries, never suggesting high-level geos such as provinces/states.

This is specially relevant if we are going to do https://github.com/CartoDB/cartodb/issues/12623

ethervoid commented 7 years ago

This CRs includes two PRs: #313 and cartodb/dataservices-api#403

ethervoid commented 7 years ago

As a side note I've tested with change in builder to pass the new parameter, upgrading and downgrading the extension for client and server to check for compatibility and so on

ethervoid commented 7 years ago

Acceptance

ethervoid commented 7 years ago

Added changes to increase version in CartoDB: cartodb/cartodb#12942

javitonino commented 7 years ago

This will need a minor docs update @csobier (this is still not released). We are just adding an optional numeric parameter number_geoms to OBS_GetAvailableGeometries. The user can pass the number of geometries in his dataset in order to get back scores adjusted to the number of geometries and bounding box.

csobier commented 7 years ago

Great! Thanks for tagging me so I can track when this is released and ready for doc updates