From 274b003567c3d511a8b53784fbd319589c10b905 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Thu, 29 Mar 2018 11:34:17 -0400 Subject: [PATCH 1/3] change error msg for pip installs in choropleth --- plotly/figure_factory/_county_choropleth.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plotly/figure_factory/_county_choropleth.py b/plotly/figure_factory/_county_choropleth.py index fea9930f7bd..9d6db84efcd 100644 --- a/plotly/figure_factory/_county_choropleth.py +++ b/plotly/figure_factory/_county_choropleth.py @@ -563,11 +563,15 @@ def create_choropleth(fips, values, scope=['usa'], binning_endpoints=None, if not gp or not shapefile or not shapely: raise ImportError( "geopandas, pyshp and shapely must be installed for this figure " - "factory.\n\nRun the following commands in the terminal to " - "ensure that the correct versions of the modules are installed:\n" + "factory.\n\nIf you are using OS X run the following commands in " + "the terminal to ensure that the correct versions of the modules " + "are installed:\n" "`pip install geopandas==0.3.0`\n" "`pip install pyshp==1.2.10`\n" - "`pip install shapely==1.6.3`\n" + "`pip install shapely==1.6.3`\n\n" + "If you are using Windows, follow this blog post to properly " + "install geopandas and its dependencies including shapely:\n" + "http://geoffboeing.com/2014/09/using-geopandas-windows/" ) df, df_state = _create_us_counties_df(st_to_state_name_dict, From f9824276487f565c56ff09c0eb3a13e60cca10e2 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Thu, 29 Mar 2018 11:39:12 -0400 Subject: [PATCH 2/3] changelog update --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 467969c845a..08177dcc8ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2.5.2] - UNRELEASED +### Updated +- error message for `plotly.figure_factory.create_choropleth` is more helpful for Windows users on installing `geopandas` and dependencies including `shapely`. + ## [2.5.1] - 2018-03-26 ### Fixed - `plotly.figure_factory.create_choropleth` now works in Windows without raising an OSError. The module now uses cross-platform path tools from `os` to manipulate and manage the shapefiles contained in this package. From 51cd9bc76b399d3a0d2700ef987cc10068e7335f Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Mon, 2 Apr 2018 17:40:17 -0400 Subject: [PATCH 3/3] chelsea's comment --- plotly/figure_factory/_county_choropleth.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plotly/figure_factory/_county_choropleth.py b/plotly/figure_factory/_county_choropleth.py index 9d6db84efcd..823db373484 100644 --- a/plotly/figure_factory/_county_choropleth.py +++ b/plotly/figure_factory/_county_choropleth.py @@ -563,14 +563,13 @@ def create_choropleth(fips, values, scope=['usa'], binning_endpoints=None, if not gp or not shapefile or not shapely: raise ImportError( "geopandas, pyshp and shapely must be installed for this figure " - "factory.\n\nIf you are using OS X run the following commands in " - "the terminal to ensure that the correct versions of the modules " - "are installed:\n" + "factory.\n\nRun the following commands to install the correct " + "versions of the following modules:\n\n" "`pip install geopandas==0.3.0`\n" "`pip install pyshp==1.2.10`\n" "`pip install shapely==1.6.3`\n\n" - "If you are using Windows, follow this blog post to properly " - "install geopandas and its dependencies including shapely:\n" + "If you are using Windows, follow this post to properly " + "install geopandas and dependencies:" "http://geoffboeing.com/2014/09/using-geopandas-windows/" )