Subscribe to our Newsletter

Shooting stars

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:

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

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];
  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  );


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

Related articles

E-mail me when people leave their comments –

You need to be a member of DataViz to add comments!

Join DataViz

Webinar Series

Ask Data: Simplifying Analytics with Natural Language

What if you could directly ask questions of your data? Ask Data, Tableau’s new natural language capability, allows people to get insights by simply conversing with their data. In this latest Data Science Central webinar, members of Tableau’s Ask… Continue

Creating Business Applications with R & Python

Across industries, data scientists are creating powerful models and analytics to solve urgent business problems. However, in far too many cases, these analytics never reach their intended business users. The result is wasted time and effort, as well… Continue

DSC Webinar Series: Optimize the Data Supply Chain

Every organization is aiming to produce more comprehensive understanding of their customers, their business operations and their risks, through data. Most organizations are still learning best practices that allow them to leverage in-house data… Continue

Follow Us

@DataScienceCtrl | RSS Feeds


Data Reporter

Simons Foundation - POSITION SUMMARY   Spectrum is looking for an experienced and savvy data reporter to bring a new era of quantitative reporting to our site.   Spect...


UPS - DIGITAL DATA PLATFORM ANALYST: This is an exciting opportunity to join a growing organization within UPS, leveraging new technologies to help make ...

Data Scientist

Nehemiah Security - Nehemiah Security is in search of Mid to Senior level Data Scientist. The data scientist will be responsible for creating models that pertain to ou...