Comments (2)
The following minimal hypothesis
test can be used to check these cases:
import sys; sys.path.insert(0, '../')
import geoplot as gplt
import geoplot.crs as gcrs
import unittest
from hypothesis import given
import hypothesis.strategies as hyp
import geopandas as gpd
import matplotlib.pyplot as plt
import shapely
# (Valid) polygons.
polygonal_coordinate_lists = hyp.lists(hyp.tuples(x_point, y_point), min_size=3, unique=True)
polygon = hyp.builds(shapely.geometry.Polygon, polygonal_coordinate_lists)\
.map(lambda poly: poly.buffer(0))\
.filter(lambda poly: not poly.is_empty)\
.map(lambda poly: poly.buffer(0))
polygon_lists = hyp.lists(polygon, min_size=1)
polygon_geoseries_many = hyp.builds(gpd.GeoSeries, polygon_lists)
# Projections
projections = hyp.sampled_from((None, gcrs.AlbersEqualArea()))
class TestPolyPlot(unittest.TestCase):
@given(polygon_geoseries_many, projections)
def test_point_plot(self, polygon_geoseries, projection):
try:
gplt.polyplot(polygon_geoseries, projection=projection)
except:
import pdb; pdb.set_trace()
gplt.polyplot(polygon_geoseries, projection=projection)
plt.close()
from geoplot.
Fixed the major extent issues. Remaining nuisance cases should be their own issue.
from geoplot.
Related Issues (20)
- Pin geopandas version? HOT 2
- cProfiling geoplot vs Cartopy vs GeoPandas: puzzling results HOT 2
- Typo in UserWarnings
- geoplot installed but geoplot.crs is not found HOT 4
- Legends in Geoplot 0.4.4 HOT 1
- Unable to install geoplot with pipenv under Ubuntu 20.04LTS HOT 1
- Grey boxes when clipping data with kdeplot HOT 8
- geoplot.kdeplot --> overlapping isolines HOT 8
- Fix KDEPlot hue tests HOT 6
- Voronoi plot fails with Value Error: Points cannot contain Nan HOT 4
- Does geoplot only work with EPSG:4326 unless the projection argument is set?
- Tests fail with geopandas 0.11
- Feature request? Apply pointplot "hue" to edgecolor only
- ModuleNotFoundError: No module named 'matplotlib.axes._subplots' HOT 1
- AttributeError: 'MultiPolygon' object has no attribute 'exterior' / TypeError: 'MultiPolygon' object is not iterable HOT 2
- kdeplot not working when fill=True HOT 3
- New Feature request - question: Bivariate choropleth?
- Exporting a KDEPlot as KML
- Documentation Update: shade is deprecated HOT 1
- Cannot import GeoPlot due to Iterable from collections
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geoplot.