salish-sea / acartia

Open source web3 code underlying the Acartia data cooperative for sharing animal location data in real time
https://acartia.io
MIT License
4 stars 1 forks source link

Integration with Marine Exchange of Puget Sound #28

Open scottveirs opened 7 months ago

scottveirs commented 7 months ago
puzzledcherry commented 7 months ago

This may be out of left field, but do you guys have experience using this API with Mapbox? For what I'm working with right now, I'm trying to use the API endpoint and display the data on a Mapbox map, but I have limited experience with both API's and Mapbox. I've created a Postman account but I'm unsure what to do with this tool. Anything helps!

puzzledcherry commented 7 months ago

update: i figured out a way to use mapbox, but i have a follow up question, does the api pull result in a json file? is there anyway to get a geojson file instead?

scottveirs commented 6 months ago

Happy 2024, @puzzledcherry Skyla! I'm excited to work with you all this year to increase data exchange between the marine mammal monitoring community and commercial shipping sector in Puget Sound.

A couple of projects to date have used Mapbox to display data from Acartia.io via its API. I'd suggest you take a look at these two open repositories for example code that may be helpful to you:

puzzledcherry commented 6 months ago

Thanks so much @scottveirs , these resources look super helpful! Looking forward to the new year together!

puzzledcherry commented 5 months ago

I've been working more with the API you provided and was wondering if you guys have any insight on how I could identify outliers in the data so I can filter them out, like whales on land. Or do you just manually filter by long/lat? Also, what is the "trusted" data field of each entry about?

scottveirs commented 5 months ago

The Acartia trust model is a work in progress! In phase 1 it is really simple: if a moderator has reviewed a point from an unknown/new community scientist or the point came trusted observer, then trust level = 1. For now those are the only points you probably want.

On Wed, Feb 14, 2024 at 08:58 skyla! @.***> wrote:

I've been working more with the API you provided and was wondering if you guys have any insight on how I could identify outliers in the data so I can filter them out, like whales on land. Or do you just manually filter by long/lat? Also, what is the "trusted" data field of each entry about?

— Reply to this email directly, view it on GitHub https://github.com/salish-sea/acartia/issues/28#issuecomment-1944234178, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADLE3M7MNAJK3LFUG3PAPZDYTTUKPAVCNFSM6AAAAABANL5PB2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBUGIZTIMJXHA . You are receiving this because you were mentioned.Message ID: @.***>

puzzledcherry commented 4 months ago

Hi Scott! Long time no talk, I had a clarify question about the data being aggregated by Acartia: From my understanding Acartia's data is being fed into WRAS. Is Acartia also receiving WRAS data or is it a one-way transaction?

puzzledcherry commented 4 months ago

Follow up: does Acartia have their own platform for taking whale sightings or do they get all their info from aggregating from other platforms like Orca Network?

scottveirs commented 4 months ago

Hey Skyla,

Ocean Wise has only requested Acartia points that are recent (near real time), are whales (not pinnipeds, fish, etc), and have been validated by Orca Network staff. So, WRAS is only getting a fraction of what's in Acartia (i.e. only a real time subset for select species; no acoustic detections from Orcasound; no Whale Alert sightings that haven't been validated by Orca Network; no historic data uploads).

It's currently a one-way transaction: an Acartia data subset to WRAS. You can read all about the initial exchange here. It could change over time, but data flow from the Ocean Wise / BCCSN silo back to Acartia won't likely ever be in real time, but may eventually take the form of an intermittent transfer (e.g. monthly or annually).

Acartia.io currently has no map-based interface for geo-referencing points, but authenticated users with a digital ID and token can upload records using an import function and spreadsheet template.

puzzledcherry commented 4 months ago

Got it, thanks Scott!

puzzledcherry commented 3 months ago

Hey Scott :) I'm exploring the idea of a program that connects whale sightings on a map to help visualize the travel path of pods/individual whales. I determine whether two sightings are of the same pod/whale based on their type, and the distance they've travelled within 60 minutes. Example: if there are two grey whale sightings both within a lon/lat of 0.075 degrees, and both sightings were submitted within the same hour, I create a connection between them.

I've done some testing and this temporal-spatial algorithm seems to be working pretty well which I'm hyped about, but I'm looking to refine my algorithm with more species-specific thresholds. Like, I know an orca would travel faster than a grey whale within an hour, but exactly how fast?

From some googling it seems like orca, humpback, and grey whales are the ones found in the puget sound/salish sea. Could you provide some insights on their travel speeds within the puget sound/salish sea area, I figured you are probably my most reliable source for whale/cetacean info :)

scottveirs commented 3 months ago

That's great to hear your algorithm is generating useful tracks, Skyla!

@veirs may have some thoughts regarding your approach as he hacked together something similar last year in a this 2023 Earthday hackathon (see Gdoc with pre-hackathon goals and resources, as well as final slide deck).

For SRKW (and to a lesser extent Bigg's) killer whales, I'd point you to this shared spreadsheet of the peer-reviewed vs observed SRKW speed estimates. When we get a good ecotype (+/- pod, +/- matriline) track from Orcasound +/- Orca Network observations, I try to add additional observed times. You're welcome to join me in that exercise if you'd like, including on the Bigg's tab that I recently added.

I don't have travel speed estimates for baleen whales in Puget Sound, but know we are starting to get individual tracks in recent years that could inform speed statistics (at least inside Whidbey Island for gray whales, and for select humpback tracks near Seattle)...

puzzledcherry commented 3 months ago

These are great resources, thank you Scott! And yes, if veirs has anything they want to add, I'm all ears :) I'll definitely take a look at it and see if there's anything I'm able to contribute to those observed times, are there any steps I need to take to join you in that exercise?

scottveirs commented 3 months ago

I may need to give you edit access (eg via a Gmail account), but feel free to add a row whenever you observe KWs moving between landmarks like the ones listed. (I use Google maps to measure distances manually, but you may have other methods.)

puzzledcherry commented 3 months ago

Screenshot 2024-04-02 132310

Hey Scott! Sorry I couldn't catch you on Monday, I'm excited to learn more about the earth day hackathon you mentioned! As I'm working with the Acartia data I noticed that some of the sightings seem to be from the future? It's currently 1:27 PM on April 2nd, but I'm getting sightings from as far as 7:38 PM tonight AHAHA

Can you help me understand what might be happening? It may be something within my own code but I wanted to check in and see if anyone else had this issue or if you have any insight in this :)

scottveirs commented 3 months ago

Hi Skyla,

All times in the response from the Acartia API will be in UTC (aka GMT or Zulu time), so you should subtract 7 or 8 hours to get local time (being careful about Daylight Savings...)

Do you think that's the issue?

++Scott

On Tue, Apr 2, 2024 at 1:37 PM skyla! @.***> wrote:

Screenshot.2024-04-02.132310.png (view on web) https://github.com/salish-sea/acartia/assets/101948715/3fbe505b-f04b-4f96-8899-87c6bf0f6525

Hey Scott! Sorry I couldn't catch you on Monday, I'm excited to learn more about the earth day hackathon you mentioned! As I'm working with the Acartia data I noticed that some of the sightings seem to be from the future? It's currently 1:27 PM on April 2nd, but I'm getting sightings from as far as 7:38 PM tonight AHAHA

Can you help me understand what might be happening? It may be something within my own code but I wanted to check in and see if anyone else had this issue or if you have any insight in this :)

— Reply to this email directly, view it on GitHub https://github.com/salish-sea/acartia/issues/28#issuecomment-2033047132, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADLE3M4Z6F2NACAMDHEPHQLY3MJHDAVCNFSM6AAAAABANL5PB2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZTGA2DOMJTGI . You are receiving this because you were mentioned.Message ID: @.***>

puzzledcherry commented 3 months ago

That might be it, I'll start taking that into account! Thank you!

scottveirs commented 2 months ago

Hey @puzzledcherry -- just had a novel thought for you and Patrick: one could use the AIS data for known whale watch vessels to infer the presence of whales, even if they haven't yet been reported via public sighting or listening networks. While networks often do this manually by tracking vessels on marinetraffic.com or vesselfinder.com , perhaps the process could be automated with some "smart" algorithms. The algorithms would basically just need to look for changes in boat speed (i.e. reductions of ~20-50% from the max or cruising speeds in any region away from their home port). Here's an example for Explorathor (out of Vancouver) that is currently with some Bigg's killer whales...

Image

puzzledcherry commented 2 months ago

This is an interesting algorithm idea Scott, I like it! Currently, I'm focused on starting a different project at work, but I'll keep your idea in mind and hopefully find time to work on it soon. Let's stay in touch— I'm eager to hear about new ideas and how the whale-saving efforts are progressing.