Animals | CartoDB.js
✓ Published0🌍 Public
Aandrewxhill
Last edited Nov 16, 2014
Created on Nov 16, 2014
This example visualizes animal sightings on an interactive map using CartoDB.js. It displays all animals by default and dynamically adds a layer selector list that groups animals by type, with counts derived from SQL queries against the `all_animals` table. Clicking a type filters the map by updating the SQL for sublayers and the data layer, drawing connected lines via `ST_MakeLine` on the selected subset. The code uses CartoDB’s `createVis` and `SQL` APIs to load the map and query data from the `seatheanimals` user account.
AI-generated description