3 ms·
Looks like they used Leaflet, a Javascript mapping library, for the visualization, so you end up with funny stuff like this in the source: var courtBounds =
by jonas21 11y ago
Looks like they used Leaflet, a Javascript mapping library, for the visualization, so you end up with funny stuff like this in the source:
var courtBounds = [[33.1593, -118.0198], [34.2353, -118.5198]];
- speg 11y ago> countQuery.execute("SELECT COUNT(cartodb_id) AS feature_count FROM kobe_all_shots_geocoded_final_merge"... I sure hope they have permissions set up on that database..
- xeromal 11y agoI'd never think to view source on random pages I visit, but this has me curious who else does things like this. Why is JS executing SQL?
- jonknee 11y agoIt's an API call to CartoDB, that's how it is designed to work. The response is JSON. http://docs.cartodb.com/cartodb-platform/sql-api/ http://docs.cartodb.com/cartodb-platform/sql-api/
- xeromal 11y agoThanks for sharing. That's pretty slick then. I feel like some things are better expressed in SQL syntax.
- ralusek 11y agoPossibly a local DB like Lovefield?
- jonknee 11y agoIt's CartoDB, the full request is: http://latimes.cartodb.com/api/v2/sql?q=SELECT%20COUNT(cartodb_id)%20AS%20feature_count%20FROM%20kobe_all_shots_geocoded_final_merge http://latimes.cartodb.com/api/v2/sql?q=SELECT%20COUNT(carto...