Written by on

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

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, 6 jenks));
 /* 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!

Don’t forget to share this post on Twitter, Facebook, and Linkedin!

About the author
About the author

Sergio has spent years bridging the designer-developer divide and making products to improve the way that decisions are made. He has a background in computer science and currently researches data visualization, information design, and interface design with a special focus on data interaction.
In 2009, Sergio co-founded Vizzuality, a company dedicated to visualization, analysis, and cloud-based services for large amounts of data, with offices in Madrid and New York.

More posts from Sergio Álvarez

Related Posts

Ready to optimize your territories with Location Intelligence?

Close circle icon

Contact us

Please fill out the below form and we'll be in touch real soon.