|Pi to 1000 places connected|
In the past i have often observed circular plots (cant find a technical name) in
1) New York times to display human genome data
2) Migration patterns among humans
3) to display import and export data (Bloomberg terminal).
4) Mathematical art 
My understanding of these circular plots is very new but considering the popularity of these plots i believe it would be unjust not to discuss them on my blog. This post is motivated by an Instagram image of a similar plot created using circos software. The image is created using pi numbers upto 1000 decimal places and connecting the consecutive numbers. We know the value of pi is 3.141…. and the visualization is generated by connecting 3 to 1, 1 to 4, 4 to 1 and so on. We all know numbers in a pi are random and follow no particular order but we see a sort of an image emerge over here. A structure in random values.
The data file was created by copying and pasting pi numbers from here. You would observe that copying and pasting values from web into excel is a problem but i prefer using csv format and hence i had no other choice. I further tidied the data using the =left() and = right() functions to display the values in one column.copied them to the next column. In case you like to access the file it is here .
circos.par(gap.degree = 3)
colors= c(“#542D15″,”#C07F4D”, “#4B2078″,”#C153C9″,”#0A6A6C”,”#1DCEC6″,”#094AA5″,”#0181FD”,”white”,”#92B966″ )
chordDiagram(pi, grid.col= colors, grid.border=c(“white”),transparency=0.5)
Load up RStudio:
Circlize is a beautiful package, especially if you are trying to visualize genome data or if you are trying to exhibit flow of information from one sector to the next. The author has done an amazing job at explaining the package .
In our case we just need 3 lines of code. The circos.par() function simply creates gaps between the sector so that the image looks prettier.
I sort of cheated by creating the image in R and then importing he same to inkscape to add the background black color. Also note that we have 10 sectors for values going from 0 to 9. However, they are not placed in ascending or descending order. I am still learning the package and can probably show you how to order the sectors in my next post.
 NY Times : Genome data
 Migration Flows :Migration Flows
 Mathematical Art :Pi
 Circos Sotware : circos website
 An Introduction to circlize package: circlize