5. Subsetting Tables using World Airport Data and GIS Maps¶
from datascience import *
import numpy as np
%matplotlib inline
import matplotlib.pyplot as plots
plots.style.use('fivethirtyeight')
Warning
The airports.csv
file takes 10 - 15 seconds to load on residential wifi and has 57,420 rows.
airports = Table.read_table('http://faculty.ung.edu/rsinn/airports.csv')
airports.num_rows
57420
airports.labels
('name',
'code',
'type',
'elevation_ft',
'continent',
'country',
'region',
'city',
'lat',
'long')
airports
name | code | type | elevation_ft | continent | country | region | city | lat | long |
---|---|---|---|---|---|---|---|---|---|
Total Rf Heliport | 00A | heliport | 11 | nan | US | US-PA | Bensalem | 40.0708 | -74.9336 |
Aero B Ranch Airport | 00AA | small_airport | 3435 | nan | US | US-KS | Leoti | 38.704 | -101.474 |
Lowell Field | 00AK | small_airport | 450 | nan | US | US-AK | Anchor Point | 59.9492 | -151.696 |
Epps Airpark | 00AL | small_airport | 820 | nan | US | US-AL | Harvest | 34.8648 | -86.7703 |
Newport Hospital & Clinic Heliport | nan | closed | 237 | nan | US | US-AR | Newport | 35.6087 | -91.2549 |
Fulton Airport | 00AS | small_airport | 1100 | nan | US | US-OK | Alex | 34.9428 | -97.818 |
Cordes Airport | 00AZ | small_airport | 3810 | nan | US | US-AZ | Cordes | 34.3056 | -112.165 |
Goldstone /Gts/ Airport | 00CA | small_airport | 3038 | nan | US | US-CA | Barstow | 35.3505 | -116.888 |
Williams Ag Airport | 00CL | small_airport | 87 | nan | US | US-CA | Biggs | 39.4272 | -121.763 |
Kitchen Creek Helibase Heliport | 00CN | heliport | 3350 | nan | US | US-CA | Pine Valley | 32.7274 | -116.46 |
... (57410 rows omitted)
us = airports.where('country', "US")
us
name | code | type | elevation_ft | continent | country | region | city | lat | long |
---|---|---|---|---|---|---|---|---|---|
Total Rf Heliport | 00A | heliport | 11 | nan | US | US-PA | Bensalem | 40.0708 | -74.9336 |
Aero B Ranch Airport | 00AA | small_airport | 3435 | nan | US | US-KS | Leoti | 38.704 | -101.474 |
Lowell Field | 00AK | small_airport | 450 | nan | US | US-AK | Anchor Point | 59.9492 | -151.696 |
Epps Airpark | 00AL | small_airport | 820 | nan | US | US-AL | Harvest | 34.8648 | -86.7703 |
Newport Hospital & Clinic Heliport | nan | closed | 237 | nan | US | US-AR | Newport | 35.6087 | -91.2549 |
Fulton Airport | 00AS | small_airport | 1100 | nan | US | US-OK | Alex | 34.9428 | -97.818 |
Cordes Airport | 00AZ | small_airport | 3810 | nan | US | US-AZ | Cordes | 34.3056 | -112.165 |
Goldstone /Gts/ Airport | 00CA | small_airport | 3038 | nan | US | US-CA | Barstow | 35.3505 | -116.888 |
Williams Ag Airport | 00CL | small_airport | 87 | nan | US | US-CA | Biggs | 39.4272 | -121.763 |
Kitchen Creek Helibase Heliport | 00CN | heliport | 3350 | nan | US | US-CA | Pine Valley | 32.7274 | -116.46 |
... (23245 rows omitted)
# Do NOT execute this code block unless you're prepared to wait 2+ minutes for it to load.
#Circle.map_table(us.select('lat', 'long', 'code'), radius=2)
What airports are north of \(65^\circ\)?¶
north65 = us.where('lat', are.above(65)).sort('lat', descending = True)
north65
name | code | type | elevation_ft | continent | country | region | city | lat | long |
---|---|---|---|---|---|---|---|---|---|
Point Barrow LRRS Airstrip | nan | small_airport | 10 | nan | US | US-AK | Point Barrow | 71.3367 | -156.638 |
Wiley Post Will Rogers Memorial Airport | BRW | medium_airport | 44 | nan | US | US-AK | Utqiaġvik | 71.2854 | -156.766 |
Cape Simpson | A40 | small_airport | nan | nan | US | US-AK | nan | 71.058 | -154.736 |
Lonely Air Station | AK71 | small_airport | 17 | nan | US | US-AK | Lonely | 70.9107 | -153.242 |
Puviaq Airport | 14 | closed | 23 | nan | US | US-AK | Barrow | 70.7156 | -154.407 |
Wainwright Airport | AWI | medium_airport | 41 | nan | US | US-AK | Wainwright | 70.638 | -159.995 |
Wainwright Air Station | AK03 | small_airport | 35 | nan | US | US-AK | Wainwright | 70.6134 | -159.86 |
Kogru River | A41 | small_airport | nan | nan | US | US-AK | nan | 70.574 | -152.26 |
Spy Island Drill-Site Heliport | AA51 | heliport | 21 | nan | US | US-AK | Kuparuk | 70.5563 | -149.911 |
Oliktok LRRS Airport | OLI | small_airport | 16 | nan | US | US-AK | Oliktok Point | 70.4997 | -149.88 |
... (104 rows omitted)
Marker.map_table(north65.select('lat', 'long', 'name'))
Make this Notebook Trusted to load map: File -> Trust Notebook
What airports are at least 1 mile above sea level?¶
milehigh = us.where('elevation_ft',are.above(5280))
milehigh
name | code | type | elevation_ft | continent | country | region | city | lat | long |
---|---|---|---|---|---|---|---|---|---|
Clear Creek Ranch Airport | nan | closed | 6138 | nan | US | US-UT | Kanab | 37.2478 | -112.822 |
St Vincent General Hospital Heliport | 01CO | heliport | 10175 | nan | US | US-CO | Leadville | 39.2453 | -106.246 |
La Sal Junction Airport | 01UT | small_airport | 6000 | nan | US | US-UT | La Sal | 38.3083 | -109.396 |
Mc Cullough Airport | 02CO | small_airport | 7615 | nan | US | US-CO | Monte Vista | 37.6433 | -106.047 |
Morgan Ranch Airport | 02ID | small_airport | 5634 | nan | US | US-ID | Cascade | 44.5555 | -115.305 |
Wise River Airport | 02T | small_airport | 5830 | nan | US | US-MT | Wise River | 45.7691 | -112.982 |
Llama Ranch Airport | 03NV | small_airport | 6120 | nan | US | US-NV | Ruby Valley | 40.5844 | -115.298 |
A Z Minerals Corporation Airport | 03UT | small_airport | 5315 | nan | US | US-UT | Mexican Hat | 37.1208 | -109.986 |
(Old) Chinle Airport | 04AZ | closed | 5515 | nan | US | US-AZ | Chinle | 36.1472 | -109.561 |
Navajo Mountain Airport | 04UT | small_airport | 6160 | nan | US | US-UT | Navajo Mountain Trdng Post | 37.0083 | -110.795 |
... (724 rows omitted)
Circle.map_table(milehigh.select('lat', 'long', 'name'), area=2)
Make this Notebook Trusted to load map: File -> Trust Notebook
Airports and heliports in Georgia¶
ga = us.where('region', are.containing('GA'))
ga
name | code | type | elevation_ft | continent | country | region | city | lat | long |
---|---|---|---|---|---|---|---|---|---|
Lt World Airport | 00GA | small_airport | 700 | nan | US | US-GA | Lithonia | 33.7675 | -84.0683 |
Caffrey Heliport | 00GE | heliport | 957 | nan | US | US-GA | Hiram | 33.8842 | -84.7339 |
Medical Center Heliport | 01GA | heliport | 319 | nan | US | US-GA | Columbus | 32.4793 | -84.9791 |
The Farm Airport | 01GE | small_airport | 375 | nan | US | US-GA | Wrightsville | 32.6744 | -82.7711 |
Doug Bolton Field | 02GA | small_airport | 884 | nan | US | US-GA | Commerce | 34.2026 | -83.429 |
Etowah Fields Airport | 02GE | small_airport | 710 | nan | US | US-GA | Euharlee | 34.1753 | -84.9244 |
Raju Airport | 05GA | small_airport | 625 | nan | US | US-GA | Richland | 32.0714 | -84.7144 |
Smith Heliport | 06GA | heliport | 1065 | nan | US | US-GA | Redan | 33.7534 | -84.1621 |
Alcovy Airport | 07GA | small_airport | 750 | nan | US | US-GA | Covington | 33.675 | -83.7631 |
Sapelo Island Airport | 08GA | small_airport | 12 | nan | US | US-GA | Darien | 31.4258 | -81.2859 |
... (516 rows omitted)
Circle.map_table(ga.select('lat', 'long', 'code'), area=2)
Make this Notebook Trusted to load map: File -> Trust Notebook
ga.group('type')
type | count |
---|---|
closed | 31 |
heliport | 134 |
large_airport | 5 |
medium_airport | 16 |
seaplane_base | 2 |
small_airport | 338 |
heliports = ga.where('type',"heliport")
heliports
name | code | type | elevation_ft | continent | country | region | city | lat | long |
---|---|---|---|---|---|---|---|---|---|
Caffrey Heliport | 00GE | heliport | 957 | nan | US | US-GA | Hiram | 33.8842 | -84.7339 |
Medical Center Heliport | 01GA | heliport | 319 | nan | US | US-GA | Columbus | 32.4793 | -84.9791 |
Smith Heliport | 06GA | heliport | 1065 | nan | US | US-GA | Redan | 33.7534 | -84.1621 |
Big Canoe Heliport | 0GA5 | heliport | 1475 | nan | US | US-GA | Jasper | 34.4548 | -84.2891 |
Apple 1 Heliport | 11GE | heliport | 1273 | nan | US | US-GA | Cumming | 34.2603 | -84.0664 |
Gwinnett Community Hospital D/B/A Eastside Medical Cente ... | 12GA | heliport | 1065 | nan | US | US-GA | Snellville | 33.875 | -84.0206 |
Latham Creek Heliport | 14GA | heliport | 1120 | nan | US | US-GA | Gainesville | 34.3365 | -83.9435 |
Stakely Heliport | 14GE | heliport | 1940 | nan | US | US-GA | Trenton | 34.7855 | -85.4537 |
Galleria Heliport | 16GA | heliport | 998 | nan | US | US-GA | Marietta | 33.8851 | -84.4627 |
Pratt and Whitney Aircraft Heliport | 1GA1 | heliport | 430 | nan | US | US-GA | Columbus | 32.5432 | -84.8319 |
... (124 rows omitted)
Circle.map_table(heliports.select('lat', 'long', 'code'), radius=2)
C:\Users\robbs\anaconda3\envs\datasci\lib\site-packages\datascience\maps.py:797: FutureWarning: The 'radius' argument is deprecated. Please use 'area' instead.
warnings.warn("The 'radius' argument is deprecated. Please use 'area' instead.", FutureWarning)
Make this Notebook Trusted to load map: File -> Trust Notebook
ga_big = ga.where('type',"large_airport")
ga_big
name | code | type | elevation_ft | continent | country | region | city | lat | long |
---|---|---|---|---|---|---|---|---|---|
Augusta Regional At Bush Field | AGS | large_airport | 144 | nan | US | US-GA | Augusta | 33.3699 | -81.9645 |
Hartsfield Jackson Atlanta International Airport | ATL | large_airport | 1026 | nan | US | US-GA | Atlanta | 33.6367 | -84.4281 |
Dobbins Air Reserve Base | MGE | large_airport | 1068 | nan | US | US-GA | Marietta | 33.9154 | -84.5163 |
Savannah Hilton Head International Airport | SAV | large_airport | 50 | nan | US | US-GA | Savannah | 32.1276 | -81.2021 |
Robins Air Force Base | WRB | large_airport | 294 | nan | US | US-GA | Warner Robins | 32.6401 | -83.5919 |
Marker.map_table(ga_big.select('lat', 'long', 'code'))
Make this Notebook Trusted to load map: File -> Trust Notebook