Geospatial Visualizations
Voronoi tessellation, Delaunay triangulation, and choropleth plots are a few of the geospatial visualizations that will be used in this chapter. An explanation for each of them is provided here.
Voronoi Tessellation
In a Voronoi tessellation, each pair of data points is separated by a line that is the same distance from both data points. The separation creates cells that, for every given point, marks which data point is closer. The closer the data points, the smaller the cells.
The following example shows how you can simply use the voronoi
method to create this visualization:
# plotting our dataset as voronoi plot geoplotlib.voronoi(dataset_filtered, line_color='b') geoplotlib.set_smoothing(True) geoplotlib.show()
As we can see, the code to create this visualization is relatively short.
After importing the dependencies we need, we read the dataset using the read_csv
method of pandas (or geoplotlib). We then use it as data for our...