{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Spiral plot ##" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "[Spiral plot](http://cs.lnu.se/isovis/courses/spring07/dac751/papers/TimeSpiralsInfoVis2001.pdf) is a method of visualizing (periodic) time series. Here we adapt it to visualize tennis tournament results for Simona Halep, No 2 WTA 2015 ranking." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We generate bar charts of set results in each tournament along an Archimedean spiral of equation\n", "$z(\\theta)=a\\theta e^{-i \\theta}$, $a>0, \\theta>3\\pi/2$. Our bars are curvilinear bars, i.e. they have spiral arcs as base." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Matplotlib plot of this spiral:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import numpy as np\n", "%matplotlib inline" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [], "source": [ "PI=np.pi" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "(-60.0, 60.0, -50.0, 50.0)" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAFrCAYAAADFFqIgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXd4VNXWxt+dIC2A0pHQEelIV3pABBQBu6Ag6BXBigoq\nAgqiUkT0+oFYQIqINFEpIp1QpXcTeifUUEIJIWV/f7zJTUQgk2Qm++wz6/c855nJZDJZOZl5z9pr\nr6K01hAEQRDcQ4BpAwRBEATvIsIuCILgMkTYBUEQXIYIuyAIgssQYRcEQXAZIuyCIAguI4tpA5RS\nkm8pCIKQDrTW6kaPO8Jj11obP/r372/cBqccci7kXMi5cP65uBWOEHZBEATBe4iwC4IguAwR9kRC\nQkJMm+AY5FwkI+ciGTkXy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zUr82tHnwu+FXSlVDMADAA6leKwigKcAVATw\nIIBRSqkbblK4iAUAKmutqwPYA+B9AFBKVYKfnQulVACAkQBaAqgMoINSqoJZqzKVOABva60rA6gH\n4NXEv783gEVa6/IAliDxPeIn9AAQluJrR58Lvxd2AF8CeOe6x9oBmKK1jtNaHwSFrm5mG5aZaK0X\naa0TEr9cA6BY4v228LNzAf59e7TWh7TWsQCmgO8Jv0BrfUJrvSXx/iUA4eD7oR2ACYlPmwDgETMW\nZi6Jzt9DAMakeNjR58KvhV0p1RbAEa319uu+FQzgSIqvjyU+5i+8AGBu4n1/PBfX/81H4f6/+YYo\npUoBqA5e7AtrrU8CFH8AhcxZlqkkOX8pUwgdfS6ymDbA1yilFgIonPIh8B/UD0AfMAzjF9ziXPTV\nWs9OfE5fALFa68kGTBQchFIqF4BfAPTQWl+6Qc2J63OllVKtAZzUWm9RSoXc4qmOOheuF3at9Q2F\nWylVBUApAFsTY8bFAGxSStUFvdISKZ5eLPExq7nZuUhCKdUFXHI2S/HwMQDFU3ztinORCq78/6cF\npVQWUNQnaq1nJj58UilVWGt9UilVBMApcxZmGg0AtFVKPQQgB4DcSqmJAE44+Vz4bShGa71Da11E\na11Ga10aXG7X0FqfAjALwNNKqaxKqdIA7gKwzqS9vkYp1QpcbrbVWsek+NYsAO396VwAWA/gLqVU\nSaVUVgDtwfPgT4wFEKa1/irFY7MAdEm83xnAzOt/yG1orftorUtorcuA74MlWutOAGbDwefC9R57\nGtBgaAJa6zCl1DRwFzwWwCva/SW6IwBkBbAwMelljdb6FX88F1rreKXUa2CmUACAH7TW4YbNyjSU\nUg0APAtgu1JqM/jZ6ANgKIBpSqkXwCyyp8xZaZwhcPC5kJYCgiAILsNvQzGCIAhuRYRdEATBZYiw\nC4IguAwRdkEQBJchwi4IguAyRNgFQRBchgi7IAiCyxBhFwRBcBn/D98qJ8mTdafmAAAAAElFTkSu\nQmCC\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "a=2\n", "theta=np.linspace(3*PI/2, 8*PI, 400)\n", "z=a*theta*np.exp(-1j*theta)\n", "plt.figure(figsize=(6,6))\n", "plt.plot(z.real, z.imag)\n", "plt.axis('equal')\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Each ray (starting from origin O(0,0)) crosses successive turnings of the spiral at constant distance points, namely at distance=$2\\pi a$.\n", "With our choice a=2, this distance is $4\\pi=12.56637$. Hence we set the tallest bar corresponding to \n", "a set score of 7 as having the height 10. The bar height corresponding to any set score in $\\{0, 1, 2, \\ldots, 7\\}$ can be read from the following dictionary:" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "8.571428571428571" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "h=7.0\n", "score={0: 0., 1:10./h, 2: 20/h, 3: 30/h, 4: 40/h, 5: 50/h, 6: 60/h, 7: 70/h}\n", "score[6]" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import plotly.plotly as py\n", "from plotly.graph_objs import *" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Read the json file created from data posted at [wtatennis.com](http://www.wtatennis.com/players/player/13516/title/simona-halep):" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[{u'rank': 3}, {u'points': 280}, {u'prize': 111163}, {u'A Beck (55)': [4, 6, 6, 4, 6, 3]}, {u'N Vikhlyantseva (584)': [6, 2, 6, 2]}, {u'A Krunic (84)': [6, 3, 6, 3]}, {u'S Zheng (97)': [6, 2, 6, 3]}, {u'T Bacsinszky (67)': [6, 2, 6, 2]}]\n" ] } ], "source": [ "import json\n", "with open(\"halep2015.json\") as json_file:\n", " jdata = json.load(json_file)\n", "print jdata['Shenzen']" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "played_at is the list of tournaments Simona Halep participated in:" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": true }, "outputs": [], "source": [ "played_at=['Shenzen', 'Australian Open', 'Fed Cup', 'Dubai', 'Indiana Wells', 'Miami',\n", " 'Stuttgart', 'Madrid', 'Rome', 'French Open', 'Birmingham', 'Wimbledon', 'Toronto',\n", " 'Cincinnati', 'US Open', 'Guangzhou', 'Wuhan', 'Beijing', 'WTA Finals' ]" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": false }, "outputs": [], "source": [ "#define a dict giving the number of matches played by Halep in each tournament k\n", "nmatches={ k: len(jdata[where][3:]) for (k, where) in enumerate(played_at) } " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The arcs of spiral are defined as Plotly SVG paths:" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": true }, "outputs": [], "source": [ "def make_arc(aa, theta0, theta1, dist, nr=4):# defines the arc of spiral between theta0 and theta1, \n", " \n", " theta=np.linspace(theta0, theta1, nr)\n", " pts=(aa*theta+dist)*np.exp(-1j*theta)# points on spiral arc r=aa*theta\n", " \n", " string_arc='M '\n", " for k in range(len(theta)):\n", " string_arc+=str(pts.real[k])+', '+str(pts.imag[k])+' L '\n", " return string_arc" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "' -4.57526296667, 0.927451718436 L -4.61366881509, 0.618827320468 L -4.63134090185, 0.309214291159 L -4.62831853072, -5.66805547408e-16 L '" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "make_arc(0.2, PI+0.2, PI, 4)[1:]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The function make_bar returns a Plotly dict that will be used to generate the bar shapes:" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": true }, "outputs": [], "source": [ "def make_bar(bar_height, theta0, fill_color, rad=0.2, a=2):\n", " theta1=theta0+rad\n", " C=(a*theta1+bar_height)*np.exp(-1j*theta1)\n", " D=a*theta0*np.exp(-1j*theta0)\n", " \n", " return dict( \n", " line=Line(color=fill_color, width=0.5\n", " ), \n", " path= make_arc(a, theta0, theta0+rad, 0.0)+str(C.real)+', '+str(C.imag)+' '+\\\n", " make_arc(a, theta1, theta0, bar_height)[1:]+ str(D.real)+', '+str(D.imag),\n", " type='path',\n", " fillcolor=fill_color \n", " ) \n", " " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Define a function setting the plot layout:" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": true }, "outputs": [], "source": [ "def make_layout(title, plot_size):\n", " axis=dict(showline=False, # hide axis line, grid, ticklabels and title\n", " zeroline=False,\n", " showgrid=False,\n", " showticklabels=False,\n", " title='' \n", " )\n", "\n", " return Layout(title=title,\n", " font=Font(size=12), \n", " xaxis=XAxis(axis),\n", " yaxis=YAxis(axis),\n", " showlegend=False,\n", " width=plot_size,\n", " height=plot_size,\n", " margin=Margin(t=30, b=30, l=30, r=30),\n", " hovermode='closest',\n", " shapes=[]# below we append to shapes the dicts defining \n", " #the bars associated to set scores\n", " \n", " ) " ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "collapsed": true }, "outputs": [], "source": [ "title='Simona Halep 2015 Tournament Results
Each arc of spiral corresponds to a tournament'" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "collapsed": false }, "outputs": [], "source": [ "layout=make_layout(title, 700)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The bar charts corresponding to two consecutive matches in a tournament are separated by an arc of length interM,\n", "whereas the bar charts corresponding to two consecutive tournaments are separated by a longer arc, interT:" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "collapsed": true }, "outputs": [], "source": [ "interM=2.0#the length of circle arc approximating an arc of spiral, between two consecutive matches\n", "interT=3.5# between two tournaments" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The bars are colored by the following rule: the bars associated to Halep's results are colored in red (colors[0]),\n", "while the colors for opponents are chosen according to their rank (see the code below). The darker colors correspond to high ranked opponents, while the lighter ones to lower ranked opponents." ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "collapsed": true }, "outputs": [], "source": [ "colors=['#dc3148','#864d7f','#9e70a2', '#caaac2','#d6c7dd', '#e6e1dd'] " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Get data for generating bars and data to be displayed when hovering the mouse over the plot:" ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "collapsed": false }, "outputs": [], "source": [ "a=2.0 # the parameter in spiral equation z(theta)=a*theta exp(-i theta)\n", "theta0=3*PI/2 # the starting point of the spiral\n", "Theta=[]# the list of tournament arc ends\n", "Opponent=[]# the list of opponents in each set of all matches played by halep\n", "rankOp=[]# rank of opponent list\n", "middleBar=[]# theta coordinate for the middle point of each bar base\n", "half_h=[]# the list of bar heights/2\n", "wb=1.5# bar width along the spiral\n", "rad=wb/(a*theta0)#the angle in radians corresponding to an arc of length wb, \n", " #within the circle of radius a*theta\n", "rank_Halep=[]\n", "Halep_set_sc=[]# list of Halep set scores\n", "Opponent_set_sc=[]# list of opponent set scores\n", "bar_colors=[]# the list of colors assigned to each bar in bar charts\n", "\n", "for k, where in enumerate(played_at):\n", " nr=nmatches[k]# nr is the number of matches played by Halep in the k^th tournament\n", " Theta.append(theta0)\n", " for match in range(nr):\n", " player=jdata[where][3+match].keys()[0]# opponent name in match match\n", " \n", " rankOp.append(int(player.partition('(')[2].partition(')')[0]))#Extract opponent rank:\n", " set_sc=jdata[where][3+match].values()[0]#set scores in match match\n", " sets=len(set_sc)\n", " #set bar colors according to opponent rank\n", " if rankOp[-1] in range(1,11): col=colors[1]\n", " elif rankOp[-1] in range(11, 21): col=colors[2] \n", " elif rankOp[-1] in range(21, 51): col=colors[3] \n", " elif rankOp[-1] in range(51, 101): col=colors[4] \n", " else: col=colors[5] \n", " \n", " \n", " for s in range(0, sets, 2):\n", " middleBar.append(0.5*(2*theta0+rad))# get the middle of each angular interval \n", " # defining bar base\n", " rank_Halep+=[jdata[where][0]['rank']]\n", " Halep_set_sc.append(set_sc[s])\n", " \n", " half_h.append(0.5*score[set_sc[s]])# middle of bar height\n", " bar_colors.append(colors[0])\n", " \n", " layout['shapes'].append(make_bar(score[set_sc[s]], theta0, colors[0], rad=rad, a=2))\n", " rad=wb/(a*theta0)\n", " \n", " theta0=theta0+rad\n", " middleBar.append(0.5*(2*theta0+rad))\n", " Opponent_set_sc.append(set_sc[s+1])\n", " half_h.append(0.5*score[set_sc[s+1]])\n", " Opponent.append(jdata[where][3+match].keys()[0])\n", " bar_colors.append(col)\n", " \n", " layout['shapes'].append(make_bar(score[set_sc[s+1]], theta0, col , rad=rad, a=2))\n", " \n", " rad=wb/(a*theta0)\n", " theta0=theta0+rad\n", " gapM=interM/(a*theta0) \n", " theta0=theta0-rad+gapM\n", " gapT=interT/(a*theta0) \n", " Theta.append(theta0)\n", " theta0=theta0-gapM+gapT \n", " " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Check list lengths:" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "308 308 154 308\n" ] } ], "source": [ "print len(bar_colors), len(middleBar), len(Opponent), len(half_h)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Define the list of strings to be displayed for each bar:" ] }, { "cell_type": "code", "execution_count": 21, "metadata": { "collapsed": false }, "outputs": [], "source": [ "nrB=nrB=len(bar_colors)\n", "playersRank=['n']*nrB\n", "\n", "for k in range(0,nrB, 2):\n", " playersRank[k]=u'Halep'+' ('+'{:d}'.format(rank_Halep[k/2])+')'+'
'+\\\n", " 'set score: '+str(Halep_set_sc[k/2])\n", "for k in range(1, nrB, 2):\n", " playersRank[k]=Opponent[(k-1)/2]+'
'+'set score: '+str(Opponent_set_sc[(k-1)/2])" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 22, "metadata": { "collapsed": false }, "outputs": [], "source": [ "players=[]# Plotly traces that define position of text on bars\n", "\n", "for k in range(nrB):\n", " z=(a*middleBar[k]+half_h[k])*np.exp(-1j*middleBar[k])\n", " players.append(Scatter(x=[z.real],\n", " y=[z.imag],\n", " mode='markers',\n", " marker=Marker(size=0.25, color=bar_colors[k]),\n", " name='',\n", " text=playersRank[k],\n", " hoverinfo='text'\n", " )\n", " )" ] }, { "cell_type": "code", "execution_count": 23, "metadata": { "collapsed": false }, "outputs": [], "source": [ "LT=len(Theta)\n", "aa=[a-0.11]*2+[a-0.1]*3+[a-0.085]*5+[a-0.075]*5+[a-0.065]*4# here is a trick to get spiral arcs \n", "#looking at the same distance from the bar charts\n", "\n", "spiral=[] #Plotly traces of spiral arcs\n", "for k in range(0, LT, 2):\n", " X=[]\n", " Y=[]\n", " theta=np.linspace(Theta[k], Theta[k+1], 40)\n", " Z=aa[k/2]*theta*np.exp(-1j*theta)\n", " X+=Z.real.tolist()\n", " Y+=Z.imag.tolist()\n", " X.append(None)\n", " Y.append(None)\n", " spiral.append(Scatter(x=X,\n", " y=Y,\n", " mode='lines',\n", " line=Line(color='#23238E', width=4),\n", " name='',\n", " text=played_at[k/2],\n", " hoverinfo='text'))" ] }, { "cell_type": "code", "execution_count": 24, "metadata": { "collapsed": false }, "outputs": [], "source": [ "data=Data(spiral+players)\n", "fig=Figure(data=data,layout=layout)" ] }, { "cell_type": "code", "execution_count": 25, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "py.sign_in('empet', 'my_api_key')\n", "py.iplot(fig, filename='spiral-plot')" ] }, { "cell_type": "code", "execution_count": 64, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "\n", "\n" ], "text/plain": [ "" ] }, "execution_count": 64, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from IPython.core.display import HTML\n", "def css_styling():\n", " styles = open(\"./custom.css\", \"r\").read()\n", " return HTML(styles)\n", "css_styling()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.11" } }, "nbformat": 4, "nbformat_minor": 0 }