Commit c36ed240 authored by Alex Nunes's avatar Alex Nunes

Modified timeline to check for receiver column before filtering releases

 Changes to be committed:
	modified:   docs/notebooks/visual_detection_timeline.ipynb.rst
	modified:   resonate/
parent 5596f3ce
......@@ -10,7 +10,7 @@ This tool takes a detections extract file and generates a Plotly
animated timeline, either in place in an iPython notebook or exported
out to an HTML file.
.. warning::
.. warning::
Input files must include ``datecollected``, ``catalognumber``, ``station``, ``latitude``, and ``longitude`` as columns.
......@@ -44,7 +44,7 @@ much for responsive than standard Scattergeo plot.
from resonate.visual_timeline import timeline
import pandas as pd
mapbox_access_token = 'YOUR MAPBOX ACCESS TOKEN HERE'
detections = pd.read_csv("/path/to/detection.csv")
timeline(detections, "Title", mapbox_token=mapbox_access_token)
......@@ -21,7 +21,8 @@ def consolidate_data(detections):
detections = detections.copy(deep=True)
detections = detections[~(detections.receiver == 'release')]
if 'receiver' in detections.columns:
detections = detections[~(detections.receiver == 'release')]
detections['date'] = pd.to_datetime(detections.datecollected)
detections['det_counts'] = 0
detections = detections.groupby(
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment