Shapefiles 1: Intro to Shapefiles

Overview:

  1. Read in the state/province Natural Earth shapefile

  2. Explore the shapefile using GeoPandas

  3. Plot the shapefile on a map and overlay with other Natural Earth shapefiles

Prerequisites

Concepts

Importance

Notes

Pandas

Necessary

Cartopy

Necessary

  • Time to learn: 30 minutes


What is a shapefile?

From Wikipedia:

The shapefile format is a geospatial vector data format for geographic information system (GIS) software. It is developed and regulated by Esri as a mostly open specification for data interoperability among Esri and other GIS software products. The shapefile format can spatially describe vector features: points, lines, and polygons, representing, for example, water wells, rivers, and lakes. Each item usually has attributes that describe it, such as name or temperature.

Rasters versus Shapefiles: By virtue of being a *vector data format*, shapefiles do not becoming fuzzy/pixelated as one zooms in on maps that display features defined by shapefiles. This is in contrast to raster-based data. See the first reference at the end of the notebook for a nice explanation.
Note: We've already been using shapefiles, whenever we've added various Natural Earth backgrounds with Cartopy's feature. We'll examine shapefiles in more detail here, using Cartopy's shapereader.

Imports

import cartopy.crs as ccrs
import cartopy.feature as cfeature
import geopandas as gp
import matplotlib.pyplot as plt
import pandas as pd
import cartopy.io.shapereader as shpreader
from metpy.plots import USCOUNTIES
import glob
import os
/tmp/ipykernel_4163011/873809853.py:3: DeprecationWarning: Shapely 2.0 is installed, but because PyGEOS is also installed, GeoPandas still uses PyGEOS by default. However, starting with version 0.14, the default will switch to Shapely. To force to use Shapely 2.0 now, you can either uninstall PyGEOS or set the environment variable USE_PYGEOS=0. You can do this before starting the Python process, or in your code before importing geopandas:

import os
os.environ['USE_PYGEOS'] = '0'
import geopandas

In the next release, GeoPandas will switch to using Shapely by default, even if PyGEOS is installed. If you only have PyGEOS installed to get speed-ups, this switch should be smooth. However, if you are using PyGEOS directly (calling PyGEOS functions on geometries from GeoPandas), this will then stop working and you are encouraged to migrate from PyGEOS to Shapely 2.0 (https://shapely.readthedocs.io/en/latest/migration_pygeos.html).
  import geopandas as gp

Read in a shapefile

Use Cartopy’s shpreader.natural_earth method to read in the highest (10m) resolution states and provinces shapefile. It will be automatically downloaded if not present, and is cached by default in a hidden subdirectory in your home directory.

res = '10m'
category = 'cultural'
name = 'admin_1_states_provinces'
shpfilename = shpreader.natural_earth(res, category, name)
shpfilename
'/home11/staff/ktyle/.local/share/cartopy/shapefiles/natural_earth/cultural/ne_10m_admin_1_states_provinces.shp'

What files matching this particular political boundary classification do we have?

path = os.path.dirname(shpfilename)
glob.glob(path + "/ne_10m_admin_1_states_provinces.*")
['/home11/staff/ktyle/.local/share/cartopy/shapefiles/natural_earth/cultural/ne_10m_admin_1_states_provinces.shp',
 '/home11/staff/ktyle/.local/share/cartopy/shapefiles/natural_earth/cultural/ne_10m_admin_1_states_provinces.dbf',
 '/home11/staff/ktyle/.local/share/cartopy/shapefiles/natural_earth/cultural/ne_10m_admin_1_states_provinces.shx',
 '/home11/staff/ktyle/.local/share/cartopy/shapefiles/natural_earth/cultural/ne_10m_admin_1_states_provinces.prj',
 '/home11/staff/ktyle/.local/share/cartopy/shapefiles/natural_earth/cultural/ne_10m_admin_1_states_provinces.cpg']

We have five files with different suffixes. The first three must be present (see the second reference at the end of the notebook). Here, we will read in the .shp file, using a Pandas-like library, Geopandas, which creates a geo-referenced Pandas Dataframe.

Explore the shapefile using Geopandas

Display all columns in the dataframe. Then create the dataframe and take a look at the first and last five rows (scroll to see all 84 columns).

pd.set_option('display.max_columns', None)
df = gp.read_file(shpfilename)
df
featurecla scalerank adm1_code diss_me iso_3166_2 wikipedia iso_a2 adm0_sr name name_alt name_local type type_en code_local code_hasc note hasc_maybe region region_cod provnum_ne gadm_level check_me datarank abbrev postal area_sqkm sameascity labelrank name_len mapcolor9 mapcolor13 fips fips_alt woe_id woe_label woe_name latitude longitude sov_a3 adm0_a3 adm0_label admin geonunit gu_a3 gn_id gn_name gns_id gns_name gn_level gn_region gn_a1_code region_sub sub_code gns_level gns_lang gns_adm1 gns_region min_label max_label min_zoom wikidataid name_ar name_bn name_de name_en name_es name_fr name_el name_hi name_hu name_id name_it name_ja name_ko name_nl name_pl name_pt name_ru name_sv name_tr name_vi name_zh ne_id geometry
0 Admin-1 scale rank 3 ARG-1309 1309 AR-E NaN AR 1 Entre Ríos Entre-Rios NaN Provincia Province NaN AR.ER NaN NaN NaN NaN 10 1 20 3 NaN ER 0 -99 3 10 3 13 AR08 NaN 2344682 Entre Rios, AR, Argentina Entre Ríos -32.02750 -59.2824 ARG ARG 2 Argentina Argentina ARG 3434137 Provincia de Entre Rios -988655 Entre Rios 1 NaN AR.08 NaN NaN 1 khm AR08 NaN 6.0 11.0 6.0 Q44762 إنتري ريوس এন্ত্রে রিও প্রদেশ Entre Ríos Entre Ríos Province Entre Ríos Entre Ríos Έντρε Ρίος एन्ट्रे रियोस Entre Ríos tartomány Provinsi Entre Ríos provincia di Entre Ríos エントレ・リオス州 엔트레리오스 주 Entre Ríos Entre Ríos Entre Ríos Энтре-Риос Entre Ríos Entre Ríos eyaleti Entre Ríos 恩特雷里奥斯省 1159309789 POLYGON ((-58.20011 -32.44713, -58.20012 -32.4...
1 Admin-1 scale rank 6 URY-8 8 UY-PA NaN UY 1 Paysandú NaN NaN Departamento Department NaN UY.PA NaN NaN NaN NaN 19 1 0 8 NaN PA 0 -99 6 8 2 10 UY11 NaN 2347650 Paysandú, UY, Uruguay Paysandú -32.09330 -57.2240 URY URY 2 Uruguay Uruguay URY 3441242 Departamento de Paysandu -908097 Paysandu, Departamento de 1 NaN UY.11 NaN NaN 1 fra UY11 NaN 8.0 11.0 8.0 Q16576 إدارة بايساندو পেসান্ডো বিভাগ Departamento Paysandú Paysandú Department Departamento de Paysandú Paysandú Παϊσαντού पयसंदु विभाग Paysandú megye Departemen Paysandú dipartimento di Paysandú パイサンドゥ県 파이산두 주 Paysandú Paysandú Paysandú Пайсанду Paysandú Paysandu Departmanı Paysandú 派桑杜省 1159307733 POLYGON ((-58.20012 -32.44720, -58.20011 -32.4...
2 Admin-1 scale rank 3 PAK-1114 1114 PK-SD NaN PK 1 Sind Sindh NaN Province Province NaN PK.SD NaN NaN NaN NaN 2 1 20 2 NaN SD 0 -99 3 4 3 11 PK05 NaN 2346499 Sindh, PK, Pakistan Sind 26.37340 68.8685 PAK PAK 2 Pakistan Pakistan PAK 1164807 Sindh -2774813 Sindh 1 NaN PK.05 NaN NaN 1 rus PK05 NaN 5.0 10.5 5.0 Q37211 السند সিন্ধু প্রদেশ Sindh Sindh Sindh Sind Σιντ सिंध Szindh Sindh Sindh シンド州 신드 주 Sindh Sindh Sind Синд Sindh Sind Eyaleti Sindh 信德省 1159309351 MULTIPOLYGON (((68.18304 23.84216, 68.18301 23...
3 Admin-1 scale rank 2 IND-3264 3264 IN-GJ NaN IN 1 Gujarat NaN NaN NaN NaN NaN IN.GJ NaN NaN West NaN 20064 1 20 1 NaN NaN 0 -99 2 7 2 2 IN32 NaN 2345743 Gujarat, IN, India Gujarat 22.75010 71.3013 IND IND 2 India India IND 1270770 State of Gujarat -2096768 Gujarat, State of 1 NaN IN.09 NaN NaN 1 nld IN09 NaN 4.6 10.1 4.6 Q1061 غوجارات গুজরাত Gujarat Gujarat Guyarat Gujarat Γκουτζαράτ गुजरात Gudzsarát Gujarat Gujarat グジャラート州 구자라트 주 Gujarat Gudźarat Gujarate Гуджарат Gujarat Gucerat Gujarat 古吉拉特邦 1159314179 POLYGON ((68.18301 23.84209, 68.18304 23.84216...
4 Admin-1 scale rank 2 IDN-1185 1185 ID-KI NaN ID 5 Kalimantan Timur Kaltim NaN Propinsi Province NaN ID.KI NaN NaN NaN NaN 15 1 20 1 NaN KI 0 -99 2 16 6 11 ID14 NaN 2345723 East Kalimantan, ID, Indonesia Kalimantan Timur 1.28915 116.3540 IDN IDN 2 Indonesia Indonesia IDN 1641897 Provinsi Kalimantan Timur -2680740 Kalimantan Timur, Provinsi 1 NaN ID.14 NaN NaN 1 ind ID14 NaN 5.0 10.1 4.6 Q3899 كالمنتان الشرقية কিলিমান্তান তিমুর Ostkalimantan East Kalimantan Kalimantan Oriental Kalimantan oriental Ανατολικό Καλιμαντάν पूर्व कालिमंतान NaN Kalimantan Timur Kalimantan Orientale 東カリマンタン州 칼리만탄티무르 주 Oost-Kalimantan Borneo Wschodnie Kalimantan Oriental Восточный Калимантан Kalimantan Timur Doğu Kalimantan Đông Kalimantan 東加里曼丹省 1159310009 MULTIPOLYGON (((117.70361 4.16341, 117.70361 4...
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
4589 Admin-1 aggregation 10 MLT-5953 5953 MT-20 NaN MT 3 Isla Isla|Città Invicta NaN NaN NaN NaN MT.SE.IS NaN NaN Malta Xlokk NaN 0 0 0 10 NaN NaN 0 -99 20 7 1 8 NaN NaN 24551400 NaN Malta 35.88640 14.5149 MLT MLT 5 Malta Malta MLT 8299724 L-Isla 11534632 L-Isla 1 NaN MT.25 Southern Harbour NaN 1 mlt MT25 NaN 11.0 11.0 11.0 Q846593 سنجليا সেনগ্লিয়া Senglea Senglea Senglea Isla Σενγκλέα सेंग्लिया Isla Senglea Senglea イシーラ 셍글레아 Senglea Isla Senglea Сенглеа L-Isla Senglea Senglea 森格萊阿 1159318051 POLYGON ((14.51073 35.88896, 14.51537 35.89113...
4590 Admin-1 aggregation 10 MLT-5955 5955 MT-06 NaN MT 3 Cospicua Bormla NaN NaN NaN NaN MT.SE.BO NaN NaN Malta Xlokk NaN 0 0 0 10 NaN NaN 0 -99 20 8 1 8 NaN NaN 24551391 NaN Malta 35.88000 14.5207 MLT MLT 5 Malta Malta MLT 8299705 Bormla 11534041 Bormla 1 NaN MT.06 Southern Harbour NaN 1 mlt MT06 NaN 11.0 11.0 11.0 Q757225 كوسبيكو কসপিকোয়া Cospicua Cospicua Bormla Bormla Κοσπίκουα कोस्पिकुआ Bormla Cospicua Cospicua ボルムラ 보름라 Cospicua Bormla Cospicua Бормла Bormla Cospicua Cospicua 科斯皮夸 1159318057 POLYGON ((14.52937 35.88156, 14.52700 35.87772...
4591 Admin-1 aggregation 10 MLT-5942 5942 MT-41 NaN MT 3 Pietà NaN NaN NaN NaN NaN MT.CE.PI NaN NaN Malta Majjistral NaN 0 0 0 10 NaN NaN 0 -99 20 5 1 8 NaN NaN 24551394 NaN Malta 35.88910 14.4927 MLT MLT 5 Malta Malta MLT 8299740 Tal-Pieta 11535783 Tal-Pieta 1 NaN MT.41 Northern Harbour NaN 1 mlt MT41 NaN 11.0 11.0 11.0 Q744070 NaN NaN Pietà Pietà Pietà Pietà Πιετά NaN Pietà NaN Pietà ピータ 피타 Pietà Pietà Pietà Пьета Pietà NaN NaN 佩塔 1159318027 POLYGON ((14.49801 35.89251, 14.49616 35.88830...
4592 Admin-1 aggregation 10 MLT-5940 5940 MT-34 NaN MT 3 Msida NaN NaN NaN NaN NaN MT.CE.MS NaN NaN Malta Majjistral NaN 0 0 0 10 NaN NaN 0 -99 20 5 1 8 NaN NaN 24551414 NaN Malta 35.89490 14.4825 MLT MLT 5 Malta Malta MLT 8299722 L-Imsida 11534629 L-Imsida 1 NaN MT.23 Northern Harbour NaN 1 mlt MT23 NaN 11.0 11.0 11.0 Q585187 مسيدا সিডা Msida Msida Msida Msida Μσίντα सीडा Msida Msida Msida イムシーダ 므시다 Msida Msida Msida Мсида Msida Msida Msida 姆西達 1159318023 POLYGON ((14.48663 35.88636, 14.48231 35.88979...
4593 Admin-1 aggregation 10 MLT-5951 5951 MT-03 NaN MT 3 Birgu NaN NaN NaN NaN NaN MT.SE.BR NaN NaN Malta Xlokk NaN 0 0 0 10 NaN NaN 0 -99 20 5 1 8 NaN NaN 24551404 NaN Malta 35.88710 14.5260 MLT MLT 5 Malta Malta MLT 8299702 Il-Birgu 11534037 Il-Birgu 1 NaN MT.03 Southern Harbour NaN 1 mlt MT03 NaN 11.0 11.0 11.0 Q752346 بيرجو বিরগো Vittoriosa Birgu Birgu Birgu Μπίργκου बिर्गु Birgu Birgu Vittoriosa ビルグ 비르구 Birgu Birgu Birgu Биргу Birgu Birgu Birgu 比尔古 1159318047 POLYGON ((14.52126 35.88711, 14.51537 35.89113...

4594 rows × 84 columns

Examine the column names more concisely.

df.columns
Index(['featurecla', 'scalerank', 'adm1_code', 'diss_me', 'iso_3166_2',
       'wikipedia', 'iso_a2', 'adm0_sr', 'name', 'name_alt', 'name_local',
       'type', 'type_en', 'code_local', 'code_hasc', 'note', 'hasc_maybe',
       'region', 'region_cod', 'provnum_ne', 'gadm_level', 'check_me',
       'datarank', 'abbrev', 'postal', 'area_sqkm', 'sameascity', 'labelrank',
       'name_len', 'mapcolor9', 'mapcolor13', 'fips', 'fips_alt', 'woe_id',
       'woe_label', 'woe_name', 'latitude', 'longitude', 'sov_a3', 'adm0_a3',
       'adm0_label', 'admin', 'geonunit', 'gu_a3', 'gn_id', 'gn_name',
       'gns_id', 'gns_name', 'gn_level', 'gn_region', 'gn_a1_code',
       'region_sub', 'sub_code', 'gns_level', 'gns_lang', 'gns_adm1',
       'gns_region', 'min_label', 'max_label', 'min_zoom', 'wikidataid',
       'name_ar', 'name_bn', 'name_de', 'name_en', 'name_es', 'name_fr',
       'name_el', 'name_hi', 'name_hu', 'name_id', 'name_it', 'name_ja',
       'name_ko', 'name_nl', 'name_pl', 'name_pt', 'name_ru', 'name_sv',
       'name_tr', 'name_vi', 'name_zh', 'ne_id', 'geometry'],
      dtype='object')
Tip: Countries are in the DataFrame's admin column. We can chain together Pandas` methods such as sort_values and unique to show all of the countries included in the shapefile.
df.admin.sort_values().unique()
array(['Afghanistan', 'Akrotiri Sovereign Base Area', 'Aland', 'Albania',
       'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla',
       'Antarctica', 'Antigua and Barbuda', 'Argentina', 'Armenia',
       'Aruba', 'Ashmore and Cartier Islands', 'Australia', 'Austria',
       'Azerbaijan', 'Bahrain', 'Bangladesh', 'Barbados',
       'Baykonur Cosmodrome', 'Belarus', 'Belgium', 'Belize', 'Benin',
       'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina',
       'Botswana', 'Brazil', 'British Indian Ocean Territory',
       'British Virgin Islands', 'Brunei', 'Bulgaria', 'Burkina Faso',
       'Burundi', 'Cambodia', 'Cameroon', 'Canada', 'Cape Verde',
       'Caribbean Netherlands', 'Cayman Islands',
       'Central African Republic', 'Chad', 'Chile', 'China',
       'Clipperton Island', 'Colombia', 'Comoros', 'Cook Islands',
       'Coral Sea Islands', 'Costa Rica', 'Croatia', 'Cuba', 'Curaçao',
       'Cyprus', 'Czech Republic', 'Democratic Republic of the Congo',
       'Denmark', 'Dhekelia Sovereign Base Area', 'Djibouti', 'Dominica',
       'Dominican Republic', 'East Timor', 'Ecuador', 'Egypt',
       'El Salvador', 'Equatorial Guinea', 'Eritrea', 'Estonia',
       'Ethiopia', 'Falkland Islands', 'Faroe Islands',
       'Federated States of Micronesia', 'Fiji', 'Finland', 'France',
       'French Polynesia', 'French Southern and Antarctic Lands', 'Gabon',
       'Gambia', 'Gaza Strip', 'Georgia', 'Germany', 'Ghana', 'Gibraltar',
       'Greece', 'Greenland', 'Grenada', 'Guam', 'Guatemala', 'Guernsey',
       'Guinea', 'Guinea Bissau', 'Guyana', 'Haiti',
       'Heard Island and McDonald Islands', 'Honduras',
       'Hong Kong S.A.R.', 'Hungary', 'Iceland', 'India',
       'Indian Ocean Territories', 'Indonesia', 'Iran', 'Iraq', 'Ireland',
       'Isle of Man', 'Israel', 'Italy', 'Ivory Coast', 'Jamaica',
       'Japan', 'Jersey', 'Jordan', 'Kazakhstan', 'Kenya', 'Kiribati',
       'Kosovo', 'Kuwait', 'Kyrgyzstan', 'Laos', 'Latvia', 'Lebanon',
       'Lesotho', 'Liberia', 'Libya', 'Liechtenstein', 'Lithuania',
       'Luxembourg', 'Macau S.A.R', 'Macedonia', 'Madagascar', 'Malawi',
       'Malaysia', 'Maldives', 'Mali', 'Malta', 'Marshall Islands',
       'Mauritania', 'Mauritius', 'Mexico', 'Moldova', 'Monaco',
       'Mongolia', 'Montenegro', 'Montserrat', 'Morocco', 'Mozambique',
       'Myanmar', 'Namibia', 'Nauru', 'Nepal', 'Netherlands',
       'New Caledonia', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria',
       'Niue', 'Norfolk Island', 'North Korea', 'Northern Cyprus',
       'Northern Mariana Islands', 'Norway', 'Oman', 'Pakistan', 'Palau',
       'Panama', 'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines',
       'Pitcairn Islands', 'Poland', 'Portugal', 'Puerto Rico', 'Qatar',
       'Republic of Serbia', 'Republic of the Congo', 'Romania', 'Russia',
       'Rwanda', 'S. Sudan', 'Saint Barthelemy', 'Saint Helena',
       'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Martin',
       'Saint Pierre and Miquelon', 'Saint Vincent and the Grenadines',
       'Samoa', 'San Marino', 'Sao Tome and Principe', 'Saudi Arabia',
       'Senegal', 'Seychelles', 'Siachen Glacier', 'Sierra Leone',
       'Singapore', 'Sint Maarten', 'Slovakia', 'Slovenia',
       'Solomon Islands', 'Somalia', 'Somaliland', 'South Africa',
       'South Georgia and the Islands', 'South Korea', 'Spain',
       'Spratly Is.', 'Sri Lanka', 'Sudan', 'Suriname', 'Swaziland',
       'Sweden', 'Switzerland', 'Syria', 'Taiwan', 'Tajikistan',
       'Thailand', 'The Bahamas', 'Togo', 'Tonga', 'Trinidad and Tobago',
       'Tunisia', 'Turkey', 'Turkmenistan', 'Turks and Caicos Islands',
       'Tuvalu', 'US Naval Base Guantanamo Bay', 'Uganda', 'Ukraine',
       'United Arab Emirates', 'United Kingdom',
       'United Republic of Tanzania',
       'United States Minor Outlying Islands',
       'United States Virgin Islands', 'United States of America',
       'Uruguay', 'Uzbekistan', 'Vanuatu', 'Vatican', 'Venezuela',
       'Vietnam', 'Wallis and Futuna', 'West Bank', 'Western Sahara',
       'Yemen', 'Zambia', 'Zimbabwe'], dtype=object)

Let’s display all rows that are in the USA.

df.loc[df.admin == 'United States of America']
featurecla scalerank adm1_code diss_me iso_3166_2 wikipedia iso_a2 adm0_sr name name_alt name_local type type_en code_local code_hasc note hasc_maybe region region_cod provnum_ne gadm_level check_me datarank abbrev postal area_sqkm sameascity labelrank name_len mapcolor9 mapcolor13 fips fips_alt woe_id woe_label woe_name latitude longitude sov_a3 adm0_a3 adm0_label admin geonunit gu_a3 gn_id gn_name gns_id gns_name gn_level gn_region gn_a1_code region_sub sub_code gns_level gns_lang gns_adm1 gns_region min_label max_label min_zoom wikidataid name_ar name_bn name_de name_en name_es name_fr name_el name_hi name_hu name_id name_it name_ja name_ko name_nl name_pl name_pt name_ru name_sv name_tr name_vi name_zh ne_id geometry
1291 Admin-1 scale rank 2 USA-3514 3514 US-MN http://en.wikipedia.org/wiki/Minnesota US 1 Minnesota MN|Minn. NaN State State US27 US.MN NaN NaN Midwest NaN 0 1 20 1 Minn. MN 0 -99 0 9 1 1 US27 NaN 2347582 Minnesota, US, United States Minnesota 46.0592 -93.3640 US1 USA 2 United States of America United States of America USA 5037779 Minnesota -1 NaN 1 NaN US.MN West North Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1527 مينيسوتا মিনেসোটা Minnesota Minnesota Minnesota Minnesota Μινεσότα मिनेसोटा Minnesota Minnesota Minnesota ミネソタ州 미네소타 주 Minnesota Minnesota Minnesota Миннесота Minnesota Minnesota Minnesota 明尼蘇達州 1159315297 POLYGON ((-95.16057 49.36949, -95.10282 49.353...
1293 Admin-1 scale rank 2 USA-3519 3519 US-WA http://en.wikipedia.org/wiki/Washington_(state) US 6 Washington WA|Wash. NaN State State US53 US.WA NaN NaN West NaN 0 1 20 1 Wash. WA 0 -99 0 10 1 1 US53 NaN 2347606 Washington, US, United States Washington 47.4865 -120.3610 US1 USA 2 United States of America United States of America USA 5815135 Washington -1 NaN 1 NaN US.WA Pacific NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1223 واشنطن ওয়াশিংটন Washington Washington Washington État de Washington Ουάσινγκτον वाशिंगटन Washington Washington Washington ワシントン州 워싱턴주 Washington Waszyngton Washington Вашингтон Washington Vaşington Washington 华盛顿州 1159309547 MULTIPOLYGON (((-122.65326 48.99251, -122.4333...
1295 Admin-1 scale rank 2 USA-3518 3518 US-ID http://en.wikipedia.org/wiki/Idaho US 1 Idaho ID|Idaho NaN State State US16 US.ID NaN NaN West NaN 0 1 20 1 Idaho ID 0 -99 0 5 1 1 US16 NaN 2347571 Idaho, US, United States Idaho 43.7825 -114.1330 US1 USA 2 United States of America United States of America USA 5596512 Idaho -1 NaN 1 NaN US.ID Mountain NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1221 أيداهو আইডাহো Idaho Idaho Idaho Idaho Αϊντάχο आयडाहो Idaho Idaho Idaho アイダホ州 아이다호주 Idaho Idaho Idaho Айдахо Idaho Idaho Idaho 爱达荷州 1159315339 POLYGON ((-117.03815 48.99251, -116.93818 48.9...
1296 Admin-1 scale rank 2 USA-3515 3515 US-MT http://en.wikipedia.org/wiki/Montana US 1 Montana MT|Mont. NaN State State US30 US.MT NaN NaN West NaN 0 1 20 1 Mont. MT 0 -99 0 7 1 1 US30 NaN 2347585 Montana, US, United States Montana 46.9965 -110.0440 US1 USA 2 United States of America United States of America USA 5667009 Montana -1 NaN 1 NaN US.MT Mountain NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1212 مونتانا মন্টানা Montana Montana Montana Montana Μοντάνα मोन्टाना Montana Montana Montana モンタナ州 몬태나주 Montana Montana Montana Монтана Montana Montana Montana 蒙大拿州 1159315333 POLYGON ((-116.04816 48.99251, -115.83913 48.9...
1299 Admin-1 scale rank 2 USA-3516 3516 US-ND http://en.wikipedia.org/wiki/North_Dakota US 1 North Dakota ND|N.D. NaN State State US38 US.ND NaN NaN Midwest NaN 0 1 20 1 N.D. ND 0 -99 0 12 1 1 US38 NaN 2347593 North Dakota, US, United States North Dakota 47.4675 -100.3020 US1 USA 2 United States of America United States of America USA 5690763 North Dakota -1 NaN 1 NaN US.ND West North Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1207 داكوتا الشمالية নর্থ ডাকোটা North Dakota North Dakota Dakota del Norte Dakota du Nord Βόρεια Ντακότα उत्तर डेकोटा Észak-Dakota Dakota Utara Dakota del Nord ノースダコタ州 노스다코타주 North Dakota Dakota Północna Dakota do Norte Северная Дакота North Dakota Kuzey Dakota Bắc Dakota 北达科他州 1159315337 POLYGON ((-104.04757 48.99262, -103.96949 48.9...
1301 Admin-1 scale rank 2 USA-3562 3562 US-MI http://en.wikipedia.org/wiki/Michigan US 1 Michigan MI|Mich. NaN State State US26 US.MI NaN NaN Midwest NaN 0 1 20 1 Mich. MI 0 -99 0 8 1 1 US26 NaN 2347581 Michigan, US, United States Michigan 43.4343 -84.9479 US1 USA 2 United States of America United States of America USA 5001836 Michigan -1 NaN 1 NaN US.MI East North Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1166 ميشيغان মিশিগান Michigan Michigan Míchigan Michigan Μίσιγκαν मिशिगन Michigan Michigan Michigan ミシガン州 미시간 주 Michigan Michigan Michigan Мичиган Michigan Michigan Michigan 密歇根州 1159314665 POLYGON ((-88.37646 48.30511, -88.34726 48.298...
1302 Admin-1 scale rank 2 USA-3561 3561 US-ME http://en.wikipedia.org/wiki/Maine US 6 Maine ME|Maine NaN State State US23 US.ME NaN NaN Northeast NaN 0 1 20 1 Maine ME 0 -99 0 5 1 1 US23 NaN 2347578 Maine, US, United States Maine 45.1480 -69.1973 US1 USA 2 United States of America United States of America USA 4971068 Maine -1 NaN 1 NaN US.ME New England NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q724 مين মেইন Maine Maine Maine Maine Μέιν मेन Maine Maine Maine メイン州 메인 주 Maine Maine Maine Мэн Maine Maine Maine 缅因州 1159308501 MULTIPOLYGON (((-69.22197 47.45969, -69.06966 ...
1305 Admin-1 scale rank 2 USA-3550 3550 US-OH http://en.wikipedia.org/wiki/Ohio US 1 Ohio OH|Ohio NaN State State US39 US.OH NaN NaN Midwest NaN 0 1 20 1 Ohio OH 0 -99 0 4 1 1 US39 NaN 2347594 Ohio, US, United States Ohio 40.0924 -82.6719 US1 USA 2 United States of America United States of America USA 5165418 Ohio -1 NaN 1 NaN US.OH East North Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1397 أوهايو ওহাইও Ohio Ohio Ohio Ohio Οχάιο ओहायो Ohio Ohio Ohio オハイオ州 오하이오 주 Ohio Ohio Ohio Огайо Ohio Ohio Ohio 俄亥俄州 1159315315 POLYGON ((-83.13086 41.93803, -83.12345 41.920...
1306 Admin-1 scale rank 2 USA-3538 3538 US-NH http://en.wikipedia.org/wiki/New_Hampshire US 1 New Hampshire NH|N.H. NaN State State US33 US.NH NaN NaN Northeast NaN 0 1 20 1 N.H. NH 0 -99 0 13 1 1 US33 NaN 2347588 New Hampshire, US, United States New Hampshire 43.5993 -71.6301 US1 USA 2 United States of America United States of America USA 5090174 New Hampshire -1 NaN 1 NaN US.NH New England NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q759 نيوهامشير নিউ হ্যাম্প্‌শায়ার New Hampshire New Hampshire Nuevo Hampshire New Hampshire Νιου Χάμσαϊρ नया हेम्पशायर New Hampshire New Hampshire New Hampshire ニューハンプシャー州 뉴햄프셔 주 New Hampshire New Hampshire Nova Hampshire Нью-Гэмпшир New Hampshire New Hampshire New Hampshire 新罕布什尔州 1159315303 POLYGON ((-71.16033 45.24577, -71.14173 45.252...
1307 Admin-1 scale rank 2 USA-3559 3559 US-NY http://en.wikipedia.org/wiki/New_York US 3 New York NY|N.Y. NaN State State US36 US.NY NaN NaN Northeast NaN 0 1 20 1 N.Y. NY 0 -99 0 8 1 1 US36 NaN 2347591 New York, US, United States New York 43.1988 -75.3242 US1 USA 2 United States of America United States of America USA 5128638 New York -1 NaN 1 NaN US.NY Middle Atlantic NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1384 نيويورك নিউ ইয়র্ক New York New York Nueva York État de New York Νέα Υόρκη न्यूयॉर्क New York New York New York ニューヨーク州 뉴욕 주 New York Nowy Jork Nova Iorque Нью-Йорк New York New York New York 纽约州 1159312155 MULTIPOLYGON (((-74.69588 44.99803, -74.59611 ...
1308 Admin-1 scale rank 2 USA-3540 3540 US-VT http://en.wikipedia.org/wiki/Vermont US 1 Vermont VT NaN State State US50 US.VT NaN NaN Northeast NaN 0 1 20 1 Vt. VT 0 -99 0 7 1 1 US50 NaN 2347604 Vermont, US, United States Vermont 44.0886 -72.7317 US1 USA 2 United States of America United States of America USA 5242283 Vermont -1 NaN 1 NaN US.VT New England NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q16551 فيرمونت ভার্মন্ট Vermont Vermont Vermont Vermont Βερμόντ वर्मांट Vermont Vermont Vermont バーモント州 버몬트 주 Vermont Vermont Vermont Вермонт Vermont Vermont Vermont 佛蒙特州 1159315305 POLYGON ((-73.35134 45.00463, -73.29942 45.004...
1309 Admin-1 scale rank 2 USA-3560 3560 US-PA http://en.wikipedia.org/wiki/Pennsylvania US 1 Pennsylvania Commonwealth of Pennsylvania|PA NaN State State US42 US.PA NaN NaN Northeast NaN 0 1 20 1 Pa. PA 0 -99 0 12 1 1 US42 NaN 2347597 Pennsylvania, US, United States Pennsylvania 40.8601 -77.6094 US1 USA 2 United States of America United States of America USA 6254927 Pennsylvania -1 NaN 1 NaN US.PA Middle Atlantic NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1400 بنسيلفانيا পেন্সিল্‌ভেনিয়া Pennsylvania Pennsylvania Pensilvania Pennsylvanie Πενσιλβανία पेन्सिलवेनिया Pennsylvania Pennsylvania Pennsylvania ペンシルベニア州 펜실베이니아주 Pennsylvania Pensylwania Pensilvânia Пенсильвания Pennsylvania Pensilvanya Pennsylvania 宾夕法尼亚州 1159315331 POLYGON ((-80.52023 42.32378, -80.50415 42.326...
1310 Admin-1 scale rank 2 USA-3520 3520 US-AZ http://en.wikipedia.org/wiki/Arizona US 1 Arizona AZ|Ariz. NaN State State US04 US.AZ NaN NaN West NaN 0 1 20 1 Ariz. AZ 0 -99 0 7 1 1 US04 NaN 2347561 Arizona, US, United States Arizona 34.3046 -111.9350 US1 USA 2 United States of America United States of America USA 5551752 Arizona -1 NaN 1 NaN US.AZ Mountain NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q816 أريزونا অ্যারিজোনা Arizona Arizona Arizona Arizona Αριζόνα एरीजोना Arizona Arizona Arizona アリゾナ州 애리조나주 Arizona Arizona Arizona Аризона Arizona Arizona Arizona 亞利桑那州 1159315341 POLYGON ((-111.00627 31.32718, -111.06712 31.3...
1313 Admin-1 scale rank 2 USA-3521 3521 US-CA http://en.wikipedia.org/wiki/California US 8 California CA|Calif. NaN State State US06 US.CA NaN NaN West NaN 0 1 20 1 Calif. CA 0 -99 0 10 1 1 US06 NaN 2347563 California, US, United States California 36.7496 -119.5910 US1 USA 2 United States of America United States of America USA 5332921 California -1 NaN 1 NaN US.CA Pacific NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q99 كاليفورنيا ক্যালিফোর্নিয়া Kalifornien California California Californie Καλιφόρνια कैलिफ़ोर्निया Kalifornia California California カリフォルニア州 캘리포니아주 Californië Kalifornia Califórnia Калифорния Kalifornien Kaliforniya California 加利福尼亚州 1159308415 MULTIPOLYGON (((-114.72428 32.71284, -114.7645...
1314 Admin-1 scale rank 2 USA-3524 3524 US-NM http://en.wikipedia.org/wiki/New_Mexico US 1 New Mexico NM|N.M. NaN State State US35 US.NM NaN NaN West NaN 0 1 20 1 N.M. NM 0 -99 0 10 1 1 US35 NaN 2347590 New Mexico, US, United States New Mexico 34.5002 -106.0240 US1 USA 2 United States of America United States of America USA 5481136 New Mexico -1 NaN 1 NaN US.NM Mountain NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1522 نيومكسيكو নিউ মেক্সিকো New Mexico New Mexico Nuevo México Nouveau-Mexique Νέο Μεξικό नया मेक्सिको Új-Mexikó New Mexico Nuovo Messico ニューメキシコ州 뉴멕시코주 New Mexico Nowy Meksyk Novo México Нью-Мексико New Mexico New Mexico New Mexico 新墨西哥州 1159315347 POLYGON ((-108.13750 31.77754, -108.16334 31.7...
1316 Admin-1 scale rank 2 USA-3536 3536 US-TX http://en.wikipedia.org/wiki/Texas US 4 Texas TX|Tex. NaN State State US48 US.TX NaN NaN South NaN 0 1 20 1 Tex. TX 0 -99 0 5 1 1 US48 NaN 2347602 Texas, US, United States Texas 31.1310 -98.7607 US1 USA 2 United States of America United States of America USA 4736286 Texas -1 NaN 1 NaN US.TX West South Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1439 تكساس টেক্সাস Texas Texas Texas Texas Τέξας टॅक्सस Texas Texas Texas テキサス州 텍사스 주 Texas Teksas Texas Техас Texas Teksas Texas 得克萨斯州 1159315211 MULTIPOLYGON (((-106.47313 31.75507, -106.4928...
1664 Admin-1 scale rank 2 USA-3563 3563 US-AK http://en.wikipedia.org/wiki/Alaska US 6 Alaska AK|Alaska NaN State State US02 US.AK NaN NaN West NaN 0 1 20 1 Alaska AK 0 -99 0 6 1 1 US02 NaN 2347560 Alaska, US, United States Alaska 65.3609 -151.6040 US1 USA 2 United States of America United States of America USA 5879092 Alaska -1 NaN 1 NaN US.AK Pacific NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q797 ألاسكا আলাস্কা Alaska Alaska Alaska Alaska Αλάσκα अलास्का Alaszka Alaska Alaska アラスカ州 알래스카주 Alaska Alaska Alasca Аляска Alaska Alaska Alaska 阿拉斯加州 1159308731 MULTIPOLYGON (((-141.00556 69.65095, -141.0054...
2072 Admin-1 scale rank 2 USA-3535 3535 US-LA http://en.wikipedia.org/wiki/Louisiana US 5 Louisiana LA NaN State State US22 US.LA NaN NaN South NaN 0 1 20 1 La. LA 0 -99 0 9 1 1 US22 NaN 2347577 Louisiana, US, United States Louisiana 30.5274 -91.9991 US1 USA 2 United States of America United States of America USA 4331987 Louisiana -1 NaN 1 NaN US.LA West South Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1588 لويزيانا লুইজিয়ানা Louisiana Louisiana Luisiana Louisiane Λουιζιάνα लुईज़ियाना Louisiana Louisiana Louisiana ルイジアナ州 루이지애나 주 Louisiana Luizjana Luisiana Луизиана Louisiana Louisiana Louisiana 路易斯安那州 1159315221 MULTIPOLYGON (((-89.52599 30.19278, -89.53637 ...
2073 Admin-1 scale rank 2 USA-3544 3544 US-MS http://en.wikipedia.org/wiki/Mississippi US 5 Mississippi MS|Miss. NaN State State US28 US.MS NaN NaN South NaN 0 1 20 1 Miss. MS 0 -99 0 11 1 1 US28 NaN 2347583 Mississippi, US, United States Mississippi 32.8657 -89.7189 US1 USA 2 United States of America United States of America USA 4436296 Mississippi -1 NaN 1 NaN US.MS East South Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1494 مسيسيبي মিসিসিপি Mississippi Mississippi Misisipi Mississippi Μισισίπι मिसिसिप्पी Mississippi Mississippi Mississippi ミシシッピ州 미시시피주 Mississippi Missisipi Mississippi Миссисипи Mississippi Mississippi Mississippi 密西西比州 1159315231 MULTIPOLYGON (((-88.40315 30.38760, -88.40734 ...
2074 Admin-1 scale rank 2 USA-3541 3541 US-AL http://en.wikipedia.org/wiki/Alabama US 5 Alabama AL|Ala. NaN State State US01 US.AL NaN NaN South NaN 0 1 20 1 Ala. AL 0 -99 0 7 1 1 US01 NaN 2347559 Alabama, US, United States Alabama 32.8551 -86.7184 US1 USA 2 United States of America United States of America USA 4829764 Alabama -1 NaN 1 NaN US.AL East South Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q173 ألاباما অ্যালাবামা Alabama Alabama Alabama Alabama Αλαμπάμα अलाबामा Alabama Alabama Alabama アラバマ州 앨라배마주 Alabama Alabama Alabama Алабама Alabama Alabama Alabama 亚拉巴马州 1159315233 MULTIPOLYGON (((-87.41963 30.47962, -87.42683 ...
2075 Admin-1 scale rank 2 USA-3542 3542 US-FL http://en.wikipedia.org/wiki/Florida US 5 Florida FL|Fla. NaN State State US12 US.FL NaN NaN South NaN 0 1 20 8 Fla. FL 0 -99 0 7 1 1 US12 NaN 2347568 Florida, US, United States Florida 28.1568 -81.6228 US1 USA 2 United States of America United States of America USA 4155751 Florida -1 NaN 1 NaN US.FL South Atlantic NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q812 فلوريدا ফ্লোরিডা Florida Florida Florida Floride Φλόριντα फ़्लोरिडा Florida Florida Florida フロリダ州 플로리다주 Florida Floryda Flórida Флорида Florida Florida Florida 佛罗里达州 1159315207 MULTIPOLYGON (((-81.50003 30.71218, -81.49926 ...
2076 Admin-1 scale rank 2 USA-3543 3543 US-GA http://en.wikipedia.org/wiki/Georgia_(U.S._state) US 6 Georgia GA|Ga. NaN State State US13 US.GA NaN NaN South NaN 0 1 20 1 Ga. GA 0 -99 0 7 1 1 US13 NaN 2347569 Georgia, US, United States Georgia 32.8547 -83.4078 US1 USA 2 United States of America United States of America USA 4197000 Georgia -1 NaN 1 NaN US.GA South Atlantic NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1428 جورجيا জর্জিয়া Georgia Georgia Georgia Géorgie Τζόρτζια जॉर्जिया Georgia Georgia Georgia ジョージア州 조지아주 Georgia Georgia Geórgia Джорджия Georgia Georgia Georgia 喬治亞州 1159311857 MULTIPOLYGON (((-80.89029 32.03266, -80.88939 ...
2077 Admin-1 scale rank 2 USA-3545 3545 US-SC http://en.wikipedia.org/wiki/South_Carolina US 1 South Carolina SC|S.C. NaN State State US45 US.SC NaN NaN South NaN 0 1 20 1 S.C. SC 0 -99 0 14 1 1 US45 NaN 2347599 South Carolina, US, United States South Carolina 33.8578 -80.6471 US1 USA 2 United States of America United States of America USA 4597040 South Carolina -1 NaN 1 NaN US.SC South Atlantic NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1456 كارولاينا الجنوبية সাউথ ক্যারোলাইনা South Carolina South Carolina Carolina del Sur Caroline du Sud Νότια Καρολίνα दक्षिणी केरोलाइना Dél-Karolina Carolina Selatan Carolina del Sud サウスカロライナ州 사우스캐롤라이나주 South Carolina Karolina Południowa Carolina do Sul Южная Каролина South Carolina Güney Karolina Nam Carolina 南卡罗来纳州 1159315307 MULTIPOLYGON (((-78.57316 33.88260, -78.60001 ...
2078 Admin-1 scale rank 2 USA-3549 3549 US-NC http://en.wikipedia.org/wiki/North_Carolina US 5 North Carolina NC|N.C. NaN State State US37 US.NC NaN NaN South NaN 0 1 20 1 N.C. NC 0 -99 0 14 1 1 US37 NaN 2347592 North Carolina, US, United States North Carolina 35.6152 -78.8660 US1 USA 2 United States of America United States of America USA 4482348 North Carolina -1 NaN 1 NaN US.NC South Atlantic NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1454 كارولاينا الشمالية নর্থ ক্যারোলাইনা North Carolina North Carolina Carolina del Norte Caroline du Nord Βόρεια Καρολίνα उत्तरी केरोलिना Észak-Karolina Carolina Utara Carolina del Nord ノースカロライナ州 노스캐롤라이나주 North Carolina Karolina Północna Carolina do Norte Северная Каролина North Carolina Kuzey Karolina Bắc Carolina 北卡罗来纳州 1159314887 MULTIPOLYGON (((-76.03173 36.55028, -76.03091 ...
2079 Admin-1 scale rank 2 USA-3552 3552 US-VA http://en.wikipedia.org/wiki/Virginia US 6 Virginia VA NaN State State US51 US.VA NaN NaN South NaN 0 1 20 1 Va. VA 0 -99 0 8 1 1 US51 NaN 2347605 Virginia, US, United States Virginia 37.7403 -78.2431 US1 USA 2 United States of America United States of America USA 6254928 Virginia -1 NaN 1 NaN US.VA South Atlantic NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1370 فرجينيا ভার্জিনিয়া Virginia Virginia Virginia Virginie Βιρτζίνια वर्जीनिया Virginia Virginia Virginia バージニア州 버지니아 주 Virginia Wirginia Virgínia Виргиния Virginia Virjinya Virginia 弗吉尼亚州 1159315259 MULTIPOLYGON (((-76.01325 36.55016, -76.04459 ...
2080 Admin-1 scale rank 2 USA-3556 3556 US-DC http://en.wikipedia.org/wiki/Washington,_D.C. US 1 District of Columbia DC|D.C. NaN Federal District Federal District US11 US.DC NaN NaN South NaN 0 1 20 1 D.C. DC 0 9 9 20 1 1 US11 NaN 2347567 District of Columbia, US, United States District of Columbia 38.8922 -77.0113 US1 USA 2 United States of America United States of America USA 4138106 District of Columbia -1 NaN 1 NaN US.DC South Atlantic NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q61 واشنطن العاصمة ওয়াশিংটন Washington Washington Washington D. C. Washington Ουάσινγκτον वॉशिंगटन डी॰ सी॰ Washington Washington Washington ワシントンD.C. 워싱턴 D.C. Washington D.C. Waszyngton Washington Вашингтон Washington Washington Washington 華盛頓哥倫比亞特區 1159315327 POLYGON ((-77.02293 38.80277, -77.02739 38.819...
2081 Admin-1 scale rank 2 USA-3557 3557 US-MD http://en.wikipedia.org/wiki/Maryland US 1 Maryland MD NaN State State US24 US.MD NaN NaN South NaN 0 1 20 1 Md. MD 0 -99 0 8 1 1 US24 NaN 2347579 Maryland, US, United States Maryland 39.3874 -77.0454 US1 USA 2 United States of America United States of America USA 4361885 Maryland -1 NaN 1 NaN US.MD South Atlantic NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1391 ماريلند মেরিল্যান্ড Maryland Maryland Maryland Maryland Μέριλαντ मैरीलैंड Maryland Maryland Maryland メリーランド州 메릴랜드 주 Maryland Maryland Maryland Мэриленд Maryland Maryland Maryland 马里兰州 1159315329 MULTIPOLYGON (((-75.64786 37.96572, -75.65368 ...
2082 Admin-1 scale rank 2 USA-3555 3555 US-DE http://en.wikipedia.org/wiki/Delaware US 1 Delaware DE|Del. NaN State State US10 US.DE NaN NaN South NaN 0 1 20 1 Del. DE 0 -99 0 8 1 1 US10 NaN 2347566 Delaware, US, United States Delaware 38.8657 -75.4112 US1 USA 2 United States of America United States of America USA 4142224 Delaware -1 NaN 1 NaN US.DE South Atlantic NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1393 ديلاوير ডেলাওয়্যার Delaware Delaware Delaware Delaware Ντέλαγουερ डेलावेयर Delaware Delaware Delaware デラウェア州 델라웨어 주 Delaware Delaware Delaware Делавэр Delaware Delaware Delaware 特拉华州 1159315325 POLYGON ((-75.05773 38.45344, -75.05809 38.453...
2083 Admin-1 scale rank 2 USA-3558 3558 US-NJ http://en.wikipedia.org/wiki/New_Jersey US 5 New Jersey NJ|N.J. NaN State State US34 US.NJ NaN NaN Northeast NaN 0 1 20 1 N.J. NJ 0 -99 0 10 1 1 US34 NaN 2347589 New Jersey, US, United States New Jersey 40.0449 -74.4653 US1 USA 2 United States of America United States of America USA 5101760 New Jersey -1 NaN 1 NaN US.NJ Middle Atlantic NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1408 نيوجيرسي নিউ জার্সি New Jersey New Jersey Nueva Jersey New Jersey Νιου Τζέρσεϊ न्यू जर्सी New Jersey New Jersey New Jersey ニュージャージー州 뉴저지 주 New Jersey New Jersey Nova Jérsia Нью-Джерси New Jersey New Jersey New Jersey 新泽西州 1159315267 MULTIPOLYGON (((-73.90713 40.99079, -73.90770 ...
2084 Admin-1 scale rank 2 USA-3537 3537 US-CT http://en.wikipedia.org/wiki/Connecticut US 1 Connecticut CT|Conn. NaN State State US09 US.CT NaN NaN Northeast NaN 0 1 20 1 Conn. CT 0 -99 0 11 1 1 US09 NaN 2347565 Connecticut, US, United States Connecticut 41.6486 -72.7594 US1 USA 2 United States of America United States of America USA 4831725 Connecticut -1 NaN 1 NaN US.CT New England NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q779 كونيتيكت কানেটিকাট Connecticut Connecticut Connecticut Connecticut Κονέκτικατ कनेक्टिकट Connecticut Connecticut Connecticut コネチカット州 코네티컷 주 Connecticut Connecticut Connecticut Коннектикут Connecticut Connecticut Connecticut 康乃狄克州 1159315301 POLYGON ((-71.84717 41.31082, -71.87147 41.302...
2085 Admin-1 scale rank 2 USA-3539 3539 US-RI http://en.wikipedia.org/wiki/Rhode_Island US 6 Rhode Island State of Rhode Island and Providence Plantatio... NaN State State US44 US.RI NaN NaN Northeast NaN 0 1 20 1 R.I. RI 0 -99 0 12 1 1 US44 NaN 2347598 Rhode Island, US, United States Rhode Island 41.6242 -71.5082 US1 USA 2 United States of America United States of America USA 5224323 Rhode Island -1 NaN 1 NaN US.RI New England NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1387 رود آيلاند রোড আইল্যান্ড Rhode Island Rhode Island Rhode Island Rhode Island Ρόουντ Άιλαντ रोड आइलैंड Rhode Island Rhode Island Rhode Island ロードアイランド州 로드아일랜드주 Rhode Island Rhode Island Rhode Island Род-Айленд Rhode Island Rhode Island Rhode Island 羅德島州 1159312213 MULTIPOLYGON (((-71.23686 41.70956, -71.23839 ...
2086 Admin-1 scale rank 2 USA-3513 3513 US-MA http://en.wikipedia.org/wiki/Massachusetts US 6 Massachusetts Commonwealth of Massachusetts|MA|Mass. NaN State State US25 US.MA NaN NaN Northeast NaN 0 1 20 1 Mass. MA 0 -99 0 13 1 1 US25 NaN 2347580 Massachusetts, US, United States Massachusetts 42.3739 -71.9993 US1 USA 2 United States of America United States of America USA 6254926 Massachusetts -1 NaN 1 NaN US.MA New England NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q771 ماساتشوستس ম্যাসাচুসেট্‌স Massachusetts Massachusetts Massachusetts Massachusetts Μασαχουσέτη मैसाचूसिट्स Massachusetts Massachusetts Massachusetts マサチューセッツ州 매사추세츠 주 Massachusetts Massachusetts Massachusetts Массачусетс Massachusetts Massachusetts Massachusetts 麻薩諸塞州 1159312157 MULTIPOLYGON (((-71.19396 41.67686, -71.19026 ...
2169 Admin-1 scale rank 2 USA-3525 3525 US-OR http://en.wikipedia.org/wiki/Oregon US 6 Oregon OR|Ore. NaN State State US41 US.OR NaN NaN West NaN 0 1 20 1 Ore. OR 0 -99 0 6 1 1 US41 NaN 2347596 Oregon, US, United States Oregon 43.8333 -120.3860 US1 USA 2 United States of America United States of America USA 5744337 Oregon -1 NaN 1 NaN US.OR Pacific NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q824 أوريغون অরেগন Oregon Oregon Oregón Oregon Όρεγκον औरिगन Oregon Oregon Oregon オレゴン州 오리건 주 Oregon Oregon Oregon Орегон Oregon Oregon Oregon 俄勒冈州 1159309549 MULTIPOLYGON (((-124.49245 42.92984, -124.4636...
2912 Admin-1 scale rank 2 USA-3517 3517 US-HI http://en.wikipedia.org/wiki/Hawaii US 8 Hawaii HI|Hawaii NaN State State US15 US.HI NaN NaN West NaN 0 1 20 1 Hawaii HI 0 -99 0 6 1 1 US15 NaN 2347570 Hawaii, US, United States Hawaii 21.4919 -157.9990 US1 USA 2 United States of America United States of America USA 5855797 Hawaii -1 NaN 1 NaN US.HI Pacific NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q782 هاواي হাওয়াই Hawaii Hawaii Hawái Hawaï Χαβάη हवाई Hawaii Hawaii Hawaii ハワイ州 하와이주 Hawaï Hawaje Havaí Гавайи Hawaii Hawaii Hawaii 夏威夷州 1159308409 MULTIPOLYGON (((-154.89962 19.56702, -154.8466...
3274 Admin-1 scale rank 2 USA-3526 3526 US-UT http://en.wikipedia.org/wiki/Utah US 1 Utah UT NaN State State US49 US.UT NaN NaN West NaN 0 1 20 1 Utah UT 0 -99 0 4 1 1 US49 NaN 2347603 Utah, US, United States Utah 39.5007 -111.5440 US1 USA 2 United States of America United States of America USA 5549030 Utah -1 NaN 1 NaN US.UT Mountain NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q829 يوتا ইউটা Utah Utah Utah Utah Γιούτα यूटाह Utah Utah Utah ユタ州 유타 주 Utah Utah Utah Юта Utah Utah Utah 犹他州 1159315349 POLYGON ((-111.05024 41.99983, -111.05024 41.9...
3275 Admin-1 scale rank 2 USA-3527 3527 US-WY http://en.wikipedia.org/wiki/Wyoming US 1 Wyoming WY|Wyo. NaN State State US56 US.WY NaN NaN West NaN 0 1 20 1 Wyo. WY 0 -99 0 7 1 1 US56 NaN 2347609 Wyoming, US, United States Wyoming 42.9999 -107.5520 US1 USA 2 United States of America United States of America USA 5843591 Wyoming -1 NaN 1 NaN US.WY Mountain NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1214 وايومنغ ওয়াইয়োমিং Wyoming Wyoming Wyoming Wyoming Ουαϊόμινγκ वायोमिंग Wyoming Wyoming Wyoming ワイオミング州 와이오밍주 Wyoming Wyoming Wyoming Вайоминг Wyoming Wyoming Wyoming 怀俄明州 1159315351 POLYGON ((-111.04999 41.00005, -111.05002 41.0...
3276 Admin-1 scale rank 2 USA-3523 3523 US-NV http://en.wikipedia.org/wiki/Nevada US 1 Nevada NV|Nev. NaN State State US32 US.NV NaN NaN West NaN 0 1 20 1 Nev. NV 0 -99 0 6 1 1 US32 NaN 2347587 Nevada, US, United States Nevada 39.4299 -117.0200 US1 USA 2 United States of America United States of America USA 5509151 Nevada -1 NaN 1 NaN US.NV Mountain NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1227 نيفادا নেভাডা Nevada Nevada Nevada Nevada Νεβάδα नेवाडा Nevada Nevada Nevada ネバダ州 네바다주 Nevada Nevada Nevada Невада Nevada Nevada Nevada 内华达州 1159315345 POLYGON ((-114.04255 42.00008, -114.04252 41.8...
3277 Admin-1 scale rank 2 USA-3522 3522 US-CO http://en.wikipedia.org/wiki/Colorado US 1 Colorado CO|Colo. NaN State State US08 US.CO NaN NaN West NaN 0 1 20 1 Colo. CO 0 -99 0 8 1 1 US08 NaN 2347564 Colorado, US, United States Colorado 38.9998 -105.5430 US1 USA 2 United States of America United States of America USA 5417618 Colorado -1 NaN 1 NaN US.CO Mountain NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1261 كولورادو কলোরাডো Colorado Colorado Colorado Colorado Κολοράντο कॉलराडो Colorado Colorado Colorado コロラド州 콜로라도 주 Colorado Kolorado Colorado Колорадо Colorado Colorado Colorado 科羅拉多州 1159315343 POLYGON ((-109.04633 40.99983, -108.88932 40.9...
3278 Admin-1 scale rank 2 USA-3534 3534 US-SD http://en.wikipedia.org/wiki/South_Dakota US 1 South Dakota SD|S.D. NaN State State US46 US.SD NaN NaN Midwest NaN 0 1 20 1 S.D. SD 0 -99 0 12 1 1 US46 NaN 2347600 South Dakota, US, United States South Dakota 44.4711 -100.2550 US1 USA 2 United States of America United States of America USA 5769223 South Dakota -1 NaN 1 NaN US.SD West North Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1211 داكوتا الجنوبية সাউথ ডাকোটা South Dakota South Dakota Dakota del Sur Dakota du Sud Νότια Ντακότα दक्षिण डकोटा Dél-Dakota Dakota Selatan Dakota del Sud サウスダコタ州 사우스다코타주 South Dakota Dakota Południowa Dakota do Sul Южная Дакота South Dakota Güney Dakota Nam Dakota 南达科他州 1159315367 POLYGON ((-104.03930 44.99993, -104.03859 45.0...
3279 Admin-1 scale rank 2 USA-3532 3532 US-NE http://en.wikipedia.org/wiki/Nebraska US 1 Nebraska NE|Nebr. NaN State State US31 US.NE NaN NaN Midwest NaN 0 1 20 1 Nebr. NE 0 -99 0 8 1 1 US31 NaN 2347586 Nebraska, US, United States Nebraska 41.5002 -99.6855 US1 USA 2 United States of America United States of America USA 5073708 Nebraska -1 NaN 1 NaN US.NE West North Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1553 نبراسكا নেব্রাস্কা Nebraska Nebraska Nebraska Nebraska Νεμπράσκα नेब्रास्का Nebraska Nebraska Nebraska ネブラスカ州 네브래스카 주 Nebraska Nebraska Nebraska Небраска Nebraska Nebraska Nebraska 內布拉斯加州 1159315363 POLYGON ((-104.05373 40.99983, -104.05292 41.1...
3280 Admin-1 scale rank 2 USA-3530 3530 US-KS http://en.wikipedia.org/wiki/Kansas US 1 Kansas KS|Kans. NaN State State US20 US.KS NaN NaN Midwest NaN 0 1 20 1 Kans. KS 0 -99 0 6 1 1 US20 NaN 2347575 Kansas, US, United States Kansas 38.5000 -98.3309 US1 USA 2 United States of America United States of America USA 4273857 Kansas -1 NaN 1 NaN US.KS West North Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1558 كانساس ক্যান্সাস Kansas Kansas Kansas Kansas Κάνσας केन्सास Kansas Kansas Kansas カンザス州 캔자스 주 Kansas Kansas Kansas Канзас Kansas Kansas Kansas 堪薩斯州 1159315359 POLYGON ((-102.03957 36.99981, -102.03994 37.0...
3281 Admin-1 scale rank 2 USA-3533 3533 US-OK http://en.wikipedia.org/wiki/Oklahoma US 1 Oklahoma OK|Okla. NaN State State US40 US.OK NaN NaN South NaN 0 1 20 1 Okla. OK 0 -99 0 8 1 1 US40 NaN 2347595 Oklahoma, US, United States Oklahoma 35.4520 -97.1309 US1 USA 2 United States of America United States of America USA 4544379 Oklahoma -1 NaN 1 NaN US.OK West South Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1649 أوكلاهوما ওক‌লাহোমা Oklahoma Oklahoma Oklahoma Oklahoma Οκλαχόμα ओक्लाहोमा Oklahoma Oklahoma Oklahoma オクラホマ州 오클라호마주 Oklahoma Oklahoma Oklahoma Оклахома Oklahoma Oklahoma Oklahoma 奧克拉荷馬州 1159315365 POLYGON ((-103.00024 36.50020, -103.00036 36.6...
3282 Admin-1 scale rank 2 USA-3529 3529 US-IA http://en.wikipedia.org/wiki/Iowa US 1 Iowa IA|Iowa NaN State State US19 US.IA NaN NaN Midwest NaN 0 1 20 1 Iowa IA 0 -99 0 4 1 1 US19 NaN 2347574 Iowa, US, United States Iowa 42.0423 -93.3891 US1 USA 2 United States of America United States of America USA 4862182 Iowa -1 NaN 1 NaN US.IA West North Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1546 آيوا আইওয়া Iowa Iowa Iowa Iowa Αϊόβα आयोवा Iowa Iowa Iowa アイオワ州 아이오와 주 Iowa Iowa Iowa Айова Iowa Iowa Iowa 艾奥瓦州 1159315357 POLYGON ((-96.55546 43.28863, -96.54858 43.289...
3283 Admin-1 scale rank 2 USA-3531 3531 US-MO http://en.wikipedia.org/wiki/Missouri US 1 Missouri MO NaN State State US29 US.MO NaN US.IL|USA-MOS Midwest NaN 0 1 20 1 Mo. MO 0 -99 0 8 1 1 US29 US17 2347584 Missouri, US, United States Missouri 38.5487 -92.4460 US1 USA 2 United States of America United States of America USA 4398678 Missouri -1 NaN 1 NaN US.MO West North Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1581 ميزوري মিসৌরি Missouri Missouri Misuri Missouri Μιζούρι मिसौरी Missouri Missouri Missouri ミズーリ州 미주리 주 Missouri Missouri Missouri Миссури Missouri Missouri Missouri 密蘇里州 1159315361 POLYGON ((-95.63364 40.30918, -95.64995 40.311...
4352 Admin-1 scale rank 2 USA-3553 3553 US-WI http://en.wikipedia.org/wiki/Wisconsin US 1 Wisconsin WI|Wis. NaN State State US55 US.WI NaN NaN Midwest NaN 0 1 20 1 Wis. WI 0 -99 0 9 1 1 US55 NaN 2347608 Wisconsin, US, United States Wisconsin 44.3709 -89.5831 US1 USA 2 United States of America United States of America USA 5279468 Wisconsin -1 NaN 1 NaN US.WI East North Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1537 ويسكونسن উইসকনসিন Wisconsin Wisconsin Wisconsin Wisconsin Ουισκόνσιν विस्कॉन्सिन Wisconsin Wisconsin Wisconsin ウィスコンシン州 위스콘신 주 Wisconsin Wisconsin Wisconsin Висконсин Wisconsin Wisconsin Wisconsin 威斯康辛州 1159315321 POLYGON ((-89.95764 47.28611, -89.98547 47.243...
4353 Admin-1 scale rank 2 USA-3546 3546 US-IL http://en.wikipedia.org/wiki/Illinois US 1 Illinois IL|Ill. NaN State State US17 US.IL NaN NaN Midwest NaN 0 1 20 1 Ill. IL 0 -99 0 8 1 1 US17 NaN 2347572 Illinois, US, United States Illinois 39.9460 -89.1991 US1 USA 2 United States of America United States of America USA 4896861 Illinois -1 NaN 1 NaN US.IL East North Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1204 إلينوي ইলিনয় Illinois Illinois Illinois Illinois Ιλινόι इलिनॉय Illinois Illinois Illinois イリノイ州 일리노이 주 Illinois Illinois Illinois Иллинойс Illinois Illinois Illinois 伊利诺伊州 1159315309 POLYGON ((-90.58530 38.87808, -90.62653 38.890...
4354 Admin-1 scale rank 2 USA-3548 3548 US-KY http://en.wikipedia.org/wiki/Kentucky US 1 Kentucky Commonwealth of Kentucky|KY NaN State State US21 US.KY NaN US.IN|USA-KEN South NaN 0 1 20 1 Ky. KY 0 -99 0 8 1 1 US21 US18 2347576 Kentucky, US, United States Kentucky 37.3994 -85.5729 US1 USA 2 United States of America United States of America USA 6254925 Kentucky -1 NaN 1 NaN US.KY East South Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1603 كنتاكي কেন্টাকি Kentucky Kentucky Kentucky Kentucky Κεντάκι केन्टकी Kentucky Kentucky Kentucky ケンタッキー州 켄터키 주 Kentucky Kentucky Kentucky Кентукки Kentucky Kentucky Kentucky 肯塔基州 1159315313 MULTIPOLYGON (((-89.25331 36.56912, -89.22631 ...
4355 Admin-1 scale rank 2 USA-3528 3528 US-AR http://en.wikipedia.org/wiki/Arkansas US 1 Arkansas AR|Ark. NaN State State US05 US.AR NaN NaN South NaN 0 1 20 1 Ark. AR 0 -99 0 8 1 1 US05 NaN 2347562 Arkansas, US, United States Arkansas 34.7563 -92.1428 US1 USA 2 United States of America United States of America USA 4099753 Arkansas -1 NaN 1 NaN US.AR West South Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1612 أركنساس আর্কানসাস Arkansas Arkansas Arkansas Arkansas Αρκάνσας अरकांसास Arkansas Arkansas Arkansas アーカンソー州 아칸소 주 Arkansas Arkansas Arkansas Арканзас Arkansas Arkansas Arkansas 阿肯色州 1159315355 POLYGON ((-90.30422 35.00008, -90.30124 34.995...
4356 Admin-1 scale rank 2 USA-3551 3551 US-TN http://en.wikipedia.org/wiki/Tennessee US 1 Tennessee TN|Tenn. NaN State State US47 US.TN NaN NaN South NaN 0 1 20 1 Tenn. TN 0 -99 0 9 1 1 US47 NaN 2347601 Tennessee, US, United States Tennessee 35.7514 -86.3415 US1 USA 2 United States of America United States of America USA 4662168 Tennessee -1 NaN 1 NaN US.TN East South Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1509 تينيسي টেনেসী Tennessee Tennessee Tennessee Tennessee Τενεσί टेनेसी Tennessee Tennessee Tennessee テネシー州 테네시 주 Tennessee Tennessee Tennessee Теннесси Tennessee Tennessee Tennessee 田纳西州 1159315319 POLYGON ((-89.67404 35.89629, -89.66730 35.915...
4357 Admin-1 scale rank 2 USA-3554 3554 US-WV http://en.wikipedia.org/wiki/West_Virginia US 1 West Virginia WV|W.Va. NaN State State US54 US.WV NaN NaN South NaN 0 1 20 1 W.Va. WV 0 -99 0 13 1 1 US54 NaN 2347607 West Virginia, US, United States West Virginia 38.6422 -80.7128 US1 USA 2 United States of America United States of America USA 4826850 West Virginia -1 NaN 1 NaN US.WV South Atlantic NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1371 فيرجينيا الغربية পশ্চিম ভার্জিনিয়া West Virginia West Virginia Virginia Occidental Virginie-Occidentale Δυτική Βιρτζίνια पश्चिमी वर्जीनिया Nyugat-Virginia Virginia Barat Virginia Occidentale ウェストバージニア州 웨스트버지니아주 West Virginia Wirginia Zachodnia Virgínia Ocidental Западная Виргиния West Virginia Batı Virginia Tây Virginia 西維吉尼亞州 1159315323 POLYGON ((-82.58945 38.41932, -82.58898 38.418...
4358 Admin-1 scale rank 2 USA-3547 3547 US-IN http://en.wikipedia.org/wiki/Indiana US 1 Indiana IN|Ind. NaN State State US18 US.IN NaN NaN Midwest NaN 0 1 20 1 Ind. IN 0 -99 0 7 1 1 US18 NaN 2347573 Indiana, US, United States Indiana 39.8874 -86.1396 US1 USA 2 United States of America United States of America USA 4921868 Indiana -1 NaN 1 NaN US.IN East North Central NaN -1 NaN NaN NaN 3.5 7.5 2.0 Q1415 إنديانا ইন্ডিয়ানা Indiana Indiana Indiana Indiana Ιντιάνα इंडियाना Indiana Indiana Indiana インディアナ州 인디애나 주 Indiana Indiana Indiana Индиана Indiana Indiana Indiana 印第安纳州 1159315311 POLYGON ((-84.80608 41.69681, -84.80608 41.617...
Tip: The name column corresponds to the states.

Examine the Geometry column

When Geopandas creates a dataframe from a Shapefile, a key column that gets added is the geometry one. Here we can see that each of the states have Geometry features consisting of Polygons or Multipolygons

df.loc[df.name == 'Colorado']['geometry']
3277    POLYGON ((-109.04633 40.99983, -108.88932 40.9...
Name: geometry, dtype: geometry
df.loc[df.name == 'New York']['geometry']
1307    MULTIPOLYGON (((-74.69588 44.99803, -74.59611 ...
Name: geometry, dtype: geometry
Question: Notice that Colorado's geometry is POLYGON while New York is MULTIPOLYGON. Can you think of a reason for the distinction? (Hint: are any islands part of the state?)

Make a Geopandas dataframe for New York State

dfNYS = df.loc[df.name == 'New York']

As with any Pandas Dataframe, we can directly call its plot method for a quick view.

dfNYS.plot(figsize=(12,9))
<Axes: >
../../_images/67a26148891c6e6bda2cb70f71bdf93c8637db3c09ce355fffd02705f6739b55.png

We can create a GeoPandas series consisting only of the Geometry column.

geoNY = df.loc[df.name == 'New York']['geometry']
geoNY
1307    MULTIPOLYGON (((-74.69588 44.99803, -74.59611 ...
Name: geometry, dtype: geometry

Examine the values attribute of this Geopandas geometry object:

geoNY.values
<GeometryArray>
[<MULTIPOLYGON (((-74.696 44.998, -74.596 44.998, -74.496 44.999, -74.397 44....>]
Length: 1, dtype: geometry
Note: The object begins with shapely. It stems from the Shapely library. Although we did not explicitly list this library in our list of imports, it was imported as a result of the import cartopy.io.shapereader as shpreader statement.

If we take just the first (and only element) of this array, what do we get?

nysPoly = geoNY.values[0]
nysPoly
../../_images/2b39c720b09bebeca76528b08758e4c3e960d7f5c7eb9ddb1e680b32560c5745.svg

Plot the shapefile

We can now add this object to a Cartopy-referenced Matplotlib plot using Matplotlib’s add_geometries method. First we’ll comment out all of the Natural Earth shapefiles we typically use. This will produce just a map of NYS.

fig = plt.figure(figsize=(15,10))
ax = plt.axes(projection=ccrs.PlateCarree())
plt.title('NYS')
ax.add_geometries(nysPoly, ccrs.PlateCarree(),
                  edgecolor='black', facecolor='tab:blue', alpha=0.5)
ax.set_extent([-80, -72,40.5,45.2], ccrs.PlateCarree());
../../_images/8e778eaaf196655118574240af84750e04bba85c56fa6b7938cccc74c3494b52.png

Add additional features to the plot

Now, add some of Cartopy’s Natural Earth features to the plot. We should see that with the exception of the counties (which defaults to a slightly lower resolution (20m) than the others) everything should line up nicely. We’ll slightly expand the map extent so we’ll see neighboring state/province outlines.

res = '10m'
fig = plt.figure(figsize=(15,10))
ax = plt.axes(projection=ccrs.PlateCarree())

plt.title('NYS')
ax.coastlines(resolution=res)
ax.add_geometries(nysPoly, ccrs.PlateCarree(),
                  edgecolor='black', facecolor='tab:blue', alpha=0.5)
ax.add_feature (cfeature.LAKES.with_scale(res), alpha = 0.5)
ax.add_feature (cfeature.STATES.with_scale(res))
ax.add_feature(USCOUNTIES,edgecolor='grey',linewidth=1 );
ax.set_extent([-85, -67,37.5,49.5], ccrs.PlateCarree());
../../_images/b1d6359ee8d344657a00a3b0b6458c60d65ee1ddafebea39f6ccf9400608b333.png
Tip: The USCOUNTIES shapefile also has a 5m version. To use it, append .with_scale('5m') to USCOUNTIES.

Summary

  • Matplotlib and Cartopy, via the Shapely library, provides support for reading and displaying shapefiles.

  • Shapefiles are a form of vector graphics; unlike rasters, they do not degrade as one zooms into them.

  • The Geopandas library treats shapefiles as geo-referenced Pandas dataframes.

What’s Next?

We’ll return to cloud-optimized geotiffs, specifically those that are tile-based, with more detail automatically displayed as one zooms in to a particular region.