I am learning to use the Wolfram databins and DO Button and DO Note apps for a personal project.

The sample code I am using as the Recipe is:

location={ {{Latitude}},{{Longitude}}}

Now, when I call the data from the databin:

In= Values[Databin[bin, 1]]["location"]
Out= {"{ 51.50690466636,-0.194158124029808}"}

The Head of this result is a List containing a String. What I would like is either a List containing a List of Reals or a a List containing a GeoPosition. At the moment I solve this with writing in my notebook:

ToExpression /@ Values[Databin[bin]]["location"]

for the first case and

GeoPosition /@ ToExpression /@ Values[Databin[bin, 1]]["location"]

which works fine, but somehow it annoys me that the data is stored in the databin (or understood upon import by Mathematica) as a string and not as a list of Reals.

Is there a way to store the data in the databin as a List of Reals (by writing code in the DO Recipe)?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.