Visualize your data on the interactive web map using QGIS plugins

Zeljko Majstorovic
4 min readNov 11, 2020

--

As a researcher, you’ve probably encountered the challenge of showing the data on a map. On the internet, you can find dozens of solutions for sure. Some of them suggest full-featured tools with subscription plans or, on the other hand, some suggest free solutions that lack the functionality you need, or maybe you don’t have the required knowledge to implement an offered solution. However, in those situations, open-source tools such as QGIS and its plugins can be very handy.

Use case

Let’s say you have some data written down in CSV, xlsx, or some other machine-readable format. You could show anything, but let’s say you want to pin every country in the world.

You will probably want something like this — a simple pinpoint with some more details which are shown when clicked.

That could be easily achieved with basic knowledge of using QGIS and few clicks.

Solution

One of the possible solutions is explained in the next four steps.

1. Data preparation

The data can be saved in CSV or some other machine-readable format, but it has to be formatted properly because once it is imported to QGIS you can’t change it anymore. A good example of the data set is shown in the picture below and can be found on Kaggle or similar websites.

An example of a properly formatted data

2. qgis2web plugin installation

QGIS has a lot of different plugins made by developers voluntarily. Some plugins are working perfectly, some of them could be improved but we should appreciate the fact that someone out there tried to make some tasks easier.

Plugins can be found in the menu toolbar: Plugins>Manage and install plugins and the “qgis2web” plugin can be easily found through the search option.

3. Data import

After the plugin is installed you are a few clicks away from the final result, you have to import your data following steps as shown on the image below. Notice that in the third step you have the ability to do some adjustments to show data properly.

Importing the data in the QGIS tool

After everything is configured, you just have to click Add and data should be shown on the map. If you want to change from maker dot to location pin you can change marker appearance in the layer setting under the “Symbology” tab.

4. Export as a map

qgis2web plugin can be found in the toolbar. When you run this plugin new windows (as shown below) will pop up.

As you can see you have a map preview, you can choose between three choices at the bottom of that window. Also, at the top, you will have five tabs where you can adjust map and data appearance as well as an export tab where you can choose the export folder on your computer.

Example of the destination folder

Once the map is exported to the desired location, you can open that map just by clicking on index.html and the map will be shown in the web browser as a web map.

Conclusion

To sum up, this is a simple example that can be applied in various use cases, and I hope someone finds this post useful. If you are reading this, what to say other than thank you!

For more similar stories visit the publication Student research group SIS-DVA!

--

--

Zeljko Majstorovic

Teaching Assistant at Faculty of Transport and Traffic Sciences