Skip to content

Commit

Permalink
Merge pull request #12 from lixun910/master
Browse files Browse the repository at this point in the history
update to pre pypi release
  • Loading branch information
lixun910 authored Mar 9, 2021
2 parents e8cfa5c + 9f81ed1 commit 9a69de6
Show file tree
Hide file tree
Showing 72 changed files with 2,167 additions and 1,483 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pip install git+https://github.com/geodacenter/pygeoda

See more details: https://geodacenter.github.io/pygeoda/install.html

#### Docs
#### Documentation

[https://geodacenter.github.io/pygeoda](https://geodacenter.github.io/pygeoda)

Expand All @@ -47,7 +47,7 @@ lisa = pygeoda.local_moran(w, gda['Crm_prs'])
# lisa_colors(): ('#eeeeee', '#FF0000', '#0000FF', '#a7adf9', '#f4ada8', '#464646', '#999999')
```

* GeoPandas + pygeoda
* pygeoda + GeoPandas

```Python
import geopandas
Expand Down Expand Up @@ -76,7 +76,7 @@ lisa = pygeoda.local_moran(w, gda['Crm_prs'])
* K-Nearest Neighbor
* Kernel

* Spatial Autocorrelation
* Local Indicators of Spatial Association (LISA)
* Local Moran
* Local Geary
* Local Getis-Ord
Expand Down
27 changes: 21 additions & 6 deletions docs/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,26 +121,41 @@
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../spatial_auto.html">6. Spatial Autocorrelation</a><ul>
<li class="toctree-l1"><a class="reference internal" href="../spatial_auto.html">6. Local Indicators of Spatial Association</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../spatial_auto.html#local-moran">6.1 Local Moran</a></li>
<li class="toctree-l2"><a class="reference internal" href="../spatial_auto.html#lisa-object">6.2 LISA object</a></li>
<li class="toctree-l2"><a class="reference internal" href="../spatial_auto.html#local-geary">6.3 Local Geary</a></li>
<li class="toctree-l2"><a class="reference internal" href="../spatial_auto.html#local-getis-ord-statistics">6.4 Local Getis-Ord Statistics</a></li>
<li class="toctree-l2"><a class="reference internal" href="../spatial_auto.html#local-join-count">6.5 Local Join Count</a></li>
<li class="toctree-l2"><a class="reference internal" href="../spatial_auto.html#quantile-lisa">6.6 Quantile LISA</a></li>
<li class="toctree-l2"><a class="reference internal" href="../spatial_auto.html#batch-local-moran">6.7 Batch Local Moran</a></li>
<li class="toctree-l2"><a class="reference internal" href="../spatial_auto.html#local-bivariate-join-count">6.6 Local Bivariate Join Count</a></li>
<li class="toctree-l2"><a class="reference internal" href="../spatial_auto.html#local-multivariate-join-count">6.7 Local Multivariate Join Count</a></li>
<li class="toctree-l2"><a class="reference internal" href="../spatial_auto.html#quantile-lisa">6.8 Quantile LISA</a></li>
<li class="toctree-l2"><a class="reference internal" href="../spatial_auto.html#multivariate-quantile-lisa">6.9 Multivariate Quantile LISA</a></li>
<li class="toctree-l2"><a class="reference internal" href="../spatial_auto.html#neighbor-match-test">6.10 Neighbor Match Test</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../spatial_clustering.html">7. Spatial Clustering</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../spatial_clustering.html#skater">7.1 SKATER</a></li>
<li class="toctree-l2"><a class="reference internal" href="../spatial_clustering.html#redcap">7.2 REDCAP</a></li>
<li class="toctree-l2"><a class="reference internal" href="../spatial_clustering.html#max-p">7.3 Max-p</a></li>
<li class="toctree-l2"><a class="reference internal" href="../spatial_clustering.html#spatially-constrained-hierarchical-clucstering">7.3 Spatially Constrained Hierarchical Clucstering</a></li>
<li class="toctree-l2"><a class="reference internal" href="../spatial_clustering.html#azp">7.3 AZP</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../spatial_clustering.html#azp-greedy">7.3.1 AZP greedy</a></li>
<li class="toctree-l3"><a class="reference internal" href="../spatial_clustering.html#azp-simulated-annealing">7.3.2 AZP Simulated Annealing</a></li>
<li class="toctree-l3"><a class="reference internal" href="../spatial_clustering.html#azp-tabu-search">7.3.3 AZP Tabu Search</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../spatial_clustering.html#max-p">7.4 Max-p</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../spatial_clustering.html#max-p-greedy">7.4.1 Max-p greedy</a></li>
<li class="toctree-l3"><a class="reference internal" href="../spatial_clustering.html#max-p-tabu-search">7.4.2 Max-p Tabu Search</a></li>
<li class="toctree-l3"><a class="reference internal" href="../spatial_clustering.html#max-p-simulated-annealing">7.4.3 Max-p Simulated Annealing</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../esda_geopandas.html">ESDA with pygeoda and geopandas</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../esda_geopandas.html#geopandas">1 GeoPandas</a></li>
<li class="toctree-l2"><a class="reference internal" href="../esda_geopandas.html#matplotlib">2 Matplotlib</a></li>
<li class="toctree-l2"><a class="reference internal" href="../esda_geopandas.html#geopandas-pygeoda">3 geoPandas + pygeoda</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../esda_geopandas.html#geopandas-pygeoda">3 GeoPandas + pygeoda</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../esda_geopandas.html#load-geospatial-data-in-geopandas">3.1 Load geospatial data in GeoPandas</a></li>
<li class="toctree-l3"><a class="reference internal" href="../esda_geopandas.html#create-pygeoda-object-from-geodataframe">3.2 Create pygeoda object from geodataframe</a></li>
<li class="toctree-l3"><a class="reference internal" href="../esda_geopandas.html#id1">3.3 ESDA with pygeoda and geopandas</a></li>
Expand Down Expand Up @@ -168,7 +183,7 @@
<li class="toctree-l3"><a class="reference internal" href="../generated/pygeoda.kernel_knn_weights.html">pygeoda.kernel_knn_weights</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../api.html#pygeoda-spatial-autocorrelation">pygeoda (spatial autocorrelation)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../api.html#pygeoda-lisa">pygeoda (LISA)</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../generated/pygeoda.lisa.html">pygeoda.lisa</a></li>
<li class="toctree-l3"><a class="reference internal" href="../generated/pygeoda.local_moran.html">pygeoda.local_moran</a></li>
<li class="toctree-l3"><a class="reference internal" href="../generated/pygeoda.local_geary.html">pygeoda.local_geary</a></li>
Expand Down
6 changes: 4 additions & 2 deletions docs/_modules/pygeoda/classify/breaks.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,10 @@
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#local-geary">6.3 Local Geary</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#local-getis-ord-statistics">6.4 Local Getis-Ord Statistics</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#local-join-count">6.5 Local Join Count</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#quantile-lisa">6.6 Quantile LISA</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#batch-local-moran">6.7 Batch Local Moran</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#local-bivariate-no-colocation-join-count">6.6 Local Bivariate (no-colocation) Join Count</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#local-multivariate-co-location-join-count">6.7 Local Multivariate (co-location) Join Count</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#quantile-lisa">6.8 Quantile LISA</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#batch-local-moran">6.9 Batch Local Moran</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../spatial_clustering.html">7. Spatial Clustering</a><ul>
Expand Down
18 changes: 11 additions & 7 deletions docs/_modules/pygeoda/clustering/azp.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,20 +121,24 @@
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../spatial_auto.html">6. Spatial Autocorrelation</a><ul>
<li class="toctree-l1"><a class="reference internal" href="../../../spatial_auto.html">6. Local Indicators of Spatial Association</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#local-moran">6.1 Local Moran</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#lisa-object">6.2 LISA object</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#local-geary">6.3 Local Geary</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#local-getis-ord-statistics">6.4 Local Getis-Ord Statistics</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#local-join-count">6.5 Local Join Count</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#quantile-lisa">6.6 Quantile LISA</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#batch-local-moran">6.7 Batch Local Moran</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#local-bivariate-join-count">6.6 Local Bivariate Join Count</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#local-multivariate-join-count">6.7 Local Multivariate Join Count</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#quantile-lisa">6.8 Quantile LISA</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#multivariate-quantile-lisa">6.9 Multivariate Quantile LISA</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_auto.html#neighbor-match-test">6.10 Neighbor Match Test</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../spatial_clustering.html">7. Spatial Clustering</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_clustering.html#skater">7.1 SKATER</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_clustering.html#redcap">7.2 REDCAP</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_clustering.html#max-p">7.3 Max-p</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_clustering.html#azp">7.3 AZP</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../spatial_clustering.html#max-p">7.4 Max-p</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../esda_geopandas.html">ESDA with pygeoda and geopandas</a><ul>
Expand Down Expand Up @@ -356,7 +360,7 @@ <h1>Source code for pygeoda.clustering.azp</h1><div class="highlight"><pre>

<span class="k">return</span> <span class="p">{</span>
<span class="s2">&quot;Total sum of squares&quot;</span> <span class="p">:</span> <span class="n">total_ss</span><span class="p">,</span>
<span class="s2">&quot;Within-cluster sum of squares&quot;</span> <span class="p">:</span> <span class="nb">list</span><span class="p">(</span><span class="n">within_ss</span><span class="p">)</span> <span class="o">+</span> <span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">*</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">cluster_ids</span><span class="p">)</span> <span class="o">-</span> <span class="nb">len</span><span class="p">(</span><span class="n">within_ss</span><span class="p">)),</span>
<span class="s2">&quot;Within-cluster sum of squares&quot;</span> <span class="p">:</span> <span class="n">within_ss</span><span class="p">,</span>
<span class="s2">&quot;Total within-cluster sum of squares&quot;</span> <span class="p">:</span> <span class="n">between_ss</span><span class="p">,</span>
<span class="s2">&quot;The ratio of between to total sum of squares&quot;</span> <span class="p">:</span> <span class="n">ratio</span><span class="p">,</span>
<span class="s2">&quot;Clusters&quot;</span> <span class="p">:</span> <span class="n">flat_2dclusters</span><span class="p">(</span><span class="n">w</span><span class="o">.</span><span class="n">num_obs</span><span class="p">,</span> <span class="n">cluster_ids</span><span class="p">),</span>
Expand Down Expand Up @@ -433,7 +437,7 @@ <h1>Source code for pygeoda.clustering.azp</h1><div class="highlight"><pre>

<span class="k">return</span> <span class="p">{</span>
<span class="s2">&quot;Total sum of squares&quot;</span> <span class="p">:</span> <span class="n">total_ss</span><span class="p">,</span>
<span class="s2">&quot;Within-cluster sum of squares&quot;</span> <span class="p">:</span> <span class="nb">list</span><span class="p">(</span><span class="n">within_ss</span><span class="p">)</span> <span class="o">+</span> <span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">*</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">cluster_ids</span><span class="p">)</span> <span class="o">-</span> <span class="nb">len</span><span class="p">(</span><span class="n">within_ss</span><span class="p">)),</span>
<span class="s2">&quot;Within-cluster sum of squares&quot;</span> <span class="p">:</span> <span class="n">within_ss</span><span class="p">,</span>
<span class="s2">&quot;Total within-cluster sum of squares&quot;</span> <span class="p">:</span> <span class="n">between_ss</span><span class="p">,</span>
<span class="s2">&quot;The ratio of between to total sum of squares&quot;</span> <span class="p">:</span> <span class="n">ratio</span><span class="p">,</span>
<span class="s2">&quot;Clusters&quot;</span> <span class="p">:</span> <span class="n">flat_2dclusters</span><span class="p">(</span><span class="n">w</span><span class="o">.</span><span class="n">num_obs</span><span class="p">,</span> <span class="n">cluster_ids</span><span class="p">),</span>
Expand Down Expand Up @@ -507,7 +511,7 @@ <h1>Source code for pygeoda.clustering.azp</h1><div class="highlight"><pre>

<span class="k">return</span> <span class="p">{</span>
<span class="s2">&quot;Total sum of squares&quot;</span> <span class="p">:</span> <span class="n">total_ss</span><span class="p">,</span>
<span class="s2">&quot;Within-cluster sum of squares&quot;</span> <span class="p">:</span> <span class="nb">list</span><span class="p">(</span><span class="n">within_ss</span><span class="p">)</span> <span class="o">+</span> <span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">*</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">cluster_ids</span><span class="p">)</span> <span class="o">-</span> <span class="nb">len</span><span class="p">(</span><span class="n">within_ss</span><span class="p">)),</span>
<span class="s2">&quot;Within-cluster sum of squares&quot;</span> <span class="p">:</span> <span class="n">within_ss</span><span class="p">,</span>
<span class="s2">&quot;Total within-cluster sum of squares&quot;</span> <span class="p">:</span> <span class="n">between_ss</span><span class="p">,</span>
<span class="s2">&quot;The ratio of between to total sum of squares&quot;</span> <span class="p">:</span> <span class="n">ratio</span><span class="p">,</span>
<span class="s2">&quot;Clusters&quot;</span> <span class="p">:</span> <span class="n">flat_2dclusters</span><span class="p">(</span><span class="n">w</span><span class="o">.</span><span class="n">num_obs</span><span class="p">,</span> <span class="n">cluster_ids</span><span class="p">),</span>
Expand Down
Loading

0 comments on commit 9a69de6

Please sign in to comment.