[Qgis-developer] QGIS D3 DataVis Plugin Status Report

matteo matteo.ghetta at gmail.com
Tue Oct 4 00:37:51 PDT 2016


Calvin,

> This is on a windows 7 laptop using the OSGeo4W 64-bit network installer. I
> currently am using the latest QGIS 2.16.3 64-bit. From the OSGeo4W Setup I
> installed python-pip. From the shell I then did 'pip install plotly'.
> During the install I got errors and doing a Google search it appears that I
> needed to also do a pip install setuptools which I then installed.
> Everything comes up but does not display the plot. By looking at the python
> console it indicates where the temporary file was stored. If I launch it in
> the web browser then the plot is displayed. I tried various version of QGIS
> on windows all with the same results.

yep.. we just tried it on 2 Ubuntu and Debian machines.. so no surprise
that on Windows it doesn't work.. more test needed :)

>  I tried it using the VirtualBox OSGeoLive image using LUbuntu and
> installed plotly there. In this case it worked so there is something wrong
> with windows.
> 
> One other thing for windows in the file PlotDialog.ui where it has the
> following:
> 
>  <customwidgets>
>   <customwidget>
>    <class>QgsColorButtonV2</class>
>    <extends>QToolButton</extends>
>    <header>qgscolorbuttonv2.h</header>
>    <container>1</container>
>   </customwidget>
>  . . .
> 
> Every time you see <header>...h</header> it needs to be changed to
> <header>qgis.gui</header>

first time I hear of such an error.. UI have been created with Qt
Designer so they should be cross pltamform

> I don't know what is wrong with this running on windows. I am excited about
> this plugin and it has great potential. Here are several observations that
> I have.
> 
> 1. It must work without having the user add extra libraries so it has to be
> self contained.

agreed.. when I found that plotly went open source with python API I
just tried to build a plugin.. it worked and I kept going on.. Anyway I
also think that external libraries could be an obstacle..

that is.. we can make some code refactoring using on of the libraries
you listed in the previous email.. I liked http://d3plus.org/

> 2. I realize this is very preliminary work, but right now you have the
> ability to add expressions and I tried using the $id to get the row number
> and use it as the X axis and it does not work. It generates a python error.
> It appears you have not implemented expressions.

in the first code trial expression were supported, so just a matter of
time ;)

> 3. Good date and time support is important.

agreed

> 4. It would be wonderful if you could get aggregate types of functions
> working such as what I am doing with my circular heat map. I am not sure
> what the complexity of that would be in the 2D formats. In my case I am
> counting the number of incidents across two variables of date and time to
> create a heatmap.

mmm.. never deal with aggregates functions.. but I'm sure we will find a way

> 5. Do you have plans for this to do frequency plots?

if you consider density plot a valid replacement for frequency ones, yes :)

> 6. You are displaying this in a QGIS windows, but it would also be nice to
> allow the user to export it to a file for posting the interactive plot on
> the Internet.

this was also work in progress.. in the first version, when you created
a plot, it will have been sent to the browser.. so it should no be a problem

> 7. If it would ever work such that it could be rendered in the print
> composer that would be awesome.

agreed!

> 8. Some charts need different labels for the parameters for example I don't
> know what it means for a pie chart to have x and y axis. For pie chars you
> have a label and a value.

that also should not be a problem.. Micheal designed the code in a easy
way so that when you change the plot the parameters will be updated
according to the plot needs..


Well.. I think the first thing we have to do is to choose the provider
for the code.. if plotly, d3plus or whatever.. else we will spend a lot
of effort writing code that maybe we won't consider suitable in the
future..


Thanks Calvin for the feedback ;)

Matteo


More information about the Qgis-developer mailing list