From 065e59c385b09634d164b76dadb8cb7f37988386 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Mon, 19 Feb 2018 12:45:45 -0500 Subject: [PATCH 1/5] remove unnecessary data files in tests and robust data-path searching --- plotly/figure_factory/_county_choropleth.py | 13 +- .../cb_2016_us_county_500k.cpg | 1 - .../cb_2016_us_county_500k.dbf | Bin 527301 -> 527301 bytes .../cb_2016_us_county_500k.prj | 1 - .../cb_2016_us_county_500k.shp | Bin .../cb_2016_us_county_500k.shp.ea.iso.xml | 404 ------------- .../cb_2016_us_county_500k.shp.iso.xml | 539 ------------------ .../cb_2016_us_county_500k.shp.xml | 410 ------------- .../cb_2016_us_county_500k.shx | Bin .../cb_2016_us_state_500k.cpg | 1 - .../cb_2016_us_state_500k.prj | 1 - .../cb_2016_us_state_500k.shp.ea.iso.xml | 335 ----------- .../cb_2016_us_state_500k.shp.iso.xml | 501 ---------------- .../cb_2016_us_state_500k.shp.xml | 329 ----------- .../gz_2010_us_050_00_500k.prj | 1 - .../gz_2010_us_050_00_500k.xml | 229 -------- 16 files changed, 10 insertions(+), 2755 deletions(-) delete mode 100755 plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.cpg mode change 100755 => 100644 plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.dbf delete mode 100755 plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.prj mode change 100755 => 100644 plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shp delete mode 100755 plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shp.ea.iso.xml delete mode 100755 plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shp.iso.xml delete mode 100755 plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shp.xml mode change 100755 => 100644 plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shx delete mode 100755 plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.cpg delete mode 100755 plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.prj delete mode 100755 plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.shp.ea.iso.xml delete mode 100755 plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.shp.iso.xml delete mode 100755 plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.shp.xml delete mode 100755 plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/gz_2010_us_050_00_500k/gz_2010_us_050_00_500k.prj delete mode 100644 plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/gz_2010_us_050_00_500k/gz_2010_us_050_00_500k.xml diff --git a/plotly/figure_factory/_county_choropleth.py b/plotly/figure_factory/_county_choropleth.py index ddf7dfdcc3f..279b4a878fa 100644 --- a/plotly/figure_factory/_county_choropleth.py +++ b/plotly/figure_factory/_county_choropleth.py @@ -4,6 +4,7 @@ import io import numpy as np +import os import pandas as pd import warnings @@ -19,17 +20,23 @@ def _create_us_counties_df(st_to_state_name_dict, state_to_st_dict): # URLS - data_url = 'plotly/package_data/data/' + abs_file_path = os.path.realpath(__file__) + abs_dir_path = os.path.dirname(abs_file_path) + + abs_plotly_dir_path = abs_dir_path[:abs_dir_path.find('/figure_factory')] + abs_data_dir_path = abs_plotly_dir_path + '/package_data/data/' + + print abs_data_dir_path shape_pre2010 = 'gz_2010_us_050_00_500k/gz_2010_us_050_00_500k.shp' - shape_pre2010 = data_url + shape_pre2010 + shape_pre2010 = abs_data_dir_path + shape_pre2010 df_shape_pre2010 = gp.read_file(shape_pre2010) df_shape_pre2010['FIPS'] = (df_shape_pre2010['STATE'] + df_shape_pre2010['COUNTY']) df_shape_pre2010['FIPS'] = pd.to_numeric(df_shape_pre2010['FIPS']) states_path = 'cb_2016_us_state_500k/cb_2016_us_state_500k.shp' - states_path = data_url + states_path + states_path = abs_data_dir_path + states_path # state df df_state = gp.read_file(states_path) diff --git a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.cpg b/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.cpg deleted file mode 100755 index 3ad133c048f..00000000000 --- a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.cpg +++ /dev/null @@ -1 +0,0 @@ -UTF-8 \ No newline at end of file diff --git a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.dbf b/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.dbf old mode 100755 new mode 100644 index 2e11060905764baf9e8bcb5399d96a126d637d56..1ef3b1499fe77072ebe17a325c1c6d4e7c04b6db GIT binary patch delta 39 tcmX>)UE%0-1r}x@CcZ|NRu;xq7N%Af=2jLUo3)jNt(Ap+D+|X#ZUDzx2@e1O delta 39 tcmX>)UE%0-1s3K~X0Aq-Ru;xq7N%Af=2jLUo3)jNt(Ap+D+|X#ZUEB(32y)Z diff --git a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.prj b/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.prj deleted file mode 100755 index 747df588c20..00000000000 --- a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.prj +++ /dev/null @@ -1 +0,0 @@ -GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] \ No newline at end of file diff --git a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shp b/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shp old mode 100755 new mode 100644 diff --git a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shp.ea.iso.xml b/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shp.ea.iso.xml deleted file mode 100755 index 2e87ded9295..00000000000 --- a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shp.ea.iso.xml +++ /dev/null @@ -1,404 +0,0 @@ - - - - Feature Catalog for the 2016 Current County and Equivalent 1:500,000 Cartographic Boundary File - - - The Current County and Equivalent at a scale of 1:500,000 - - - cb_2016_county_500k - - - 2017-03 - - - eng - - - utf8 - - - - - - - cb_2016_us_county_500k.shp - - - Current County and Equivalent (national) - - - false - - - - - - STATEFP - - - Current state Federal Information Processing Series (FIPS) code - - - - - - - National Standard Codes (ANSI INCITS 38-2009), Federal Information Processing Series (FIPS) - States/State Equivalents - - - - - - - - - - COUNTYFP - - - Current county Federal Information Processing Series (FIPS) code - - - - - - - National Standard Codes (ANSI INCITS 31-2009), Federal Information Processing Series (FIPS) - Counties/County Equivalents - - - - - - - - - - COUNTYNS - - - Current county Geographic Names Information System (GNIS) code - - - - - - - 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 - - - - - - - - - - - - - U.S. Geological Survey (USGS) - - - resourceProvider - - - - - - - - - - - - - - - - - - AFFGEOID - - - American FactFinder summary level code + geovariant code + '00US' + GEOID - - - - - - - American FactFinder geographic identifier - - - - - - - - - - GEOID - - - County identifier; a concatenation of current state Federal Information Processing Series (FIPS) code and county FIPS code - - - - - - - - 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". - - - - - - - - - NAME - - - Current county name - - - - - - - National Standard Codes (ANSI INCITS 31-2009), Federal Information Processing Series (FIPS) - Counties/County Equivalents - - - - - - - - - - LSAD - - - Current legal/statistical area description code for county - - - - - - - 00 - - - Blank - - - - - - - - 03 - - - City and Borough (suffix) - - - - - - - - 04 - - - Borough (suffix) - - - - - - - - 05 - - - Census Area (suffix) - - - - - - - - 06 - - - County (suffix) - - - - - - - - 07 - - - District (suffix) - - - - - - - - 10 - - - Island (suffix) - - - - - - - - 12 - - - Municipality (suffix) - - - - - - - - 13 - - - Municipio (suffix) - - - - - - - - 15 - - - Parish (suffix) - - - - - - - - 25 - - - city (suffix) - - - - - - - - - - ALAND - - - Current land area (square meters) - - - - - - - - - - - - - - Range Domain Minimum: 0 - Range Domain Maximum: 9,999,999,999,999 - - - - - - - - - AWATER - - - Current water area (square meters) - - - - - - - - - - - - - - Range Domain Minimum: 0 - Range Domain Maximum: 9,999,999,999,999 - - - - - - - - \ No newline at end of file diff --git a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shp.iso.xml b/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shp.iso.xml deleted file mode 100755 index 6b51576337c..00000000000 --- a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shp.iso.xml +++ /dev/null @@ -1,539 +0,0 @@ - - - - cb_2016_us_county_500k.shp.iso.xml - - - eng - - - UTF-8 - - - -dataset - - - - - 2017-03 - - - ISO 19115 Geographic Information - Metadata - - - 2009-02-15 - - - https://www2.census.gov/geo/tiger/GENZ2016/shp/cb_2016_us_county_500k.zip - - - - - - - - - complex - - - 3233 - - - - - - - - - - - - - INCITS (formerly FIPS) codes - - - - - - - - - - - - 2016 Cartographic Boundary File, Current County and Equivalent for United States, 1:500,000 - - - - - - 2017-03 - - - publication - - - - - - - - - - - - The 2016 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. - -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. - -The generalized boundaries for counties and equivalent entities are based on those as of January 1, 2016, primarily as reported through the Census Bureau's Boundary and Annexation Survey (BAS). - - - 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. - - - - completed - - - - - - - - notPlanned - - - - - - - - Boundaries - - - theme - - - - - ISO 19115 Topic Categories - - - - - - - - - - 2016 - - - SHP - - - Borough - - - Cartographic Boundary - - - Census Area - - - City - - - City and Borough - - - County - - - County equivalent - - - District - - - Generalized - - - Independent City - - - Island - - - Municipality - - - Municipio - - - Parish - - - State - - - theme - - - - - None - - - - - - - - - - United States - - - US - - - place - - - - - ISO 3166 Codes for the representation of names of countries and their subdivisions - - - - - - - - - - - - otherRestrictions - - - - - - Access Constraints: None - - - 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. - -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. - - - - - - - vector - - - - - - - 500000 - - - - - - - eng - - - UTF-8 - - - boundaries - - - 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. - - - - - - - -179.148909 - - - 179.77847 - - - -14.548699 - - - 71.365162 - - - - - - - - publication date - 2017-03 - 2017-03 - - - - - - - - - - - - - true - - - - - Feature Catalog for the 2016 Current County and Equivalent 1:500,000 Cartographic Boundary File - - - - - - - - - - - https://meta.geo.census.gov/data/existing/decennial/GEO/CPMB/boundary/2016cb/county_500k/2016_county_500k.ea.iso.xml - - - - - - - - - - - SHP - - - - PK-ZIP, version 1.93A or higher - - - - - - - HTML - - - - - - - - - - - The online cartographic boundary files may be downloaded without charge. - - - To obtain more information about ordering Cartographic Boundary Files visit https://www.census.gov/geo/www/tiger. - - - - - - - - - - - https://www2.census.gov/geo/tiger/GENZ2016/shp/cb_2016_us_county_500k.zip - - - Shapefile Zip File - - - - - - - - - - - https://www.census.gov/geo/maps-data/data/tiger-cart-boundary.html - - - Cartographic Boundary Shapefiles - - - Simplified representations of selected geographic areas from the Census Bureau's MAF/TIGER geographic database - - - - - - - - - - - - - dataset - - - - - - - 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. - - - - - - - - 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. - - - - - - - - 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. - -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. - - - - - - - - - - Spatial data were extracted from the MAF/TIGER database and processed through a U.S. Census Bureau batch generalization system. - - - 2017-03-01T00:00:00 - - - - - Geo-spatial Relational Database - - - - - Census MAF/TIGER database - - - MAF/TIGER - - - - - 2016-05 - - - - creation - - - - - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch - - - originator - - - - - - Source Contribution: All spatial and feature data - - - - - - - - - - - - - - - - notPlanned - - - - This was transformed from the Census Metadata Import Format - - - - - \ No newline at end of file diff --git a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shp.xml b/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shp.xml deleted file mode 100755 index 79721520dbc..00000000000 --- a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shp.xml +++ /dev/null @@ -1,410 +0,0 @@ - - - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Cartographic Products and Services Branch - 201703 - 2016 Cartographic Boundary File, Current County and Equivalent for United States, 1:500,000 - vector digital data - - Cartographic Boundary Files - 2016 - - https://www2.census.gov/geo/tiger/GENZ2016/shp/cb_2016_us_county_500k.zip - - - - The 2016 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. - -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. - -The generalized boundaries for counties and equivalent entities are based on those as of January 1, 2016, primarily as reported through the Census Bureau's Boundary and Annexation Survey (BAS). - 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. - - - - - 201703 - 201703 - - - publication date - - - Complete - 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. - - - - -179.148909 - 179.77847 - 71.365162 - -14.548699 - - - - - ISO 19115 Topic Categories - Boundaries - - - None - 2016 - SHP - Borough - Cartographic Boundary - Census Area - City - City and Borough - County - County equivalent - District - Generalized - Independent City - Island - Municipality - Municipio - Parish - State - - - ISO 3166 Codes for the representation of names of countries and their subdivisions - United States - US - - - None - The intended display scale for this file is 1:500,000. This file should not be displayed at scales larger than 1:500,000. - -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. - - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch - - - mailing -
4600 Silver Hill Road
- Washington - DC - 20233-7400 - United States -
- 301.763.1128 - 301.763.4710 - geo.geography@census.gov -
-
-
- - - 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. - - 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. - -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. - 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. - - - Data are not accurate. Data are generalized representations of geographic boundaries at 1:500,000. - - - - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch - Unpublished material - Census MAF/TIGER database - - - Geo-spatial Relational Database - - - - 201506 - 201605 - - - The dates describe the effective date of 2016 cartographic boundaries. - - MAF/TIGER - All spatial and feature data - - - Spatial data were extracted from the MAF/TIGER database and processed through a U.S. Census Bureau batch generalization system. - MAF/TIGER - 201703 - - - - - INCITS (formerly FIPS) codes - Vector - - - G-polygon - 3233 - - - - - - - 0.000458 - 0.000458 - Decimal degrees - - - North American Datum of 1983 - Geodetic Reference System 80 - 6378137.000000 - 298.257222 - - - - - - - cb_2016_us_county_500k.shp - Current County and Equivalent (national) - U.S. Census Bureau - - - STATEFP - Current state Federal Information Processing Series (FIPS) code - U.S. Census Bureau - - - National Standard Codes (ANSI INCITS 38-2009), Federal Information Processing Series (FIPS) - States/State Equivalents - U.S. Census Bureau - - - - - COUNTYFP - Current county Federal Information Processing Series (FIPS) code - U.S. Census Bureau - - - National Standard Codes (ANSI INCITS 31-2009), Federal Information Processing Series (FIPS) - Counties/County Equivalents - U.S. Census Bureau - - - - - COUNTYNS - Current county Geographic Names Information System (GNIS) code - U.S. Census Bureau - - - 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 - U.S. Geological Survey (USGS) - - - - - AFFGEOID - American FactFinder summary level code + geovariant code + '00US' + GEOID - U.S. Census Bureau - - - American FactFinder geographic identifier - U.S. Census Bureau - - - - - GEOID - County identifier; a concatenation of current state Federal Information Processing Series (FIPS) code and county FIPS code - U.S. Census Bureau - - 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". - - - - NAME - Current county name - U.S. Census Bureau - - - National Standard Codes (ANSI INCITS 31-2009), Federal Information Processing Series (FIPS) - Counties/County Equivalents - U.S. Census Bureau - - - - - LSAD - Current legal/statistical area description code for county - U.S. Census Bureau - - - 00 - Blank - U.S. Census Bureau - - - - - 03 - City and Borough (suffix) - U.S. Census Bureau - - - - - 04 - Borough (suffix) - U.S. Census Bureau - - - - - 05 - Census Area (suffix) - U.S. Census Bureau - - - - - 06 - County (suffix) - U.S. Census Bureau - - - - - 07 - District (suffix) - U.S. Census Bureau - - - - - 10 - Island (suffix) - U.S. Census Bureau - - - - - 12 - Municipality (suffix) - U.S. Census Bureau - - - - - 13 - Municipio (suffix) - U.S. Census Bureau - - - - - 15 - Parish (suffix) - U.S. Census Bureau - - - - - 25 - city (suffix) - U.S. Census Bureau - - - - - ALAND - Current land area (square meters) - U.S. Census Bureau - - - 0 - 9,999,999,999,999 - square meters - - - - - AWATER - Current water area (square meters) - U.S. Census Bureau - - - 0 - 9,999,999,999,999 - square meters - - - - - - - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch - - - mailing -
4600 Silver Hill Road
- Washington - DC - 20233-7400 - United States -
- 301.763.1128 - 301.763.4710 - geo.geography@census.gov -
-
- 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. - - - - SHP - PK-ZIP, version 1.93A or higher - - - - - - https://www2.census.gov/geo/tiger/GENZ2016/shp/cb_2016_us_county_500k.zip - - - - - - The online cartographic boundary files may be downloaded without charge. - To obtain more information about ordering Cartographic Boundary Files visit https://www.census.gov/geo/www/tiger. - - 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. -
- - 201703 - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch - - - mailing -
4600 Silver Hill Road
- Washington - DC - 20233-7400 - United States -
- 301.763.1128 - 301.763.4710 - geo.geography@census.gov -
-
- Content Standard for Digital Geospatial Metadata - FGDC-STD-001-1998 -
-
\ No newline at end of file diff --git a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shx b/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shx old mode 100755 new mode 100644 diff --git a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.cpg b/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.cpg deleted file mode 100755 index 3ad133c048f..00000000000 --- a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.cpg +++ /dev/null @@ -1 +0,0 @@ -UTF-8 \ No newline at end of file diff --git a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.prj b/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.prj deleted file mode 100755 index 747df588c20..00000000000 --- a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.prj +++ /dev/null @@ -1 +0,0 @@ -GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] \ No newline at end of file diff --git a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.shp.ea.iso.xml b/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.shp.ea.iso.xml deleted file mode 100755 index e6da8b1f875..00000000000 --- a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.shp.ea.iso.xml +++ /dev/null @@ -1,335 +0,0 @@ - - - - Feature Catalog for the 2016 Current State and Equivalent 1:500,000 Cartographic Boundary File - - - The Current State and Equivalent at a scale of 1:500,000 - - - cb_2016_state_500k - - - 2017-03 - - - eng - - - utf8 - - - - - - - cb_2016_us_state_500k.shp - - - Current State and Equivalent (national) - - - false - - - - - - STATEFP - - - Current state Federal Information Processing Series (FIPS) code - - - - - - - National Standard Codes (ANSI INCITS 38-2009), Federal Information Processing Series (FIPS) - States/State Equivalents - - - - - - - - - - STATENS - - - Current state Geographic Names Information System (GNIS) code - - - - - - - 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 - - - - - - - - - - - - - U.S. Geological Survey (USGS) - - - resourceProvider - - - - - - - - - - - - - - - - - - AFFGEOID - - - American FactFinder summary level code + geovariant code + '00US' + GEOID - - - - - - - American FactFinder geographic identifier - - - - - - - - - - GEOID - - - State identifier; state FIPS code - - - - - - - National Standard Codes (ANSI INCITS 38-2009), Federal Information Processing Series (FIPS) - States/State Equivalents - - - - - - - - - - STUSPS - - - Current United States Postal Service state abbreviation - - - - - - - - - - - - - - U.S. Postal Service - - - resourceProvider - - - - - - - - - - - - - - Publication 28 - Postal Addressing Standards - - - - - - - - - - - - - U.S. Postal Service - - - resourceProvider - - - - - - - - - - - - - - - - - - NAME - - - Current State name - - - - - - - National Standard Codes (ANSI INCITS 38-2009), Federal Information Processing Series (FIPS) - States/State Equivalents - - - - - - - - - - LSAD - - - Current legal/statistical area description code for state - - - - - - - 00 - - - Blank - - - - - - - - - - ALAND - - - Current land area (square meters) - - - - - - - - - - - - - - Range Domain Minimum: 0 - Range Domain Maximum: 9,999,999,999,999 - - - - - - - - - AWATER - - - Current water area (square meters) - - - - - - - - - - - - - - Range Domain Minimum: 0 - Range Domain Maximum: 9,999,999,999,999 - - - - - - - - \ No newline at end of file diff --git a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.shp.iso.xml b/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.shp.iso.xml deleted file mode 100755 index 4c9ba192b0e..00000000000 --- a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.shp.iso.xml +++ /dev/null @@ -1,501 +0,0 @@ - - - - cb_2016_us_state_500k.shp.iso.xml - - - eng - - - UTF-8 - - - -dataset - - - - - 2017-03 - - - ISO 19115 Geographic Information - Metadata - - - 2009-02-15 - - - https://www2.census.gov/geo/tiger/GENZ2016/shp/cb_2016_us_state_500k.zip - - - - - - - - - complex - - - 56 - - - - - - - - - - - - - INCITS (formerly FIPS) codes - - - - - - - - - - - - 2016 Cartographic Boundary File, Current State and Equivalent for United States, 1:500,000 - - - - - - 2017-03 - - - publication - - - - - - - - - - - - The 2016 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. - -States and equivalent entities are the primary governmental divisions of the United States. In addition to the fifty states, the Census Bureau treats the District of Columbia, Puerto Rico, and each of the Island Areas (American Samoa, the Commonwealth of the Northern Mariana Islands, Guam, and the U.S. Virgin Islands) as the statistical equivalents of states for the purpose of data presentation. - - - 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. - - - - completed - - - - - - - - notPlanned - - - - - - - - Boundaries - - - theme - - - - - ISO 19115 Topic Categories - - - - - - - - - - 2016 - - - SHP - - - Cartographic Boundary - - - Generalized - - - State - - - theme - - - - - None - - - - - - - - - - United States - - - US - - - place - - - - - ISO 3166 Codes for the representation of names of countries and their subdivisions - - - - - - - - - - - - otherRestrictions - - - - - - Access Constraints: None - - - 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. - -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. - - - - - - - vector - - - - - - - 500000 - - - - - - - eng - - - UTF-8 - - - boundaries - - - 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. - - - - - - - -179.148909 - - - 179.77847 - - - -14.548699 - - - 71.365162 - - - - - - - - publication date - 2017-03 - 2017-03 - - - - - - - - - - - - - true - - - - - Feature Catalog for the 2016 Current State and Equivalent 1:500,000 Cartographic Boundary File - - - - - - - - - - - https://meta.geo.census.gov/data/existing/decennial/GEO/CPMB/boundary/2016cb/state_500k/2016_state_500k.ea.iso.xml - - - - - - - - - - - SHP - - - - PK-ZIP, version 1.93A or higher - - - - - - - HTML - - - - - - - - - - - The online cartographic boundary files may be downloaded without charge. - - - To obtain more information about ordering Cartographic Boundary Files visit https://www.census.gov/geo/www/tiger. - - - - - - - - - - - https://www2.census.gov/geo/tiger/GENZ2016/shp/cb_2016_us_state_500k.zip - - - Shapefile Zip File - - - - - - - - - - - https://www.census.gov/geo/maps-data/data/tiger-cart-boundary.html - - - Cartographic Boundary Shapefiles - - - Simplified representations of selected geographic areas from the Census Bureau's MAF/TIGER geographic database - - - - - - - - - - - - - dataset - - - - - - - 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. - - - - - - - - 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. - - - - - - - - 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. - -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. - - - - - - - - - - Spatial data were extracted from the MAF/TIGER database and processed through a U.S. Census Bureau batch generalization system. - - - 2017-03-01T00:00:00 - - - - - Geo-spatial Relational Database - - - - - Census MAF/TIGER database - - - MAF/TIGER - - - - - 2016-05 - - - - creation - - - - - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch - - - originator - - - - - - Source Contribution: All spatial and feature data - - - - - - - - - - - - - - - - notPlanned - - - - This was transformed from the Census Metadata Import Format - - - - - \ No newline at end of file diff --git a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.shp.xml b/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.shp.xml deleted file mode 100755 index a8907fcdf73..00000000000 --- a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.shp.xml +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Cartographic Products and Services Branch - 201703 - 2016 Cartographic Boundary File, Current State and Equivalent for United States, 1:500,000 - vector digital data - - Cartographic Boundary Files - 2016 - - https://www2.census.gov/geo/tiger/GENZ2016/shp/cb_2016_us_state_500k.zip - - - - The 2016 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. - -States and equivalent entities are the primary governmental divisions of the United States. In addition to the fifty states, the Census Bureau treats the District of Columbia, Puerto Rico, and each of the Island Areas (American Samoa, the Commonwealth of the Northern Mariana Islands, Guam, and the U.S. Virgin Islands) as the statistical equivalents of states for the purpose of data presentation. - 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. - - - - - 201703 - 201703 - - - publication date - - - Complete - 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. - - - - -179.148909 - 179.77847 - 71.365162 - -14.548699 - - - - - ISO 19115 Topic Categories - Boundaries - - - None - 2016 - SHP - Cartographic Boundary - Generalized - State - - - ISO 3166 Codes for the representation of names of countries and their subdivisions - United States - US - - - None - The intended display scale for this file is 1:500,000. This file should not be displayed at scales larger than 1:500,000. - -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. - - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch - - - mailing -
4600 Silver Hill Road
- Washington - DC - 20233-7400 - United States -
- 301.763.1128 - 301.763.4710 - geo.geography@census.gov -
-
-
- - - 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. - - 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. - -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. - 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. - - - Data are not accurate. Data are generalized representations of geographic boundaries at 1:500,000. - - - - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch - Unpublished material - Census MAF/TIGER database - - - Geo-spatial Relational Database - - - - 201506 - 201605 - - - The dates describe the effective date of 2016 cartographic boundaries. - - MAF/TIGER - All spatial and feature data - - - Spatial data were extracted from the MAF/TIGER database and processed through a U.S. Census Bureau batch generalization system. - MAF/TIGER - 201703 - - - - - INCITS (formerly FIPS) codes - Vector - - - G-polygon - 56 - - - - - - - 0.000458 - 0.000458 - Decimal degrees - - - North American Datum of 1983 - Geodetic Reference System 80 - 6378137.000000 - 298.257222 - - - - - - - cb_2016_us_state_500k.shp - Current State and Equivalent (national) - U.S. Census Bureau - - - STATEFP - Current state Federal Information Processing Series (FIPS) code - U.S. Census Bureau - - - National Standard Codes (ANSI INCITS 38-2009), Federal Information Processing Series (FIPS) - States/State Equivalents - U.S. Census Bureau - - - - - STATENS - Current state Geographic Names Information System (GNIS) code - U.S. Census Bureau - - - 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 - U.S. Geological Survey (USGS) - - - - - AFFGEOID - American FactFinder summary level code + geovariant code + '00US' + GEOID - U.S. Census Bureau - - - American FactFinder geographic identifier - U.S. Census Bureau - - - - - GEOID - State identifier; state FIPS code - U.S. Census Bureau - - - National Standard Codes (ANSI INCITS 38-2009), Federal Information Processing Series (FIPS) - States/State Equivalents - U.S. Census Bureau - - - - - STUSPS - Current United States Postal Service state abbreviation - U.S. Postal Service - - - Publication 28 - Postal Addressing Standards - U.S. Postal Service - - - - - NAME - Current State name - U.S. Census Bureau - - - National Standard Codes (ANSI INCITS 38-2009), Federal Information Processing Series (FIPS) - States/State Equivalents - U.S. Census Bureau - - - - - LSAD - Current legal/statistical area description code for state - U.S. Census Bureau - - - 00 - Blank - U.S. Census Bureau - - - - - ALAND - Current land area (square meters) - U.S. Census Bureau - - - 0 - 9,999,999,999,999 - square meters - - - - - AWATER - Current water area (square meters) - U.S. Census Bureau - - - 0 - 9,999,999,999,999 - square meters - - - - - - - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch - - - mailing -
4600 Silver Hill Road
- Washington - DC - 20233-7400 - United States -
- 301.763.1128 - 301.763.4710 - geo.geography@census.gov -
-
- 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. - - - - SHP - PK-ZIP, version 1.93A or higher - - - - - - https://www2.census.gov/geo/tiger/GENZ2016/shp/cb_2016_us_state_500k.zip - - - - - - The online cartographic boundary files may be downloaded without charge. - To obtain more information about ordering Cartographic Boundary Files visit https://www.census.gov/geo/www/tiger. - - 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. -
- - 201703 - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division, Geographic Customer Services Branch - - - mailing -
4600 Silver Hill Road
- Washington - DC - 20233-7400 - United States -
- 301.763.1128 - 301.763.4710 - geo.geography@census.gov -
-
- Content Standard for Digital Geospatial Metadata - FGDC-STD-001-1998 -
-
\ No newline at end of file diff --git a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/gz_2010_us_050_00_500k/gz_2010_us_050_00_500k.prj b/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/gz_2010_us_050_00_500k/gz_2010_us_050_00_500k.prj deleted file mode 100755 index 747df588c20..00000000000 --- a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/gz_2010_us_050_00_500k/gz_2010_us_050_00_500k.prj +++ /dev/null @@ -1 +0,0 @@ -GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] \ No newline at end of file diff --git a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/gz_2010_us_050_00_500k/gz_2010_us_050_00_500k.xml b/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/gz_2010_us_050_00_500k/gz_2010_us_050_00_500k.xml deleted file mode 100644 index be10e64c473..00000000000 --- a/plotly/tests/test_optional/test_figure_factory/plotly/package_data/data/gz_2010_us_050_00_500k/gz_2010_us_050_00_500k.xml +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division/Cartographic Products Branch - 2010 - 2010 Cartographic Boundary File, State-County for United States, 1:500,000 - vector digital data - - 2010 Census - Cartographic Boundary File - - http://www2.census.gov/geo/tiger/GENZ2010/ - - - - The 2010 cartographic boundary shapefiles are simplified representations of selected geographic areas from the Census Bureau's MAF/TIGER geographic database. These boundary files are specifically designed for small scale thematic mapping. When possible generalization is performed with 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 shapefiles while others are available only as state-based files. - To improve the appearance of shapes at small scales, areas are represented with fewer vertices than detailed TIGER/Line equivalents. These boundary files take up less disk space than their ungeneralized counterparts. Cartographic boundary files take less time to render on screen. These files were specifically created to support small-scale thematic mapping. - - - - - 201109 - 201109 - - - publication date - - - Complete - None planned. New cartographic boundary files will be produced on an annual release schedule. Types of geography released may vary from year to year. - - - - -167.650000 - -65.221527 - 71.342941 - -14.605210 - - - - - - None - 2010 Census - Cartographic Boundary - Generalized - Shapefile - State - - - ISO 19115 Topic Categories - Boundaries - - - None - - -United States - - -US - - - - None - 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. - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division - - - mailing -
4600 Silver Hill Road
- Washington - DC - 20233-7400 - United States -
- 301.763.1128 - 301.763.4710 - geo.geography@census.gov -
-
- Files were generated by U.S. Census Bureau Linux-based batch generalization software. FME (by Safe Software) was used to convert polygons from Oracle Spatial format into ESRI shapefile format. -
- - - 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. Some entities may have NULL name and/or Legal/Statistical Area Description (LSAD) attribution and this does not imply, in all cases, that the entities do not have names and/or LSADs. The remaining attribute information has been examined but has not been fully tested for accuracy. - - 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 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. - 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 holes or discontiguous parts of areas are not included in generalized files. - - - Data are not accurate. Data are generalized representations of 2010 Census geographic boundaries at 1:500,000. - - - - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division - unpublished material - Master Address File/Topologically Integrated Geographic Encoding and Referencing Database: Final 2010 Tabulation Benchmark (TAB10) - - - Geo-spatial Relational Database - - - - 20100101 - 20100101 - - - The dates describe the effective date of 2010 Census boundaries. - - MAF/TIGER - All spatial and feature data - - - Spatial data were extracted from the MAF/TIGER database and processed through a U.S. Census Bureau batch generalization system. - MAF/TIGER - 201109 - - - - - INCITS (formerly FIPS) codes. - Vector - - - G-polygon - 3221 - - - - - - - 0.000458 - 0.000458 - Decimal degrees - - - North American Datum of 1983 - Geodetic Reference System 80 - 6378137.000000 - 298.257222 - - - - - - The 2010 cartographic boundary polygon shapefiles contain boundary data for a specific type of Census geography. See the U.S. Census Bureau Geographic Terms and Concepts documentation for further explanation of Census geography (http://www.census.gov/geo/www/2010census/GTC_10.pdf). - -Field names, descriptions and data types are listed in this format: FIELD_NAME Description [data value or type]. - -At a miniumum, the following four fields will appear in every file: GEO_ID Unique identifier for a geographic entity [alphanumeric]; LSAD Standard abbreviation translation of Legal/Statistical Area Description (LSAD) code as used on census maps [alpha]; NAME Name without translated Legal/Statistical Area Description (LSAD) [alphanumeric]; CENSUSAREA Area of entity before generalization in square miles [numeric]. The CENSUSAREA field is the calculated area derived from the ungeneralized area of each entity. This field can be used in density calculations. Users should not calculate the area of the generalized polygons for use in any analysis. Use the GEO_ID field to join these spatial tables to 2010 Census data tables. NAME and/or LSAD may be NULL. This does not imply the entities do not have names and/or LSADs but rather the names and/or LSADs may not have been populated for a given file. - -Additional attribution for a shapefile will vary depending on the fields appropriate for a given type of geography. These fields may include: AIANHH American Indian Area/Alaska Native Area/Hawaiian Home Land [4-digit Census code]; AIHHTLI American Indian Trust Land/Hawaiian Home Land Indicator ['R' for reservation, 'T' for off-reservation trust land], AITSCE American Indian Tribal Subdivision [3-digit Census code]; ANRC Alaska Native Regional Corporation [5-digit FIPS code]; BLKGRP Block Group [1-digit Census code]; CBSA Metropolitan Statistical Area/Micropolitan Statistical Area [5-digit FIPS code]; CD Congressional District [2-digit FIPS code]; CNECTA Combined New England City and Town Area [3-digit FIPS code]; CONCIT Consolidated City [5-digit FIPS code]; COUNTY County [3-digit FIPS code]; COUSUB County Subdivision [5-digit FIPS code]; CSA Combined Statistical Area [3-digit Census code]; DIVISION Census Division [1-digit Census code]; METDIV Metropolitan Division [5-digit FIPS code]; NECTA New England City and Town Area [5-digit FIPS code]; NECTADIV New England City and Town Area Division [5-digit FIPS code]; PLACE Place [5-digit FIPS code]; REGION Census Region [1-digit Census code]; SDELM Elementary School District [5-digit Local Education Agency code]; SDSEC Secondary School District [5-digit Local Education Agency code]; SDUNI Unified School District [5-digit Local Education Agency code]; SLDL State Legislative District (Lower Chamber) [alphanumeric]; SLDU State Legislative District (Upper Chamber) [alphanumeric]; STATE State [2-digit FIPS code]; SUBMCD Subminor Civil Division [5-digit FIPS code] TBLKGRP Tribal Block Group [1-digit alphanumeric]; TRACT Tract [6-digit Census code]; TTRACT Tribal Census Tract [6-digit Census code]; VTD Voting District [alphanumeric]; ZCTA5 ZIP Code Tabulation Area [5-digit Census code]. - -Some nation-based files may include Puerto Rico and the Island Areas of the United States. Island areas include American Samoa, Guam, the Commonwealth of the Northern Mariana Islands (Northern Mariana Islands), and the United States Virgin Islands. - http://www.census.gov/geo/www/2010census/GTC_10.pdf - - - - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division - - - mailing -
4600 Silver Hill Road
- Washington - DC - 20233-7400 - United States -
- 301.763.1128 -
-
- 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. - - - - SHP (compressed) - The files were compressed using Linux-based Info-ZIP Zip 2.32. Files can be decompressed with PK-ZIP, version 1.93A or higher, WinZip or other decompression software packages. - - - - - - http://www.census.gov/geo/www/cob/index.html - - - - - - The online cartographic boundary files may be downloaded without charge. - - The cartographic boundary files contain geographic data only and do not include display or mapping software or statistical data. The files are delivered as zipped ESRI Shapefiles. Users are responsible for converting or translating the files into a format used by their specific software packages. -
- - 201109 - - - - U.S. Department of Commerce, U.S. Census Bureau, Geography Division/Cartographic Products Branch - - - mailing -
4600 Silver Hill Road
- Washington - DC - 20233-7400 - United States -
- 301.763.1101 - 301.763.4710 - geo.geography@census.gov -
-
- Content Standard for Digital Geospatial Metadata - FGDC-STD-001-1998 -
-
\ No newline at end of file From 950244084d2c760f6f20d707baf3b022fddbbb3e Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Mon, 19 Feb 2018 12:46:48 -0500 Subject: [PATCH 2/5] pep-8: l -> L variable name --- plotly/figure_factory/_county_choropleth.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plotly/figure_factory/_county_choropleth.py b/plotly/figure_factory/_county_choropleth.py index 279b4a878fa..f79bd8ced56 100644 --- a/plotly/figure_factory/_county_choropleth.py +++ b/plotly/figure_factory/_county_choropleth.py @@ -26,8 +26,6 @@ def _create_us_counties_df(st_to_state_name_dict, state_to_st_dict): abs_plotly_dir_path = abs_dir_path[:abs_dir_path.find('/figure_factory')] abs_data_dir_path = abs_plotly_dir_path + '/package_data/data/' - print abs_data_dir_path - shape_pre2010 = 'gz_2010_us_050_00_500k/gz_2010_us_050_00_500k.shp' shape_pre2010 = abs_data_dir_path + shape_pre2010 df_shape_pre2010 = gp.read_file(shape_pre2010) @@ -645,14 +643,14 @@ def create_choropleth(fips, values, scope=['usa'], binning_endpoints=None, list(np.linspace(0, 1, viri_len)) )[1:-1] - for l in np.linspace(0, 1, len(LEVELS)): + for L in np.linspace(0, 1, len(LEVELS)): for idx, inter in enumerate(viri_intervals): - if l == 0: + if L == 0: break - elif inter[0] < l <= inter[1]: + elif inter[0] < L <= inter[1]: break - intermed = ((l - viri_intervals[idx][0]) / + intermed = ((L - viri_intervals[idx][0]) / (viri_intervals[idx][1] - viri_intervals[idx][0])) float_color = colors.find_intermediate_color( From f2ba9129ebd4f04af3091247400e15358f902fb9 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Mon, 19 Feb 2018 12:50:02 -0500 Subject: [PATCH 3/5] bump version number up --- plotly/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotly/version.py b/plotly/version.py index ba9b91332bd..5cd7abf832e 100644 --- a/plotly/version.py +++ b/plotly/version.py @@ -1 +1 @@ -__version__ = '2.4.0' +__version__ = '2.4.1' From 5818d2b96e389cd2fb658f2fe53c26763886edd8 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Tue, 20 Feb 2018 13:55:19 -0500 Subject: [PATCH 4/5] remove shapefiles from folders and delete folders --- .../cb_2016_us_county_500k.dbf | Bin .../cb_2016_us_county_500k.shp | Bin .../cb_2016_us_county_500k.shx | Bin .../cb_2016_us_state_500k.dbf | Bin .../cb_2016_us_state_500k.shp | Bin .../cb_2016_us_state_500k.shx | Bin .../gz_2010_us_050_00_500k.dbf | Bin .../gz_2010_us_050_00_500k.shp | Bin .../gz_2010_us_050_00_500k.shx | Bin 9 files changed, 0 insertions(+), 0 deletions(-) rename plotly/package_data/data/{cb_2016_us_county_500k => }/cb_2016_us_county_500k.dbf (100%) rename plotly/package_data/data/{cb_2016_us_county_500k => }/cb_2016_us_county_500k.shp (100%) rename plotly/package_data/data/{cb_2016_us_county_500k => }/cb_2016_us_county_500k.shx (100%) rename plotly/package_data/data/{cb_2016_us_state_500k => }/cb_2016_us_state_500k.dbf (100%) rename plotly/package_data/data/{cb_2016_us_state_500k => }/cb_2016_us_state_500k.shp (100%) rename plotly/package_data/data/{cb_2016_us_state_500k => }/cb_2016_us_state_500k.shx (100%) rename plotly/package_data/data/{gz_2010_us_050_00_500k => }/gz_2010_us_050_00_500k.dbf (100%) rename plotly/package_data/data/{gz_2010_us_050_00_500k => }/gz_2010_us_050_00_500k.shp (100%) rename plotly/package_data/data/{gz_2010_us_050_00_500k => }/gz_2010_us_050_00_500k.shx (100%) diff --git a/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.dbf b/plotly/package_data/data/cb_2016_us_county_500k.dbf similarity index 100% rename from plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.dbf rename to plotly/package_data/data/cb_2016_us_county_500k.dbf diff --git a/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shp b/plotly/package_data/data/cb_2016_us_county_500k.shp similarity index 100% rename from plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shp rename to plotly/package_data/data/cb_2016_us_county_500k.shp diff --git a/plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shx b/plotly/package_data/data/cb_2016_us_county_500k.shx similarity index 100% rename from plotly/package_data/data/cb_2016_us_county_500k/cb_2016_us_county_500k.shx rename to plotly/package_data/data/cb_2016_us_county_500k.shx diff --git a/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.dbf b/plotly/package_data/data/cb_2016_us_state_500k.dbf similarity index 100% rename from plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.dbf rename to plotly/package_data/data/cb_2016_us_state_500k.dbf diff --git a/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.shp b/plotly/package_data/data/cb_2016_us_state_500k.shp similarity index 100% rename from plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.shp rename to plotly/package_data/data/cb_2016_us_state_500k.shp diff --git a/plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.shx b/plotly/package_data/data/cb_2016_us_state_500k.shx similarity index 100% rename from plotly/package_data/data/cb_2016_us_state_500k/cb_2016_us_state_500k.shx rename to plotly/package_data/data/cb_2016_us_state_500k.shx diff --git a/plotly/package_data/data/gz_2010_us_050_00_500k/gz_2010_us_050_00_500k.dbf b/plotly/package_data/data/gz_2010_us_050_00_500k.dbf similarity index 100% rename from plotly/package_data/data/gz_2010_us_050_00_500k/gz_2010_us_050_00_500k.dbf rename to plotly/package_data/data/gz_2010_us_050_00_500k.dbf diff --git a/plotly/package_data/data/gz_2010_us_050_00_500k/gz_2010_us_050_00_500k.shp b/plotly/package_data/data/gz_2010_us_050_00_500k.shp similarity index 100% rename from plotly/package_data/data/gz_2010_us_050_00_500k/gz_2010_us_050_00_500k.shp rename to plotly/package_data/data/gz_2010_us_050_00_500k.shp diff --git a/plotly/package_data/data/gz_2010_us_050_00_500k/gz_2010_us_050_00_500k.shx b/plotly/package_data/data/gz_2010_us_050_00_500k.shx similarity index 100% rename from plotly/package_data/data/gz_2010_us_050_00_500k/gz_2010_us_050_00_500k.shx rename to plotly/package_data/data/gz_2010_us_050_00_500k.shx From 6a7e7f2c1be80a386bded418c9a6158e3bf4cdf6 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Tue, 20 Feb 2018 14:24:52 -0500 Subject: [PATCH 5/5] removed data/ folder and modified choropleth code to match file names --- plotly/figure_factory/_county_choropleth.py | 13 ++++++------- .../{data => }/cb_2016_us_county_500k.dbf | Bin .../{data => }/cb_2016_us_county_500k.shp | Bin .../{data => }/cb_2016_us_county_500k.shx | Bin .../{data => }/cb_2016_us_state_500k.dbf | Bin .../{data => }/cb_2016_us_state_500k.shp | Bin .../{data => }/cb_2016_us_state_500k.shx | Bin .../{data => }/gz_2010_us_050_00_500k.dbf | Bin .../{data => }/gz_2010_us_050_00_500k.shp | Bin .../{data => }/gz_2010_us_050_00_500k.shx | Bin 10 files changed, 6 insertions(+), 7 deletions(-) rename plotly/package_data/{data => }/cb_2016_us_county_500k.dbf (100%) rename plotly/package_data/{data => }/cb_2016_us_county_500k.shp (100%) rename plotly/package_data/{data => }/cb_2016_us_county_500k.shx (100%) rename plotly/package_data/{data => }/cb_2016_us_state_500k.dbf (100%) rename plotly/package_data/{data => }/cb_2016_us_state_500k.shp (100%) rename plotly/package_data/{data => }/cb_2016_us_state_500k.shx (100%) rename plotly/package_data/{data => }/gz_2010_us_050_00_500k.dbf (100%) rename plotly/package_data/{data => }/gz_2010_us_050_00_500k.shp (100%) rename plotly/package_data/{data => }/gz_2010_us_050_00_500k.shx (100%) diff --git a/plotly/figure_factory/_county_choropleth.py b/plotly/figure_factory/_county_choropleth.py index f79bd8ced56..cb542064dda 100644 --- a/plotly/figure_factory/_county_choropleth.py +++ b/plotly/figure_factory/_county_choropleth.py @@ -24,30 +24,29 @@ def _create_us_counties_df(st_to_state_name_dict, state_to_st_dict): abs_dir_path = os.path.dirname(abs_file_path) abs_plotly_dir_path = abs_dir_path[:abs_dir_path.find('/figure_factory')] - abs_data_dir_path = abs_plotly_dir_path + '/package_data/data/' + abs_package_data_dir_path = abs_plotly_dir_path + '/package_data/' - shape_pre2010 = 'gz_2010_us_050_00_500k/gz_2010_us_050_00_500k.shp' - shape_pre2010 = abs_data_dir_path + shape_pre2010 + shape_pre2010 = 'gz_2010_us_050_00_500k.shp' + shape_pre2010 = abs_package_data_dir_path + shape_pre2010 df_shape_pre2010 = gp.read_file(shape_pre2010) df_shape_pre2010['FIPS'] = (df_shape_pre2010['STATE'] + df_shape_pre2010['COUNTY']) df_shape_pre2010['FIPS'] = pd.to_numeric(df_shape_pre2010['FIPS']) - states_path = 'cb_2016_us_state_500k/cb_2016_us_state_500k.shp' - states_path = abs_data_dir_path + states_path + states_path = 'cb_2016_us_state_500k.shp' + states_path = abs_package_data_dir_path + states_path # state df df_state = gp.read_file(states_path) df_state = df_state[['STATEFP', 'NAME', 'geometry']] df_state = df_state.rename(columns={'NAME': 'STATE_NAME'}) - county_url = 'plotly/package_data/data/cb_2016_us_county_500k/' filenames = ['cb_2016_us_county_500k.dbf', 'cb_2016_us_county_500k.shp', 'cb_2016_us_county_500k.shx'] for j in range(len(filenames)): - filenames[j] = county_url + filenames[j] + filenames[j] = abs_package_data_dir_path + filenames[j] dbf = io.open(filenames[0], 'rb') shp = io.open(filenames[1], 'rb') diff --git a/plotly/package_data/data/cb_2016_us_county_500k.dbf b/plotly/package_data/cb_2016_us_county_500k.dbf similarity index 100% rename from plotly/package_data/data/cb_2016_us_county_500k.dbf rename to plotly/package_data/cb_2016_us_county_500k.dbf diff --git a/plotly/package_data/data/cb_2016_us_county_500k.shp b/plotly/package_data/cb_2016_us_county_500k.shp similarity index 100% rename from plotly/package_data/data/cb_2016_us_county_500k.shp rename to plotly/package_data/cb_2016_us_county_500k.shp diff --git a/plotly/package_data/data/cb_2016_us_county_500k.shx b/plotly/package_data/cb_2016_us_county_500k.shx similarity index 100% rename from plotly/package_data/data/cb_2016_us_county_500k.shx rename to plotly/package_data/cb_2016_us_county_500k.shx diff --git a/plotly/package_data/data/cb_2016_us_state_500k.dbf b/plotly/package_data/cb_2016_us_state_500k.dbf similarity index 100% rename from plotly/package_data/data/cb_2016_us_state_500k.dbf rename to plotly/package_data/cb_2016_us_state_500k.dbf diff --git a/plotly/package_data/data/cb_2016_us_state_500k.shp b/plotly/package_data/cb_2016_us_state_500k.shp similarity index 100% rename from plotly/package_data/data/cb_2016_us_state_500k.shp rename to plotly/package_data/cb_2016_us_state_500k.shp diff --git a/plotly/package_data/data/cb_2016_us_state_500k.shx b/plotly/package_data/cb_2016_us_state_500k.shx similarity index 100% rename from plotly/package_data/data/cb_2016_us_state_500k.shx rename to plotly/package_data/cb_2016_us_state_500k.shx diff --git a/plotly/package_data/data/gz_2010_us_050_00_500k.dbf b/plotly/package_data/gz_2010_us_050_00_500k.dbf similarity index 100% rename from plotly/package_data/data/gz_2010_us_050_00_500k.dbf rename to plotly/package_data/gz_2010_us_050_00_500k.dbf diff --git a/plotly/package_data/data/gz_2010_us_050_00_500k.shp b/plotly/package_data/gz_2010_us_050_00_500k.shp similarity index 100% rename from plotly/package_data/data/gz_2010_us_050_00_500k.shp rename to plotly/package_data/gz_2010_us_050_00_500k.shp diff --git a/plotly/package_data/data/gz_2010_us_050_00_500k.shx b/plotly/package_data/gz_2010_us_050_00_500k.shx similarity index 100% rename from plotly/package_data/data/gz_2010_us_050_00_500k.shx rename to plotly/package_data/gz_2010_us_050_00_500k.shx