danioxoli / HotSpotAnalysis_Plugin

A QGIS plugin for hotspot analysis
GNU General Public License v3.0
55 stars 12 forks source link

Scheduling the HS analysis #21

Closed ontheway16 closed 5 years ago

ontheway16 commented 5 years ago

Hello, I am not quite familiar with Qgis environment, so apologises if this is a simple question. I need the datas in a google sheet periodically analysed by HS plugin, according to their dates, so all records from same date will be analysed as a set, for hotspots. Then, next day, data table will be checked again for existence of newly added set of data. Is is possible to automate such process in Qgis? I know there are python scripting and scheduling options, but just wanted to be sure this plugin is compatible with such an automation procedure. I am not sure about Qgis can directly read/write Google Sheets but my attention is mostly on the plugin side. I appreciate any opinions.

danioxoli commented 5 years ago

Hello, Thank you for your interest and I apologize for the late reply. I try to reply point by point to your questions.

In principle, it is possible to start from a spreadsheet (containing a series of point coordinates among the columns) for running spatial statistics such as the getis-ord G. However, the Hotspot analysis plugin accepts in input only shapefile. This implies that your input data cannot be used "as it is" but needs to be properly formatted.

Nevertheless, the main issue connected to your request is that QGIS does not offer large support for scheduling repetitive processing. You may try to create a custom pipeline using PyQGIS API to achieve your goal (Here an example). The hotspot analysis on geospatial data is provided by the PySAL. You should nest PySAL functions into your custom pipeline to obtain what you need.

Sorry to cannot help you further!

Best Daniele

ontheway16 commented 5 years ago

Daniele Thank you for the answer, the idea in mind was like relating the data table to fixed shapefile and analyse it in a schedule. Of course, if the plugin wants data within shp, this will not work. The ideal solution would be an excel or g.sheets function for me since the coords are in an XY column in spreadsheet, but I could not find one, the only excel one is not suitable for automation (require input, etc). It seems I will check arcgis route to see what's possible. Thank you again.