Three cartography tricks for making CARTO BUILDER maps

Almost one year from last blog post, here we are again. Lots of things have happened since then. I would like to mention some key events such as CARTO Locations, SIGLibre (where I gave a talk about A series of unfortunate maps) and several GeoInquietos Madrid talks and workshops.

This time I will give you some easy tips to elaborate very useful artifacts with BUILDER STYLE UI but also switching to a more pro mode with CartoCSS. Before reading further, I will recommend to have a look at CARTO’s Styling Guides. They were written by Mamata Akella, the real expert here. But if you want to skip go through those guides, log into your CARTO account and follow the instructions below. In doing so, at the end of the day, you will be able to create outstanding visualizations in a manner of minutes displaying markers as beacons and fireflies among others.

Read More

How to map NBA player shots using CartoDB

A couple of weeks ago LA Times amazed us with their Kobe’s 30,699 shots visualization. Then they explained us how they made it. In this post, I am going to replicate their process. But in my case, I am going to plot Stephen Curry’s last regular season shots. A little bit of knowledge of the NBA API, few lines of Python and some SQL queries in CartoDB and… BOOM!

Read More

3D buildings with CartoCSS!

Sorry, I lied. You cannot make 3D buildings with just CartoCSS. You also need SQL. I promise you it will be quickly and painless. But first, you need a dataset from a city. This has to be made by polygons representing buildings areas and must also have a height field. I downloaded one of Brooklyn from NYC OpenData.

Read More

PostGIS tips & tricks with CartoDB.js

It is been awhile since my last post. A lot of cool things have happened since then!  I continue to learn Javascript and PostGIS. In fact, with the combination of these two and a little help of CartoDB.js, you could make amazing visualizations. In this post, you will learn how to connect points using great circles and also how to stack your points as chips in order to solve the “overlapping points problem”.

I believe that everyone is familiar with great circles thanks to the Facebook friendship map. But in my case, I get completely in love with them when I learnt how to “paint” them in R. But maybe the most brilliant visualization is the one recently made by Carlos Matallín. Here we are going to learn the most basic SQL query used in the former viz that allows us to connect our points of interest and getting simple but outstanding cartographies:

Read More

Torque visualizations using CartoDB.js

My #geopropósito for this year is learning Javascript. Quite useful if you want to know how to use all the APIs for webmapping. I started taking a very interesting course about understanding the weird parts of this language. Then I watched all the Javascript for GIS programmers free-tutorials made by Geospatial Training -especially, the one concerning APIs– and also attended the seminary about the ArcGIS API for Javascript organized by GeoDevelopers. But what I needed was practise. So I decided to instead of using the CartoDB editor, I would created my torque animated maps with the CartoDB.js library.

What is the code behind this map? First, it had Python at the backend. If you do not have yet read the post about how to capture data from the Twitter API, do it now! On the other hand, it has some interesting lines of CartoCSS and Javascript at the frontend. I am still working on it because there are some details to add such as title, legend and a better slider. But I believe the main skeleton is set up. First the CartoCSS:

Read More

Cartographic tools for data journalists

Last Saturday I attended the Jornadas de Herramientas Cartográficas organized by Geoinquietos and the Periodismo de Datos group in Medialab-Prado. Several professionals, cartographers and journalists mostly, gave an insight of their work and the tools they most commonly use. The event was focused on election maps (#electionmaps) and you can find a GitHub repository with all the slides and scripts which were displayed during the workshop.

Thanks to Xosé Manuel Vilán and Jesús García we learnt how to make hex maps with Quantum GIS, Graeme Herbert showed us how to make prediction models applying the not-well-called D’Hont Law and a couple of epidemiologists from the Instituto de Salud Carlos III, Rebeca Ramis and Diana Gómez, explained to us how to analyze spatial data with Geoda software. Carlos Gil and Beatriz Martinez also introduced us into mapping with R. A very interesting talk was given by Jorge Sanz from CartoDB.  He showed us how to solve the eternal geographical problem of the Spanish geography: putting the Canary Islands on the map. And he did it with just a few lines of SQL:

You can observe the result thanks to the following map. Before and after running the code.

Read More