openbrainsrc / Radian

Plotting with AngularJS
http://openbrainsrc.github.io/Radian/index.html
168 stars 19 forks source link

isodate metadata plots broken #10

Closed glutamate closed 11 years ago

glutamate commented 11 years ago

between Bayeshive commits d7f87f78 and dc685dc8, plots of the following type are broken

<plot-data id="plot5k_0" name="plot5k_0" format="csv" cols="time,signal">
<metadata name="time" label="Time" format="date" DATE-PARSE-FORMAT="isodate"></metadata>
"2005-01-03T00:00:00.000Z", 840.6400146484375
"2005-01-04T00:00:00.000Z", 852.3300170898438
"2005-01-05T00:00:00.000Z", 845.4600219726562
"2005-01-06T00:00:00.000Z", 848.8900146484375
"2005-01-07T00:00:00.000Z", 859.9000244140625
...
</plot-data>

<plot width=620 zoom-x>
<lines x="[[plot5k_0.time]]" y="[[plot5k_0.signal]]"></lines>
</plot>
glutamate commented 11 years ago

but only when in a document displayed in the dashboard, not on the document page...

ian-ross commented 11 years ago

I'll check this out later. My version of Radian is in pieces on the floor at the moment -- I'm adding stuff to the expression parser to allow you to specify palettes within expressions (things like [[@P{red:blue}(some#variable)]]).

On 22 April 2013 13:09, Tom Nielsen notifications@github.com wrote:

between Bayeshive commits d7f87f78 and dc685dc8, plots of the following type are broken

"2005-01-03T00:00:00.000Z", 840.6400146484375 "2005-01-04T00:00:00.000Z", 852.3300170898438 "2005-01-05T00:00:00.000Z", 845.4600219726562 "2005-01-06T00:00:00.000Z", 848.8900146484375 "2005-01-07T00:00:00.000Z", 859.9000244140625 ...

— Reply to this email directly or view it on GitHubhttps://github.com/glutamate/Radian/issues/10 .

Ian Ross Tel: +43(0)6804451378 ian@skybluetrades.net www.skybluetrades.net

ian-ross commented 11 years ago

It's almost certainly a problem with the way I scope data and metadata derived from plot-data elements. I have a bit of an idea what it might be. It was tricky to get that stuff working at the beginning, and I need to go back and re-examine the scope stuff, because I think I was a bit Angular-naïve when I wrote it.

On 22 April 2013 13:49, Ian Ross ian@skybluetrades.net wrote:

I'll check this out later. My version of Radian is in pieces on the floor at the moment -- I'm adding stuff to the expression parser to allow you to specify palettes within expressions (things like [[@P{red:blue}(some#variable)]]).

On 22 April 2013 13:09, Tom Nielsen notifications@github.com wrote:

between Bayeshive commits d7f87f78 and dc685dc8, plots of the following type are broken

"2005-01-03T00:00:00.000Z", 840.6400146484375 "2005-01-04T00:00:00.000Z", 852.3300170898438 "2005-01-05T00:00:00.000Z", 845.4600219726562 "2005-01-06T00:00:00.000Z", 848.8900146484375 "2005-01-07T00:00:00.000Z", 859.9000244140625 ...

— Reply to this email directly or view it on GitHubhttps://github.com/glutamate/Radian/issues/10 .

Ian Ross Tel: +43(0)6804451378 ian@skybluetrades.net www.skybluetrades.net

Ian Ross Tel: +43(0)6804451378 ian@skybluetrades.net www.skybluetrades.net

ian-ross commented 11 years ago

Just a quick question about this, so that I go at it the same way that you did: how did you import data like this? With my "time series CSV" importer, or just as normal CSV data? I see that the plotting stuff in prebaysig.js produces the metadata lines automatically -- I just want to make sure that I'm generating time series data with the right, and I can't see where the timeseries metadata gets set up.

Oh, except for in BaysYahoo, I now see. Is that what I should use to test this?

On 22 April 2013 13:50, Ian Ross ian@skybluetrades.net wrote:

It's almost certainly a problem with the way I scope data and metadata derived from plot-data elements. I have a bit of an idea what it might be. It was tricky to get that stuff working at the beginning, and I need to go back and re-examine the scope stuff, because I think I was a bit Angular-naïve when I wrote it.

On 22 April 2013 13:49, Ian Ross ian@skybluetrades.net wrote:

I'll check this out later. My version of Radian is in pieces on the floor at the moment -- I'm adding stuff to the expression parser to allow you to specify palettes within expressions (things like [[@P{red:blue}(some#variable)]]).

On 22 April 2013 13:09, Tom Nielsen notifications@github.com wrote:

between Bayeshive commits d7f87f78 and dc685dc8, plots of the following type are broken

"2005-01-03T00:00:00.000Z", 840.6400146484375 "2005-01-04T00:00:00.000Z", 852.3300170898438 "2005-01-05T00:00:00.000Z", 845.4600219726562 "2005-01-06T00:00:00.000Z", 848.8900146484375 "2005-01-07T00:00:00.000Z", 859.9000244140625 ...

— Reply to this email directly or view it on GitHubhttps://github.com/glutamate/Radian/issues/10 .

Ian Ross Tel: +43(0)6804451378 ian@skybluetrades.net www.skybluetrades.net

Ian Ross Tel: +43(0)6804451378 ian@skybluetrades.net www.skybluetrades.net

Ian Ross Tel: +43(0)6804451378 ian@skybluetrades.net www.skybluetrades.net

glutamate commented 11 years ago

Yes with baysyahoo. I think you have to go into your /var/bayeshive/1 directory and then do somethign like this

mkdir gsk_l.\$data\$ cd gsk_l.\$data\$/ baysyahoo GSK.L

(just copying from my .bash_history)

On Mon, Apr 22, 2013 at 5:59 PM, Ian Ross notifications@github.com wrote:

Just a quick question about this, so that I go at it the same way that you did: how did you import data like this? With my "time series CSV" importer, or just as normal CSV data? I see that the plotting stuff in prebaysig.js produces the metadata lines automatically -- I just want to make sure that I'm generating time series data with the right, and I can't see where the timeseries metadata gets set up.

Oh, except for in BaysYahoo, I now see. Is that what I should use to test this?

On 22 April 2013 13:50, Ian Ross ian@skybluetrades.net wrote:

It's almost certainly a problem with the way I scope data and metadata derived from plot-data elements. I have a bit of an idea what it might be. It was tricky to get that stuff working at the beginning, and I need to go back and re-examine the scope stuff, because I think I was a bit Angular-naïve when I wrote it.

On 22 April 2013 13:49, Ian Ross ian@skybluetrades.net wrote:

I'll check this out later. My version of Radian is in pieces on the floor at the moment -- I'm adding stuff to the expression parser to allow you to specify palettes within expressions (things like [[@P{red:blue}(some#variable)]]).

On 22 April 2013 13:09, Tom Nielsen notifications@github.com wrote:

between Bayeshive commits d7f87f78 and dc685dc8, plots of the following type are broken

<plot-data id="plot5k_0" name="plot5k_0" format="csv" cols="time,signal"> <metadata name="time" label="Time" format="date" DATE-PARSE-FORMAT="isodate"> "2005-01-03T00:00:00.000Z", 840.6400146484375 "2005-01-04T00:00:00.000Z", 852.3300170898438 "2005-01-05T00:00:00.000Z", 845.4600219726562 "2005-01-06T00:00:00.000Z", 848.8900146484375 "2005-01-07T00:00:00.000Z", 859.9000244140625 ...

— Reply to this email directly or view it on GitHub< https://github.com/glutamate/Radian/issues/10> .

Ian Ross Tel: +43(0)6804451378 ian@skybluetrades.net www.skybluetrades.net

Ian Ross Tel: +43(0)6804451378 ian@skybluetrades.net www.skybluetrades.net

Ian Ross Tel: +43(0)6804451378 ian@skybluetrades.net www.skybluetrades.net

— Reply to this email directly or view it on GitHubhttps://github.com/glutamate/Radian/issues/10#issuecomment-16801683 .

ian-ross commented 11 years ago

OK, I'll try that.

On 22 April 2013 19:07, Tom Nielsen notifications@github.com wrote:

Yes with baysyahoo. I think you have to go into your /var/bayeshive/1 directory and then do somethign like this

mkdir gsk_l.\$data\$ cd gsk_l.\$data\$/ baysyahoo GSK.L

(just copying from my .bash_history)

On Mon, Apr 22, 2013 at 5:59 PM, Ian Ross notifications@github.com wrote:

Just a quick question about this, so that I go at it the same way that you did: how did you import data like this? With my "time series CSV" importer, or just as normal CSV data? I see that the plotting stuff in prebaysig.js produces the metadata lines automatically -- I just want to make sure that I'm generating time series data with the right, and I can't see where the timeseries metadata gets set up.

Oh, except for in BaysYahoo, I now see. Is that what I should use to test this?

On 22 April 2013 13:50, Ian Ross ian@skybluetrades.net wrote:

It's almost certainly a problem with the way I scope data and metadata derived from plot-data elements. I have a bit of an idea what it might be. It was tricky to get that stuff working at the beginning, and I need to go back and re-examine the scope stuff, because I think I was a bit Angular-naïve when I wrote it.

On 22 April 2013 13:49, Ian Ross ian@skybluetrades.net wrote:

I'll check this out later. My version of Radian is in pieces on the floor at the moment -- I'm adding stuff to the expression parser to allow you to specify palettes within expressions (things like [[@P{red:blue}(some#variable)]]).

On 22 April 2013 13:09, Tom Nielsen notifications@github.com wrote:

between Bayeshive commits d7f87f78 and dc685dc8, plots of the following type are broken

<plot-data id="plot5k_0" name="plot5k_0" format="csv" cols="time,signal"> <metadata name="time" label="Time" format="date" DATE-PARSE-FORMAT="isodate"> "2005-01-03T00:00:00.000Z", 840.6400146484375 "2005-01-04T00:00:00.000Z", 852.3300170898438 "2005-01-05T00:00:00.000Z", 845.4600219726562 "2005-01-06T00:00:00.000Z", 848.8900146484375 "2005-01-07T00:00:00.000Z", 859.9000244140625 ...

— Reply to this email directly or view it on GitHub< https://github.com/glutamate/Radian/issues/10> .

Ian Ross Tel: +43(0)6804451378 ian@skybluetrades.net www.skybluetrades.net

Ian Ross Tel: +43(0)6804451378 ian@skybluetrades.net www.skybluetrades.net

Ian Ross Tel: +43(0)6804451378 ian@skybluetrades.net www.skybluetrades.net

— Reply to this email directly or view it on GitHub< https://github.com/glutamate/Radian/issues/10#issuecomment-16801683> .

— Reply to this email directly or view it on GitHubhttps://github.com/glutamate/Radian/issues/10#issuecomment-16802309 .

Ian Ross Tel: +43(0)6804451378 ian@skybluetrades.net www.skybluetrades.net

ian-ross commented 11 years ago

This is fixed now and I've committed a new version of Radian to the BH repo. Doing sigPlot(#gsk_l) now produces something sensible.

The problem was to do with the way that metadata is associated with data items for <plot-data> elements: I had reorganised the way that the data was stored, but I hadn't changed the way that the metadata was propagated through expression evaluations.

Incidentally, I just spent about an hour on a very nasty problem. The JS minimiser that we use (Jasmine) can apparently turn valid JavaScript into invalid JavaScript under some circumstances. Rather annoying to track down: I ended up taking the JS file from static/tmp, using it to replace my radian.js file in my Radian test setup and doing a binary search to track down the problem in the (very long) lines from the minimiser. It was turning lines like this:

var banded = false, interp = "hsl";
if (tokType == _name) {

into this

var banded=false,interp="hsl"if(tokType==_name){

which is certainly minimised, but isn't really JavaScript...

glutamate commented 11 years ago

Thats great, thanks

On Mon, Apr 22, 2013 at 9:16 PM, Ian Ross notifications@github.com wrote:

This is fixed now and I've committed a new version of Radian to the BH repo. Doing sigPlot(#gsk_l) now produces something sensible.

The problem was to do with the way that metadata is associated with data items for elements: I had reorganised the way that the data was stored, but I hadn't changed the way that the metadata was propagated through expression evaluations.

Incidentally, I just spent about an hour on a very nasty problem. The JS minimiser that we use (Jasmine) can apparently turn valid JavaScript into invalid JavaScript under some circumstances. Rather annoying to track down: I ended up taking the JS file from static/tmp, using it to replace my radian.js file in my Radian test setup and doing a binary search to track down the problem in the (very long) lines from the minimiser. It was turning lines like this:

var banded = false, interp = "hsl";if (tokType == _name) {

into this

var banded=false,interp="hsl"if(tokType==_name){

which is certainly minimised, but isn't really JavaScript...

— Reply to this email directly or view it on GitHubhttps://github.com/glutamate/Radian/issues/10#issuecomment-16820166 .