Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

map.rst doumentation added #554

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 136 additions & 2 deletions docs/maps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,139 @@ Maps (``datascience.maps``)
===========================

.. automodule:: datascience.maps
:members:
:undoc-members:

**Summary of Methods for FoliumWrapper**

The folium wrapper class creates a map element that can be drawn. It takes an abstract base class as an argument.

Display

.. autosummary::
:toctree: _autosummary

_FoliumWrapper.draw
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the rationale for including docs on _FoliumWrapper? Normally classes that start with an underscore are not intended to be a primary part of the visible API?

_FoliumWrapper.as_html
_FoliumWrapper.show


Edit

.. autosummary::
:toctree: _autosummary

_FoliumWrapper._inline_map
_FoliumWrapper._set_folium_map


**Summary of Methods for Map**

The Map class takes in list of features and ids along with width and height as arguments.

Creation

.. autosummary::
:toctree: _autosummary

Map.__init__
Map.copy
Map._create_map


Accessing Values

.. autosummary::
:toctree: _autosummary

Map.__getItem__
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should methods starting with an _ be surfaced here?

Map.__len__
Map.__iter__
Map._autozoom
Map._autobounds
Map.features
Map.read_geojson
Map._read_geojson_features


Mutation

.. autosummary::
:toctree: _autosummary

Map._set_folium_wrap
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this method be made visible in this documentation?

Map.format
Map.geojson
Map.color

Transformation

.. autosummary::
:toctree: _autosummary

Map.overlay

**Summary of Marker Class**

The Marker class instantiates a marker that is displayed with _FoliumWrapper's simple_marker method. The color of the marker can either be chosen from [‘red’, ‘blue’, ‘green’, ‘purple’, ‘orange’, ‘darkred’,'lightred’, ‘beige’, ‘darkblue’, ‘darkgreen’, ‘cadetblue’, ‘darkpurple’,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fact that it uses _FoliumWrapper doesn't seem like a critical thing to document, that users need to understand.

‘white’, ‘pink’, ‘lightblue’, ‘lightgreen’, ‘gray’, ‘black’, ‘lightgray’] or using a hexcode.


Creation

.. autosummary::
:toctree: _autosummary

Marker.__init__
Marker.copy

Mutation

.. autosummary::
:toctree: _autosummary

Marker.geojson
Marker.format
Marker.draw_on
Marker.map
Marker.map_table

Accessing Values

.. autosummary::
:toctree: _autosummary

Marker.lat_lons

**Summary of Region Class**

Used to display a GeoJSON feature when using Folium's geo_json method.

Creation

.. autosummary::
:toctree: _autosummary

Region.__init__
Region.copy

Mutation

.. autosummary::
:toctree: _autosummary

Region.geojson
Region.format
Region.draw_on


Accessing values

.. autosummary::
:toctree: _autosummary

Region.lat_lons
Region.type
Region.polygons
Region.properties
Region._lat_lons_from_geojson
Region.get_coordinates