|
119 | 119 | "cell_type": "markdown",
|
120 | 120 | "metadata": {},
|
121 | 121 | "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" |
125 | 137 | ]
|
126 | 138 | },
|
127 | 139 | {
|
128 | 140 | "cell_type": "code",
|
129 | 141 | "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": {}, |
136 | 143 | "outputs": [],
|
137 | 144 | "source": [
|
138 | 145 | "# create figure and axes\n",
|
139 | 146 | "\n",
|
140 | 147 | "\n",
|
141 | 148 | "\n",
|
142 |
| - "\n", |
143 | 149 | "# create map from world_filtered data-frame\n",
|
144 | 150 | "\n",
|
145 | 151 | "\n",
|
146 | 152 | "\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" |
150 | 168 | ]
|
151 | 169 | },
|
| 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 | + }, |
152 | 205 | {
|
153 | 206 | "cell_type": "markdown",
|
154 | 207 | "metadata": {},
|
155 | 208 | "source": [
|
| 209 | + "## Part II:\n", |
| 210 | + "\n", |
| 211 | + "In Geopandas:\n", |
| 212 | + "\n", |
156 | 213 | "* add New York, Berlin, Paris, Toronto, Calgary, Tokyo to the map you have created before\n",
|
157 | 214 | "* 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`" |
160 | 216 | ]
|
161 | 217 | },
|
162 | 218 | {
|
|
187 | 243 | "\n",
|
188 | 244 | "\n",
|
189 | 245 | "\n",
|
190 |
| - "# add cities\n", |
191 |
| - "\n", |
192 |
| - "\n" |
| 246 | + "# add cities\n" |
193 | 247 | ]
|
194 | 248 | },
|
195 | 249 | {
|
|
230 | 284 | "name": "python",
|
231 | 285 | "nbconvert_exporter": "python",
|
232 | 286 | "pygments_lexer": "ipython3",
|
233 |
| - "version": "3.7.4" |
| 287 | + "version": "3.7.6" |
234 | 288 | },
|
235 | 289 | "toc": {
|
236 | 290 | "base_numbering": 1,
|
|
276 | 330 | }
|
277 | 331 | },
|
278 | 332 | "nbformat": 4,
|
279 |
| - "nbformat_minor": 2 |
| 333 | + "nbformat_minor": 4 |
280 | 334 | }
|
0 commit comments