Implement TripsLayer
for animating moving objects and connect to MovingPandas
#292
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
a minimal example
![Screen Recording 2023-12-05 at 5 15 35 PM](https://private-user-images.githubusercontent.com/15164633/288223305-bef41324-f838-4a25-b9ec-1a1dbb948e56.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk5MTUxNTMsIm5iZiI6MTcxOTkxNDg1MywicGF0aCI6Ii8xNTE2NDYzMy8yODgyMjMzMDUtYmVmNDEzMjQtZjgzOC00YTI1LWI5ZWMtMWExZGJiOTQ4ZTU2LmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzAyVDEwMDczM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEyOTYyYWNjZTcxNzIzZjg4YWY4N2FhMWNjYWNkZjk2NDEzZGNiMDkzZTFlOWM3OTU3YWNkMTIxMjkyMzI1NjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Mr_x9jZF0t6RznCW1ZM2k5lcBnQRMzGWWpFClHH9HFk)
Change list
TripsLayer
under theexperimental
modulemovingpandas
so I can use it for type checking. Maybe this should be a dev dependency and only imported as a type?from_movingpandas
class method to construct aTripsLayer
from a movingpandasTrajectoryCollection
Todo
TimestampAccessor
TrajectoryCollection
directly intoTimestampAccessor
?Open questions
ipywidgets.Play
widget (connected via jslink) is probably good enough for now, even if it appears to have a decent amount of overhead. The alternative would be to have a manual animation component on the JS side that maintains its own time state.Example repro
I got data from Access AIS, with a custom bounding box and time range, though it would probably be straightforward to use other data files as well.
cc @anitagraser, you may be interested in this, and/or have ideas for how to better integrate with movingpandas