Inspiration

I wanted to find a way to link social media with water quality for adaptive sampling but couldn't find strong enough association (twitter API) and a good retrospective body of data. So I tried to find the simplest way to collect data going forward - that is more empirical than anecdotal and doesn't require users to have a particular social media account (although #irlome could be tracked in the future on various platforms). I'm trying to reduce the need to sample lots of water for expensive DNA work, and build an easy way for the community to engage in science.

What it does

It provides a basic and easy interface to allow users to upload photos of the water from their camera phone. It shrinks the image, clusters by color and returns the centroid (representative color) from 5 clusters. It loads the data into an interactive map for users to visualize but captures, data time and location allowing us (over time) to correlate with existing water quality data (to be implemented).

How I built it

It uses a static hosted website in AWS S3, a simple javascript to submit photos to a folder in the bucket. A new file in the bucket triggers an AWS Lambda event that runs the shrink and cluster by color script (<30 sec per image, could be faster). This outputs data that currently goes to a flatfile that I uploaded to mapbox data/tile/style that I created. This needs to be more dynamic and realtime - see What's Next.

Challenges I ran into

I haven't done any web coding or javascript for ages. The permissions to allow anonymous uploads to an S3 path are being a pain. The logo is hand-drawn and still needs work. I don't have any real data to work from - I've used real water photos but the locations are artificial for the demonstration.

Accomplishments that I'm proud of

It kind-of works and looks ok, it still needs a lot of work - and the image analysis is rough.

What I learned

I've worked quickly with the keep-it-simple philosophy and tried to generate a working prototype. As a scientist I'm very detail oriented and would normally have spent 36 planning and doing background work, but I liked the talk on Friday by Jacob Waites and decided to try the rough prototyping approach in this limited timespan. To be honest, running my own lab this is actually something I would normally have tried to find a student for, so it was fun to push this through and try it out over the weekend.

What's next for IRLOme

Finish connecting the AWS upload parts. Connect data generation directly to mapbox API if possible, or use a database intermediate, Finish the web app (the top menu does nothing) and get better graphics. Collect some preliminary data (students or local school link) and do some data analysis with lobo/water management district data then review the image processing algorithm and refine it. Get a decent beta version to test and work with my outreach team to launch a campaign to get people to start collecting data. Find funding to expand the campaign.

Share this project:
×

Updates