-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
215 lines (204 loc) · 8.79 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<meta name="author" content="MaptimeATX" />
<meta name="date" content="2015-08-12" />
<title>CartoDB Exercises</title>
<style type="text/css">code{white-space: pre;}</style>
<link rel="stylesheet" type="text/css" media="screen, projection, print"
href="http://www.w3.org/Talks/Tools/Slidy2/styles/slidy.css" />
<link rel="stylesheet" href="//cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src="//cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<script src="//api.tiles.mapbox.com/mapbox.js/plugins/turf/v2.0.0/turf.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="scripts/Leaflet.MakiMarkers.js"></script>
<link rel="stylesheet" href="styles/style.css" />
<script src="http://www.w3.org/Talks/Tools/Slidy2/scripts/slidy.js"
charset="utf-8" type="text/javascript"></script>
</head>
<body>
<div class="slide titlepage">
<h1 class="title">CartoDB Exercises</h1>
<p class="author">
<a href="http://maptimeatx.github.io">MaptimeATX</a>
</p>
<p class="date">August 12, 2015</p>
</div>
<div id="cartodb-exercises" class="slide section level1">
<h1>CartoDB Exercises</h1>
<p>Presentation viewable at <a href="http://maptimeatx.github.io/cartodb-exercises/">maptimeatx.github.io/cartodb-exercises/</a></p>
<p>Source code for the presentation is at <a href="https://github.com/MaptimeATX/cartodb-exercises">github.com/MaptimeATX/cartodb-exercises</a></p>
</div>
<div id="cartodb" class="slide section level1">
<h1>CartoDB</h1>
<p>First, check out <a href="http://maptime.io/cartodb-tutorial/">maptime.io/cartodb-tutorial/</a></p>
<p>Then, get a CartoDB account at <a href="https://cartodb.com/signup">cartodb.com/signup</a> for today's exercises</p>
</div>
<div id="tutorial---world-cities-map" class="slide section level1">
<h1>Tutorial - World Cities Map</h1>
<p><a href="http://www.naturalearthdata.com/">Natural Earth Data - naturalearthdata.com</a></p>
<p>This is a great resource for general cartographic data, and it's public domain!</p>
</div>
<div id="tutorial---world-cities-map-1" class="slide section level1">
<h1>Tutorial - World Cities Map</h1>
<div class="incremental">
<p>Download <a href="http://www.naturalearthdata.com/downloads/50m-cultural-vectors/50m-populated-places/">Natural Earth Data Populated Places Simple</a> Shapefile: <a href="http://goo.gl/QtJiCn">goo.gl/QtJiCn</a></p>
<div class="figure">
<img src="img/populated_places_dl.png" />
</div>
<p>Open <a href="http://cartodb.com">cartodb.com</a> and log in</p>
<p>Drag the downloaded <code>ne_50m_populated_places_simple.zip</code> file into your CartoDB Dashboard</p>
</div>
</div>
<div id="tutorial---world-cities-map-2" class="slide section level1">
<h1>Tutorial - World Cities Map</h1>
<div class="figure">
<img src="img/populated_places_map1.png" alt="Whoa! A fully functional web map!" />
<p class="caption">Whoa! A fully functional web map!</p>
</div>
</div>
<div id="tutorial---world-cities-map-3" class="slide section level1">
<h1>Tutorial - World Cities Map</h1>
<div class="incremental">
<p>Explore the <strong>Data View</strong>, note the different columns (especially <code>pop_max</code>)</p>
<div class="figure">
<img src="img/populated_places_data_view.png" />
</div>
</div>
</div>
<div id="tutorial---world-cities-map-4" class="slide section level1">
<h1>Tutorial - World Cities Map</h1>
<div class="incremental">
<p>Explore the <strong>Map View</strong>, experiment with the Wizards.</p>
<p>Try making a <strong>Bubble Map</strong> based on population.</p>
<div class="figure">
<img src="img/populated_places_bubble.png" />
</div>
</div>
</div>
<div id="tutorial---world-cities-map-5" class="slide section level1">
<h1>Tutorial - World Cities Map</h1>
<div class="incremental">
<p>Add an <strong>Info Window</strong> to display <code>name</code> and <code>pop_max</code></p>
<div class="figure">
<img src="img/populated_places_infowindow.png" />
</div>
</div>
</div>
<div id="tutorial---world-cities-map-6" class="slide section level1">
<h1>Tutorial - World Cities Map</h1>
<div class="incremental">
<p>Check out the <strong>CartoCSS Editor</strong> tab. That's the <code>code</code> for all the styling rules.</p>
<p>Instead of using the Wizard, we could have done all the styling manually in this tab.</p>
</div>
</div>
<div id="tutorial---world-cities-map-7" class="slide section level1">
<h1>Tutorial - World Cities Map</h1>
<div class="figure">
<img src="img/populated_places_cartocss.png" />
</div>
</div>
<div id="tutorial---world-cities-map-8" class="slide section level1">
<h1>Tutorial - World Cities Map</h1>
<p>Add the following rule to add labels to your city dots:</p>
<pre><code>#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;
}</code></pre>
<p>(Visit <a href="https://goo.gl/zGqpGA">goo.gl/zGqpGA</a> to copy-paste)</p>
</div>
<div id="tutorial---world-cities-map-9" class="slide section level1">
<h1>Tutorial - World Cities Map</h1>
<div class="figure">
<img src="img/populated_places_labelcss.png" />
</div>
</div>
<div id="tutorial---world-cities-map-10" class="slide section level1">
<h1>Tutorial - World Cities Map</h1>
<div class="incremental">
<p>Now that we have labels, let's change the basemap to one without its own labels</p>
<div class="figure">
<img src="img/populated_places_litebasemap.png" />
</div>
</div>
</div>
<div id="tutorial---world-cities-map-11" class="slide section level1">
<h1>Tutorial - World Cities Map</h1>
<div class="incremental">
<p>Click Visualize, then Publish to get a shareable link to your map</p>
<div class="figure">
<img src="img/populated_places_final.png" alt="Nice job!" />
<p class="caption">Nice job!</p>
</div>
</div>
</div>
<div id="exercise-1---population-choropleth" class="slide section level1">
<h1>Exercise 1 - Population Choropleth</h1>
<div class="incremental">
<p>Introduce yourself to the person next to you and <em>work together</em> for this exercise</p>
<div class="figure">
<img src="img/say_hi.gif" />
</div>
</div>
</div>
<div id="exercise-1---population-choropleth-1" class="slide section level1">
<h1>Exercise 1 - Population Choropleth</h1>
<p><strong>Choropleth Map</strong> - a map where areas are shaded or patterned in proportion to a statistical variable being displayed on the map (<a href="http://en.wikipedia.org/wiki/Choropleth_map">en.wikipedia.org/wiki/Choropleth_map</a>)</p>
</div>
<div id="exercise-1---population-choropleth-2" class="slide section level1">
<h1>Exercise 1 - Population Choropleth</h1>
<ol style="list-style-type: decimal">
<li><p>Download <a href="http://acdmy.org/d/counties.zip">Map Academy's Counties Shapefile</a>: <a href="http://acdmy.org/d/counties.zip">acdmy.org/d/counties.zip</a></p></li>
<li><p>Import the downloaded <code>counties.zip</code> file into your CartoDB Dashboard</p></li>
<li><p>Use the Wizard to make a Choropleth Map based on population. <em>Hint: Use <code>pop_sqkm</code></em></p></li>
</ol>
</div>
<div class="slide section level1">
<div class="big-image">
<img src="img/population-choropleth.png" />
</div>
</div>
<div id="exercise-2---explore-earthquakes-data" class="slide section level1">
<h1>Exercise 2 - Explore Earthquakes Data</h1>
<div class="incremental">
<ol style="list-style-type: decimal">
<li>Download <a href="http://earthquake.usgs.gov/earthquakes/feed/v1.0/csv.php">All Earthquakes for the Last 30 Days</a> from USGS: <a href="http://goo.gl/hhoAyK">goo.gl/hhoAyK</a></li>
</ol>
<div class="figure">
<img src="img/earthquakes_dl.png" />
</div>
<ol start="2" style="list-style-type: decimal">
<li><p>Import the <code>all_month.csv</code> into your CartoDB account (drag and drop)</p></li>
<li><p>Experiment with the Wizard tab. Try Heat Map, Intensity, Density, maybe even Torque.</p></li>
</ol>
<p>Example: <a href="http://cdb.io/1JUy0WP">cdb.io/1JUy0WP</a></p>
</div>
</div>
<div id="good-job" class="slide section level1">
<h1>Good Job!</h1>
<div class="incremental">
<p>Thanks to all of you for coming!</p>
<div class="figure">
<img src="img/hooray.gif" />
</div>
<p>Thanks to <a href="https://objectrocket.com/">ObjectRocket</a> for hosting and <a href="http://cartodb.com">CartoDB</a> for the pizza!</p>
<p>Learn more about CartoDB at the <a href="http://academy.cartodb.com/">CartoDB Map Academy</a></p>
</div>
</div>
<script src="scripts/main.js"></script>
</body>
</html>