How to create dashboards & widgets with CartoDB

Last weeks I have been working with DeepInsights.js, the “new” CartoDB’s Javascript library that allows you to create dashboards. This technology is so powerful that can be intimidating. But in this blog post I am going to demonstrate how easy is to create dashboards, widgets and add customized elements. Let’s start!


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