Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Feb 6, 2024
1 parent 45c4510 commit 801fe2d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 23 deletions.
3 changes: 1 addition & 2 deletions _sources/user/quickstart.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ What you'll need
Before we can start running Markov chains, you'll need to:

* Install ``gerrychain`` from PyPI. See the :doc:`installation guide <./install>` for instructions.
* Download `this example json of Pennsylvania's VTDs
<https://github.com/mggg/GerryChain/blob/main/docs/_static/PA_VTDs.json>`_.
* Download `this example json of Pennsylvania's VTDs <https://github.com/mggg/GerryChain/blob/main/docs/_static/PA_VTDs.json>`_.
* Open your preferred Python environment (e.g. JupyterLab, IPython, or a ``.py`` file
in your favorite editor) in the directory containing the ``PA_VTDs.json`` file
that you downloaded.
Expand Down
8 changes: 4 additions & 4 deletions api.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ <h2><a class="toc-backref" href="#id6">Adjacency graphs</a><a class="headerlink"
</div>
<dl class="method">
<dt id="gerrychain.graph.graph.Graph.add_data">
<code class="sig-name descname">add_data</code><span class="sig-paren">(</span><em class="sig-param">df: &lt;Mock name='mock.DataFrame' id='140185783486256'&gt;</em>, <em class="sig-param">columns: Optional[Iterable[str]] = None</em><span class="sig-paren">)</span> &#x2192; None<a class="reference internal" href="_modules/gerrychain/graph/graph.html#Graph.add_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gerrychain.graph.graph.Graph.add_data" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">add_data</code><span class="sig-paren">(</span><em class="sig-param">df: &lt;Mock name='mock.DataFrame' id='139849168410512'&gt;</em>, <em class="sig-param">columns: Optional[Iterable[str]] = None</em><span class="sig-paren">)</span> &#x2192; None<a class="reference internal" href="_modules/gerrychain/graph/graph.html#Graph.add_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gerrychain.graph.graph.Graph.add_data" title="Permalink to this definition"></a></dt>
<dd><p>Add columns of a DataFrame to a graph as node attributes
by matching the DataFrame’s index to node ids.</p>
<dl class="field-list simple">
Expand Down Expand Up @@ -211,7 +211,7 @@ <h2><a class="toc-backref" href="#id6">Adjacency graphs</a><a class="headerlink"

<dl class="method">
<dt id="gerrychain.graph.graph.Graph.from_geodataframe">
<em class="property">classmethod </em><code class="sig-name descname">from_geodataframe</code><span class="sig-paren">(</span><em class="sig-param">dataframe: &lt;Mock name='mock.DataFrame' id='140185783486256'&gt;</em>, <em class="sig-param">adjacency: str = 'rook'</em>, <em class="sig-param">cols_to_add: Optional[List[str]] = None</em>, <em class="sig-param">reproject: bool = False</em>, <em class="sig-param">ignore_errors: bool = False</em><span class="sig-paren">)</span> &#x2192; gerrychain.graph.graph.Graph<a class="reference internal" href="_modules/gerrychain/graph/graph.html#Graph.from_geodataframe"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gerrychain.graph.graph.Graph.from_geodataframe" title="Permalink to this definition"></a></dt>
<em class="property">classmethod </em><code class="sig-name descname">from_geodataframe</code><span class="sig-paren">(</span><em class="sig-param">dataframe: &lt;Mock name='mock.DataFrame' id='139849168410512'&gt;</em>, <em class="sig-param">adjacency: str = 'rook'</em>, <em class="sig-param">cols_to_add: Optional[List[str]] = None</em>, <em class="sig-param">reproject: bool = False</em>, <em class="sig-param">ignore_errors: bool = False</em><span class="sig-paren">)</span> &#x2192; gerrychain.graph.graph.Graph<a class="reference internal" href="_modules/gerrychain/graph/graph.html#Graph.from_geodataframe"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gerrychain.graph.graph.Graph.from_geodataframe" title="Permalink to this definition"></a></dt>
<dd><p>Creates the adjacency <a class="reference internal" href="#gerrychain.graph.graph.Graph" title="gerrychain.graph.graph.Graph"><code class="xref py py-class docutils literal notranslate"><span class="pre">Graph</span></code></a> of geometries described by <cite>dataframe</cite>.
The areas of the polygons are included as node attributes (with key <cite>area</cite>).
The shared perimeter of neighboring polygons are included as edge attributes
Expand Down Expand Up @@ -311,7 +311,7 @@ <h2><a class="toc-backref" href="#id6">Adjacency graphs</a><a class="headerlink"

<dl class="method">
<dt id="gerrychain.graph.graph.Graph.join">
<code class="sig-name descname">join</code><span class="sig-paren">(</span><em class="sig-param">dataframe: &lt;Mock name='mock.DataFrame' id='140185783486256'&gt;</em>, <em class="sig-param">columns: Optional[List[str]] = None</em>, <em class="sig-param">left_index: Optional[str] = None</em>, <em class="sig-param">right_index: Optional[str] = None</em><span class="sig-paren">)</span> &#x2192; None<a class="reference internal" href="_modules/gerrychain/graph/graph.html#Graph.join"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gerrychain.graph.graph.Graph.join" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">join</code><span class="sig-paren">(</span><em class="sig-param">dataframe: &lt;Mock name='mock.DataFrame' id='139849168410512'&gt;</em>, <em class="sig-param">columns: Optional[List[str]] = None</em>, <em class="sig-param">left_index: Optional[str] = None</em>, <em class="sig-param">right_index: Optional[str] = None</em><span class="sig-paren">)</span> &#x2192; None<a class="reference internal" href="_modules/gerrychain/graph/graph.html#Graph.join"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gerrychain.graph.graph.Graph.join" title="Permalink to this definition"></a></dt>
<dd><p>Add data from a dataframe to the graph, matching nodes to rows when
the node’s <cite>left_index</cite> attribute equals the row’s <cite>right_index</cite> value.</p>
<dl class="field-list simple">
Expand Down Expand Up @@ -1328,7 +1328,7 @@ <h2><a class="toc-backref" href="#id8">Markov chains</a><a class="headerlink" hr

<dl class="class">
<dt id="gerrychain.updaters.DataTally">
<em class="property">class </em><code class="sig-prename descclassname">gerrychain.updaters.</code><code class="sig-name descname">DataTally</code><span class="sig-paren">(</span><em class="sig-param">data: Union[Dict, &lt;Mock name='mock.Series' id='140185783486352'&gt;, str], alias: str</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/gerrychain/updaters/tally.html#DataTally"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gerrychain.updaters.DataTally" title="Permalink to this definition"></a></dt>
<em class="property">class </em><code class="sig-prename descclassname">gerrychain.updaters.</code><code class="sig-name descname">DataTally</code><span class="sig-paren">(</span><em class="sig-param">data: Union[Dict, &lt;Mock name='mock.Series' id='139849168410608'&gt;, str], alias: str</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/gerrychain/updaters/tally.html#DataTally"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gerrychain.updaters.DataTally" title="Permalink to this definition"></a></dt>
<dd><p>An updater for tallying numerical data that is not necessarily stored as
node attributes</p>
<dl class="field-list simple">
Expand Down
18 changes: 9 additions & 9 deletions full_ref.html
Original file line number Diff line number Diff line change
Expand Up @@ -1585,7 +1585,7 @@ <h2>Graph<a class="headerlink" href="#graph" title="Permalink to this headline">

<dl class="function">
<dt>
<code class="sig-prename descclassname">gerrychain.graph.adjacency.</code><code class="sig-name descname">neighbors</code><span class="sig-paren">(</span><em class="sig-param">df: &lt;Mock name='mock.GeoDataFrame' id='140185783431376'&gt;</em>, <em class="sig-param">adjacency: str</em><span class="sig-paren">)</span> &#x2192; Dict<a class="reference internal" href="_modules/gerrychain/graph/adjacency.html#neighbors"><span class="viewcode-link">[source]</span></a></dt>
<code class="sig-prename descclassname">gerrychain.graph.adjacency.</code><code class="sig-name descname">neighbors</code><span class="sig-paren">(</span><em class="sig-param">df: &lt;Mock name='mock.GeoDataFrame' id='139849168871776'&gt;</em>, <em class="sig-param">adjacency: str</em><span class="sig-paren">)</span> &#x2192; Dict<a class="reference internal" href="_modules/gerrychain/graph/adjacency.html#neighbors"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

<dl class="function">
Expand Down Expand Up @@ -1691,7 +1691,7 @@ <h2>Graph<a class="headerlink" href="#graph" title="Permalink to this headline">

<dl class="function">
<dt>
<code class="sig-prename descclassname">gerrychain.graph.geo.</code><code class="sig-name descname">identify_utm_zone</code><span class="sig-paren">(</span><em class="sig-param">df: &lt;Mock name='mock.GeoDataFrame' id='140185783431376'&gt;</em><span class="sig-paren">)</span> &#x2192; int<a class="reference internal" href="_modules/gerrychain/graph/geo.html#identify_utm_zone"><span class="viewcode-link">[source]</span></a></dt>
<code class="sig-prename descclassname">gerrychain.graph.geo.</code><code class="sig-name descname">identify_utm_zone</code><span class="sig-paren">(</span><em class="sig-param">df: &lt;Mock name='mock.GeoDataFrame' id='139849168871776'&gt;</em><span class="sig-paren">)</span> &#x2192; int<a class="reference internal" href="_modules/gerrychain/graph/geo.html#identify_utm_zone"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Given a GeoDataFrame, identify the Universal Transverse Mercator zone
number for the centroid of the geometries in the dataframe.</p>
</dd></dl>
Expand Down Expand Up @@ -1851,7 +1851,7 @@ <h2>Graph<a class="headerlink" href="#graph" title="Permalink to this headline">
</div>
<dl class="method">
<dt>
<code class="sig-name descname">add_data</code><span class="sig-paren">(</span><em class="sig-param">df: &lt;Mock name='mock.DataFrame' id='140185783486256'&gt;</em>, <em class="sig-param">columns: Optional[Iterable[str]] = None</em><span class="sig-paren">)</span> &#x2192; None<a class="reference internal" href="_modules/gerrychain/graph/graph.html#Graph.add_data"><span class="viewcode-link">[source]</span></a></dt>
<code class="sig-name descname">add_data</code><span class="sig-paren">(</span><em class="sig-param">df: &lt;Mock name='mock.DataFrame' id='139849168410512'&gt;</em>, <em class="sig-param">columns: Optional[Iterable[str]] = None</em><span class="sig-paren">)</span> &#x2192; None<a class="reference internal" href="_modules/gerrychain/graph/graph.html#Graph.add_data"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Add columns of a DataFrame to a graph as node attributes
by matching the DataFrame’s index to node ids.</p>
<dl class="field-list simple">
Expand Down Expand Up @@ -1912,7 +1912,7 @@ <h2>Graph<a class="headerlink" href="#graph" title="Permalink to this headline">

<dl class="method">
<dt>
<em class="property">classmethod </em><code class="sig-name descname">from_geodataframe</code><span class="sig-paren">(</span><em class="sig-param">dataframe: &lt;Mock name='mock.DataFrame' id='140185783486256'&gt;</em>, <em class="sig-param">adjacency: str = 'rook'</em>, <em class="sig-param">cols_to_add: Optional[List[str]] = None</em>, <em class="sig-param">reproject: bool = False</em>, <em class="sig-param">ignore_errors: bool = False</em><span class="sig-paren">)</span> &#x2192; gerrychain.graph.graph.Graph<a class="reference internal" href="_modules/gerrychain/graph/graph.html#Graph.from_geodataframe"><span class="viewcode-link">[source]</span></a></dt>
<em class="property">classmethod </em><code class="sig-name descname">from_geodataframe</code><span class="sig-paren">(</span><em class="sig-param">dataframe: &lt;Mock name='mock.DataFrame' id='139849168410512'&gt;</em>, <em class="sig-param">adjacency: str = 'rook'</em>, <em class="sig-param">cols_to_add: Optional[List[str]] = None</em>, <em class="sig-param">reproject: bool = False</em>, <em class="sig-param">ignore_errors: bool = False</em><span class="sig-paren">)</span> &#x2192; gerrychain.graph.graph.Graph<a class="reference internal" href="_modules/gerrychain/graph/graph.html#Graph.from_geodataframe"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Creates the adjacency <a class="reference internal" href="api.html#gerrychain.graph.graph.Graph" title="gerrychain.graph.graph.Graph"><code class="xref py py-class docutils literal notranslate"><span class="pre">Graph</span></code></a> of geometries described by <cite>dataframe</cite>.
The areas of the polygons are included as node attributes (with key <cite>area</cite>).
The shared perimeter of neighboring polygons are included as edge attributes
Expand Down Expand Up @@ -2012,7 +2012,7 @@ <h2>Graph<a class="headerlink" href="#graph" title="Permalink to this headline">

<dl class="method">
<dt>
<code class="sig-name descname">join</code><span class="sig-paren">(</span><em class="sig-param">dataframe: &lt;Mock name='mock.DataFrame' id='140185783486256'&gt;</em>, <em class="sig-param">columns: Optional[List[str]] = None</em>, <em class="sig-param">left_index: Optional[str] = None</em>, <em class="sig-param">right_index: Optional[str] = None</em><span class="sig-paren">)</span> &#x2192; None<a class="reference internal" href="_modules/gerrychain/graph/graph.html#Graph.join"><span class="viewcode-link">[source]</span></a></dt>
<code class="sig-name descname">join</code><span class="sig-paren">(</span><em class="sig-param">dataframe: &lt;Mock name='mock.DataFrame' id='139849168410512'&gt;</em>, <em class="sig-param">columns: Optional[List[str]] = None</em>, <em class="sig-param">left_index: Optional[str] = None</em>, <em class="sig-param">right_index: Optional[str] = None</em><span class="sig-paren">)</span> &#x2192; None<a class="reference internal" href="_modules/gerrychain/graph/graph.html#Graph.join"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Add data from a dataframe to the graph, matching nodes to rows when
the node’s <cite>left_index</cite> attribute equals the row’s <cite>right_index</cite> value.</p>
<dl class="field-list simple">
Expand Down Expand Up @@ -2100,7 +2100,7 @@ <h2>Graph<a class="headerlink" href="#graph" title="Permalink to this headline">

<dl class="function">
<dt>
<code class="sig-prename descclassname">gerrychain.graph.graph.</code><code class="sig-name descname">add_boundary_perimeters</code><span class="sig-paren">(</span><em class="sig-param">graph: gerrychain.graph.graph.Graph</em>, <em class="sig-param">geometries: &lt;Mock name='mock.Series' id='140185783486352'&gt;</em><span class="sig-paren">)</span> &#x2192; None<a class="reference internal" href="_modules/gerrychain/graph/graph.html#add_boundary_perimeters"><span class="viewcode-link">[source]</span></a></dt>
<code class="sig-prename descclassname">gerrychain.graph.graph.</code><code class="sig-name descname">add_boundary_perimeters</code><span class="sig-paren">(</span><em class="sig-param">graph: gerrychain.graph.graph.Graph</em>, <em class="sig-param">geometries: &lt;Mock name='mock.Series' id='139849168410608'&gt;</em><span class="sig-paren">)</span> &#x2192; None<a class="reference internal" href="_modules/gerrychain/graph/graph.html#add_boundary_perimeters"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Add shared perimeter between nodes and the total geometry boundary.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
Expand All @@ -2120,7 +2120,7 @@ <h2>Graph<a class="headerlink" href="#graph" title="Permalink to this headline">

<dl class="function">
<dt>
<code class="sig-prename descclassname">gerrychain.graph.graph.</code><code class="sig-name descname">check_dataframe</code><span class="sig-paren">(</span><em class="sig-param">df: &lt;Mock name='mock.DataFrame' id='140185783486256'&gt;</em><span class="sig-paren">)</span> &#x2192; None<a class="reference internal" href="_modules/gerrychain/graph/graph.html#check_dataframe"><span class="viewcode-link">[source]</span></a></dt>
<code class="sig-prename descclassname">gerrychain.graph.graph.</code><code class="sig-name descname">check_dataframe</code><span class="sig-paren">(</span><em class="sig-param">df: &lt;Mock name='mock.DataFrame' id='139849168410512'&gt;</em><span class="sig-paren">)</span> &#x2192; None<a class="reference internal" href="_modules/gerrychain/graph/graph.html#check_dataframe"><span class="viewcode-link">[source]</span></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>None</p>
Expand Down Expand Up @@ -2516,7 +2516,7 @@ <h2>Partition<a class="headerlink" href="#partition" title="Permalink to this he

<dl class="method">
<dt>
<code class="sig-name descname">to_series</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; &lt;Mock name='mock.Series' id='140185783486352'&gt;<a class="reference internal" href="_modules/gerrychain/partition/assignment.html#Assignment.to_series"><span class="viewcode-link">[source]</span></a></dt>
<code class="sig-name descname">to_series</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; &lt;Mock name='mock.Series' id='139849168410608'&gt;<a class="reference internal" href="_modules/gerrychain/partition/assignment.html#Assignment.to_series"><span class="viewcode-link">[source]</span></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>The assignment as a <code class="xref py py-class docutils literal notranslate"><span class="pre">pandas.Series</span></code>.</p>
Expand Down Expand Up @@ -4483,7 +4483,7 @@ <h2>Updaters<a class="headerlink" href="#updaters" title="Permalink to this head

<dl class="class">
<dt>
<em class="property">class </em><code class="sig-prename descclassname">gerrychain.updaters.tally.</code><code class="sig-name descname">DataTally</code><span class="sig-paren">(</span><em class="sig-param">data: Union[Dict, &lt;Mock name='mock.Series' id='140185783486352'&gt;, str], alias: str</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/gerrychain/updaters/tally.html#DataTally"><span class="viewcode-link">[source]</span></a></dt>
<em class="property">class </em><code class="sig-prename descclassname">gerrychain.updaters.tally.</code><code class="sig-name descname">DataTally</code><span class="sig-paren">(</span><em class="sig-param">data: Union[Dict, &lt;Mock name='mock.Series' id='139849168410608'&gt;, str], alias: str</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/gerrychain/updaters/tally.html#DataTally"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>An updater for tallying numerical data that is not necessarily stored as
node attributes</p>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

Loading

0 comments on commit 801fe2d

Please sign in to comment.