├── .gitignore ├── README.md ├── assets └── images │ ├── basemap-quakes.png │ ├── census-counties-20m.png │ └── worldwide-m6-quakes-2000-2015-subplots.png ├── bayarea_foo.py ├── bayarea_mapfoo.py ├── data ├── bayarea_zipcodes │ ├── bayarea_zipcodes.dbf │ ├── bayarea_zipcodes.prj │ ├── bayarea_zipcodes.sbn │ ├── bayarea_zipcodes.sbx │ ├── bayarea_zipcodes.shp │ ├── bayarea_zipcodes.shp.xml │ ├── bayarea_zipcodes.shx │ ├── bayarea_zipcodes.zip │ ├── epsg_4326--bayarea_zipcodes.dbf │ ├── epsg_4326--bayarea_zipcodes.prj │ ├── epsg_4326--bayarea_zipcodes.shp │ └── epsg_4326--bayarea_zipcodes.shx ├── cb_2015_06_tract_500k │ ├── README.md │ ├── cb_2015_06_tract_500k.cpg │ ├── cb_2015_06_tract_500k.dbf │ ├── cb_2015_06_tract_500k.prj │ ├── cb_2015_06_tract_500k.shp │ ├── cb_2015_06_tract_500k.shp.ea.iso.xml │ ├── cb_2015_06_tract_500k.shp.iso.xml │ ├── cb_2015_06_tract_500k.shp.xml │ └── cb_2015_06_tract_500k.shx ├── cb_2015_us_county_20m │ ├── cb_2015_us_county_20m.cpg │ ├── cb_2015_us_county_20m.dbf │ ├── cb_2015_us_county_20m.prj │ ├── cb_2015_us_county_20m.shp │ ├── cb_2015_us_county_20m.shp.ea.iso.xml │ ├── cb_2015_us_county_20m.shp.iso.xml │ ├── cb_2015_us_county_20m.shp.xml │ └── cb_2015_us_county_20m.shx ├── projections │ └── epsg_4326.txt └── usgs │ └── worldwide-m6-quakes.csv ├── fetchdata.py ├── notebooks ├── Geopandas on OS X and Anaconda + Python 3.5.ipynb ├── assets │ └── simple-quakes-bay-counties-zips.png └── notebookdata │ ├── bayarea_zipcodes.zip │ ├── cb_2015_us_county_5m.zip │ └── us_quakes_1990_2015_M4.5.json ├── plot_ca_census.py ├── plot_census_counties.py ├── samples └── pyproj_blog_itm_wgs-example.py └── viz_subplotmaps.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *,cover 46 | .hypothesis/ 47 | 48 | # Translations 49 | *.mo 50 | *.pot 51 | 52 | # Django stuff: 53 | *.log 54 | local_settings.py 55 | 56 | # Flask stuff: 57 | instance/ 58 | .webassets-cache 59 | 60 | # Scrapy stuff: 61 | .scrapy 62 | 63 | # Sphinx documentation 64 | docs/_build/ 65 | 66 | # PyBuilder 67 | target/ 68 | 69 | # IPython Notebook 70 | .ipynb_checkpoints 71 | 72 | # pyenv 73 | .python-version 74 | 75 | # celery beat schedule file 76 | celerybeat-schedule 77 | 78 | # dotenv 79 | .env 80 | 81 | # virtualenv 82 | venv/ 83 | ENV/ 84 | 85 | # Spyder project settings 86 | .spyderproject 87 | 88 | # Rope project settings 89 | .ropeproject 90 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Attempts at Python 3.x + GIS work with pyshp, osgeo, matplotlib.basemap 2 | 3 | Learning about Python and GIS as I go... 4 | 5 | Attempting to do everything in Python 3.x, [as supplied by Anaconda](https://docs.continuum.io/anaconda/pkg-docs). 6 | 7 | # Current status 8 | 9 | ## Libraries I have successfully used 10 | 11 | I've been able to install these libraries and use them on OSX and Python 3.5, via the Anaconda installer: 12 | 13 | - [fiona](https://github.com/Toblerity/Fiona) - friendly API for handling of different shapefile formats. 14 | - [shapely](http://toblerity.org/shapely/manual.html) - geospatial analysis 15 | - [descartes](https://pypi.python.org/pypi/descartes) - converts geometric objects into paths and patches for Matplotlib. 16 | - [geopandas](http://geopandas.org) - wraps up the above libraries with Pandas DataFrames 17 | - [basemap](http://matplotlib.org/basemap/index.html) - Matplotlib's geographic mapping library 18 | 19 | 20 | 21 | ## Plotting data on maps 22 | 23 | Trying to use [matplotlib's basemap](https://github.com/matplotlib/basemap) to do geospatial visualizations. 24 | 25 | - [x] Installed basemap via `conda install basemap` 26 | - [x] Created earthquake scatterplot on Earth map layer: [gist](https://gist.github.com/dannguyen/eb1c4e70565d8cb82d63) 27 | 28 | basemap earthquakes 29 | - [x] Rendered mapviz as part of matplotlib grids [viz_subplotmaps.py](viz_subplotmaps.py) 30 | 31 | basemap earthquakes 32 | 33 | 34 | ## Working with shapefiles 35 | 36 | - [x] Use basemap to read shapefile and project 37 | - [x] Successfully plotted Census shapefile that's already in epsg:4326 38 | 39 | 40 | Check it out: [plot_census_counties.py](plot_census_counties.py) 41 | 42 | census-counties-aea 43 | 44 | - [x] Plot shapefiles that aren't in lat/lng format by first using [Geopandas to reproject to esri:4326](notebooks/Geopandas%20on%20OS%20X%20and%20Anaconda%20+%20Python 3.5.ipynb) 45 | 46 | 47 | 48 | - [x] Concatenated shapefiles and converted shapefiles into GeoJSON ([blog post on Census population estimates](http://blog.danwin.com/census-places-cartodb-geopandas-mapping/)) 49 | 50 | 51 | ### Using pyshp 52 | 53 | Trying to re-project a shapefile in Python using [pyshp](https://pypi.python.org/pypi/pyshp): 54 | 55 | - [x] Installed pyshp `pip install pyshp` 56 | - [x] Attempted to emulate example: [Reproject a Polygon Shapefile using PyShp and PyProj](https://glenbambrick.com/2016/01/24/reproject-shapefile/) 57 | 58 | ### Using pyproj 59 | 60 | Projecting coordinates with [pyproj](https://github.com/jswhit/pyproj) 61 | 62 | - [x] Installed pyproj via `conda install pyproj` 63 | - [x] Successfully projected coordinates 64 | - See use of pyproj to translate X/Y coordinates in NYPD stops-and-frisks data to lng/lat: [dannguyen/python-notebooks-data-wrangling -- wrangling-nypd-frisks.py](https://github.com/dannguyen/python-notebooks-data-wrangling/blob/master/scripts/wrangling-nypd-frisks.py) 65 | - See early attempts at using pyproj (and caveat about its configuration): [Getting inaccurate results converting from New York State projection to NAD83 with Python's pyproj](http://gis.stackexchange.com/questions/181667/getting-inaccurate-results-converting-from-new-york-state-projection-to-nad83-wi) 66 | 67 | 68 | 69 | ### Other tutorials to look at later: 70 | 71 | - https://www.pfenninger.org/posts/mapping-the-worlds-nuclear-power-plants/ 72 | -------------------------------------------------------------------------------- /assets/images/basemap-quakes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/assets/images/basemap-quakes.png -------------------------------------------------------------------------------- /assets/images/census-counties-20m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/assets/images/census-counties-20m.png -------------------------------------------------------------------------------- /assets/images/worldwide-m6-quakes-2000-2015-subplots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/assets/images/worldwide-m6-quakes-2000-2015-subplots.png -------------------------------------------------------------------------------- /bayarea_foo.py: -------------------------------------------------------------------------------- 1 | """ 2 | A reproduction of code found at: 3 | https://glenbambrick.com/2016/01/24/reproject-shapefile/ 4 | """ 5 | from pathlib import Path 6 | from pyproj import Proj, transform 7 | import shapefile 8 | SHP_BASENAME = 'bayarea_zipcodes' 9 | DDIR = Path('data', SHP_BASENAME) 10 | SHP_NAME = DDIR.joinpath(SHP_BASENAME) 11 | NEWPREFIX = 'epsg_4326--' 12 | 13 | # set the input projection of the original file. 14 | INPUT_PROJ = Proj(init="esri:102643") 15 | # set the projection for the output file. 16 | OUTPUT_PROJ = Proj(init="epsg:4326") 17 | # OUTPUT PRJ WKT 18 | OUTPUT_WKTPRJ = Path('data', 'projections', 'epsg_4326.txt').read_text() 19 | 20 | 21 | 22 | r_sf = shapefile.Reader(str(SHP_NAME)) 23 | w_sf = shapefile.Writer(r_sf.shapeType) 24 | 25 | 26 | for shape in r_sf.shapes(): 27 | # each shape has a list of geometry to add to new file 28 | listpoly = [] 29 | if len(shape.parts) == 1: 30 | for x, y in shape.points: 31 | newxy = transform(INPUT_PROJ, OUTPUT_PROJ, x, y) 32 | listpoly.append(list(newxy)) 33 | ### add geometry to new file 34 | w_sf.poly(parts=[listpoly]) ## REFACTORTK 35 | else: # more than one part to the geometry 36 | shparts = shape.parts 37 | shpoints = shape.points 38 | shparts.append(len(shpoints)) # ...? 39 | for i in range(len(shparts) - 1): 40 | listparts = [] 41 | coordct = shparts[i] 42 | endcoord = coordct + abs(coordct - shparts[i + 1]) 43 | for j in range(coordct, endcoord): 44 | for coords in shpoints[j:endcoord]: 45 | x, y = coords 46 | newxy = transform(INPUT_PROJ, OUTPUT_PROJ, x, y) 47 | listparts.append(list(newxy)) 48 | listpoly.append(listparts) 49 | 50 | ### add geometry to new file 51 | w_sf.poly(parts=listpoly) ## REFACTORTK 52 | 53 | 54 | # save to shapefile 55 | out_baseshp = NEWPREFIX + SHP_BASENAME 56 | out_shpname = DDIR.joinpath(out_baseshp + '.shp') 57 | w_sf.save(str(out_shpname)) 58 | 59 | # generate PRJ file 60 | out_prjname = DDIR.joinpath(out_baseshp + '.prj') 61 | with out_prjname.open('w') as wf: 62 | # via http://spatialreference.org/ref/epsg/4326/prettywkt/ 63 | wf.write(OUTPUT_WKTPRJ) 64 | -------------------------------------------------------------------------------- /bayarea_mapfoo.py: -------------------------------------------------------------------------------- 1 | from shutil import unpack_archive 2 | from pathlib import Path 3 | import matplotlib.pyplot as plt 4 | from mpl_toolkits.basemap import Basemap 5 | 6 | SHP_BASENAME = 'bayarea_zipcodes' 7 | DDIR = Path('data', SHP_BASENAME) 8 | NEWPREFIX = 'epsg_4326--' 9 | SHP_NAME = DDIR.joinpath(NEWPREFIX + SHP_BASENAME) 10 | 11 | fig, ax = plt.subplots() 12 | m = Basemap(ax=ax) 13 | m.readshapefile(str(SHP_NAME), 'stuffwhatisthis') 14 | 15 | 16 | ## Current error 17 | 18 | # in () 19 | # ----> 1 m.readshapefile(str(SHP_NAME), 'stuffwhatisthis') 20 | 21 | # /Users/dtown/.pyenv/versions/anaconda3-2.5.0/lib/python3.5/site-packages/mpl_toolkits/basemap/__init__.py in readshapefile(self, shapefile, name, drawbounds, zorder, linewidth, color, antialiased, ax, default_encoding) 22 | # 2144 info = (shf.numRecords,shptype,bbox[0:2]+[0.,0.],bbox[2:]+[0.,0.]) 23 | # 2145 npoly = 0 24 | # -> 2146 for shprec in shf.shapeRecords(): 25 | # 2147 shp = shprec.shape; rec = shprec.record 26 | # 2148 npoly = npoly + 1 27 | 28 | # /Users/dtown/.pyenv/versions/anaconda3-2.5.0/lib/python3.5/site-packages/mpl_toolkits/basemap/shapefile.py in shapeRecords(self) 29 | # 541 shapeRecords = [] 30 | # 542 return [_ShapeRecord(shape=rec[0], record=rec[1]) \ 31 | # --> 543 for rec in zip(self.shapes(), self.records())] 32 | # 544 33 | # 545 class Writer: 34 | 35 | # /Users/dtown/.pyenv/versions/anaconda3-2.5.0/lib/python3.5/site-packages/mpl_toolkits/basemap/shapefile.py in records(self) 36 | # 508 """Returns all records in a dbf file.""" 37 | # 509 if not self.numRecords: 38 | # --> 510 self.__dbfHeader() 39 | # 511 records = [] 40 | # 512 f = self.__getFileObj(self.dbf) 41 | 42 | # /Users/dtown/.pyenv/versions/anaconda3-2.5.0/lib/python3.5/site-packages/mpl_toolkits/basemap/shapefile.py in __dbfHeader(self) 43 | # 444 self.fields.append(fieldDesc) 44 | # 445 terminator = dbf.read(1) 45 | # --> 446 assert terminator == b("\r") 46 | # 447 self.fields.insert(0, ('DeletionFlag', 'C', 1, 0)) 47 | # 448 48 | 49 | # AssertionError: 50 | 51 | -------------------------------------------------------------------------------- /data/bayarea_zipcodes/bayarea_zipcodes.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/data/bayarea_zipcodes/bayarea_zipcodes.dbf -------------------------------------------------------------------------------- /data/bayarea_zipcodes/bayarea_zipcodes.prj: -------------------------------------------------------------------------------- 1 | PROJCS["NAD_1983_StatePlane_California_III_FIPS_0403_Feet",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",6561666.666666666],PARAMETER["False_Northing",1640416.666666667],PARAMETER["Central_Meridian",-120.5],PARAMETER["Standard_Parallel_1",37.06666666666667],PARAMETER["Standard_Parallel_2",38.43333333333333],PARAMETER["Latitude_Of_Origin",36.5],UNIT["Foot_US",0.3048006096012192]] -------------------------------------------------------------------------------- /data/bayarea_zipcodes/bayarea_zipcodes.sbn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/data/bayarea_zipcodes/bayarea_zipcodes.sbn -------------------------------------------------------------------------------- /data/bayarea_zipcodes/bayarea_zipcodes.sbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/data/bayarea_zipcodes/bayarea_zipcodes.sbx -------------------------------------------------------------------------------- /data/bayarea_zipcodes/bayarea_zipcodes.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/data/bayarea_zipcodes/bayarea_zipcodes.shp -------------------------------------------------------------------------------- /data/bayarea_zipcodes/bayarea_zipcodes.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/data/bayarea_zipcodes/bayarea_zipcodes.shx -------------------------------------------------------------------------------- /data/bayarea_zipcodes/bayarea_zipcodes.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/data/bayarea_zipcodes/bayarea_zipcodes.zip -------------------------------------------------------------------------------- /data/bayarea_zipcodes/epsg_4326--bayarea_zipcodes.dbf: -------------------------------------------------------------------------------- 1 | t! -------------------------------------------------------------------------------- /data/bayarea_zipcodes/epsg_4326--bayarea_zipcodes.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["WGS84",DATUM["WGS_1984",SPHEROID["WGS84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"] 2 | -------------------------------------------------------------------------------- /data/bayarea_zipcodes/epsg_4326--bayarea_zipcodes.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/data/bayarea_zipcodes/epsg_4326--bayarea_zipcodes.shp -------------------------------------------------------------------------------- /data/bayarea_zipcodes/epsg_4326--bayarea_zipcodes.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/data/bayarea_zipcodes/epsg_4326--bayarea_zipcodes.shx -------------------------------------------------------------------------------- /data/cb_2015_06_tract_500k/README.md: -------------------------------------------------------------------------------- 1 | curl -O http://www2.census.gov/geo/tiger/GENZ2015/shp/cb_2015_06_tract_500k.zip\n 2 | https://www.census.gov/geo/maps-data/data/cbf/cbf_tracts.html -------------------------------------------------------------------------------- /data/cb_2015_06_tract_500k/cb_2015_06_tract_500k.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /data/cb_2015_06_tract_500k/cb_2015_06_tract_500k.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/data/cb_2015_06_tract_500k/cb_2015_06_tract_500k.dbf -------------------------------------------------------------------------------- /data/cb_2015_06_tract_500k/cb_2015_06_tract_500k.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /data/cb_2015_06_tract_500k/cb_2015_06_tract_500k.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/data/cb_2015_06_tract_500k/cb_2015_06_tract_500k.shp -------------------------------------------------------------------------------- /data/cb_2015_06_tract_500k/cb_2015_06_tract_500k.shp.ea.iso.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | Feature Catalog for the 2015 State-County-Census Tract 1:500,000 10 | 11 | 12 | The State-County-Census Tract at a scale of 1:500,000 13 | 14 | 15 | cb_2015_tract_500k 16 | 17 | 18 | 2016-03 19 | 20 | 21 | eng 22 | 23 | 24 | utf8 27 | 28 | 29 | 31 | 32 | 33 | 34 | cb_2015_06_tract_500k.shp 35 | 36 | 37 | Current Census Tract State-based entities 38 | 39 | 40 | false 41 | 42 | 43 | 44 | 45 | 46 | STATEFP 47 | 48 | 49 | Current state Federal Information Processing Series (FIPS) code 50 | 51 | 52 | 54 | 55 | 56 | 57 | National Standard Codes (ANSI INCITS 38-2009), Federal Information Processing Series (FIPS) - States/State Equivalents 58 | 59 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | COUNTYFP 69 | 70 | 71 | Current county Federal Information Processing Series (FIPS) code 72 | 73 | 74 | 76 | 77 | 78 | 79 | National Standard Codes (ANSI INCITS 31-2009), Federal Information Processing Series (FIPS) - Counties/County Equivalents 80 | 81 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | TRACTCE 91 | 92 | 93 | Current census tract code 94 | 95 | 96 | 98 | 99 | 100 | 101 | 000000 102 | 103 | 104 | Water tract in some coastal and Great Lakes water and territorial sea 105 | 106 | 108 | 109 | 110 | 111 | 112 | 113 | 000100 to 998999 114 | 115 | 116 | Census tract number 117 | 118 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | AFFGEOID 128 | 129 | 130 | American FactFinder summary level code + geovariant code + '00US' + GEOID 131 | 132 | 133 | 135 | 136 | 137 | 138 | American FactFinder geographic identifier 139 | 140 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | GEOID 150 | 151 | 152 | Census tract identifier; a concatenation of current state Federal Information Processing Series (FIPS) code, county FIPS code, and census tract code 153 | 154 | 155 | 157 | 158 | 159 | 160 | 161 | The GEOID attribute is a concatenation of the state FIPS code, followed by the county FIPS code, followed by the census tract code. No spaces are allowed between the two codes. The state FIPS code is taken from "National Standard Codes (ANSI INCITS 38-2009), Federal Information Processing Series (FIPS) - States". The county FIPS code is taken from "National Standard Codes (ANSI INCITS 31-2009), Federal Information Processing Series (FIPS) - Counties/County Equivalents". The census tract code is taken from the "TRACTCE" attribute. 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | NAME 171 | 172 | 173 | Current census tract name, this is the census tract code converted to an integer or integer plus two-digit decimal if the last two characters of the code are not both zeros. 174 | 175 | 176 | 178 | 179 | 180 | 181 | 182 | Values for this attribute are composed of a set of census tract names. As such, they do not exist in a known, predefined set. 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | LSAD 192 | 193 | 194 | Current legal/statistical area description code for Census tract 195 | 196 | 197 | 199 | 200 | 201 | 202 | CT 203 | 204 | 205 | Census Tract (prefix) 206 | 207 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | ALAND 217 | 218 | 219 | Current land area (square meters) 220 | 221 | 222 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | Range Domain Minimum: 0 235 | Range Domain Maximum: 9,999,999,999,999 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | AWATER 245 | 246 | 247 | Current water area (square meters) 248 | 249 | 250 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | Range Domain Minimum: 0 263 | Range Domain Maximum: 9,999,999,999,999 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | -------------------------------------------------------------------------------- /data/cb_2015_06_tract_500k/cb_2015_06_tract_500k.shp.iso.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | cb_2015_06_tract_500k.shp.iso.xml 9 | 10 | 11 | eng 12 | 13 | 14 | UTF-8 17 | 18 | 19 | 20 | Series Information for the 2015 Cartographic Boundary File, State-County-Census Tract , 1:500,000 21 | 22 | 23 | 25 | dataset 26 | 27 | 28 | 30 | 31 | 2016-03 32 | 33 | 34 | ISO 19115 Geographic Information - Metadata 35 | 36 | 37 | 2009-02-15 38 | 39 | 40 | http://www2.census.gov/geo/tiger/GENZ2015/shp 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 51 | complex 52 | 53 | 54 | 8043 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | INCITS (formerly FIPS) codes 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 2015 Cartographic Boundary File, State-County-Census Tract for California, 1:500,000 80 | 81 | 82 | 83 | 84 | 85 | 201603 86 | 87 | 88 | publication 91 | 92 | 93 | 94 | 96 | 97 | 98 | 99 | The 2015 cartographic boundary shapefiles are simplified representations of selected geographic areas from the U.S. Census Bureau's Master Address File / Topologically Integrated Geographic Encoding and Referencing (MAF/TIGER) Database (MTDB). These boundary files are specifically designed for small-scale thematic mapping. When possible, generalization is performed with the intent to maintain the hierarchical relationships among geographies and to maintain the alignment of geographies within a file set for a given year. Geographic areas may not align with the same areas from another year. Some geographies are available as nation-based files while others are available only as state-based files. 100 | 101 | Census tracts are small, relatively permanent statistical subdivisions of a county or equivalent entity, and were defined by local participants as part of the 2010 Census Participant Statistical Areas Program. The Census Bureau delineated the census tracts in situations where no local participant existed or where all the potential participants declined to participate. The primary purpose of census tracts is to provide a stable set of geographic units for the presentation of census data and comparison back to previous decennial censuses. Census tracts generally have a population size between 1,200 and 8,000 people, with an optimum size of 4,000 people. When first delineated, census tracts were designed to be homogeneous with respect to population characteristics, economic status, and living conditions. The spatial size of census tracts varies widely depending on the density of settlement. Physical changes in street patterns caused by highway construction, new development, and so forth, may require boundary revisions. In addition, census tracts occasionally are split due to population growth, or combined as a result of substantial population decline. Census tract boundaries generally follow visible and identifiable features. They may follow legal boundaries such as minor civil division (MCD) or incorporated place boundaries in some states and situations to allow for census tract-to-governmental unit relationships where the governmental boundaries tend to remain unchanged between censuses. State and county boundaries always are census tract boundaries in the standard census geographic hierarchy. In a few rare instances, a census tract may consist of noncontiguous areas. These noncontiguous areas may occur where the census tracts are coextensive with all or parts of legal entities that are themselves noncontiguous. For the 2010 Census, the census tract code range of 9400 through 9499 was enforced for census tracts that include a majority American Indian population according to Census 2000 data and/or their area was primarily covered by federally recognized American Indian reservations and/or off-reservation trust lands; the code range 9800 through 9899 was enforced for those census tracts that contained little or no population and represented a relatively large special land use area such as a National Park, military installation, or a business/industrial park; and the code range 9900 through 9998 was enforced for those census tracts that contained only water area, no land area. 102 | 103 | 104 | These files were specifically created to support small-scale thematic mapping. To improve the appearance of shapes at small scales, areas are represented with fewer vertices than detailed TIGER/Line Shapefiles. Cartographic boundary files take up less disk space than their ungeneralized counterparts. Cartographic boundary files take less time to render on screen than TIGER/Line Shapefiles. You can join this file with table data downloaded from American FactFinder by using the AFFGEOID field in the cartographic boundary file. If detailed boundaries are required, please use the TIGER/Line Shapefiles instead of the generalized cartographic boundary files. 105 | 106 | 107 | 109 | completed 110 | 111 | 112 | 114 | 115 | 116 | 117 | 120 | notPlanned 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | Boundaries 129 | 130 | 131 | theme 134 | 135 | 136 | 137 | 138 | ISO 19115 Topic Categories 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 2015 149 | 150 | 151 | SHP 152 | 153 | 154 | Cartographic Boundary 155 | 156 | 157 | Census Tract 158 | 159 | 160 | County 161 | 162 | 163 | Generalized 164 | 165 | 166 | State 167 | 168 | 169 | theme 172 | 173 | 174 | 175 | 176 | None 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | California 187 | 188 | 189 | CA 190 | 191 | 192 | place 195 | 196 | 197 | 198 | 199 | ANSI INCITS 38:2009 (Formerly FIPS 5-2), ANSI INCITS 31:2009 (Formerly FIPS 6-4),ANSI INCITS 454:2009 (Formerly FIPS 8-6), ANSI INCITS 455:2009(Formerly FIPS 9-1), ANSI INCITS 446:2008 (Geographic Names Information System (GNIS)) 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | otherRestrictions 212 | 213 | 214 | 217 | 218 | 219 | Access Constraints: None 220 | 221 | 222 | Use Constraints:The intended display scale for this file is 1:500,000. This file should not be displayed at scales larger than 1:500,000. 223 | 224 | These products are free to use in a product or publication, however acknowledgement must be given to the U.S. Census Bureau as the source. The boundary information is for visual display at appropriate small scales only. Cartographic boundary files should not be used for geographic analysis including area or perimeter calculation. Files should not be used for geocoding addresses. Files should not be used for determining precise geographic area relationships. 225 | 226 | 227 | 228 | 229 | 230 | 231 | vector 233 | 234 | 235 | eng 236 | 237 | 238 | UTF-8 241 | 242 | 243 | The cartographic boundary files contain geographic data only and do not include display mapping software or statistical data. For information on how to use cartographic boundary file data with specific software package users shall contact the company that produced the software. 244 | 245 | 246 | 247 | 248 | 249 | 250 | -124.409591 251 | 252 | 253 | -114.131211 254 | 255 | 256 | 32.534156 257 | 258 | 259 | 42.009518 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | publication date 268 | 2016-03 269 | 2016-03 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | true 283 | 284 | 285 | County-Census Tract 286 | 287 | 288 | 289 | 290 | Feature Catalog for the 2015 State-County-Census Tract 1:500,000 Cartographic Boundary File 291 | 292 | 293 | 294 | 295 | 296 | 299 | 300 | 301 | 302 | 303 | http://meta.geo.census.gov/data/existing/decennial/GEO/CPMB/boundary/2014gz/tract_500k/2014_tract_500k.ea.iso.xml 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | SHP 315 | 316 | 317 | 318 | The cartographic boundary files contain geographic data only and do not include display mapping software or statistical data. For information on how to use cartographic boundary file data with specific software package users shall contact the company that produced the software. 319 | 320 | 321 | 322 | 323 | 324 | 325 | html 326 | 327 | 328 | 329 | 330 | 331 | 332 | 334 | 335 | 336 | 337 | The online cartographic boundary files may be downloaded without charge. 338 | 339 | 340 | To obtain more information about ordering Cartographic Boundary Files visit http://www.census.gov/geo/www/tiger. 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | http://www2.census.gov/geo/tiger/GENZ2015/shp/cb_2015_06_tract_500k.zip 352 | 353 | 354 | Shapefile Zip File 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | http://www.census.gov/geo/maps-data/data/tiger-cart-boundary.html 366 | 367 | 368 | Cartographic Boundary Shapefiles 369 | 370 | 371 | Simplified representations of selected geographic areas from the Census Bureau's MAF/TIGER geographic database 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | dataset 387 | 388 | 389 | 390 | 391 | 392 | 393 | Horizontal Positional Accuracy 394 | 395 | 396 | 397 | 398 | 399 | Data are not accurate. Data are generalized representations of geographic boundaries at 1:500,000. 400 | 401 | 402 | 403 | 404 | 405 | meters 406 | 407 | 408 | 409 | 410 | Missing 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | The cartographic boundary files are generalized representations of extracts taken from the MAF/TIGER Database. Generalized boundary files are clipped to a simplified version of the U.S. outline. As a result, some off-shore areas may be excluded from the generalized files. Some small geographic areas, holes, or discontiguous parts of areas may not be included in generalized files if they are not visible at the target scale. 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | The Census Bureau performed automated tests to ensure logical consistency of the source database. Segments making up the outer and inner boundaries of a polygon tie end-to-end to completely enclose the area. All polygons were tested for closure. The Census Bureau uses its internally developed geographic update system to enhance and modify spatial and attribute data in the Census MAF/TIGER database. Standard geographic codes, such as INCITS (formerly FIPS) codes for states, counties, municipalities, county subdivisions, places, American Indian/Alaska Native/Native Hawaiian areas, and congressional districts are used when encoding spatial entities. The Census Bureau performed spatial data tests for logical consistency of the codes during the compilation of the original Census MAF/TIGER database files. Feature attribute information has been examined but has not been fully tested for consistency. 433 | 434 | For the cartographic boundary files, the Point and Vector Object Count for the G-polygon SDTS Point and Vector Object Type reflects the number of records in the file's data table. For multi-polygon features, only one attribute record exists for each multi-polygon rather than one attribute record per individual G-polygon component of the multi-polygon feature. Cartographic Boundary File multi-polygons are an exception to the G-polygon object type classification. Therefore, when multi-polygons exist in a file, the object count will be less than the actual number of G-polygons. 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | Spatial data were extracted from the MAF/TIGER database and processed through a U.S. Census Bureau batch generalization system. 445 | 446 | 447 | 2016-03-01T00:00:00 448 | 449 | 450 | 451 | 452 | Geo-spatial Relational Database 453 | 454 | 455 | 456 | 457 | Census MAF/TIGER database 458 | 459 | 460 | MAF/TIGER 461 | 462 | 463 | 464 | 465 | 20150101 466 | 467 | 468 | The dates describe the effective date of 2015 cartographic boundaries. 471 | 472 | 473 | 474 | 475 | 476 | 477 | U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch 478 | 479 | 480 | originator 482 | 483 | 484 | 485 | 486 | 487 | Source Contribution: All spatial and feature data 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 505 | notPlanned 506 | 507 | 508 | 509 | This was transformed from the Census Metadata Import Format 510 | 511 | 513 | 514 | 515 | -------------------------------------------------------------------------------- /data/cb_2015_06_tract_500k/cb_2015_06_tract_500k.shp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Cartographic Products and Services Branch 7 | 201603 8 | 2015 Cartographic Boundary File, State-County-Census Tract for California, 1:500,000 9 | vector digital data 10 | 11 | Cartographic Boundary Files 12 | 2015 13 | 14 | http://www2.census.gov/geo/tiger/GENZ2015/shp/cb_2015_06_tract_500k.zip 15 | 16 | 17 | 18 | The 2015 cartographic boundary shapefiles are simplified representations of selected geographic areas from the U.S. Census Bureau's Master Address File / Topologically Integrated Geographic Encoding and Referencing (MAF/TIGER) Database (MTDB). These boundary files are specifically designed for small-scale thematic mapping. When possible, generalization is performed with the intent to maintain the hierarchical relationships among geographies and to maintain the alignment of geographies within a file set for a given year. Geographic areas may not align with the same areas from another year. Some geographies are available as nation-based files while others are available only as state-based files. 19 | 20 | Census tracts are small, relatively permanent statistical subdivisions of a county or equivalent entity, and were defined by local participants as part of the 2010 Census Participant Statistical Areas Program. The Census Bureau delineated the census tracts in situations where no local participant existed or where all the potential participants declined to participate. The primary purpose of census tracts is to provide a stable set of geographic units for the presentation of census data and comparison back to previous decennial censuses. Census tracts generally have a population size between 1,200 and 8,000 people, with an optimum size of 4,000 people. When first delineated, census tracts were designed to be homogeneous with respect to population characteristics, economic status, and living conditions. The spatial size of census tracts varies widely depending on the density of settlement. Physical changes in street patterns caused by highway construction, new development, and so forth, may require boundary revisions. In addition, census tracts occasionally are split due to population growth, or combined as a result of substantial population decline. Census tract boundaries generally follow visible and identifiable features. They may follow legal boundaries such as minor civil division (MCD) or incorporated place boundaries in some states and situations to allow for census tract-to-governmental unit relationships where the governmental boundaries tend to remain unchanged between censuses. State and county boundaries always are census tract boundaries in the standard census geographic hierarchy. In a few rare instances, a census tract may consist of noncontiguous areas. These noncontiguous areas may occur where the census tracts are coextensive with all or parts of legal entities that are themselves noncontiguous. For the 2010 Census, the census tract code range of 9400 through 9499 was enforced for census tracts that include a majority American Indian population according to Census 2000 data and/or their area was primarily covered by federally recognized American Indian reservations and/or off-reservation trust lands; the code range 9800 through 9899 was enforced for those census tracts that contained little or no population and represented a relatively large special land use area such as a National Park, military installation, or a business/industrial park; and the code range 9900 through 9998 was enforced for those census tracts that contained only water area, no land area. 21 | These files were specifically created to support small-scale thematic mapping. To improve the appearance of shapes at small scales, areas are represented with fewer vertices than detailed TIGER/Line Shapefiles. Cartographic boundary files take up less disk space than their ungeneralized counterparts. Cartographic boundary files take less time to render on screen than TIGER/Line Shapefiles. You can join this file with table data downloaded from American FactFinder by using the AFFGEOID field in the cartographic boundary file. If detailed boundaries are required, please use the TIGER/Line Shapefiles instead of the generalized cartographic boundary files. 22 | 23 | 24 | 25 | 26 | 201603 27 | 201603 28 | 29 | 30 | publication date 31 | 32 | 33 | Complete 34 | None planned. No changes or updates will be made to this version of the cartographic boundary files. New versions of the cartographic boundary files will be produced on an annual release schedule. Types of geography released may vary from year to year. 35 | 36 | 37 | 38 | -124.409591 39 | -114.131211 40 | 42.009518 41 | 32.534156 42 | 43 | 44 | 45 | 46 | ISO 19115 Topic Categories 47 | Boundaries 48 | 49 | 50 | None 51 | 2015 52 | SHP 53 | Cartographic Boundary 54 | Census Tract 55 | County 56 | Generalized 57 | State 58 | 59 | 60 | ANSI INCITS 38:2009 (Formerly FIPS 5-2), ANSI INCITS 31:2009 (Formerly FIPS 6-4),ANSI INCITS 454:2009 (Formerly FIPS 8-6), ANSI INCITS 455:2009(Formerly FIPS 9-1), ANSI INCITS 446:2008 (Geographic Names Information System (GNIS)) 61 | California 62 | CA 63 | 64 | 65 | None 66 | The intended display scale for this file is 1:500,000. This file should not be displayed at scales larger than 1:500,000. 67 | 68 | These products are free to use in a product or publication, however acknowledgement must be given to the U.S. Census Bureau as the source. The boundary information is for visual display at appropriate small scales only. Cartographic boundary files should not be used for geographic analysis including area or perimeter calculation. Files should not be used for geocoding addresses. Files should not be used for determining precise geographic area relationships. 69 | 70 | 71 | 72 | 73 | U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch 74 | 75 | 76 | mailing 77 |
4600 Silver Hill Road
78 | Washington 79 | DC 80 | 20233-7400 81 | United States 82 |
83 | 301.763.1128 84 | 301.763.4710 85 | geo.geography@census.gov 86 |
87 |
88 |
89 | 90 | 91 | Accurate against American National Standards Institute (ANSI) Publication INCITS 446-2008 (Geographic Names Information System (GNIS)) at the 100% level for the codes and base names present in the file. The remaining attribute information has been examined but has not been fully tested for accuracy. 92 | 93 | The Census Bureau performed automated tests to ensure logical consistency of the source database. Segments making up the outer and inner boundaries of a polygon tie end-to-end to completely enclose the area. All polygons were tested for closure. The Census Bureau uses its internally developed geographic update system to enhance and modify spatial and attribute data in the Census MAF/TIGER database. Standard geographic codes, such as INCITS (formerly FIPS) codes for states, counties, municipalities, county subdivisions, places, American Indian/Alaska Native/Native Hawaiian areas, and congressional districts are used when encoding spatial entities. The Census Bureau performed spatial data tests for logical consistency of the codes during the compilation of the original Census MAF/TIGER database files. Feature attribute information has been examined but has not been fully tested for consistency. 94 | 95 | For the cartographic boundary files, the Point and Vector Object Count for the G-polygon SDTS Point and Vector Object Type reflects the number of records in the file's data table. For multi-polygon features, only one attribute record exists for each multi-polygon rather than one attribute record per individual G-polygon component of the multi-polygon feature. Cartographic Boundary File multi-polygons are an exception to the G-polygon object type classification. Therefore, when multi-polygons exist in a file, the object count will be less than the actual number of G-polygons. 96 | The cartographic boundary files are generalized representations of extracts taken from the MAF/TIGER Database. Generalized boundary files are clipped to a simplified version of the U.S. outline. As a result, some off-shore areas may be excluded from the generalized files. Some small geographic areas, holes, or discontiguous parts of areas may not be included in generalized files if they are not visible at the target scale. 97 | 98 | 99 | Data are not accurate. Data are generalized representations of geographic boundaries at 1:500,000. 100 | 101 | 102 | 103 | 104 | 105 | 106 | U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch 107 | unpublished material 108 | Census MAF/TIGER database 109 | 110 | 111 | Geo-spatial Relational Database 112 | 113 | 114 | 115 | 20150101 116 | 20150101 117 | 118 | 119 | The dates describe the effective date of 2015 cartographic boundaries. 120 | 121 | MAF/TIGER 122 | All spatial and feature data 123 | 124 | 125 | Spatial data were extracted from the MAF/TIGER database and processed through a U.S. Census Bureau batch generalization system. 126 | MAF/TIGER 127 | 201603 128 | 129 | 130 | 131 | 132 | INCITS (formerly FIPS) codes 133 | Vector 134 | 135 | 136 | G-polygon 137 | 8043 138 | 139 | 140 | 141 | 142 | 143 | 144 | 0.000458 145 | 0.000458 146 | Decimal degrees 147 | 148 | 149 | North American Datum of 1983 150 | Geodetic Reference System 80 151 | 6378137.000000 152 | 298.257222 153 | 154 | 155 | 156 | 157 | 158 | 159 | cb_2015_06_tract_500k.shp 160 | Current Census Tract State-based entities 161 | U.S. Census Bureau 162 | 163 | 164 | STATEFP 165 | Current state Federal Information Processing Series (FIPS) code 166 | U.S. Census Bureau 167 | 168 | 169 | National Standard Codes (ANSI INCITS 38-2009), Federal Information Processing Series (FIPS) - States/State Equivalents 170 | U.S. Census Bureau 171 | 172 | 173 | 174 | 175 | COUNTYFP 176 | Current county Federal Information Processing Series (FIPS) code 177 | U.S. Census Bureau 178 | 179 | 180 | National Standard Codes (ANSI INCITS 31-2009), Federal Information Processing Series (FIPS) - Counties/County Equivalents 181 | U.S. Census Bureau 182 | 183 | 184 | 185 | 186 | TRACTCE 187 | Current census tract code 188 | U.S. Census Bureau 189 | 190 | 191 | 000000 192 | Water tract in some coastal and Great Lakes water and territorial sea 193 | U.S. Census Bureau 194 | 195 | 196 | 197 | 198 | 000100 to 998999 199 | Census tract number 200 | U.S. Census Bureau 201 | 202 | 203 | 204 | 205 | AFFGEOID 206 | American FactFinder summary level code + geovariant code + '00US' + GEOID 207 | U.S. Census Bureau 208 | 209 | 210 | American FactFinder geographic identifier 211 | U.S. Census Bureau 212 | 213 | 214 | 215 | 216 | GEOID 217 | Census tract identifier; a concatenation of current state Federal Information Processing Series (FIPS) code, county FIPS code, and census tract code 218 | U.S. Census Bureau 219 | 220 | The GEOID attribute is a concatenation of the state FIPS code, followed by the county FIPS code, followed by the census tract code. No spaces are allowed between the two codes. The state FIPS code is taken from "National Standard Codes (ANSI INCITS 38-2009), Federal Information Processing Series (FIPS) - States". The county FIPS code is taken from "National Standard Codes (ANSI INCITS 31-2009), Federal Information Processing Series (FIPS) - Counties/County Equivalents". The census tract code is taken from the "TRACTCE" attribute. 221 | 222 | 223 | 224 | NAME 225 | Current census tract name, this is the census tract code converted to an integer or integer plus two-digit decimal if the last two characters of the code are not both zeros. 226 | U.S. Census Bureau 227 | 228 | Values for this attribute are composed of a set of census tract names. As such, they do not exist in a known, predefined set. 229 | 230 | 231 | 232 | LSAD 233 | Current legal/statistical area description code for Census tract 234 | U.S. Census Bureau 235 | 236 | 237 | CT 238 | Census Tract (prefix) 239 | U.S. Census Bureau 240 | 241 | 242 | 243 | 244 | ALAND 245 | Current land area (square meters) 246 | U.S. Census Bureau 247 | 248 | 249 | 0 250 | 9,999,999,999,999 251 | square meters 252 | 253 | 254 | 255 | 256 | AWATER 257 | Current water area (square meters) 258 | U.S. Census Bureau 259 | 260 | 261 | 0 262 | 9,999,999,999,999 263 | square meters 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch 274 | 275 | 276 | mailing 277 |
4600 Silver Hill Road
278 | Washington 279 | DC 280 | 20233-7400 281 | United States 282 |
283 | 301.763.1128 284 | 301.763.4710 285 | geo.geography@census.gov 286 |
287 |
288 | No warranty, expressed or implied is made with regard to the accuracy of these data, and no liability is assumed by the U.S. Government in general or the U.S. Census Bureau in specific as to the spatial or attribute accuracy of the data. The act of distribution shall not constitute any such warranty and no responsibility is assumed by the U.S. government in the use of these files. The boundary information is for small-scale mapping purposes only; boundary depiction and designation for small-scale mapping purposes do not constitute a determination of jurisdictional authority or rights of ownership or entitlement and they are not legal land descriptions. 289 | 290 | 291 | 292 | SHP 293 | PK-ZIP, version 1.93A or higher 294 | 295 | 296 | 297 | 298 | 299 | http://www2.census.gov/geo/tiger/GENZ2015/shp/cb_2015_06_tract_500k.zip 300 | 301 | 302 | 303 | 304 | 305 | The online cartographic boundary files may be downloaded without charge. 306 | To obtain more information about ordering Cartographic Boundary Files visit http://www.census.gov/geo/www/tiger. 307 | 308 | The cartographic boundary files contain geographic data only and do not include display mapping software or statistical data. For information on how to use cartographic boundary file data with specific software package users shall contact the company that produced the software. 309 |
310 | 311 | 201603 312 | 313 | 314 | 315 | U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch 316 | 317 | 318 | mailing 319 |
4600 Silver Hill Road
320 | Washington 321 | DC 322 | 20233-7400 323 | United States 324 |
325 | 301.763.1128 326 | 301.763.4710 327 | geo.geography@census.gov 328 |
329 |
330 | Content Standard for Digital Geospatial Metadata 331 | FGDC-STD-001-1998 332 |
333 |
-------------------------------------------------------------------------------- /data/cb_2015_06_tract_500k/cb_2015_06_tract_500k.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/data/cb_2015_06_tract_500k/cb_2015_06_tract_500k.shx -------------------------------------------------------------------------------- /data/cb_2015_us_county_20m/cb_2015_us_county_20m.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /data/cb_2015_us_county_20m/cb_2015_us_county_20m.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/data/cb_2015_us_county_20m/cb_2015_us_county_20m.dbf -------------------------------------------------------------------------------- /data/cb_2015_us_county_20m/cb_2015_us_county_20m.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /data/cb_2015_us_county_20m/cb_2015_us_county_20m.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/data/cb_2015_us_county_20m/cb_2015_us_county_20m.shp -------------------------------------------------------------------------------- /data/cb_2015_us_county_20m/cb_2015_us_county_20m.shp.ea.iso.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | Feature Catalog for the 2015 State-County 1:20,000,000 10 | 11 | 12 | The State-County at a scale of 1:20,000,000 13 | 14 | 15 | cb_2015_county_20m 16 | 17 | 18 | 2016-03 19 | 20 | 21 | eng 22 | 23 | 24 | utf8 27 | 28 | 29 | 31 | 32 | 33 | 34 | cb_2015_us_county_20m.shp 35 | 36 | 37 | Current County and Equivalent National entities 38 | 39 | 40 | false 41 | 42 | 43 | 44 | 45 | 46 | STATEFP 47 | 48 | 49 | Current state Federal Information Processing Series (FIPS) code 50 | 51 | 52 | 54 | 55 | 56 | 57 | National Standard Codes (ANSI INCITS 38-2009), Federal Information Processing Series (FIPS) - States/State Equivalents 58 | 59 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | COUNTYFP 69 | 70 | 71 | Current county Federal Information Processing Series (FIPS) code 72 | 73 | 74 | 76 | 77 | 78 | 79 | National Standard Codes (ANSI INCITS 31-2009), Federal Information Processing Series (FIPS) - Counties/County Equivalents 80 | 81 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | COUNTYNS 91 | 92 | 93 | Current county Geographic Names Information System (GNIS) code 94 | 95 | 96 | 98 | 99 | 100 | 101 | INCITS 446:2008 (Geographic Names Information System (GNIS)), Identifying Attributes for Named Physical and Cultural Geographic Features (Except Roads and Highways) of the United States, Its Territories, Outlying Areas, and Freely Associated Areas, and the Waters of the Same to the Limit of the Twelve-Mile Statutory Zone 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | U.S. Geological Survey (USGS) 115 | 116 | 117 | resourceProvider 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | AFFGEOID 138 | 139 | 140 | American FactFinder summary level code + geovariant code + '00US' + GEOID 141 | 142 | 143 | 145 | 146 | 147 | 148 | American FactFinder geographic identifier 149 | 150 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | GEOID 160 | 161 | 162 | County identifier; a concatenation of current state Federal Information Processing Series (FIPS) code and county FIPS code 163 | 164 | 165 | 167 | 168 | 169 | 170 | 171 | The GEOID attribute is a concatenation of the state FIPS code followed by the county FIPS code. No spaces are allowed between the two codes. The state FIPS code is taken from "National Standard Codes (ANSI INCITS 38-2009), Federal Information Processing Series (FIPS) - States". The county FIPS code is taken from "National Standard Codes (ANSI INCITS 31-2009), Federal Information Processing Series (FIPS) - Counties/County Equivalents". 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | NAME 181 | 182 | 183 | Current county name 184 | 185 | 186 | 188 | 189 | 190 | 191 | National Standard Codes (ANSI INCITS 31-2009), Federal Information Processing Series (FIPS) - Counties/County Equivalents 192 | 193 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | LSAD 203 | 204 | 205 | Current legal/statistical area description code for county 206 | 207 | 208 | 210 | 211 | 212 | 213 | 00 214 | 215 | 216 | Blank 217 | 218 | 220 | 221 | 222 | 223 | 224 | 225 | 03 226 | 227 | 228 | City and Borough (suffix) 229 | 230 | 232 | 233 | 234 | 235 | 236 | 237 | 04 238 | 239 | 240 | Borough (suffix) 241 | 242 | 244 | 245 | 246 | 247 | 248 | 249 | 05 250 | 251 | 252 | Census Area (suffix) 253 | 254 | 256 | 257 | 258 | 259 | 260 | 261 | 06 262 | 263 | 264 | County (suffix) 265 | 266 | 268 | 269 | 270 | 271 | 272 | 273 | 07 274 | 275 | 276 | District (suffix) 277 | 278 | 280 | 281 | 282 | 283 | 284 | 285 | 10 286 | 287 | 288 | Island (suffix) 289 | 290 | 292 | 293 | 294 | 295 | 296 | 297 | 12 298 | 299 | 300 | Municipality (suffix) 301 | 302 | 304 | 305 | 306 | 307 | 308 | 309 | 13 310 | 311 | 312 | Municipio (suffix) 313 | 314 | 316 | 317 | 318 | 319 | 320 | 321 | 15 322 | 323 | 324 | Parish (suffix) 325 | 326 | 328 | 329 | 330 | 331 | 332 | 333 | 25 334 | 335 | 336 | city (suffix) 337 | 338 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | ALAND 348 | 349 | 350 | Current land area (square meters) 351 | 352 | 353 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | Range Domain Minimum: 0 366 | Range Domain Maximum: 9,999,999,999,999 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | AWATER 376 | 377 | 378 | Current water area (square meters) 379 | 380 | 381 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | Range Domain Minimum: 0 394 | Range Domain Maximum: 9,999,999,999,999 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | -------------------------------------------------------------------------------- /data/cb_2015_us_county_20m/cb_2015_us_county_20m.shp.iso.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | cb_2015_us_county_20m.shp.iso.xml 9 | 10 | 11 | eng 12 | 13 | 14 | UTF-8 17 | 18 | 19 | 21 | dataset 22 | 23 | 24 | 26 | 27 | 2016-03 28 | 29 | 30 | ISO 19115 Geographic Information - Metadata 31 | 32 | 33 | 2009-02-15 34 | 35 | 36 | http://www2.census.gov/geo/tiger/GENZ2015/shp 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 47 | complex 48 | 49 | 50 | 3220 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | INCITS (formerly FIPS) codes 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 2015 Cartographic Boundary File, State-County for United States, 1:20,000,000 76 | 77 | 78 | 79 | 80 | 81 | 201603 82 | 83 | 84 | publication 87 | 88 | 89 | 90 | 92 | 93 | 94 | 95 | The 2015 cartographic boundary shapefiles are simplified representations of selected geographic areas from the U.S. Census Bureau's Master Address File / Topologically Integrated Geographic Encoding and Referencing (MAF/TIGER) Database (MTDB). These boundary files are specifically designed for small-scale thematic mapping. When possible, generalization is performed with the intent to maintain the hierarchical relationships among geographies and to maintain the alignment of geographies within a file set for a given year. Geographic areas may not align with the same areas from another year. Some geographies are available as nation-based files while others are available only as state-based files. 96 | 97 | The primary legal divisions of most states are termed counties. In Louisiana, these divisions are known as parishes. In Alaska, which has no counties, the equivalent entities are the organized boroughs, city and boroughs, municipalities, and for the unorganized area, census areas. The latter are delineated cooperatively for statistical purposes by the State of Alaska and the Census Bureau. In four states (Maryland, Missouri, Nevada, and Virginia), there are one or more incorporated places that are independent of any county organization and thus constitute primary divisions of their states. These incorporated places are known as independent cities and are treated as equivalent entities for purposes of data presentation. The District of Columbia and Guam have no primary divisions, and each area is considered an equivalent entity for purposes of data presentation. The Census Bureau treats the following entities as equivalents of counties for purposes of data presentation: Municipios in Puerto Rico, Districts and Islands in American Samoa, Municipalities in the Commonwealth of the Northern Mariana Islands, and Islands in the U.S. Virgin Islands. The entire area of the United States, Puerto Rico, and the Island Areas is covered by counties or equivalent entities. 98 | 99 | 100 | These files were specifically created to support small-scale thematic mapping. To improve the appearance of shapes at small scales, areas are represented with fewer vertices than detailed TIGER/Line Shapefiles. Cartographic boundary files take up less disk space than their ungeneralized counterparts. Cartographic boundary files take less time to render on screen than TIGER/Line Shapefiles. You can join this file with table data downloaded from American FactFinder by using the AFFGEOID field in the cartographic boundary file. If detailed boundaries are required, please use the TIGER/Line Shapefiles instead of the generalized cartographic boundary files. 101 | 102 | 103 | 105 | completed 106 | 107 | 108 | 110 | 111 | 112 | 113 | 116 | notPlanned 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | Boundaries 125 | 126 | 127 | theme 130 | 131 | 132 | 133 | 134 | ISO 19115 Topic Categories 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 2015 145 | 146 | 147 | SHP 148 | 149 | 150 | Borough 151 | 152 | 153 | Cartographic Boundary 154 | 155 | 156 | Census Area 157 | 158 | 159 | City 160 | 161 | 162 | City and Borough 163 | 164 | 165 | County 166 | 167 | 168 | County equivalent 169 | 170 | 171 | District 172 | 173 | 174 | Generalized 175 | 176 | 177 | Independent City 178 | 179 | 180 | Island 181 | 182 | 183 | Municipality 184 | 185 | 186 | Municipio 187 | 188 | 189 | Parish 190 | 191 | 192 | State 193 | 194 | 195 | theme 198 | 199 | 200 | 201 | 202 | None 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | United States 213 | 214 | 215 | US 216 | 217 | 218 | place 221 | 222 | 223 | 224 | 225 | ANSI INCITS 38:2009 (Formerly FIPS 5-2), ANSI INCITS 31:2009 (Formerly FIPS 6-4),ANSI INCITS 454:2009 (Formerly FIPS 8-6), ANSI INCITS 455:2009(Formerly FIPS 9-1), ANSI INCITS 446:2008 (Geographic Names Information System (GNIS)) 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | otherRestrictions 238 | 239 | 240 | 243 | 244 | 245 | Access Constraints: None 246 | 247 | 248 | Use Constraints:The intended display scale for this file is 1:20,000,000. This file should not be displayed at scales larger than 1:20,000,000. 249 | 250 | These products are free to use in a product or publication, however acknowledgement must be given to the U.S. Census Bureau as the source. The boundary information is for visual display at appropriate small scales only. Cartographic boundary files should not be used for geographic analysis including area or perimeter calculation. Files should not be used for geocoding addresses. Files should not be used for determining precise geographic area relationships. 251 | 252 | 253 | 254 | 255 | 256 | 257 | vector 259 | 260 | 261 | eng 262 | 263 | 264 | UTF-8 267 | 268 | 269 | The cartographic boundary files contain geographic data only and do not include display mapping software or statistical data. For information on how to use cartographic boundary file data with specific software package users shall contact the company that produced the software. 270 | 271 | 272 | 273 | 274 | 275 | 276 | -179.174265 277 | 278 | 279 | 179.773922 280 | 281 | 282 | 17.913769 283 | 284 | 285 | 71.352561 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | publication date 294 | 2016-03 295 | 2016-03 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | true 309 | 310 | 311 | 312 | 313 | Feature Catalog for the 2015 State-County 1:20,000,000 Cartographic Boundary File 314 | 315 | 316 | 317 | 318 | 319 | 322 | 323 | 324 | 325 | 326 | http://meta.geo.census.gov/data/existing/decennial/GEO/CPMB/boundary/2014gz/county_20m/2014_county_20m.ea.iso.xml 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | SHP 338 | 339 | 340 | 341 | The cartographic boundary files contain geographic data only and do not include display mapping software or statistical data. For information on how to use cartographic boundary file data with specific software package users shall contact the company that produced the software. 342 | 343 | 344 | 345 | 346 | 347 | 348 | html 349 | 350 | 351 | 352 | 353 | 354 | 355 | 357 | 358 | 359 | 360 | The online cartographic boundary files may be downloaded without charge. 361 | 362 | 363 | To obtain more information about ordering Cartographic Boundary Files visit http://www.census.gov/geo/www/tiger. 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | http://www2.census.gov/geo/tiger/GENZ2015/shp/cb_2015_us_county_20m.zip 375 | 376 | 377 | Shapefile Zip File 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | http://www.census.gov/geo/maps-data/data/tiger-cart-boundary.html 389 | 390 | 391 | Cartographic Boundary Shapefiles 392 | 393 | 394 | Simplified representations of selected geographic areas from the Census Bureau's MAF/TIGER geographic database 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | dataset 410 | 411 | 412 | 413 | 414 | 415 | 416 | Horizontal Positional Accuracy 417 | 418 | 419 | 420 | 421 | 422 | Data are not accurate. Data are generalized representations of geographic boundaries at 1:20,000,000. 423 | 424 | 425 | 426 | 427 | 428 | meters 429 | 430 | 431 | 432 | 433 | Missing 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | The cartographic boundary files are generalized representations of extracts taken from the MAF/TIGER Database. Generalized boundary files are clipped to a simplified version of the U.S. outline. As a result, some off-shore areas may be excluded from the generalized files. Some small geographic areas, holes, or discontiguous parts of areas may not be included in generalized files if they are not visible at the target scale. 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | The Census Bureau performed automated tests to ensure logical consistency of the source database. Segments making up the outer and inner boundaries of a polygon tie end-to-end to completely enclose the area. All polygons were tested for closure. The Census Bureau uses its internally developed geographic update system to enhance and modify spatial and attribute data in the Census MAF/TIGER database. Standard geographic codes, such as INCITS (formerly FIPS) codes for states, counties, municipalities, county subdivisions, places, American Indian/Alaska Native/Native Hawaiian areas, and congressional districts are used when encoding spatial entities. The Census Bureau performed spatial data tests for logical consistency of the codes during the compilation of the original Census MAF/TIGER database files. Feature attribute information has been examined but has not been fully tested for consistency. 456 | 457 | For the cartographic boundary files, the Point and Vector Object Count for the G-polygon SDTS Point and Vector Object Type reflects the number of records in the file's data table. For multi-polygon features, only one attribute record exists for each multi-polygon rather than one attribute record per individual G-polygon component of the multi-polygon feature. Cartographic Boundary File multi-polygons are an exception to the G-polygon object type classification. Therefore, when multi-polygons exist in a file, the object count will be less than the actual number of G-polygons. 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | Spatial data were extracted from the MAF/TIGER database and processed through a U.S. Census Bureau batch generalization system. 468 | 469 | 470 | 2016-03-01T00:00:00 471 | 472 | 473 | 474 | 475 | Geo-spatial Relational Database 476 | 477 | 478 | 479 | 480 | Census MAF/TIGER database 481 | 482 | 483 | MAF/TIGER 484 | 485 | 486 | 487 | 488 | 20150101 489 | 490 | 491 | The dates describe the effective date of 2015 cartographic boundaries. 494 | 495 | 496 | 497 | 498 | 499 | 500 | U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch 501 | 502 | 503 | originator 505 | 506 | 507 | 508 | 509 | 510 | Source Contribution: All spatial and feature data 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 528 | notPlanned 529 | 530 | 531 | 532 | This was transformed from the Census Metadata Import Format 533 | 534 | 536 | 537 | 538 | -------------------------------------------------------------------------------- /data/cb_2015_us_county_20m/cb_2015_us_county_20m.shp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Cartographic Products and Services Branch 7 | 201603 8 | 2015 Cartographic Boundary File, State-County for United States, 1:20,000,000 9 | vector digital data 10 | 11 | Cartographic Boundary Files 12 | 2015 13 | 14 | http://www2.census.gov/geo/tiger/GENZ2015/shp/cb_2015_us_county_20m.zip 15 | 16 | 17 | 18 | The 2015 cartographic boundary shapefiles are simplified representations of selected geographic areas from the U.S. Census Bureau's Master Address File / Topologically Integrated Geographic Encoding and Referencing (MAF/TIGER) Database (MTDB). These boundary files are specifically designed for small-scale thematic mapping. When possible, generalization is performed with the intent to maintain the hierarchical relationships among geographies and to maintain the alignment of geographies within a file set for a given year. Geographic areas may not align with the same areas from another year. Some geographies are available as nation-based files while others are available only as state-based files. 19 | 20 | The primary legal divisions of most states are termed counties. In Louisiana, these divisions are known as parishes. In Alaska, which has no counties, the equivalent entities are the organized boroughs, city and boroughs, municipalities, and for the unorganized area, census areas. The latter are delineated cooperatively for statistical purposes by the State of Alaska and the Census Bureau. In four states (Maryland, Missouri, Nevada, and Virginia), there are one or more incorporated places that are independent of any county organization and thus constitute primary divisions of their states. These incorporated places are known as independent cities and are treated as equivalent entities for purposes of data presentation. The District of Columbia and Guam have no primary divisions, and each area is considered an equivalent entity for purposes of data presentation. The Census Bureau treats the following entities as equivalents of counties for purposes of data presentation: Municipios in Puerto Rico, Districts and Islands in American Samoa, Municipalities in the Commonwealth of the Northern Mariana Islands, and Islands in the U.S. Virgin Islands. The entire area of the United States, Puerto Rico, and the Island Areas is covered by counties or equivalent entities. 21 | These files were specifically created to support small-scale thematic mapping. To improve the appearance of shapes at small scales, areas are represented with fewer vertices than detailed TIGER/Line Shapefiles. Cartographic boundary files take up less disk space than their ungeneralized counterparts. Cartographic boundary files take less time to render on screen than TIGER/Line Shapefiles. You can join this file with table data downloaded from American FactFinder by using the AFFGEOID field in the cartographic boundary file. If detailed boundaries are required, please use the TIGER/Line Shapefiles instead of the generalized cartographic boundary files. 22 | 23 | 24 | 25 | 26 | 201603 27 | 201603 28 | 29 | 30 | publication date 31 | 32 | 33 | Complete 34 | None planned. No changes or updates will be made to this version of the cartographic boundary files. New versions of the cartographic boundary files will be produced on an annual release schedule. Types of geography released may vary from year to year. 35 | 36 | 37 | 38 | -179.174265 39 | 179.773922 40 | 71.352561 41 | 17.913769 42 | 43 | 44 | 45 | 46 | ISO 19115 Topic Categories 47 | Boundaries 48 | 49 | 50 | None 51 | 2015 52 | SHP 53 | Borough 54 | Cartographic Boundary 55 | Census Area 56 | City 57 | City and Borough 58 | County 59 | County equivalent 60 | District 61 | Generalized 62 | Independent City 63 | Island 64 | Municipality 65 | Municipio 66 | Parish 67 | State 68 | 69 | 70 | ANSI INCITS 38:2009 (Formerly FIPS 5-2), ANSI INCITS 31:2009 (Formerly FIPS 6-4),ANSI INCITS 454:2009 (Formerly FIPS 8-6), ANSI INCITS 455:2009(Formerly FIPS 9-1), ANSI INCITS 446:2008 (Geographic Names Information System (GNIS)) 71 | United States 72 | US 73 | 74 | 75 | None 76 | The intended display scale for this file is 1:20,000,000. This file should not be displayed at scales larger than 1:20,000,000. 77 | 78 | These products are free to use in a product or publication, however acknowledgement must be given to the U.S. Census Bureau as the source. The boundary information is for visual display at appropriate small scales only. Cartographic boundary files should not be used for geographic analysis including area or perimeter calculation. Files should not be used for geocoding addresses. Files should not be used for determining precise geographic area relationships. 79 | 80 | 81 | 82 | 83 | U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch 84 | 85 | 86 | mailing 87 |
4600 Silver Hill Road
88 | Washington 89 | DC 90 | 20233-7400 91 | United States 92 |
93 | 301.763.1128 94 | 301.763.4710 95 | geo.geography@census.gov 96 |
97 |
98 |
99 | 100 | 101 | Accurate against American National Standards Institute (ANSI) Publication INCITS 446-2008 (Geographic Names Information System (GNIS)) at the 100% level for the codes and base names present in the file. The remaining attribute information has been examined but has not been fully tested for accuracy. 102 | 103 | The Census Bureau performed automated tests to ensure logical consistency of the source database. Segments making up the outer and inner boundaries of a polygon tie end-to-end to completely enclose the area. All polygons were tested for closure. The Census Bureau uses its internally developed geographic update system to enhance and modify spatial and attribute data in the Census MAF/TIGER database. Standard geographic codes, such as INCITS (formerly FIPS) codes for states, counties, municipalities, county subdivisions, places, American Indian/Alaska Native/Native Hawaiian areas, and congressional districts are used when encoding spatial entities. The Census Bureau performed spatial data tests for logical consistency of the codes during the compilation of the original Census MAF/TIGER database files. Feature attribute information has been examined but has not been fully tested for consistency. 104 | 105 | For the cartographic boundary files, the Point and Vector Object Count for the G-polygon SDTS Point and Vector Object Type reflects the number of records in the file's data table. For multi-polygon features, only one attribute record exists for each multi-polygon rather than one attribute record per individual G-polygon component of the multi-polygon feature. Cartographic Boundary File multi-polygons are an exception to the G-polygon object type classification. Therefore, when multi-polygons exist in a file, the object count will be less than the actual number of G-polygons. 106 | The cartographic boundary files are generalized representations of extracts taken from the MAF/TIGER Database. Generalized boundary files are clipped to a simplified version of the U.S. outline. As a result, some off-shore areas may be excluded from the generalized files. Some small geographic areas, holes, or discontiguous parts of areas may not be included in generalized files if they are not visible at the target scale. 107 | 108 | 109 | Data are not accurate. Data are generalized representations of geographic boundaries at 1:20,000,000. 110 | 111 | 112 | 113 | 114 | 115 | 116 | U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch 117 | unpublished material 118 | Census MAF/TIGER database 119 | 120 | 121 | Geo-spatial Relational Database 122 | 123 | 124 | 125 | 20150101 126 | 20150101 127 | 128 | 129 | The dates describe the effective date of 2015 cartographic boundaries. 130 | 131 | MAF/TIGER 132 | All spatial and feature data 133 | 134 | 135 | Spatial data were extracted from the MAF/TIGER database and processed through a U.S. Census Bureau batch generalization system. 136 | MAF/TIGER 137 | 201603 138 | 139 | 140 | 141 | 142 | INCITS (formerly FIPS) codes 143 | Vector 144 | 145 | 146 | G-polygon 147 | 3220 148 | 149 | 150 | 151 | 152 | 153 | 154 | 0.000458 155 | 0.000458 156 | Decimal degrees 157 | 158 | 159 | North American Datum of 1983 160 | Geodetic Reference System 80 161 | 6378137.000000 162 | 298.257222 163 | 164 | 165 | 166 | 167 | 168 | 169 | cb_2015_us_county_20m.shp 170 | Current County and Equivalent National entities 171 | U.S. Census Bureau 172 | 173 | 174 | STATEFP 175 | Current state Federal Information Processing Series (FIPS) code 176 | U.S. Census Bureau 177 | 178 | 179 | National Standard Codes (ANSI INCITS 38-2009), Federal Information Processing Series (FIPS) - States/State Equivalents 180 | U.S. Census Bureau 181 | 182 | 183 | 184 | 185 | COUNTYFP 186 | Current county Federal Information Processing Series (FIPS) code 187 | U.S. Census Bureau 188 | 189 | 190 | National Standard Codes (ANSI INCITS 31-2009), Federal Information Processing Series (FIPS) - Counties/County Equivalents 191 | U.S. Census Bureau 192 | 193 | 194 | 195 | 196 | COUNTYNS 197 | Current county Geographic Names Information System (GNIS) code 198 | U.S. Census Bureau 199 | 200 | 201 | INCITS 446:2008 (Geographic Names Information System (GNIS)), Identifying Attributes for Named Physical and Cultural Geographic Features (Except Roads and Highways) of the United States, Its Territories, Outlying Areas, and Freely Associated Areas, and the Waters of the Same to the Limit of the Twelve-Mile Statutory Zone 202 | U.S. Geological Survey (USGS) 203 | 204 | 205 | 206 | 207 | AFFGEOID 208 | American FactFinder summary level code + geovariant code + '00US' + GEOID 209 | U.S. Census Bureau 210 | 211 | 212 | American FactFinder geographic identifier 213 | U.S. Census Bureau 214 | 215 | 216 | 217 | 218 | GEOID 219 | County identifier; a concatenation of current state Federal Information Processing Series (FIPS) code and county FIPS code 220 | U.S. Census Bureau 221 | 222 | The GEOID attribute is a concatenation of the state FIPS code followed by the county FIPS code. No spaces are allowed between the two codes. The state FIPS code is taken from "National Standard Codes (ANSI INCITS 38-2009), Federal Information Processing Series (FIPS) - States". The county FIPS code is taken from "National Standard Codes (ANSI INCITS 31-2009), Federal Information Processing Series (FIPS) - Counties/County Equivalents". 223 | 224 | 225 | 226 | NAME 227 | Current county name 228 | U.S. Census Bureau 229 | 230 | 231 | National Standard Codes (ANSI INCITS 31-2009), Federal Information Processing Series (FIPS) - Counties/County Equivalents 232 | U.S. Census Bureau 233 | 234 | 235 | 236 | 237 | LSAD 238 | Current legal/statistical area description code for county 239 | U.S. Census Bureau 240 | 241 | 242 | 00 243 | Blank 244 | U.S. Census Bureau 245 | 246 | 247 | 248 | 249 | 03 250 | City and Borough (suffix) 251 | U.S. Census Bureau 252 | 253 | 254 | 255 | 256 | 04 257 | Borough (suffix) 258 | U.S. Census Bureau 259 | 260 | 261 | 262 | 263 | 05 264 | Census Area (suffix) 265 | U.S. Census Bureau 266 | 267 | 268 | 269 | 270 | 06 271 | County (suffix) 272 | U.S. Census Bureau 273 | 274 | 275 | 276 | 277 | 07 278 | District (suffix) 279 | U.S. Census Bureau 280 | 281 | 282 | 283 | 284 | 10 285 | Island (suffix) 286 | U.S. Census Bureau 287 | 288 | 289 | 290 | 291 | 12 292 | Municipality (suffix) 293 | U.S. Census Bureau 294 | 295 | 296 | 297 | 298 | 13 299 | Municipio (suffix) 300 | U.S. Census Bureau 301 | 302 | 303 | 304 | 305 | 15 306 | Parish (suffix) 307 | U.S. Census Bureau 308 | 309 | 310 | 311 | 312 | 25 313 | city (suffix) 314 | U.S. Census Bureau 315 | 316 | 317 | 318 | 319 | ALAND 320 | Current land area (square meters) 321 | U.S. Census Bureau 322 | 323 | 324 | 0 325 | 9,999,999,999,999 326 | square meters 327 | 328 | 329 | 330 | 331 | AWATER 332 | Current water area (square meters) 333 | U.S. Census Bureau 334 | 335 | 336 | 0 337 | 9,999,999,999,999 338 | square meters 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch 349 | 350 | 351 | mailing 352 |
4600 Silver Hill Road
353 | Washington 354 | DC 355 | 20233-7400 356 | United States 357 |
358 | 301.763.1128 359 | 301.763.4710 360 | geo.geography@census.gov 361 |
362 |
363 | No warranty, expressed or implied is made with regard to the accuracy of these data, and no liability is assumed by the U.S. Government in general or the U.S. Census Bureau in specific as to the spatial or attribute accuracy of the data. The act of distribution shall not constitute any such warranty and no responsibility is assumed by the U.S. government in the use of these files. The boundary information is for small-scale mapping purposes only; boundary depiction and designation for small-scale mapping purposes do not constitute a determination of jurisdictional authority or rights of ownership or entitlement and they are not legal land descriptions. 364 | 365 | 366 | 367 | SHP 368 | PK-ZIP, version 1.93A or higher 369 | 370 | 371 | 372 | 373 | 374 | http://www2.census.gov/geo/tiger/GENZ2015/shp/cb_2015_us_county_20m.zip 375 | 376 | 377 | 378 | 379 | 380 | The online cartographic boundary files may be downloaded without charge. 381 | To obtain more information about ordering Cartographic Boundary Files visit http://www.census.gov/geo/www/tiger. 382 | 383 | The cartographic boundary files contain geographic data only and do not include display mapping software or statistical data. For information on how to use cartographic boundary file data with specific software package users shall contact the company that produced the software. 384 |
385 | 386 | 201603 387 | 388 | 389 | 390 | U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch 391 | 392 | 393 | mailing 394 |
4600 Silver Hill Road
395 | Washington 396 | DC 397 | 20233-7400 398 | United States 399 |
400 | 301.763.1128 401 | 301.763.4710 402 | geo.geography@census.gov 403 |
404 |
405 | Content Standard for Digital Geospatial Metadata 406 | FGDC-STD-001-1998 407 |
408 |
-------------------------------------------------------------------------------- /data/cb_2015_us_county_20m/cb_2015_us_county_20m.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/data/cb_2015_us_county_20m/cb_2015_us_county_20m.shx -------------------------------------------------------------------------------- /data/projections/epsg_4326.txt: -------------------------------------------------------------------------------- 1 | GEOGCS["WGS84",DATUM["WGS_1984",SPHEROID["WGS84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"] 2 | -------------------------------------------------------------------------------- /fetchdata.py: -------------------------------------------------------------------------------- 1 | import requests 2 | from shutil import unpack_archive 3 | from pathlib import Path 4 | URL = 'http://apps.sfgov.org/datafiles/view.php?file=sfgis/bayarea_zipcodes.zip' 5 | DDIR = Path('data', Path(URL).stem) 6 | DDIR.mkdir(parents=True, exist_ok=True) 7 | ZIP_PATH = DDIR.joinpath(Path(URL).name) 8 | 9 | resp = requests.get(URL) 10 | with ZIP_PATH.open('wb') as zf: 11 | zf.write(resp.content) 12 | # unpack it 13 | unpack_archive(str(ZIP_PATH), extract_dir=str(DDIR)) 14 | -------------------------------------------------------------------------------- /notebooks/assets/simple-quakes-bay-counties-zips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/notebooks/assets/simple-quakes-bay-counties-zips.png -------------------------------------------------------------------------------- /notebooks/notebookdata/bayarea_zipcodes.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/notebooks/notebookdata/bayarea_zipcodes.zip -------------------------------------------------------------------------------- /notebooks/notebookdata/cb_2015_us_county_5m.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dannguyen/gis-geospatial-fun-python3x/a5da0955ff08ee90ea79626b19cb96c843e3df0c/notebooks/notebookdata/cb_2015_us_county_5m.zip -------------------------------------------------------------------------------- /plot_ca_census.py: -------------------------------------------------------------------------------- 1 | # http://basemaptutorial.readthedocs.io/en/latest/shapefile.html 2 | 3 | from mpl_toolkits.basemap import Basemap 4 | from pathlib import Path 5 | import matplotlib.pyplot as plt 6 | SHPFILE_PATH = Path('data', 'cb_2015_06_tract_500k', 'cb_2015_06_tract_500k' ) 7 | 8 | map = Basemap(llcrnrlon=-124.48, urcrnrlon=-114.13, 9 | llcrnrlat=32.53, urcrnrlat=42.01, 10 | resolution='i', projection='tmerc', 11 | lat_0 = 32, lon_0 = -120) 12 | map.drawmapboundary(color='#333333', fill_color='aqua') 13 | map.fillcontinents(color='#ddaa66',lake_color='aqua') 14 | map.readshapefile(str(SHPFILE_PATH), 'stuff') 15 | plt.show() 16 | -------------------------------------------------------------------------------- /plot_census_counties.py: -------------------------------------------------------------------------------- 1 | """ 2 | Plot U.S. Census Shapefiles using Albers Equal Area 3 | 4 | https://www.census.gov/geo/maps-data/data/cbf/cbf_counties.html 5 | http://matplotlib.org/basemap/users/aea.html 6 | http://gis.stackexchange.com/questions/141580/which-projection-is-best-for-mapping-the-contiguous-united-states/142093 7 | """ 8 | 9 | 10 | from pathlib import Path 11 | from shutil import unpack_archive 12 | import requests 13 | from mpl_toolkits.basemap import Basemap 14 | import matplotlib.pyplot as plt 15 | IMG_PATH = Path('assets', 'images', 'census-counties-20m.png') 16 | 17 | SHPFILE_URL = 'http://www2.census.gov/geo/tiger/GENZ2015/shp/cb_2015_us_county_20m.zip' 18 | SHPFILE_ZIPPATH = Path('data', Path(SHPFILE_URL).name) 19 | SHPFILE_NAME = Path('data', SHPFILE_ZIPPATH.stem, SHPFILE_ZIPPATH.stem) 20 | SHPFILE_PATH = Path('data', SHPFILE_ZIPPATH.stem, SHPFILE_ZIPPATH.stem + '.shp') 21 | 22 | SHPFILE_DIR = SHPFILE_PATH.parent 23 | if not SHPFILE_PATH.exists(): 24 | print("Can't find", SHPFILE_PATH) 25 | print("Downloading", SHPFILE_URL) 26 | SHPFILE_DIR.mkdir(parents=True, exist_ok=True) 27 | resp = requests.get(SHPFILE_URL) 28 | with SHPFILE_ZIPPATH.open('wb') as w: 29 | w.write(resp.content) 30 | 31 | unpack_archive(str(SHPFILE_ZIPPATH), extract_dir=str(SHPFILE_DIR)) 32 | 33 | 34 | fig, ax = plt.subplots() 35 | map = Basemap(ax=ax, projection='aea', 36 | llcrnrlon=-120, urcrnrlon=-62, 37 | llcrnrlat=21.5, urcrnrlat=50, 38 | lat_1=29.5, lat_2=45.5, lon_0=-96, lat_0=37.5) 39 | map.drawmapboundary(fill_color='#34ACAF') 40 | map.fillcontinents(color='#AA0078',lake_color='#34ACAF') 41 | map.readshapefile(str(SHPFILE_NAME), 'stuff', linewidth=0.4, color="magenta") 42 | ax.set_title("U.S. Census County Shapefile w/ Albers Equal Area Projection") 43 | fig.savefig(str(IMG_PATH)) 44 | -------------------------------------------------------------------------------- /samples/pyproj_blog_itm_wgs-example.py: -------------------------------------------------------------------------------- 1 | # Code comes from: 2 | # https://glenbambrick.com/2016/01/24/reproject-shapefile/ 3 | import shapefile 4 | from pyproj import Proj, transform 5 | 6 | # function to create .prj file 7 | def getWKT_PRJ (epsg_code): 8 | import urllib 9 | wkt = urllib.urlopen("http://spatialreference.org/ref/epsg/{0}/prettywkt/".format(epsg_code)) 10 | remove_spaces = wkt.read().replace(" ","") 11 | output = remove_spaces.replace("\n", "") 12 | return output 13 | 14 | # working folder 15 | shp_folder = "C:/blog/pyproj/shp/" 16 | 17 | # Shapefile Reader to access data from original file. 18 | shpf = shapefile.Reader(shp_folder + "Ireland_LA.shp") 19 | 20 | # Shapefile Writer to add data to new file 21 | wgs_shp = shapefile.Writer(shapefile.POLYGON) 22 | 23 | # access the fields information of the original file. 24 | fields = shpf.fields 25 | 26 | # access to the fields to create in new file 27 | wgs_fields = wgs_shp.fields 28 | 29 | # grab the name of fields and data types 30 | for name in fields: 31 | if type(name) == "tuple": 32 | continue 33 | else: 34 | args = name 35 | wgs_shp.field(*args) 36 | 37 | # access the records of the original file. 38 | records = shpf.records() 39 | 40 | for row in records: 41 | args = row 42 | wgs_shp.record(*args) 43 | 44 | # set the input projection of the original file. 45 | input_projection = Proj(init="epsg:29902") 46 | # set the projection for the output file. 47 | output_projection = Proj(init="epsg:4326") 48 | 49 | # a refernce to access the geometry of the counties in the original file. 50 | geom = shpf.shapes() 51 | 52 | # for each polygon in the dataset 53 | for feature in geom: 54 | # if there is only one part 55 | if len(feature.parts) == 1: 56 | # create empty list to store all the coordinates 57 | poly_list = [] 58 | # get each coord that makes up the polygon 59 | for coords in feature.points: 60 | x, y = coords[0], coords[1] 61 | # tranform the coord 62 | new_x, new_y = transform(input_projection, output_projection, x, y) 63 | # put the coord into a list structure 64 | poly_coord = [float(new_x), float(new_y)] 65 | # append the coords to the polygon list 66 | poly_list.append(poly_coord) 67 | # add the geometry to the shapefile. 68 | wgs_shp.poly(parts=[poly_list]) 69 | # if there is more than one part to the geometry 70 | else: 71 | # append the total amount of points to the end of the parts list 72 | feature.parts.append(len(feature.points)) 73 | 74 | # enpty list to store all the parts that make up the complete feature 75 | poly_list = [] 76 | 77 | # keep track of the part being added 78 | parts_counter = 0 79 | 80 | # while the parts_counter is less than the amount of parts 81 | while parts_counter < len(feature.parts) - 1: 82 | # keep track of the amount of points added to the feature 83 | coord_count = feature.parts[parts_counter] 84 | # number of points in each part 85 | no_of_points = abs(feature.parts[parts_counter] - feature.parts[parts_counter + 1]) 86 | # create list to hold individual parts - these get added to poly_list[] 87 | part_list = [] 88 | # cut off point for each part 89 | end_point = coord_count + no_of_points 90 | 91 | # loop through each part 92 | while coord_count < end_point: 93 | for coords in feature.points[coord_count:end_point]: 94 | x, y = coords[0], coords[1] 95 | # tranform the coord 96 | new_x, new_y = transform(input_projection, output_projection, x, y) 97 | # put the coord into a list structure 98 | poly_coord = [float(new_x), float(new_y)] 99 | # append the coords to the part list 100 | part_list.append(poly_coord) 101 | coord_count = coord_count + 1 102 | # append the part to the poly_list 103 | poly_list.append(part_list) 104 | parts_counter = parts_counter + 1 105 | # add the geometry to to new file 106 | wgs_shp.poly(parts=poly_list) 107 | 108 | # save the new Shapefile 109 | wgs_shp.save(shp_folder + "Ireland_LA_wgs.shp") 110 | 111 | # generate a prj file. 112 | prj = open(shp_folder + "Ireland_LA_wgs.prj", "w") 113 | epsg = getWKT_PRJ("4326") 114 | prj.write(epsg) 115 | prj.close() 116 | -------------------------------------------------------------------------------- /viz_subplotmaps.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | from mpl_toolkits.basemap import Basemap 3 | import pandas as pd 4 | import matplotlib.pyplot as plt 5 | 6 | DATA_FILENAME = Path('data', 'usgs', 'worldwide-m6-quakes.csv') 7 | OUTPUT_IMGNAME = Path('assets', 'images', 'worldwide-m6-quakes-2000-2015-subplots.png') 8 | quakes = pd.read_csv(str(DATA_FILENAME), parse_dates=['time']) 9 | # probably a better way to get year values 10 | years = quakes['time'].dt.year.sort_values().unique() 11 | 12 | ncol = 3 # hardcoded 13 | nrow = int(len(years) / ncol) 14 | 15 | fig, axlist = plt.subplots(ncol, nrow, figsize=(20, 10), 16 | sharex=True, sharey=True) 17 | 18 | for i in range(ncol): 19 | for j in range(nrow): 20 | n = (i * ncol) + j 21 | yr = years[n] 22 | qdf = quakes[quakes['time'].dt.year == yr] 23 | ax = axlist[i][j] 24 | earthmap = Basemap(ax=ax) 25 | earthmap.drawcoastlines(color='#555566', linewidth=1) 26 | # plot it 27 | ax.scatter(qdf['longitude'], qdf['latitude']) 28 | ax.set_title(str(yr)) 29 | 30 | 31 | fig.savefig(str(OUTPUT_IMGNAME)) 32 | --------------------------------------------------------------------------------