CartoDB Backbone for data-driven webpages
✓ Published0🌍 Public
Aandrewxhill
Last edited Sep 12, 2012
Created on Sep 12, 2012
This example demonstrates how to integrate CartoDB’s geographic data services with the Backbone.js framework to build data-driven webpages. The code defines a custom Backbone model that queries the `nyc_parks` table via SQL, fetching the ten largest parks by area and then binding a `reset` event to display their names in an alert. It uses CartoDB’s `CartoDBCollection` and the `fetch()` method to load remote data asynchronously, while Backbone’s event system triggers the callback. The example shows a minimal pattern for combining SQL queries with a client-side MVC structure.
AI-generated description