Re: Spectrometer and Medialab-Prado Hackfest

13 views
Skip to first unread message

Liz Barry

unread,
May 13, 2013, 10:50:45 AM5/13/13
to Daniel Lombraña González, Francois Grey, plots-spe...@googlegroups.com
Hi Daniel, 
Great to hear from you! I'm copying the spectrometry mailing list: 
Please join this list in order to reply-all. 

Dear spectrometry list, 
I'd like to introduce Daniel who is awesome and organizing a spectrometer hackathon this weekend in Spain. Please read below for his inquiry on whether there is a SpectralWorkbench API for accessing datasets? They are interested in creating ways for many people to help searching / sorting similar spectra by grouping them by similar characteristics. Perhaps someone who is working with Google Summer of Code projects can also provide a status update on the "Shazaam for spectra" project?

Thank you all!
Liz



On Tue, May 7, 2013 at 3:17 AM, Daniel Lombraña González <tele...@gmail.com> wrote:
Dear Liz,

I'm Daniel Lombraña, and I work for the Citizen Cyberscience Centre. As you have seen in my tweets, we will be co-organizing in collaboration with the Medialab-Prado, Ibercivis and the Open Knowledge Foundation a hackfest around Citizen Science in Madrid, Spain.

From the CCC we are really interested in the field of volunteer sensing, as we are developing different tools for doing citizen science like PyBossa (check CrowdCrafting.org or ForestWatchers.net to try the software in real projects) or the volunteer Computing project LHC@Home: Test4Theory.

In this hackfest I would explore the idea of creating some spectrometers just to learn something new, and see if we can integrate the PyBossa framework with your web site http://spectralworkbench.org

PyBossa can help when you need to get a crowd of people helping you to, for example, look for similar pictures, and group them by similar characteristics, in your case by similar wavelengths. Thus, would be useful if we propose at the hackfest the possibility of creating a CrowdCrafting.org app that will help you to group the submitted spectra? If your site has an API that serves the current data sets, then, creating the app would be more or less simple :-) What do you think?

All the best,

Daniel

PS: Thanks a lot for writing about the Google Group and twetting about the hackfest!

--
··························································································································································
http://daniellombrana.es
http://citizencyberscience.net
··························································································································································
Por favor, NO utilice formatos de archivo propietarios para el
intercambio de documentos, como DOC y XLS, sino PDF, HTML, RTF, TXT, CSV
o cualquier otro que no obligue a utilizar un programa de un
fabricante concreto para tratar la información contenida en él.
··························································································································································



--
Liz Barry
director of urban environment
@publiclab

Jeffrey Warren

unread,
May 13, 2013, 11:04:23 AM5/13/13
to plots-spe...@googlegroups.com, Daniel Lombraña González, Francois Grey
There is an API - but not for bulk queries. Any spectrum has a link to CSV, JSON, and XML download -- you can fetch those directly with the URLs provided on the page. 

If you need a way to get such data in JSON or XML form for a search query or something, tell me what you need and I can add it as a query.

Jeff


--
You received this message because you are subscribed to the Google Groups "plots-spectrometry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plots-spectrome...@googlegroups.com.
To post to this group, send email to plots-spe...@googlegroups.com.
Visit this group at http://groups.google.com/group/plots-spectrometry?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jeffrey Warren

unread,
May 14, 2013, 10:24:45 AM5/14/13
to Daniel Lombraña González, plots-spe...@googlegroups.com, Francois Grey
Sure - you'd like a JSON api call at:


Would that work?

Jeff


On Tue, May 14, 2013 at 3:40 AM, Daniel Lombraña González <tele...@gmail.com> wrote:
Hi there,

Thanks a lot for your support! I've been checking the API and I see that you can get for example all olive oils samples like this:

http://spectralworkbench.org/tag/oliveoil

Would be possible to do the same but getting the results in JSON? Then, if we have "golden wavelenghts" for the oliveoil sample, we can create a CrowdCrafting.org app that will invite the volunteers to match them to that golden item. This could help you to validate the data that your community is submitting. Would be this valuable?

All the best,

Daniel

Jeffrey Warren

unread,
May 14, 2013, 10:49:39 AM5/14/13
to Daniel Lombraña González, plots-spe...@googlegroups.com, Francois Grey
I just added that, with links along the right side of every tag page. So:


etc. 

It only displays the most recent 24, but you can go back by "page" using:




Enjoy!!

Jeff

Jeffrey Warren

unread,
May 16, 2013, 9:23:45 AM5/16/13
to Daniel Lombraña González, plots-spe...@googlegroups.com, Francois Grey
Spectral Workbench itself is intended as an analysis tool to compare data, and I'd encourage you to use the JavaScript API and write macros to do that: 


There are already methods for comparing, and I was hoping to write one for subtracting spectra as well so if you get to that it'd be great. 

It uses Flot.js which wants data in an array of pairs, like: 

[ [400,138], [401.5,150], ... ]

So in the JS code on SW, it has to convert the native JSON storage to this format before displaying. The code isn't super clean, but I was planning on including a method like $W.convert_for_flot_display() to standardize this conversion so it's easier to use. For now, there is $W.add_spectrum(int id) - which fetches data from a spectrum with the given ID, and displays it in the graph for comparison

You can save and share macros here: http://spectralworkbench.org/macros

Jeff


On Thu, May 16, 2013 at 3:51 AM, Daniel Lombraña González <tele...@gmail.com> wrote:
Perfect! Thanks a lot Jeffrey. One extra question, do you have a JavaScript library to view the wavelengths out of the box? In the JSON objects that you are returning I can see that you embed the raw data, which is amazing by the way, so do you have around any handy lib for rendering that data? The idea will be to render the data directly in the browser so users can compare them :-)

I see that you also add in the JSON the name of the picture, but you give only the relative URL, would be possible to change that to the full path? It will help a lot to other developers to find out the services, hehe. I'm actually now in the process of adding this support to our PyBossa framework, and it is called HATEOAS. The basic idea behind HATEOAS is to provide in APIs as much information as possible, so new developers do not have to look in the docs as they will get a structure in the API that will allow then to discover the next item in the list, etc, etc.

If you need help with this, let me know it, but a quick search in Google will give you some hints.

All the best,

Daniel

Jeffrey Warren

unread,
May 16, 2013, 9:49:24 AM5/16/13
to Daniel Lombraña González, plots-spe...@googlegroups.com, Francois Grey
Reply all
Reply to author
Forward
0 new messages