L
✓ Published0🌍 Public
Aandrewxhill
Last edited Jan 28, 2016
Created on Jan 28, 2016
A choropleth map of U.S. census block groups colors each polygon by a seven-step color ramp based on the `median_rent_moe` column, overlaid on a dark CartoDB basemap. The example generates a static 500×200 pixel image centered at latitude 40, longitude -100, using the CartoDB SQL API to compute Jenks natural breaks for classification. The `CartoImage` class builds a CartoCSS style, posts a map configuration to the CartoDB static map endpoint, and returns the resulting PNG URL.
AI-generated descriptionA basic class that allows you to quickly generate static images from the CartoDB API using custom CartoCSS builders etc.