Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate the geoplot function. #90

Merged
merged 1 commit into from
Jul 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion missingno/missingno.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,24 @@ def geoplot(df,
:param kwargs: Additional keyword arguments are passed to the underlying `geoplot` function.
:return: If `inline` is False, the underlying `matplotlib.figure` object. Else, nothing.
"""
import geoplot as gplt
warnings.warn(
"The 'geoplot' function has been deprecated, and will be removed in a future version "
"of missingno. The 'geoplot' package has an example recipe for a more full-featured "
"geospatial nullity plot: "
"https://residentmario.github.io/geoplot/gallery/plot_san_francisco_trees.html"
)
try:
import geoplot as gplt
except ImportError:
raise ImportError("Install geoplot <= 0.2.4 (the package) for geoplot function support")

if gplt.__version__ >= "0.3.0":
raise ImportError(
f"The missingno geoplot function requires geoplot package version 0.2.4 or lower, "
f"but version {gplt.__version__} is installed instead. To use the geoplot function, "
f"downgrade to an older version of the geoplot package."
)

import geopandas as gpd
from shapely.geometry import Point

Expand Down
2 changes: 1 addition & 1 deletion tests/viz_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def setUp(self):
self.x_y_df = simple_df

# @pytest.mark.mpl_image_compare
@pytest.xfail
@pytest.mark.xfail
def test_geoplot_quadtree(self):
msno.geoplot(self.x_y_df, x='r0', y='r1')
return plt.gcf()