We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Dataviz in QGIS and on the web

00:00

Formal Metadata

Title
Dataviz in QGIS and on the web
Title of Series
Number of Parts
351
Author
License
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language
Production Year2022

Content Metadata

Subject Area
Genre
Abstract
#### QGIS and Dataviz Creating plots is out of the main scopes of QGIS but thanks to the simple Python API, it is easy enough to create additional scripts and plugins. The DataPlotly plugin has been developed for QGIS(the first release was created in 2017 while nowadays the plugin has been downloaded more than 100,000 times). It's today a well maintained Python plugin with a growing community of developers, users and testers. DataPlotly allows creating D3 like plots from spatial data. It is build on top of Plotly.com, a JavaScript library which offers an easy API for many languages such as Python, R, Matlab etc. The plots are completely interactive so that plot elements are directly linked with map items; therefore the user is able to query map items from the main plot canvas. Thanks to a crowdfunding campaign, the functionalities of DataPlotly were extended: a complete refactoring of the code, more plots but especially the creation of plots in the layout composer, also for atlas layouts. The plugin is also compatible for QGIS server. Lizmap Web Client is an opensource server application to publish QGIS project on the web without any coding skills needed. It’s using QGIS Server in the backend so users have the same rendering between their QGIS Desktop and the web version of their project. Thanks to the DataPlotLy plugin installed on QGIS Server and to the Lizmap application, it allows users to print PDF with plots from in their web-browser.
Keywords
PlotterPlug-in (computing)BitLibrary (computing)Functional (mathematics)Software frameworkVisualization (computer graphics)Combinational logicUser interfaceJSONComputer animationProgram flowchart
Core dumpThermal expansionClient (computing)Data typeRaw image formatTetraederOpen sourceProjective planeMultiplication signLevel (video gaming)Field (computer science)Web 2.0PlotterLetterpress printingQuaternion groupProbability density functionServer (computing)Web browserVector spacePie chartUser interfaceDemo (music)Type theoryPlug-in (computing)Physical systemPower (physics)View (database)Computer animation
Letterpress printingPlug-in (computing)Server (computing)
Web pageServer (computing)Probability density functionPlug-in (computing)Context awarenessWeb 2.0JSON
Transcript: English(auto-generated)
So, what is data visualization in QGIS? Basically, the combination of QGIS and the Plotly library makes this plugin that we developed that is called Data Plotly, available for all the users and this is a little bit the framework of the plugin.
You have the Qt API that we use to design the user interface, QGIS API to, back to the user of course for all the spatial and GIS function and Plotly API for all the plot function. And we designed it to be as easy as it could be,
maybe, for the end user. You just select, choose the plot type, vector layer, X field, Y field, and you just click on the create plot and you have an interactive plot there. Powerful of Plotly is that you are dealing, basically, with an HTML plot and we designed it to be also responsive. So, you click on something on the plot
and you have the same feature on the map that get highlighted, not vice versa. And so, we got also one step forward, why not having this plugin also available in print layout? So, you can design in QGIS print layout and you can have static plot, like this one in GIF that you are seeing,
and you can also have, of course, atlas-based plot. I mean, also together in the same layout. So, we have a static plot and an atlas-driven plot. In the bar plot of below, now it's moving, so depending on the well that is now the feature,
the atlas feature, you see that you have basically the plot that is moving together with the print layout. And, of course, you can export it using the standard QGIS exporting system. So, PDF, PNG, and so on and whatever. Then, I will leave the stage to Etienne.
Okay, so now that was in QGIS desktop. So, let's say I want to publish this project on the web. So, there is an open-source project called lismap-web-client. It's a QGIS web interface. You put your QGIS project on the server and it's all published in a web interface, taking the same symbology, yeah, thanks.
And, it's hosted on GitHub. So, there is already plot in lismap. It's possible to have like data views on layers. So, every time, in this example, every time we click, there is a pop-up showing like some pie chart for this municipality. And, there is a demo that you can find
on demo.lismap.com about the earthquake in Indonesia. And, then we can also print layouts, which were made in QGIS desktop. So, as Matteo was saying, you can add a data plotly item in your print layout. And then, thanks to a QGIS server and the plug-in running on QGIS server,
it's possible to print your PDF. It's possible to print your PDF from the web. So, to print layouts and with adding data plotly plug-ins on QGIS server, then it's possible to make QGIS server aware about plotly in a QGIS layout
running on the server side, yeah.