Quantcast
Channel: CARTO Blog
Viewing all articles
Browse latest Browse all 820

Sneak Peek: Next-Gen Styling for Data-Driven Maps

$
0
0
TurboCarto

From the very beginning, CartoDB has focused and researched how to make visual exploration of location data easier and more compelling. For most of that research, we rely on standard languages that are easy to use and learn, such as SQL and CartoCSS.

Now, we are taking CartoCSS a step further and adding new capabilities centered on data-driven styling. We’ve done this before with torque.js.

Introducing Turbo-Carto

Turbo-Carto is an open source CartoCSS pre-processor that enables functions to be added to CartoCSS that can be evaluated asynchronously. For example, Turbo-Carto allows you to create color and symbol size ramps with just a single line of code, so you don’t need to worry anymore about calculating the correct bins for your thematic map. It does it for you.

/* Creating a color ramp with Turbo Carto */marker-fill:ramp([your_column_name],colorbrewer(Greens));/* Changing symbol sizes with Turbo Carto */marker-width:ramp([your_column_name],4,18,6jenks));/* Where 4 is the minimum size, 18 the max size, 6, the number of buckets, and jenks
 the quantification method */

Not only does Turbo-Carto save you time when writing conditions on CartoCSS, but it also calculates the buckets for you and keeps you connected to the data. For example, if you filter a dataset previously styled with a color ramp, it will recalculate the bins depending on the filtered sample or even depending on the data that you are seeing in the bounding box. Analysts can leverage this with Deep Insights to find new outliers or interesting values on their maps, while keeping a statistically correct approach.

Starting today, Turbo-Carto is available through CartoDB.js and the Maps API and will be integrated soon in the CartoDB Editor.

Isn’t it cool? Take a look at the repo, give it a try, and let us know what you think.

Happy data mapping!


Viewing all articles
Browse latest Browse all 820

Trending Articles