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

Remove deprecated choropleth method #1684

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
16 changes: 0 additions & 16 deletions folium/folium.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"""

import time
import warnings
import webbrowser

from branca.element import Element, Figure, MacroElement
Expand Down Expand Up @@ -457,21 +456,6 @@ def fit_bounds(
)
)

def choropleth(self, *args, **kwargs):
"""Call the Choropleth class with the same arguments.

This method may be deleted after a year from now (Nov 2018).
"""
warnings.warn(
"The choropleth method has been deprecated. Instead use the new "
"Choropleth class, which has the same arguments. See the example "
"notebook 'GeoJSON_and_choropleth' for how to do this.",
FutureWarning,
)
from folium.features import Choropleth

self.add_child(Choropleth(*args, **kwargs))

def keep_in_front(self, *args):
"""Pass one or multiple layers that must stay in front.

Expand Down
11 changes: 0 additions & 11 deletions tests/test_folium.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,17 +385,6 @@ def test_choropleth_geopandas_str(self):
assert '"fillColor":"a_random_color","fillOpacity":0.123454321' not in out_str
assert '"fillOpacity":0.543212345' in out_str

def test_choropleth_warning(self):
"""Test that the Map.choropleth method works and raises a warning."""
self.setup()
with open(os.path.join(rootpath, "us-counties.json")) as f:
geo_data = json.load(f)
with pytest.warns(FutureWarning):
self.m.choropleth(geo_data)
assert any(
[isinstance(child, Choropleth) for child in self.m._children.values()]
)

def test_tile_attr_unicode(self):
"""Test tile attribution unicode"""
m = folium.Map(location=[45.5236, -122.6750], tiles="test", attr="юникод")
Expand Down