[Qgis-user] Using qgis as realtime decision support tool

DelazJ delazj at gmail.com
Tue Jun 19 07:08:12 PDT 2018


Hi,

Actually the Join feature in 3.0 is documented [0] (I didn't check
yesterday but I should have remembered that the author of this feature
almost always provide documentation for "his" features).
And I think that a direct join with your Excel data is possible.

[0]
https://docs.qgis.org/testing/en/docs/user_manual/working_with_vector/vector_properties.html#joins-properties

Regards,
H.

2018-06-19 0:59 GMT+02:00 DelazJ <delazj at gmail.com>:

> Hi Jeroen (and others)
>
> The add delimited text file tool [0] has a "watch file" option that, if
> i'm not mistaken, allows to apply in QGIS changes that would be made in the
> csv file in other applications such as MS Excel. So, assuming you have a
> table data with your municipalities and all the related information in
> csv-like format, you import it as simple table with the Add delimited text
> file, do a join with the spatial data and do a symbology on whether there's
> a project or no.
> Then what will be needed is simply update the csv in Excel and map is
> updated in QGIS.
>
> That's the theory as I could not run a 2.18 (I guess this is what you use)
> to check if it works. Doing it in 3.1 fails: I can see the change in the
> imported table but no repercution on the joined field nor the map (Bug?).
> However 3.x adds new and powerful (but not yet documented) features in the
> join table such as "Dynamic form" which perfectly triggers maps repaint
> when the csv is changed outside QGIS.
>
> If instead of csv, you want xls or xlsx there's a "spreadsheets" plugin
> that allows to esily use those formats in QGIS but I can't tell you if it
> has all the features.
>
> About the statistics, one can also use virtual layer [1] and do a query
> with aggregates. But having a Yes/No field in the table on which you
> perform stats should return what you are looking for I think.
>
> [0] https://docs.qgis.org/testing/en/docs/user_manual/managing_
> data_source/opening_data.html#importing-a-delimited-text-file
> [1] https://docs.qgis.org/testing/en/docs/user_manual/managing_
> data_source/create_layers.html#creating-virtual-layers
>
> Hope that heps,
> Harrissou
>
> 2018-06-18 22:29 GMT+02:00 Jeroen Hovens <mail at groenebij.nl>:
>
>> Re-opening the project does indeed update the map.
>> And the statistics toolbar does provide useful information, but just for
>> 1 column at a time.
>>
>> Okay, learned some new things, but it is not yet the decision support
>> tool I am hoping to have 😊
>> For best results, this still needs me as a person to incorporate changes
>> as they are made/chosen or to manually update maps etc.
>>
>> Maybe building a webmap and letting the group switch on and of proposals
>> (by (de)selecting them in the webmap legend) is still a fancier idea. This
>> however requires me to build a map with 60 layers, one for each proposal,
>> all uising the same basic nation-map and adding information to 1
>> municipality... That doesn’t sound effective. And then they still have to
>> make changes in two files, with consistency errors waiting to happen.
>>
>> Any fresh ideas?
>> Is it possible to incorporate a map directly into MS excel? So the map
>> part is visual within Excel, maybe even without the use of qgis?
>>
>>
>>
>> -----Oorspronkelijk bericht-----
>> Van: Raymond Nijssen <r.nijssen at terglobo.nl>
>> Verzonden: maandag 18 juni 2018 18:34
>> Aan: Jeroen Hovens <mail at groenebij.nl>; qgis-user at lists.osgeo.org
>> Onderwerp: Re: [Qgis-user] Using qgis as realtime decision support tool
>>
>>
>>
>> On 18-06-18 17:10, Jeroen Hovens wrote:
>> > That would work if updating the xlsx file automatically leads to an
>> updated map. Does it, or do I have to renew the join every time the xlslx
>> is updated?
>>
>> Just (re)opening the project should work. You can easily test it locally.
>>
>>
>> > I would like the decision makers to see directly what happens to the
>> geographical spread if they refuse proposal 10 to 21 (for instance based on
>> quality of the proposal). Because geographical spread is one of the
>> criteria and this is best visualized with a map (instead of a list of
>> municipality names), they can argue and reconsider choices. That's my need
>> for 'real-time'.
>> > Combined with the wish to make changes in just one document (xlsx being
>> the easiest) in stead of two (both xlsx and qgis), I am looking for
>> solution.
>>
>> To be honest, opening the attribute table and edit some cells manually in
>> an edit session is not too complicated imho.
>>
>>
>> >
>> > I have to look into the Statistics panel. Will that provide cumulations
>> of a certain column based on a selection of fields (all the selected
>> proposals)? And what is used to create that selection? Does it refresh
>> automatically?
>>
>> Yes, you choose the layer and column and it shows all statistics. It can
>> also show the statistics for the selected features only.
>>
>> >
>> >
>> >
>> >
>> > -----Oorspronkelijk bericht-----
>> > Van: Qgis-user <qgis-user-bounces at lists.osgeo.org> Namens Raymond
>> Nijssen
>> > Verzonden: maandag 18 juni 2018 13:35
>> > Aan: qgis-user at lists.osgeo.org
>> > Onderwerp: Re: [Qgis-user] Using qgis as realtime decision support tool
>> >
>> > Hi Jeroen,
>> >
>> > If I understand you correctly, you just want to color entire
>> municipalities based on information in one or few columns? And the
>> challenge is cooperating with others, who don't know QGIS?
>> >
>> > You could use a shared drive, like dropbox, to store 3 files:
>> > 1 table (xlsx or csv)
>> > 1 geo layer with municipalities (gpkg or shp)
>> > 1 qgis project, with the table joined to the layer, and with the
>> desired style
>> >
>> > Others can update the table, and you (and others) can open the project
>> and see the updated map in qgis.
>> >
>> > Would that work?
>> >
>> >
>> > On 18-06-18 12:40, Alexandre Neto wrote:
>> >> I agree that one layer would be preferable. Using the categorized
>> >> renderer would make it easy to select and deselect proposals. You can
>> >> create the classes with  a mix of the name of the munucipality and the
>> >> bugdet,  that way that is visible directly on the  legend, making it
>> >> easier to select.
>> >>
>> >> Then you can use the Statistics panel to show the stats over a column,
>> >> for example the budget sum.
>> >>
>> >> Jeroen Hovens <mail at groenebij.nl <mailto:mail at groenebij.nl>> escreveu
>> >> no dia segunda, 18/06/2018 às 11:27:
>> >>
>> >>      I have not organized the data yet, that will depend on the pro’s
>> and
>> >>      con’s of idea’s how to use it.____
>> >>
>> >>      __ __
>> >>
>> >>      For now, I am thinking along the following line:____
>> >>
>> >>      All municipalities as fields with attributes being whether or not
>> >>      they have a proposal and specific information about the proposal
>> >>      such as budget needed, type of project, etc.____
>> >>
>> >>      That would mean 1 layer with all the proposals. That way it seems
>> >>      easier to show the entire map (all municipalities white, just
>> >>      borders, and all municipalities with proposal coloured), so to
>> >>      easily see the spread.____
>> >>
>> >>      __ __
>> >>
>> >>      __ __
>> >>
>> >>      *Van:* Alexandre Neto <senhor.neto at gmail.com
>> >>      <mailto:senhor.neto at gmail.com>>
>> >>      *Verzonden:* maandag 18 juni 2018 12:03
>> >>      *Aan:* Jeroen Hovens <mail at groenebij.nl <mailto:mail at groenebij.nl
>> >>
>> >>      *CC:* qgis-user at lists.osgeo.org <mailto:qgis-user at lists.osgeo.org
>> >
>> >>      *Onderwerp:* Re: [Qgis-user] Using qgis as realtime decision
>> support
>> >>      tool____
>> >>
>> >>      __ __
>> >>
>> >>      Hi,____
>> >>
>> >>      It's not clear how your data is organized, making it dificult to
>> >>      help in such a specific request. All the porposals are in the same
>> >>      layer, or in diferent layers?____
>> >>
>> >>      __ __
>> >>
>> >>      Still, if you put all the proposal layers in mutually exclusive
>> >>      group, it will be easy to swap between proposals.____
>> >>
>> >>      __ __
>> >>
>> >>      If they are all in the same layer, you can categorize and in the
>> >>      legend you can select which proposal to show.____
>> >>
>> >>      __ __
>> >>
>> >>
>> >> https://docs.qgis.org/testing/en/docs/user_manual/introduction/general
>> >> _tools.html?highlight=mutually#interact-with-groups-and-layers____
>> >>
>> >>      __ __
>> >>
>> >>      You can also create an atlas with the necessary visualizations for
>> >>      each proposal and the calculus of the values you wish to show. But
>> >>      again, it all depends on how you have you data organized.____
>> >>
>> >>      __ __
>> >>
>> >>      __ __
>> >>
>> >>      Jeroen Hovens <mail at groenebij.nl <mailto:mail at groenebij.nl>>
>> >>      escreveu no dia segunda, 18/06/2018 às 10:19:____
>> >>
>> >>          Hello,____
>> >>
>> >>          ____
>> >>
>> >>          I am thinking about using qgis as a real-time decision support
>> >>          tool and I am looking for some good ideas to ease the
>> >> process.____
>> >>
>> >>          ____
>> >>
>> >>          The case is the following:____
>> >>
>> >>          I have proposals from 60 municipalities (out of a possible few
>> >>          hundred), each has 1 proposal. There is only room for 20
>> >>          proposals to be accepted. One of the criteria will be the
>> >>          geographical spread of the proposals: it is preferred to have
>> 20
>> >>          proposals sort of evenly spread over the entire country,
>> instead
>> >>          of having the majority of them coming from one region.____
>> >>
>> >>          ____
>> >>
>> >>          My idea is to show these proposals on a map by colouring the
>> >>          municipalities. As a decision support tool I need the ability
>> to
>> >>          adjust the selection in real-time (during the discussion). The
>> >>          easy way is to just edit the attribute table or to select or
>> >>          deselect specific municipalities. This however requires myself
>> >>          to be present and make changes in qgis as the discussion goes
>> >>          (given that nobody else in the decision group knows how to
>> work
>> >>          with qgis).____
>> >>
>> >>          An alternative is to produce a webmap and have each
>> municipality
>> >>          with a proposal have it’s own specific attribute value (but
>> all
>> >>          using the same colour in categorized style), so they all show
>> up
>> >>          in the map-legend, and any group member can easily select or
>> >>          deselect a specific municipality from the legend.____
>> >>
>> >>          ____
>> >>
>> >>          Do you have other ideas how to use a map as a real-time
>> decision
>> >>          support tool?____
>> >>
>> >>          ____
>> >>
>> >>          Quality of the proposal is the main criterium, but in addition
>> >>          to the geographical spread there are others as well, such as
>> >>          variety in projects and the cumulative budget for the selected
>> >>          proposals (the cumulative budget is capped). Since I am not
>> well
>> >>          known with database and calculation options in qgis and how to
>> >>          automatically show the results, I am building an easy to use
>> >>          excel file that will show all this information using precoded
>> >>          calculations, much like a dashboard. Simply selecting and
>> >>          deselecting proposals in an excel interface show you the
>> changes
>> >>          in variety of projects and cumulative budget. This is much
>> >>          easier for the decision team to do themselves, since MS Excel
>> is
>> >>          a well known environment. ____
>> >>
>> >>          Ideally I get the two connected somehow, so selecting and
>> >>          deselecting proposals will alter the results in both the map
>> as
>> >>          in the excel dashboard. However, altering data in excel
>> doesn’t
>> >>          automatically change the results in a qgis map, because they
>> are
>> >>          not connected in real-time.____
>> >>
>> >>          ____
>> >>
>> >>          Do you have any ideas how to make a real-time connection
>> between
>> >>          MS Excel and a qgis map? Or information on how to use qgis
>> >>          internal capabilities to calculate certain values based on the
>> >>          selection of proposals? However, the last option will probably
>> >>          still need myself to be present to somehow select or deselect
>> >>          the proposals in qgis.____
>> >>
>> >>          ____
>> >>
>> >>          Greetings,____
>> >>
>> >>          Jeroen____
>> >>
>> >>          ____
>> >>
>> >>          ____
>> >>
>> >>          _______________________________________________
>> >>          Qgis-user mailing list
>> >>          Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>
>> >>          List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> >>          Unsubscribe:
>> >> https://lists.osgeo.org/mailman/listinfo/qgis-user____
>> >>
>> >>      -- ____
>> >>
>> >>      Alexandre Neto____
>> >>
>> >>      ---------------------____
>> >>
>> >>      @AlexNetoGeo____
>> >>
>> >>      http://sigsemgrilhetas.wordpress.com____
>> >>
>> >>      http://gisunchained.wordpress.com____
>> >>
>> >> --
>> >> Alexandre Neto
>> >> ---------------------
>> >> @AlexNetoGeo
>> >> http://sigsemgrilhetas.wordpress.com
>> >> http://gisunchained.wordpress.com
>> >>
>> >>
>> >> _______________________________________________
>> >> Qgis-user mailing list
>> >> Qgis-user at lists.osgeo.org
>> >> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> >> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> >>
>> >
>> > --
>> > Terglobo
>> > Fahrenheitstraat 1
>> > 5223 BJ 's-Hertogenbosch
>> > 06 25 31 49 83
>> > _______________________________________________
>> > Qgis-user mailing list
>> > Qgis-user at lists.osgeo.org
>> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> >
>> >
>>
>> --
>> Terglobo
>> Fahrenheitstraat 1
>> 5223 BJ 's-Hertogenbosch
>> 06 25 31 49 83
>>
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180619/56fc06c7/attachment.html>


More information about the Qgis-user mailing list