Is it possible to compute Getis-Ord Gi* statistics (referred to as hotspot analysis in arcgis) with a Python library?

  • I use QGIS frequently and have no idea what a hotspot analysis is. You might get better responses if you included at least a definition, or better yet a visual. Many of us know the ins- and outs- of geopandas and might be able to describe a workflow for "hotspot analysis" but not if we have to do research to understand the question.
    – Jon
    Jun 11 '19 at 19:56
  • Hi Jon, a hotspot analysis is defined as the following in ArcGIS' documentation: "Given a set of weighted features, identifies statistically significant hot spots and cold spots using the Getis-Ord Gi* statistic." More information can be found here. Jun 12 '19 at 14:12
  • It looks like a simple z-score type statistic...that would be easy enough to implement yourself. Unless I'm missing something.
    – Jon
    Jun 12 '19 at 14:48

Check out PySAL: The Python Spatial Analysis Library


  • Thanks. Yes, I've seen it. And I see in the docs they have a Getis-Ord Statistic. However, I don't think that will generate the same kind of output as the Hotspot analysis in ArcGIS. I might be mistaken but I think the Getis-Ord in PySal generates a spatial autocorrelation statistic. Is that right? Jun 11 '19 at 20:20
  • @JuanFranciscoSaldarriaga, yes the global Getis-Ord generates a statistic. You want the local G (or G*) - pysal.readthedocs.io/en/latest/generated/…
    – user2856
    Jun 12 '19 at 0:54
  • Great. Thank you. I'll give it a try and report back. Jun 12 '19 at 14:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.