% CartoDB Exercises % MaptimeATX % August 12, 2015
Presentation viewable at maptimeatx.github.io/cartodb-exercises/
Source code for the presentation is at github.com/MaptimeATX/cartodb-exercises
First, check out maptime.io/cartodb-tutorial/
Then, get a CartoDB account at cartodb.com/signup for today's exercises
Natural Earth Data - naturalearthdata.com
This is a great resource for general cartographic data, and it's public domain!
. . .
Download Natural Earth Data Populated Places Simple Shapefile: goo.gl/QtJiCn
Open cartodb.com and log in
Drag the downloaded ne_50m_populated_places_simple.zip
file into your CartoDB Dashboard
. . .
Explore the Data View, note the different columns (especially pop_max
)
. . .
Explore the Map View, experiment with the Wizards.
Try making a Bubble Map based on population.
. . .
Add an Info Window to display name
and pop_max
. . .
Check out the CartoCSS Editor tab. That's the code
for all the styling rules.
Instead of using the Wizard, we could have done all the styling manually in this tab.
Add the following rule to add labels to your city dots:
#ne_50m_populated_places_simple::labels {
text-name: [name];
text-face-name: 'DejaVu Sans Book';
text-size: 10;
text-label-position-tolerance: 10;
text-fill: #000;
text-halo-fill: #FFF;
text-halo-radius: 1;
text-dy: -8;
text-allow-overlap: true;
text-placement: point;
text-placement-type: simple;
}
(Visit goo.gl/zGqpGA to copy-paste)
. . .
Now that we have labels, let's change the basemap to one without its own labels
. . .
Click Visualize, then Publish to get a shareable link to your map
. . .
Introduce yourself to the person next to you and work together for this exercise
Choropleth Map - a map where areas are shaded or patterned in proportion to a statistical variable being displayed on the map (en.wikipedia.org/wiki/Choropleth_map)
-
Download Map Academy's Counties Shapefile: acdmy.org/d/counties.zip
-
Import the downloaded
counties.zip
file into your CartoDB Dashboard -
Use the Wizard to make a Choropleth Map based on population. Hint: Use
pop_sqkm
. . .
- Download All Earthquakes for the Last 30 Days from USGS: goo.gl/hhoAyK
-
Import the
all_month.csv
into your CartoDB account (drag and drop) -
Experiment with the Wizard tab. Try Heat Map, Intensity, Density, maybe even Torque.
Example: cdb.io/1JUy0WP
. . .
Thanks to all of you for coming!
Thanks to ObjectRocket for hosting and CartoDB for the pizza!
Learn more about CartoDB at the CartoDB Map Academy