def test_wrong_dtype_missing_values(self):
gdf = GeoDataFrame.from_file("misc/nuts3_data.geojson")
gdf.loc[12:18, "gdppps2008"] = np.NaN
gdf.loc[25:35, "pop2008"] = np.NaN
gdf.loc[0:len(gdf)-1, "pop2008"] = gdf["pop2008"].astype(str)
StePot = SmoothStewart(gdf, "gdppps2008",
span=65000, beta=2, resolution=100000,
mask="misc/nuts3_data.geojson")
result = StePot.render(9, "equal_interval", output="Geodataframe")
self.assertIsInstance(result, GeoDataFrame)
self.assertEqual(len(result), 9)
StePot = SmoothStewart(gdf, "gdppps2008", variable_name2="pop2008",
span=65000, beta=2, resolution=100000,
mask="misc/nuts3_data.geojson")
result = StePot.render(9, "equal_interval", output="Geodataframe")
self.assertIsInstance(result, GeoDataFrame)
self.assertEqual(len(result), 9)
评论列表
文章目录