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 ab29b99 commit 04c9cbb
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 21 deletions.
7 changes: 5 additions & 2 deletions _sources/topics/contributing.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,16 @@ Pull Request Process
Community Guidelines
====================

We follow the Python Community Code of Conduct, which, in essence, means that we
expect community members
We follow an adaptation of the Contributor Covenant Code of Conduct, which,
in essence, means that we expect community members to

- **Be respectful** of different viewpoints and experience levels.
- **Gracefully accept constructive criticism**.
- **Focus on what is best for the community**.

For more detailed information about our community guidelines, please see the
`Code of Conduct <https://github.com/mggg/GerryChain/blob/main/CODE_OF_CONDUCT.md>`_
page of the main repository.


Thank You
Expand Down
3 changes: 2 additions & 1 deletion _sources/user/install.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ adjacencies or reading in shapefiles, then run
This approach sometimes fails due to compatibility issues between our
different Python GIS dependencies, like ``geopandas``, ``pyproj``,
``fiona``, and ``shapely``. If you run into this issue, try installing
the dependencies using the `geo_settings.txt <./geo_settings.txt>`_
the dependencies using the
`geo_settings.txt <https://github.com/mggg/GerryChain/blob/main/docs/geo_settings.txt>`_
file. To do this, run ``pip install -r geo_settings.txt`` from the
command line.

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='140360704862096'&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='140260702472032'&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='140360704862096'&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='140260702472032'&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='140360704862096'&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='140260702472032'&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='140360704862192'&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='140260702472128'&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='140360705323360'&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='140260702400816'&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='140360705323360'&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='140260702400816'&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='140360704862096'&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='140260702472032'&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='140360704862096'&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='140260702472032'&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='140360704862096'&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='140260702472032'&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='140360704862192'&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='140260702472128'&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='140360704862096'&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='140260702472032'&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='140360704862192'&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='140260702472128'&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='140360704862192'&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='140260702472128'&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
Loading

0 comments on commit 04c9cbb

Please sign in to comment.