Skip to content

Commit b34caa0

Browse files
committed
adding plotly section to maps_exercise
1 parent 2209588 commit b34caa0

File tree

2 files changed

+76
-22
lines changed

2 files changed

+76
-22
lines changed

maps_exercise.ipynb

Lines changed: 74 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -119,44 +119,100 @@
119119
"cell_type": "markdown",
120120
"metadata": {},
121121
"source": [
122-
"* create choropleth map of world\n",
123-
"* the colors of countries from 'world_filtered' are based on population\n",
124-
"* other countries are white with black edgecolor"
122+
"## Part I: \n",
123+
"Create choropleth map of world:\n",
124+
" - using **Geopandas**\n",
125+
" - using **Plotly**\n",
126+
"\n",
127+
"> #### Notes\n",
128+
"> * the colors of countries from 'world_filtered' are based on population\n",
129+
"> * other countries can stay white"
130+
]
131+
},
132+
{
133+
"cell_type": "markdown",
134+
"metadata": {},
135+
"source": [
136+
"### GeoPandas"
125137
]
126138
},
127139
{
128140
"cell_type": "code",
129141
"execution_count": null,
130-
"metadata": {
131-
"ExecuteTime": {
132-
"end_time": "2020-04-23T18:44:34.403050Z",
133-
"start_time": "2020-04-23T18:44:34.398818Z"
134-
}
135-
},
142+
"metadata": {},
136143
"outputs": [],
137144
"source": [
138145
"# create figure and axes\n",
139146
"\n",
140147
"\n",
141148
"\n",
142-
"\n",
143149
"# create map from world_filtered data-frame\n",
144150
"\n",
145151
"\n",
146152
"\n",
147-
"# add the rest of the countries\n",
148-
"\n",
149-
"\n"
153+
"# add the rest of the countries"
154+
]
155+
},
156+
{
157+
"cell_type": "code",
158+
"execution_count": null,
159+
"metadata": {},
160+
"outputs": [],
161+
"source": []
162+
},
163+
{
164+
"cell_type": "markdown",
165+
"metadata": {},
166+
"source": [
167+
"### Plotly"
150168
]
151169
},
170+
{
171+
"cell_type": "code",
172+
"execution_count": null,
173+
"metadata": {},
174+
"outputs": [],
175+
"source": []
176+
},
177+
{
178+
"cell_type": "code",
179+
"execution_count": null,
180+
"metadata": {},
181+
"outputs": [],
182+
"source": []
183+
},
184+
{
185+
"cell_type": "code",
186+
"execution_count": null,
187+
"metadata": {},
188+
"outputs": [],
189+
"source": []
190+
},
191+
{
192+
"cell_type": "code",
193+
"execution_count": null,
194+
"metadata": {},
195+
"outputs": [],
196+
"source": []
197+
},
198+
{
199+
"cell_type": "code",
200+
"execution_count": null,
201+
"metadata": {},
202+
"outputs": [],
203+
"source": []
204+
},
152205
{
153206
"cell_type": "markdown",
154207
"metadata": {},
155208
"source": [
209+
"## Part II:\n",
210+
"\n",
211+
"In Geopandas:\n",
212+
"\n",
156213
"* add New York, Berlin, Paris, Toronto, Calgary, Tokyo to the map you have created before\n",
157214
"* to get geometry of these cities use gpd.tools.geocode(['New York', 'Berlin', 'Paris','Toronto', 'Calgary', 'Tokyo'])\n",
158-
"* if you do not have geopy library instaled, install it with the following command in the jupyter notebook cell\n",
159-
"* !pip install geopy"
215+
"* if you do not have geopy library instaled, install it with the following command in the jupyter notebook cell `!pip install geopy`"
160216
]
161217
},
162218
{
@@ -187,9 +243,7 @@
187243
"\n",
188244
"\n",
189245
"\n",
190-
"# add cities\n",
191-
"\n",
192-
"\n"
246+
"# add cities\n"
193247
]
194248
},
195249
{
@@ -230,7 +284,7 @@
230284
"name": "python",
231285
"nbconvert_exporter": "python",
232286
"pygments_lexer": "ipython3",
233-
"version": "3.7.4"
287+
"version": "3.7.6"
234288
},
235289
"toc": {
236290
"base_numbering": 1,
@@ -276,5 +330,5 @@
276330
}
277331
},
278332
"nbformat": 4,
279-
"nbformat_minor": 2
333+
"nbformat_minor": 4
280334
}

matplotlib_3D_exercise.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
"name": "python",
142142
"nbconvert_exporter": "python",
143143
"pygments_lexer": "ipython3",
144-
"version": "3.7.4"
144+
"version": "3.7.6"
145145
},
146146
"toc": {
147147
"base_numbering": 1,
@@ -187,5 +187,5 @@
187187
}
188188
},
189189
"nbformat": 4,
190-
"nbformat_minor": 2
190+
"nbformat_minor": 4
191191
}

0 commit comments

Comments
 (0)