View your data on a map - CartoDB Tutorial
Marius Budileanu / 2014-08-01

Create your online map in 6 steps. This tutorial will showcase how to create a map, using a data set referring to high school graduates.

Share this story

The data stemms from INS and contains geospatial data provided by geo-spatial.org with the aid of CartoDB. CartoDB is an open source tool that allows storing and vizualizing geospatial data on the web. It was built to make it easier for people to tell their stories by providing them with flexible and intuitive ways to create maps and design geospatial applications. CartoDB can be installed on your own server and we also offer a hosted service at cartodb.com.

For this exercice we will need a INS TEMPO Online account, a CartoDB account and Libre Office.

1. Download statistical data


After you've created your account and your INS TEMPO login, feel free to browse the data. Our example referrs to data regarding high school graduates.

A. Go to Education, scroll down until Number of graduates by level of education, counties and localities.

B. Select high school, all counties with shift, total, 2010 & 2011, number of person and click search.

CZZX. Download Excel document.

All this data IS free to use in any purpose.

2. Prepare your statistical data

A. After downloading your new excel file, remove unnecessary columns and rows. We must have only three columns : Judet, 2010 and 2011.

B. Save the new file (.xls or .xlsx) with the name bacalaureat_2010_2011.xls.

Now we have celan and accurate data.

3. Download geospatial data

Besides statistical data, we need geospatial data. This data contains spatial information and we must have it for our map.

A. Go to geo-spatial.org and search for judete and click / the scroll down to România: seturi de date vectoriale generale / here we've found our geospatial data.

B. Download from Județe the GeoJSON file. You must have now a new file judet_ro.geojson.zip.

GeoJSON is a format for encoding a variety of geographic data structures.

All data on geo-spatial.org is free to use with a Creative Commons licence.

 

4. Upload and merge your tables

 

After you created your CartoDB account and login you’re ready to create the first tables.

A. Go to your dashboard and click create your first table.

B. Upload bacalaureat_2010_2011 and judete_ro.geojson.zip; this can be done via URL or via GoogleDrive and Dropbox (very useful when we neded a map with a hight update rate).

 

C. For a better use of statistical data (bacalaureat_2010_2011) you have to change column n2010 & n2011 from string  to number.

 

Now we are ready to merge statistical data (bacalaureat_2010_2011) with geospatial data ( judete_ro.geojson.zip).

D. Click to merge tables and then select join by column and next.

E. From the new pop up menu, select judete_ro (right dropdown) and then close the_geom from  bacalaureat_2010_2011. Turn on the_geom from judete_ro. Practically, in this step use geometry from judete_ro which has coordinates information.

 

F. Choose judet and name to merge tables. This step will create a new and complete table with the name judete_bac.


 
Finally, we have our data in a single place and we can move forward to view and style our map.
 

5. View and style your map

If you click on Map you have the possibility to view your data on a map and style your map in many ways.

From Basemap menu we have option to chose our background map, in this example we use GMAPS Dark (also available are maps from Nokia, OpenStreetMaps and some customize CartoDB Maps).

A. In the right side menu (click 1) we we found all options to style our map.

B. In wizards menu use Choropleth and select n2010 or n2011 to view gratuaded data for every county.

C. From label text dropdown menu select name to view the name of the county.

Bellow wizards is infoview menu which help’s you to view info for county at click or hover.

D. Turn on all from click and n2010 & n2011.

You can also customize legend, css and filtre you data (ex: view only counties with 3000 to 5000 graduates in 2011)

 

6. Share your map

 

Before sharing your map, you must create a new visualization.

 

A. Click visualize and create a new visualization, name it Bacalaureat. Now, your map should be seen in the same way, but under visualization name.

B. Click share and a pop up menu with shareing options will be displayed. We can choose what content from your map to share, shareing method (url, iframe, api, facebook etc.).

 

This is my map. Share yours!