Skip to content

Commit

Permalink
Merge pull request #39 from weikang9009/master
Browse files Browse the repository at this point in the history
add docs for viz function compare_surfaces
  • Loading branch information
TaylorOshan authored Sep 27, 2018
2 parents d9136f6 + 4e5a4e3 commit 962069d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 15 deletions.
3 changes: 2 additions & 1 deletion doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ Visualization
:toctree: generated/

utils.shift_colormap
utils.truncate_colormap
utils.truncate_colormap
utils.compare_surfaces
6 changes: 6 additions & 0 deletions doc/generated/mgwr.utils.compare_surfaces.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mgwr.utils.compare\_surfaces
============================

.. currentmodule:: mgwr.utils

.. autofunction:: compare_surfaces
34 changes: 20 additions & 14 deletions mgwr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,26 @@ def compare_surfaces(data, var1, var2, gwr_t, gwr_bw, mgwr_t, mgwr_bw, name, kwa
Parameters
----------
data: pandas or geopandas frame with gwr/mgwr results
var1: name of gwr parameter estimate column in frame (string)
var2: name of mgwr parameter estimate column in frame (string)
gwr_t: name of gwr t-values column in frame associated with var1 (string)
gwr_bw: bandwith for gwr model for var1
mgwr_t: name of mgwr t-values column in frame associated with var2 (string)
mgwr_bw: bandwidth for mgwr model for var2
name: common variable name to use for title
kwargs1: additional plotting arguments for gwr surface
kwargs2: additional plotting arguments for mgwr surface
Returns
-------
None: Functions generates a plot
data : pandas or geopandas Dataframe
gwr/mgwr results
var1 : string
name of gwr parameter estimate column in frame
var2 : string
name of mgwr parameter estimate column in frame
gwr_t : string
name of gwr t-values column in frame associated with var1
gwr_bw : float
bandwidth for gwr model for var1
mgwr_t : string
name of mgwr t-values column in frame associated with var2
mgwr_bw: float
bandwidth for mgwr model for var2
name : string
common variable name to use for title
kwargs1:
additional plotting arguments for gwr surface
kwargs2:
additional plotting arguments for mgwr surface
'''
import matplotlib.pyplot as plt
import geopandas as gp
Expand Down

0 comments on commit 962069d

Please sign in to comment.