Sitemap
Aditya Kuche

Aditya Kuche

World is photo imagery | GIS Engineer II at Verisk Analytics | M.Tech in Geoinformatics and Surveying Technology.

Interactive Geospatial Map

4 min readMay 28, 2023

Geospatial Map is very useful for the visualization purpose. The map are easy to understand, get the information out of it and location idea. Hence, get to known the overall idea of the dataset. It is also easy to communicate and transfer. It can be interactive, statics, web maps (which are hosted on some platforms, websites, SaaS services), serves base maps.

we have to depend on the various geospatial enable software, data to be represent

To the dataset from the Wikipedia site “https://en.wikipedia.org/wiki/List_of_forests_in_India” using the dataset form this site. Read the html site from the

pandas. read_html( )

Press enter or click to view image in full size

Getting the dataset from the first column and storing to variable df. Getting the dataset in to the script/ variable as you can see in the screenshot

Press enter or click to view image in full size

Removing the unnecessary columns from the table. Data cleaning process is performing. some row’s containing null/nan values in the Area column to remove such row from the table use

df.dropna(axis=0,subset=[‘Area’])

Here axis=0 represent the row and axis=1 represent the columns in the table as shown in the below screenshot.

After the per-processing of data, data/table get cleaned and all set to move forward in process.

Press enter or click to view image in full size

For implementing the data on the map, location is to be required globally where is the geospatial dataset is located. To locate the information on the map, geometry information of the data is required. As it is the table, it does not having the geospatial geometry information in the data.

Geometry information of the dataset is mean having spatially defined coordinated with the proper project information in it.so, to take first step toward the spatial reference of the data, getting the latitude and longitude information for each record in the table is must.

Geocoding is the process of converting the string, text ( address, landmarks and Name ) into the geo-coordinates like latitude and longitude information base on the address of the places. Technically it is a numerical representation of the address/places spatial. Geo-coordinates helps us to represent tabular information on the map.

Get Aditya Kuche’s stories in your inbox

Join Medium for free to get updates from this writer.

Here Geocoding is performing, as we have the Name and location columns in our data. Tools from the geopandas as shown below geocode is use to process the latitude and longitude information for the every records in table.

Press enter or click to view image in full size

As shown below, getting latitude and longitude information in the data.

Press enter or click to view image in full size

This information can be stored into the csv for the further use of data. No need of preprocessing again in future.

Press enter or click to view image in full size

Here folium library is use for the creating the interactive map, it also having many other capabilities for more information you can go through folium documentation.

Press enter or click to view image in full size

Result of the heatmap are as follows.

Press enter or click to view image in full size

Here, if someone needs the some information to popup into the map, like Name, Address, Latitude, Longitude, Area, etc from the data. Popup can be possible for specific columns to het the information on the go within map.

Press enter or click to view image in full size

popup can be see below.

Press enter or click to view image in full size

This all the interactive map can be saved into html format to transfer the file to third party without transferring the original dataset. The file formats is easy to transfer, light file, visualization is enable and it also interactive to get the information out of that. No need of maintaining the server up running mode and no issue of data security.

Press enter or click to view image in full size

for more information download the repository at git https://github.com/adityakuche/Interactive_Geospatial_Maps.git or connect me on LinkedIn.

--

--

Aditya Kuche
Aditya Kuche

Written by Aditya Kuche

World is photo imagery | GIS Engineer II at Verisk Analytics | M.Tech in Geoinformatics and Surveying Technology.