Graphing Real-time multi variable data

26 views
Skip to first unread message

williambel...@gmail.com

unread,
Oct 3, 2017, 9:07:15 PM10/3/17
to d3-js
Hey all, I have a large data set with multiple continuous variables for 2 subjects at a time. I would like to be able to make the 2 variables into a single point that moves continuously (in real time through the data set) in the x y plane for each person. Is this something I can do in d3 and if so any direction would be helpful. It is quite the endeavor for me as I am a complete novice.

williambel...@gmail.com

unread,
Oct 3, 2017, 9:16:57 PM10/3/17
to d3-js
I would also like to mention that I have searched online for something similar with no luck... the clothes thing would be something like https://bost.ocks.org/mike/path/

Guillaume Calmettes

unread,
Oct 3, 2017, 10:51:27 PM10/3/17
to d3...@googlegroups.com
Hi William,

1- Could you provide the structure of the two sets of data you are interested to animate?
2- Also, are you interested in just getting one point moving in the plane for each iteration or to get a line “growing" on the plane (like a snake)

Guillaume

On Oct 3, 2017, 6:17 PM -0700, williambel...@gmail.com, wrote:
I would also like to mention that I have searched online for something similar with no luck... the clothes thing would be something like https://bost.ocks.org/mike/path/

--
You received this message because you are subscribed to the Google Groups "d3-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Guillaume Calmettes

unread,
Oct 4, 2017, 11:03:21 AM10/4/17
to d3...@googlegroups.com
One simple solution would be to create 2 line generators (https://github.com/d3/d3-shape#lines) that get the (k.1, f.1) and (k.2, f.2) as (x, y) input.
So you would get a path generated for the person 1 and a path for the person 2.

You can then update the 2 paths for each iteration.


(Note that if you anticipate to have a huge amount of point, a canvas version might be better: https://bl.ocks.org/gcalmettes/fd80abba670527a9736d69486e557735



On Oct 4, 2017, 12:01 AM -0700, williambel...@gmail.com, wrote:
Hey Guillaume,

Thanks for getting back to me!

here is what some of the data looks like:

ID    sec K.1    K.2     f.1        f.2
100   7   NA     3.00   151.0   135.3   
100   8   NA     3.00   210.4   210.8
100   9   4.00   3.00   203.0   209.0
100  10  4.00   3.00   194.4   196.8
100  11  4.00   3.00   201.7   190.1

sec  is second, k.1 and k.2 are continuous(rated per second on a likert scale 1-5) .1 for person 1 and .2 for person 2, and f._ is a frequency that is also per second that i will need to center eventually. I am still cleaning my data so the f. data is currently separate from the k. data but ideally my data will look like above when i am finished cleaning. essentially i would like k. to be my x axis and f. to be y. Also the data set is rather large multiple sessions(ID) with around 100,000 observations

to answer the second part of the question i would actually like 2 lines to be growing in the plane (a line for each person). Thank you much for responding to my inquiry!

William 

williambel...@gmail.com

unread,
Oct 4, 2017, 2:59:30 PM10/4/17
to d3-js
those graphs are incredible, thank you for sending them my way... hopefully i can dig in and work with this
Reply all
Reply to author
Forward
0 new messages