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
ERROR 1: PROJ: proj_create_from_database: Open of /knight/anaconda_aug22/envs/aug22_env/share/proj failed

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 None AR 1 Entre Ríos Entre-Rios None Provincia Province None AR.ER None None None None 10 1 20 3 None ER 0 -99 3 10 3 13 AR08 None 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 None AR.08 None None 1 khm AR08 None 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 None UY 1 Paysandú None None Departamento Department None UY.PA None None None None 19 1 0 8 None PA 0 -99 6 8 2 10 UY11 None 2347650 Paysandú, UY, Uruguay Paysandú -32.09330 -57.2240 URY URY 2 Uruguay Uruguay URY 3441242 Departamento de Paysandu -908097 Paysandu, Departamento de 1 None UY.11 None None 1 fra UY11 None 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 None PK 1 Sind Sindh None Province Province None PK.SD None None None None 2 1 20 2 None SD 0 -99 3 4 3 11 PK05 None 2346499 Sindh, PK, Pakistan Sind 26.37340 68.8685 PAK PAK 2 Pakistan Pakistan PAK 1164807 Sindh -2774813 Sindh 1 None PK.05 None None 1 rus PK05 None 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 None IN 1 Gujarat None None None None None IN.GJ None None West None 20064 1 20 1 None None 0 -99 2 7 2 2 IN32 None 2345743 Gujarat, IN, India Gujarat 22.75010 71.3013 IND IND 2 India India IND 1270770 State of Gujarat -2096768 Gujarat, State of 1 None IN.09 None None 1 nld IN09 None 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 None ID 5 Kalimantan Timur Kaltim None Propinsi Province None ID.KI None None None None 15 1 20 1 None KI 0 -99 2 16 6 11 ID14 None 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 None ID.14 None None 1 ind ID14 None 5.0 10.1 4.6 Q3899 كالمنتان الشرقية কিলিমান্তান তিমুর Ostkalimantan East Kalimantan Kalimantan Oriental Kalimantan oriental Ανατολικό Καλιμαντάν पूर्व कालिमंतान None 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 None MT 3 Isla Isla|Città Invicta None None None None MT.SE.IS None None Malta Xlokk None 0 0 0 10 None None 0 -99 20 7 1 8 None None 24551400 None Malta 35.88640 14.5149 MLT MLT 5 Malta Malta MLT 8299724 L-Isla 11534632 L-Isla 1 None MT.25 Southern Harbour None 1 mlt MT25 None 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 None MT 3 Cospicua Bormla None None None None MT.SE.BO None None Malta Xlokk None 0 0 0 10 None None 0 -99 20 8 1 8 None None 24551391 None Malta 35.88000 14.5207 MLT MLT 5 Malta Malta MLT 8299705 Bormla 11534041 Bormla 1 None MT.06 Southern Harbour None 1 mlt MT06 None 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 None MT 3 Pietà None None None None None MT.CE.PI None None Malta Majjistral None 0 0 0 10 None None 0 -99 20 5 1 8 None None 24551394 None Malta 35.88910 14.4927 MLT MLT 5 Malta Malta MLT 8299740 Tal-Pieta 11535783 Tal-Pieta 1 None MT.41 Northern Harbour None 1 mlt MT41 None 11.0 11.0 11.0 Q744070 None None Pietà Pietà Pietà Pietà Πιετά None Pietà None Pietà ピータ 피타 Pietà Pietà Pietà Пьета Pietà None None 佩塔 1159318027 POLYGON ((14.49801 35.89251, 14.49616 35.88830...
4592 Admin-1 aggregation 10 MLT-5940 5940 MT-34 None MT 3 Msida None None None None None MT.CE.MS None None Malta Majjistral None 0 0 0 10 None None 0 -99 20 5 1 8 None None 24551414 None Malta 35.89490 14.4825 MLT MLT 5 Malta Malta MLT 8299722 L-Imsida 11534629 L-Imsida 1 None MT.23 Northern Harbour None 1 mlt MT23 None 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 None MT 3 Birgu None None None None None MT.SE.BR None None Malta Xlokk None 0 0 0 10 None None 0 -99 20 5 1 8 None None 24551404 None Malta 35.88710 14.5260 MLT MLT 5 Malta Malta MLT 8299702 Il-Birgu 11534037 Il-Birgu 1 None MT.03 Southern Harbour None 1 mlt MT03 None 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. None State State US27 US.MN None None Midwest None 0 1 20 1 Minn. MN 0 -99 0 9 1 1 US27 None 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 None 1 None US.MN West North Central None -1 None None None 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. None State State US53 US.WA None None West None 0 1 20 1 Wash. WA 0 -99 0 10 1 1 US53 None 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 None 1 None US.WA Pacific None -1 None None None 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 None State State US16 US.ID None None West None 0 1 20 1 Idaho ID 0 -99 0 5 1 1 US16 None 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 None 1 None US.ID Mountain None -1 None None None 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. None State State US30 US.MT None None West None 0 1 20 1 Mont. MT 0 -99 0 7 1 1 US30 None 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 None 1 None US.MT Mountain None -1 None None None 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. None State State US38 US.ND None None Midwest None 0 1 20 1 N.D. ND 0 -99 0 12 1 1 US38 None 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 None 1 None US.ND West North Central None -1 None None None 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. None State State US26 US.MI None None Midwest None 0 1 20 1 Mich. MI 0 -99 0 8 1 1 US26 None 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 None 1 None US.MI East North Central None -1 None None None 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 None State State US23 US.ME None None Northeast None 0 1 20 1 Maine ME 0 -99 0 5 1 1 US23 None 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 None 1 None US.ME New England None -1 None None None 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 None State State US39 US.OH None None Midwest None 0 1 20 1 Ohio OH 0 -99 0 4 1 1 US39 None 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 None 1 None US.OH East North Central None -1 None None None 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. None State State US33 US.NH None None Northeast None 0 1 20 1 N.H. NH 0 -99 0 13 1 1 US33 None 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 None 1 None US.NH New England None -1 None None None 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. None State State US36 US.NY None None Northeast None 0 1 20 1 N.Y. NY 0 -99 0 8 1 1 US36 None 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 None 1 None US.NY Middle Atlantic None -1 None None None 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 None State State US50 US.VT None None Northeast None 0 1 20 1 Vt. VT 0 -99 0 7 1 1 US50 None 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 None 1 None US.VT New England None -1 None None None 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 None State State US42 US.PA None None Northeast None 0 1 20 1 Pa. PA 0 -99 0 12 1 1 US42 None 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 None 1 None US.PA Middle Atlantic None -1 None None None 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. None State State US04 US.AZ None None West None 0 1 20 1 Ariz. AZ 0 -99 0 7 1 1 US04 None 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 None 1 None US.AZ Mountain None -1 None None None 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. None State State US06 US.CA None None West None 0 1 20 1 Calif. CA 0 -99 0 10 1 1 US06 None 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 None 1 None US.CA Pacific None -1 None None None 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. None State State US35 US.NM None None West None 0 1 20 1 N.M. NM 0 -99 0 10 1 1 US35 None 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 None 1 None US.NM Mountain None -1 None None None 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. None State State US48 US.TX None None South None 0 1 20 1 Tex. TX 0 -99 0 5 1 1 US48 None 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 None 1 None US.TX West South Central None -1 None None None 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 None State State US02 US.AK None None West None 0 1 20 1 Alaska AK 0 -99 0 6 1 1 US02 None 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 None 1 None US.AK Pacific None -1 None None None 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 None State State US22 US.LA None None South None 0 1 20 1 La. LA 0 -99 0 9 1 1 US22 None 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 None 1 None US.LA West South Central None -1 None None None 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. None State State US28 US.MS None None South None 0 1 20 1 Miss. MS 0 -99 0 11 1 1 US28 None 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 None 1 None US.MS East South Central None -1 None None None 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. None State State US01 US.AL None None South None 0 1 20 1 Ala. AL 0 -99 0 7 1 1 US01 None 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 None 1 None US.AL East South Central None -1 None None None 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. None State State US12 US.FL None None South None 0 1 20 8 Fla. FL 0 -99 0 7 1 1 US12 None 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 None 1 None US.FL South Atlantic None -1 None None None 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. None State State US13 US.GA None None South None 0 1 20 1 Ga. GA 0 -99 0 7 1 1 US13 None 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 None 1 None US.GA South Atlantic None -1 None None None 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. None State State US45 US.SC None None South None 0 1 20 1 S.C. SC 0 -99 0 14 1 1 US45 None 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 None 1 None US.SC South Atlantic None -1 None None None 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. None State State US37 US.NC None None South None 0 1 20 1 N.C. NC 0 -99 0 14 1 1 US37 None 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 None 1 None US.NC South Atlantic None -1 None None None 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 None State State US51 US.VA None None South None 0 1 20 1 Va. VA 0 -99 0 8 1 1 US51 None 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 None 1 None US.VA South Atlantic None -1 None None None 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. None Federal District Federal District US11 US.DC None None South None 0 1 20 1 D.C. DC 0 9 9 20 1 1 US11 None 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 None 1 None US.DC South Atlantic None -1 None None None 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 None State State US24 US.MD None None South None 0 1 20 1 Md. MD 0 -99 0 8 1 1 US24 None 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 None 1 None US.MD South Atlantic None -1 None None None 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. None State State US10 US.DE None None South None 0 1 20 1 Del. DE 0 -99 0 8 1 1 US10 None 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 None 1 None US.DE South Atlantic None -1 None None None 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. None State State US34 US.NJ None None Northeast None 0 1 20 1 N.J. NJ 0 -99 0 10 1 1 US34 None 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 None 1 None US.NJ Middle Atlantic None -1 None None None 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. None State State US09 US.CT None None Northeast None 0 1 20 1 Conn. CT 0 -99 0 11 1 1 US09 None 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 None 1 None US.CT New England None -1 None None None 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... None State State US44 US.RI None None Northeast None 0 1 20 1 R.I. RI 0 -99 0 12 1 1 US44 None 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 None 1 None US.RI New England None -1 None None None 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. None State State US25 US.MA None None Northeast None 0 1 20 1 Mass. MA 0 -99 0 13 1 1 US25 None 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 None 1 None US.MA New England None -1 None None None 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. None State State US41 US.OR None None West None 0 1 20 1 Ore. OR 0 -99 0 6 1 1 US41 None 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 None 1 None US.OR Pacific None -1 None None None 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 None State State US15 US.HI None None West None 0 1 20 1 Hawaii HI 0 -99 0 6 1 1 US15 None 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 None 1 None US.HI Pacific None -1 None None None 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 None State State US49 US.UT None None West None 0 1 20 1 Utah UT 0 -99 0 4 1 1 US49 None 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 None 1 None US.UT Mountain None -1 None None None 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. None State State US56 US.WY None None West None 0 1 20 1 Wyo. WY 0 -99 0 7 1 1 US56 None 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 None 1 None US.WY Mountain None -1 None None None 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. None State State US32 US.NV None None West None 0 1 20 1 Nev. NV 0 -99 0 6 1 1 US32 None 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 None 1 None US.NV Mountain None -1 None None None 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. None State State US08 US.CO None None West None 0 1 20 1 Colo. CO 0 -99 0 8 1 1 US08 None 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 None 1 None US.CO Mountain None -1 None None None 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. None State State US46 US.SD None None Midwest None 0 1 20 1 S.D. SD 0 -99 0 12 1 1 US46 None 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 None 1 None US.SD West North Central None -1 None None None 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. None State State US31 US.NE None None Midwest None 0 1 20 1 Nebr. NE 0 -99 0 8 1 1 US31 None 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 None 1 None US.NE West North Central None -1 None None None 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. None State State US20 US.KS None None Midwest None 0 1 20 1 Kans. KS 0 -99 0 6 1 1 US20 None 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 None 1 None US.KS West North Central None -1 None None None 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. None State State US40 US.OK None None South None 0 1 20 1 Okla. OK 0 -99 0 8 1 1 US40 None 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 None 1 None US.OK West South Central None -1 None None None 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 None State State US19 US.IA None None Midwest None 0 1 20 1 Iowa IA 0 -99 0 4 1 1 US19 None 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 None 1 None US.IA West North Central None -1 None None None 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 None State State US29 US.MO None US.IL|USA-MOS Midwest None 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 None 1 None US.MO West North Central None -1 None None None 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. None State State US55 US.WI None None Midwest None 0 1 20 1 Wis. WI 0 -99 0 9 1 1 US55 None 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 None 1 None US.WI East North Central None -1 None None None 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. None State State US17 US.IL None None Midwest None 0 1 20 1 Ill. IL 0 -99 0 8 1 1 US17 None 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 None 1 None US.IL East North Central None -1 None None None 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 None State State US21 US.KY None US.IN|USA-KEN South None 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 None 1 None US.KY East South Central None -1 None None None 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. None State State US05 US.AR None None South None 0 1 20 1 Ark. AR 0 -99 0 8 1 1 US05 None 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 None 1 None US.AR West South Central None -1 None None None 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. None State State US47 US.TN None None South None 0 1 20 1 Tenn. TN 0 -99 0 9 1 1 US47 None 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 None 1 None US.TN East South Central None -1 None None None 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. None State State US54 US.WV None None South None 0 1 20 1 W.Va. WV 0 -99 0 13 1 1 US54 None 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 None 1 None US.WV South Atlantic None -1 None None None 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. None State State US18 US.IN None None Midwest None 0 1 20 1 Ind. IN 0 -99 0 7 1 1 US18 None 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 None 1 None US.IN East North Central None -1 None None None 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))
<AxesSubplot:>
../../_images/01_Shapefiles_Intro_33_1.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>
[<shapely.geometry.multipolygon.MultiPolygon object at 0x14ee135aaa40>]
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/01_Shapefiles_Intro_41_0.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/01_Shapefiles_Intro_44_0.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/01_Shapefiles_Intro_46_0.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.