Handling data from randomly placed expanding circles

31 Views Asked by At

NB: I've recently posted pretty much the same question over at Cross Validated, but since I got no answer, I wanted to try here: If it not appropriate, just let me know in the comments and I will delete this question. Thank you.

I'm investigating the scenario seen in the GIF below: We see $n$ (in this case $10$) randomly placed circles expand on a grid.

In the graph (also below), we see how quickly the square grid is covered for $n=1,2,..,10$ (blue being $n=1$).

enter image description here

Now, this is just for a single run of my script and I'd like to represent the data from multiple runs in a single graph, so that the noise is a bit diminished and one can see the most dominating tendencies more clearly.

My problem is that I do not know what kind of manipulation would be appropriate here. I thought about simply letting the $i$th entry in the desired vector (for one of the graphs, say, $n=1$) be equal the mean of the $i$th entries for all runs (for that particular $n$, of course), but first of all I find it weird to completely break up the individual runs like this, and second of all (and most importantly) the vectors for each run (and $n$) are not of the same length (they just end when they've filled out the grid)!

Q: What is a standard way of achieving a similar effect as averaging when the sets that are sought averaged aren't the same length?

expanding circles

1

There are 1 best solutions below

3
On BEST ANSWER

Here are some things you could do:

  1. Average the values horizontally according to fill percentage. This would effectively allow you to form an average curve by looking at when each run first reaches each cut-off(maybe every 5 percent).
  2. Instead of organizing all $n$-values on the same graph, you could organize all the runs of particular $n$ on the same graph.
  3. Normalize! Always consider the same number of data points, even if for some of the runs it'll be several values of 100%.

You could build a D3 visualization to add more details to each curve to really flesh out what is going on.

Edits: Addressing the comments below.

  1. Bucketing should be a reasonable approach in general, you can take the buckets to be 5% and look then average over the times. However, another way would be to measure slightly differently, instead, collect the data points on a percentage scale, instead of a time scale, so simply only plot the coordinates that correspond to the times when $x$% of the screen is full for $x$, say, every 5%.
  2. I meant https://d3js.org/ when I said d3. It's a powerful javascript package for displaying beautiful data visualizations. Here are a ton of examples: https://github.com/mbostock/d3/wiki/Gallery, here are some examples that might be useful: http://bl.ocks.org/rkirsling/33a9e350516da54a5d4f , http://charts.animateddata.co.uk/uktemperaturelines/ , http://blog.scottlogic.com/2014/08/26/two-line-components-for-d3-charts.html . But if you haven't worked in d3 much it might be a bit rough, just a warning.