Hacker News new | comments | ask | show | jobs | submit login

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]];

> 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..

I'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?

It's an API call to CartoDB, that's how it is designed to work. The response is JSON.


Thanks for sharing. That's pretty slick then. I feel like some things are better expressed in SQL syntax.

Possibly a local DB like Lovefield?

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact