Skip to content
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
35 changes: 35 additions & 0 deletions plotlywrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,41 @@ def hist2d(x, y, label=None, opacity=None):
return Chart(data=data)


def scattergeo(latitude, longitude, size=1, text=None, location='USA-states'):
"""TODO: Docstring for map.

Parameters
----------
locations : TODO
type : TODO, optional
locationmode : TODO, optional

Returns
-------
TODO

"""
data = go.Scattergeo(
locationmode=location,
lon=longitude,
lat=latitude,
text=text,
mode='markers',
marker=dict(
size=size,
line=dict(width=1)
)
)
layout = dict(
geo=dict(
scope='usa',
projection=dict(type='albers usa'),
showland=True
)
)
return Chart(data=[data], layout=layout)


class PandasPlotting(object):
"""
These plotting tools can be accessed through dataframe instance
Expand Down