{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# GeoPandas example\n", "\n", "Elements of Data Science\n", "\n", "by [Allen Downey](https://allendowney.com)\n", "\n", "[MIT License](https://opensource.org/licenses/MIT)\n", "\n", "\n", "## Introduction\n", "\n", "This notebook reads data from a survey where respondents provide the name and location (latitude and longitude) of their \"home town\".\n", "\n", "If you are following the *Elements of Data Science* curriculum, you can read this notebook after doing the `02_times` notebook. I'll use some features you have not seen yet, but you can get a preview of where we are headed.\n", "\n", "The following cell reads the data into a Pandas DataFrame." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | Timestamp | \n", "Home town | \n", "latitude | \n", "longitude | \n", "
---|---|---|---|---|
0 | \n", "1/14/2020 9:35:38 | \n", "Luzern | \n", "47.050167 | \n", "8.309307 | \n", "
1 | \n", "1/14/2020 9:49:31 | \n", "Harrah, OK | \n", "35.489500 | \n", "97.163600 | \n", "
2 | \n", "1/19/2020 13:11:33 | \n", "Brussels, Belgium | \n", "50.845539 | \n", "4.355710 | \n", "
3 | \n", "1/23/2020 7:20:16 | \n", "bristol | \n", "51.454514 | \n", "-2.587910 | \n", "
4 | \n", "1/23/2020 11:35:38 | \n", "CABA (Buenos Aires City) | \n", "-34.609032 | \n", "-58.373219 | \n", "
5 | \n", "1/23/2020 14:10:35 | \n", "Botswana | \n", "-24.277012 | \n", "22.053224 | \n", "
6 | \n", "1/23/2020 14:28:10 | \n", "Santa Monica, CA | \n", "34.010929 | \n", "-118.491508 | \n", "
7 | \n", "1/23/2020 14:31:32 | \n", "Framingham, MA, USA | \n", "42.504990 | \n", "-71.195830 | \n", "
8 | \n", "1/23/2020 14:32:07 | \n", "Gothenburg | \n", "57.696961 | \n", "11.964948 | \n", "
9 | \n", "1/23/2020 14:35:43 | \n", "Wilmington, MA | \n", "42.558281 | \n", "-71.163834 | \n", "
10 | \n", "1/23/2020 14:46:10 | \n", "Modest, CA | \n", "37.639095 | \n", "-120.996880 | \n", "
11 | \n", "1/23/2020 14:52:49 | \n", "Tacoma, WA | \n", "47.252876 | \n", "-122.444290 | \n", "
12 | \n", "1/23/2020 14:58:22 | \n", "Dracut, MA | \n", "42.668941 | \n", "-71.303299 | \n", "
13 | \n", "1/23/2020 15:56:31 | \n", "Freehold, NJ | \n", "40.213700 | \n", "-74.300100 | \n", "
14 | \n", "1/23/2020 16:40:58 | \n", "Madison, WI | \n", "43.073100 | \n", "-89.401200 | \n", "