*Guest blog post by Vincent Granville*

This is a follow up to our video series *From chaos to clusters,* made with data points moving over time to form clusters, and produced with open source and home-made data science algorithms.

See below two frames from the new video, now featuring line segments connecting a current point to its location in the previous frame. These line segments are overwritten and change constantly from iteration to iteration, creating a "shooting stars" visual effect when you watch the video.

Towards the end of the video, the clusters are well formed (though they are also moving, especially the one at the bottom right corner) and points coming from outside are progressively attracted to the nearest cluster: you can see them quickly getting close and then get absorbed.

**Here are the two new videos**:

- Video #4 (orange, more visually pleasant | Youtube version)
- Video #5 (blue, better
*shooting star*effect | Youtube version)

Download the data file rfile3.txt used to produce these videos, (also available in compressed format). These videos are based on the following R script (a more complex version of our initial R script):

**R Source code**

vv<-read.table("c:/vincentg/rfile3.txt",header=TRUE);

iter<-vv$iter;

for (n in 1:199) {

x<-vv$x[iter == n];

y<-vv$y[iter == n];

z<-vv$new[iter == n];

u<-vv$d2init[iter == n];

v<-vv$d2last[iter == n];

p<-vv$x[iter == n-1];

q<-vv$y[iter == n-1];

u[u>1]<-1;

v[v>0.10]<-0.10;

s=1/sqrt(1+n);

if (n==1) {

plot(p,q,xlim=c(-0.08,1.08),ylim=c(-0.08,1.09),pch=20,cex=0,col=rgb(1,1,0),xlab="",ylab="",axes=TRUE );

}

points(p,q,col=rgb(1-s,1-s,1-s),pch=20,cex=1);

segments(p,q,x,y,col=rgb(0,0,1));

points(x,y,col=rgb(z,0,0),pch=20,cex=1);

Sys.sleep(5*s);

segments(p,q,x,y,col=rgb(1,1,1));

}

segments(p,q,x,y,col=rgb(0,0,1)); # arrows segments

points(x,y,col=rgb(z,0,0),pch=20,cex=1);

**Related articles**

- From chaos to clusters - statistical modeling without models
- Simple solutions to make videos with R
- Data Science: The End of Statistics?
- Fast clustering algorithms for massive datasets
- Other useful pieces of code (Perl, Python, R etc.)
- Internet Topology - Massive and Amazing Graphs
- 3-D Visualizations with rotating charts, for small and big data
- Great graphic diagrams
- Two more interesting graphs
- A new way to define centrality
- 14 questions about data visualization tools
- The top 20 data visualisation tools
- Another cute graph
- 5 books on data visualization
- Registered meteorites that has impacted on Earth visualized
- The curse of big data
- How to detect a pattern? Problem and solution

## Comments