tag:blogger.com,1999:blog-2785839458688660012024-03-19T05:43:45.764+01:00*Tips&Viz*Tips and Viz with Tableau !Anonymoushttp://www.blogger.com/profile/04345009273762315545noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-278583945868866001.post-39358764137961101752018-02-06T12:26:00.000+01:002018-02-06T12:26:13.809+01:00Tableau 10.5 est là !!<h3>
ECG de Paris : les voies ferrées irriguent la ville</h3>
<br />
<div style="font-size: medium; font-weight: normal; text-align: justify;">
L'arrivée de Tableau 10.5 en ce début d'année amène son lot de nouvelles fonctionnalités. Parmi les quelques innovations de Tableau Desktop 10.5, on peut apprécier le déploiement du nouveau moteur d'extraction (Hyper) et aussi, la tant attendue, fonctionnalité d'insertion de graphiques dans les infobulles !! Ce billet de blog va se concentrer sur ces deux fonctionnalités. Je ne parlerais pas de Tableau Server Linux qui lui mériterait un billet de blog complet tant c'est une nouveauté attendues (depuis 2014 pour ma part...). Vous êtes prêts ?!<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="giphy-embed" frameborder="0" height="360" src="https://giphy.com/embed/bQCWmEgKHasZG" width="480"></iframe></div>
<br />
<br /></div>
<a name='more'></a><br />
<h3>
Viz in tooltips : Ooooooh Yeaaaaah...</h3>
<br />
<div style="font-size: medium; font-weight: normal; text-align: justify;">
Et oui, Mesdames et Messieurs, après tant d'années d'attente, elle est enfin disponible et elle va changer la face du monde. Son nom ? Viz in tooltips !!! Bon soyons clair, c'est une belle fonctionnalité mais qui est trop jeune et pas complètement aboutie. Et ça pour plusieurs raisons que je vais tenter d'expliquer dans la suite de mon propos.<br />
<br />
Premièrement, il faut l'avouer, c'est tout à fait formidable de pouvoir intégrer des graphiques à une infobulle. Comme le dit si bien Confucius : "une image vaut mille mots". Eh bien, c'est vrai ! C'est parfois beaucoup plus parlant de mettre un graphique pour enrichir l'analyse que de rédiger un texte complet et pompeux que 3 pèlerins voudront bien lire... En ce sens, la fonctionnalité "Viz in tooltips" est vraiment, mais alors VRAIMENT, la bienvenue. Donc rien que pour ça, Tableau, bravo !!<br />
<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="giphy-embed" frameborder="0" height="322" src="https://giphy.com/embed/l0HlDOrSQNRIoRo6k" width="480"></iframe></div>
<div style="font-size: medium; font-weight: normal; text-align: justify;">
<br />
Autre côté vraiment intéressant : il est possible de faire d'intégrer des graphiques provenant d'une source secondaire ! Et ça aussi c'est vraiment top ! Bon il faut juste faire un peu attention aux champs sur lesquels on filtre parce que sinon c'est raté... (il faut filtrer sur tous les champs et non sur un champ unique pour que ça fonctionne). Il faut savoir d'un point de vue technique que les "Viz in tooltips" fonctionne grâce à des actions de filtre. C'est pour cela qu'il faut définir des champs sur lesquels réaliser l'action.<br />
<br />
Bon maintenant passons aux choses qui fâchent un peu plus... Le premier point que je trouve un peu préjudiciable c'est la performance. En effet, l'affichage des graphiques dans les infobulles peut paraître long et notamment sur Tableau Server. On s'attend en général sur des vues web à avoir un affichage quasi-instantané des infobulles. Mais là c'est parfois assez long, bien trop long par moment... Il est possible que techniquement cela provienne de la génération de l'image qui est faite à la volée lors de l'action. Cela va également dépendre de la complexité du graphique ainsi que des données (comme toute action d'ailleurs).<br />
<br />
Le deuxième point provient des infobulles elles-mêmes. Elles ne sont pas "formatables" et ne permettent pas de choisir une couleur de fond par exemple. C'est dommage pour la mise en forme et la cohérence globale d'une visualisation. Dans l'exemple plus bas, le fond du tableau de bord est noir alors que l'infobulle est blanche. Bon c'est un détail esthétique mais parfois c'est ce genre de détail qui peut rendre un tableau de bord complètement réussi !<br />
<br /></div>
<h3>
Hyper : c'est hyper bien ! ... ah ah ah ... :)</h3>
<br />
<div style="font-size: medium; font-weight: normal; text-align: justify;">
Concernant le nouveau moteur d'extraction Hyper, on est d'accord c'est quand même vachement mieux. C'est plus rapide, c'est plus efficace et c'est moins consommateur de ressources. Et ça, ce n'est pas rien ! Durant les quelques tests que j'ai réalisé, j'ai notamment réussi à extraire presque 40 millions de lignes à partir d'un croisement entre CSV et Shapefile en environ 5 minutes. Ce n'est pas instantané (quel outil peut se vanter d'être instantané à ce niveau là ?) certes mais c'est quand même beaucoup plus rapide que l'ancien moteur (tde).</div>
<br />
<div style="font-size: medium; font-weight: normal; text-align: justify;">
Au niveau des ressources utilisées, je trouve que cela est mieux optimisé que le moteur tde. En effet, il y a légèrement plus de CPU consommé mais moins de RAM. J'ai le sentiment que cela permet d'équilibrer l'utilisation des ressources pour réaliser l'extraction. Cela évitera peut-être d'exploser la RAM lors de très très grosses extractions comme dans les versions vraiment anciennes de Tableau.</div>
<br />
<div style="font-size: medium; font-weight: normal; text-align: justify;">
Enfin au niveau des performances, on est d'accord pour dire que c'est plus efficace que le moteur tde. Les données sont interrogées plus rapidement et l'exécution des requêtes est quasiment invisible. On ne voit désormais plus que la "pop-up" de calcul de l'affichage. Et ça, il faut avouer que c'est un réel progrès.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe src="https://giphy.com/embed/3ornjIhZGFWpbcGMAU" width="480" height="282" frameBorder="0" class="giphy-embed" allowFullScreen></iframe></div>
<br />
<h3>
ECG de Paris</h3>
<br />
<div style="font-size: medium; font-weight: normal; text-align: justify;">
Bon pour conclure tout cela, j'ai repris un thème que j'affectionne pour une visualisation : les transports en commun parisiens. Les données utilisées proviennent de la STIF (portail open data). Pourquoi ce thème ? Parce qu'il permet d'utiliser des données géographiques et "tabulaires". Cela m'a permit de voir comment se comporte le moteur Hyper lors la création d'extraction à partir de shapefile croisés avec des csv.</div>
<br />
<div style="font-size: medium; font-weight: normal; text-align: justify;">
Concernant la visualisation, le but est de montrer que l'ensemble du réseau ferré de transport en commun de l'Île-de-France représente quasiment le coeur de Paris. Toutes les lignes ferrées convergent vers Paris centre telles des veines et artères amenant le sang dans le palpitant. Le nombre de voyageurs empruntant ces lignes permet de donner une épaisseur différente à chaque ligne. On peut remarquer que certaines lignes sont vraiment vitales au bon fonctionnement de Paris (par exemple le RER A qui est premier en terme de trafic et loin devant). Les fréquentations ont également été récupérées et pour le coup affichées dans les infobulles. Ces fréquentation sont affichées en moyenne sur l'année (des coefficients sont appliqués sur les catégories de jours fournies par la STIF afin de pondérer les valeurs. La STIF catégorise les journées en "Jours Ouvrés Hors Vacances Scolaires", "Dimanche et Jours Fériés", "Samedis Vacances Scolaires", etc.). La période d'analyse s'étend de juillet 2016 à juin 2017. Il y a donc 1 an de données ce qui permet de voir les effets de saisonnalité (vacances scolaires et jours fériés). Petite remarque tout de même, il y a un défaut de données au mois de décembre 2016.</div>
<br />
<div class='tableauPlaceholder' id='viz1517916048671' style='position: relative'><noscript><a href='#'><img alt='ECG de Paris : les voies ferrées irriguent la ville ' src='https://public.tableau.com/static/images/ST/STIF_2018_3/ECGdeParislesvoiesferresirriguentlaville/1_rss.png' style='border: none' /></a></noscript><object class='tableauViz' style='display:none;'><param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' /> <param name='embed_code_version' value='3' /> <param name='site_root' value='' /><param name='name' value='STIF_2018_3/ECGdeParislesvoiesferresirriguentlaville' /><param name='tabs' value='no' /><param name='toolbar' value='yes' /><param name='static_image' value='https://public.tableau.com/static/images/ST/STIF_2018_3/ECGdeParislesvoiesferresirriguentlaville/1.png' /> <param name='animate_transition' value='yes' /><param name='display_static_image' value='yes' /><param name='display_spinner' value='yes' /><param name='display_overlay' value='yes' /><param name='display_count' value='yes' /><param name='filter' value='publish=yes' /></object></div> <script type='text/javascript'> var divElement = document.getElementById('viz1517916048671'); var vizElement = divElement.getElementsByTagName('object')[0]; vizElement.style.width='1000px';vizElement.style.height='1027px'; var scriptElement = document.createElement('script'); scriptElement.src = 'https://public.tableau.com/javascripts/api/viz_v1.js'; vizElement.parentNode.insertBefore(scriptElement, vizElement); </script>
<br />
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
Feel free to leave a message!</div>
Anonymoushttp://www.blogger.com/profile/04345009273762315545noreply@blogger.com6tag:blogger.com,1999:blog-278583945868866001.post-21637014922030757802017-09-26T10:32:00.003+02:002017-09-27T16:53:49.875+02:00Hurricanes, I can see you!<h3>Hurricanes: a special year?</h3>
<br />
<div style="font-size: medium; font-weight: normal; text-align: justify;">
This is currently the hurricane season in the North Atlantic. As everyone knows, Harvey, Irma, Jose and Maria hit the Carribeans and the USA between July and September. When I saw a lot of reports about the damages in the news and in my Twitter timeline as well, I wondered if 2017 was a special year or not. I also wondered if this perception of 2017 being a “special” year was due to the media and the Internet, making us more aware of this kind of severe weather than before.<br />
<br />
So I told myself: "Try to find some data about Hurricanes and go check it!!" First, I thought I would find all that I wanted on the NOOA website. Indeed! There is a lot of content on this website (especially very interesting shapefiles, and you know how I love geographical data...). But, I was actually looking for more detailed datasets. That is why I used <a href="http://weather.unisys.com/hurricane/index.php" target="_blank">the Unisys website</a> and this one was a real mine of information! This website allowed me to download all the tracks of almost all the hurricane since 1851! And here is the beginning of my journey about hurricanes!<br /></div>
</br>
<a name='more'></a><br />
<h3>
Where are you from? Where are you going?</h3>
<br />
<div style="font-size: medium; font-weight: normal; text-align: justify;">
I have to admit that it was a little bit boring to download all the data files and put them into one only file but it was a really important step in order to have all the tracks for all the hurricanes ever recorded.<br />
<br />
Each point gives a wind strength, a pressure, a date and a geographical point. All these data allowed me to create a map and to process a heatmap. The heatmap was created like the one I did in <a href="http://tipsandviz.blogspot.fr/2015/06/inside-airbnb-dataset.html" target="_blank">my AirBnB work</a>. The heatmap gives an overview of the strength over the Caribbean. You can see that all the Caribbean’s islands are very vulnerable because this is where the maximum wind speeds were measured.<br />
<br /></div>
<div style="font-size: medium; font-weight: normal; text-align: justify;">
<br />
The date in the file also allowed a time analysis to see if there were more hurricanes in the past or if there are more today. We can also see if a 2017 is a special year or not. In fact, we can see that for instance that 2005 was a very dangerous year (Katrina, Wilma, Rita...).<br />
<br /></div>
<br />
<div style="font-size: medium; font-weight: normal; text-align: justify;">
All these data gave me the opportunity to create the following dashboard. I think it is possible to find lots and lots of new analysis. If you are interested in it, feel free to contact me, I will give you the dataset with pleasure!</div>
<br />
<div class='tableauPlaceholder' id='viz1506414907944' style='position: relative'><noscript><a href='http://tipsandviz.blogspot.com/2017/09/hurricanes-i-can-see-you.html'><img alt='Hurricanes: a special year? ' src='https://public.tableau.com/static/images/Hu/Hurricanesaspecialyear/Hurricanesaspecialyear/1_rss.png' style='border: none' /></a></noscript><object class='tableauViz' style='display:none;'><param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' /> <param name='embed_code_version' value='2' /> <param name='site_root' value='' /><param name='name' value='Hurricanesaspecialyear/Hurricanesaspecialyear' /><param name='tabs' value='no' /><param name='toolbar' value='yes' /><param name='static_image' value='https://public.tableau.com/static/images/Hu/Hurricanesaspecialyear/Hurricanesaspecialyear/1.png' /> <param name='animate_transition' value='yes' /><param name='display_static_image' value='yes' /><param name='display_spinner' value='yes' /><param name='display_overlay' value='yes' /><param name='display_count' value='yes' /></object></div> <script type='text/javascript'> var divElement = document.getElementById('viz1506414907944'); var vizElement = divElement.getElementsByTagName('object')[0]; vizElement.style.width='1000px';vizElement.style.height='2860px'; var scriptElement = document.createElement('script'); scriptElement.src = 'https://public.tableau.com/javascripts/api/viz_v1.js'; vizElement.parentNode.insertBefore(scriptElement, vizElement); </script>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
Feel free to leave a message!</div>Anonymoushttp://www.blogger.com/profile/04345009273762315545noreply@blogger.com1tag:blogger.com,1999:blog-278583945868866001.post-38086301335839145512017-06-13T11:25:00.001+02:002017-06-23T16:34:56.092+02:00IronViz 2nd round : Jonathan Poulidor is in the place ! :)<h3>Premier IronViz européen !!</h3><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.linkedin.com/hp/update/6278948644423110657" imageanchor="1" target="_blank" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="215" src="https://image-store.slidesharecdn.com/147d236b-0201-4c42-94af-08dcb7808218-large.png" width="400" /></a></div><br />
<br />
<div class="separator" style="clear: both; text-align: justify;">
La semaine dernière a eu lieu la traditionnelle Tableau conference On Tour à Londres. Ce fut l'occasion pour une partie de la #SynalTeam (Hélène "Bibiche" Trouvé, Franck "Chicken" Nguyen et Jonathan "Poulidor" Trajkovic) de se déplacer dans la capitale britannique afin de voir ce qu'il en est. Comme mes chers camarades l'ont déjà expliqué, il y avait plein de choses à voir : des keynotes, des sessions, des formations, des cafés, des smoothies... bref, moult animations et autres présentations dignes d'une grande kermesse des écoles à la sauce Tableau.</div><br />
<br />
<div class="separator" style="clear: both; text-align: justify;">
De mon côté, j'ai eu la chance juste 2 semaines avant ce grand rassemblement d'être retenu pour disputer la finale de la première compétition <a href="https://public.tableau.com/fr-fr/s/winners-iron-viz-europe" target="_blank";>IronViz européenne !</a> (Pour rappel, voici <a href="http://tipsandviz.blogspot.com/2017/03/ironviz-mais-quesaco.html" target="_blank">en quoi consiste l'IronViz</a>). La compétition avait lieu le dernier jour en début d'après-midi, soit en réalité quasiment la dernière session avant la fin de la conférence. Tout ceci prenait place dans la salle accueillant les keynotes et rassemblant plus de 1000 personnes - ça fait un paquet de yeux qui vous regardent faire une viz pendant 20 minutes...</div><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://media.giphy.com/media/3o6EhNAhe1Jg7mLOrC/giphy.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="215" src="https://media.giphy.com/media/3o6EhNAhe1Jg7mLOrC/giphy.gif" width="400" /></a></div>
<a name='more'></a><br />
<br />
<div class="separator" style="clear: both; text-align: justify;">
Cette année, le thème était : la météo au Royaume-Uni. Le jeu de données rassemblait les mesures effectuées dans 37 stations météorologiques dans tout le Royaume-Uni sur une période allant pour certains endroits de 1850 à nos jours. Le jeu de données paraissait assez facile mais s'est trouvé finalement être plus complexe que prévu car ne disposant que de 4 indicateurs : les températures minimales, les températures maximales, le nombre d'heures d'ensoleillement et les précipitations. Les données sont issues du protail gouvernemental Open Data du Royaume-Uni et tous les fichiers ont été "unionés" en amont. Ceci étant, il y avait des problèmes assez importants de qualité de données : les numériques représentant les indicateurs étaient parfois affublés d'une étoile * ou d'un dièse # signifiant un commentaire sur les méthodes de collecte de ces mesures. Tout celà devait bien évidemment être nettoyé avant de pouvoir faire quelques chose dans Tableau.</div><br />
<br />
<h3>Des idées ou le syndrôme de la feuille blanche ?</h3><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://media.giphy.com/media/V4uGHRgz0zi6Y/giphy.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="215" src="https://media.giphy.com/media/V4uGHRgz0zi6Y/giphy.gif" width="400" /></a></div><br /><br />
<br />
<div class="separator" style="clear: both; text-align: justify;">
Le cheminement pour arriver à construire un rendu avec Tableau n'a pas été de tout repos. En effet, plusieurs idées se sont succédées. La première était orientée saisons : créer une restitution parlant des 4 saisons en cherchant à montrer qu'elles avaient "bougé" au cours du temps, qu'elle ne sont finalement plus comme on les conçoit dans notre calendrier voire même qu'il n'y en a plus que 2 (hiver et été) quasiment comme dans un climat continental. Cette première piste s'avérait intéressant mais finalement dure à montrer et représenter. Les résultats des analyses n'étaient pas réellement probants.</div><br />
<br />
<div class="separator" style="clear: both; text-align: justify;">
Une seconde idée a alors émergé de ce néant : créer une frise chronologique des températures au Royaume-Uni !! Waouuuuh !! ...... Bon, après avoir essayé, cela ne rendait absolument pas comme je l'espérait... De plus, la mise en forme étant très couteuse en temps, cela était risqué de réaliser ce travail en 20 minutes le Jour J.</div><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://tclhost.com/WcL14RZ.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="215" src="https://tclhost.com/WcL14RZ.gif" width="400" /></a></div><br /><br />
<br />
<div class="separator" style="clear: both; text-align: justify;">
C'est alors qu'est arrivée la dernière idée salvatrice ! HALLELUJAH !! Réaliser un tableau de bord sur le réchauffement climatique !! Après l'annonce de Donald Trump sur le retrait des Etats-Unis des accords de Paris, c'était évident ! Le travail de fond à alors débuté : charger le fichier (ça, ça va), corriger les erreurs de qualité (ça aussi, ça va), créer un fichier shapefile complémentaire pour enrichir la carte (ça, ça va aussi), trouver une bonne histoire à raconter et une bonne présentation (ça, c'est plus dur...). En effet, le type de restitution a été plus complexe à déterminer. Après avoir "joué" avec les données pour voir ce qu'il se trouvait à l'intérieur, une question est venue pointer le bout de son nez : comment présenter correctement et en même temps de manière pas trop classique des analyses sur le réchauffement climatique ? J'ai d'abord pensé à une "timeline" ou des "sparklines" mais c'était trop classique et peu lisible à mon goût. C'est alors qu'un souvenir m'est apparu comme un éclair dans le brouillard : pourquoi pas un "radar chart" ? Alors, oui, je sais, ce n'est pas considéré comme une bonne pratique de la datavisualisation... mais c'est possible lorsqu'on visualise des données temporelles. Finalement, le "radar chart" dans ce cas là se positionne comme une représentation circulaire de séries temporelles comme... comme ? COMME ? ... LES PENDULES !!</div><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://media.giphy.com/media/l0MYOUI5XfRk4LLWM/giphy.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="215" src="https://media.giphy.com/media/l0MYOUI5XfRk4LLWM/giphy.gif" width="400" /></a></div><br /><br />
<br />
<div class="separator" style="clear: both; text-align: justify;">
Eh oui, nous avons l'habitude de regarder l'heure sur des montres ? Alors pourquoi pas présenter de l'information sur un axe temporel cyclique ? Dans ce cas, les mois correspondent aux heures de bonnes vieilles horloges ! De plus ce type de présentation à déjà été utilisé dans nombre de visualisations.</div><br />
<br />
<div class="separator" style="clear: both; text-align: justify;">
L'idée étant là, il fallait dorénavant la réaliser et surtout voir si cela était faisable en moins de 20 minutes ! Je ne vous cache pas que tout ceci a nécessité un peu d'entraînement... En effet, réaliser les calculs nécessaires, basés sur des formules de trigonométrie, sans se tromper et en peu de temps... je me suis un peu entraîné !! :-) Pour être complètement transparent, ce graphique était la partie la plus importante du tableau de bord, il ne fallait donc pas la manquer. Et jusqu'à moins de 3 heures avant le grand moment, je n'arrivais pas à faire le tableau de bord complet en moins de 20 minutes...</div><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUZ6bPEWHAN-AS1PhJVVzWQE3Tnl7xcxqHC5yfr-fNbJtXdR4Ntu_CWABnk2hY5p2iOy-k24zxAFOEzkcYwQ9okeCniwky8kqyrYGBlR1vBvl36w3_lgsUaP4IGxPi3AJQLssMbvcDu44/s1600/calcul_trigo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUZ6bPEWHAN-AS1PhJVVzWQE3Tnl7xcxqHC5yfr-fNbJtXdR4Ntu_CWABnk2hY5p2iOy-k24zxAFOEzkcYwQ9okeCniwky8kqyrYGBlR1vBvl36w3_lgsUaP4IGxPi3AJQLssMbvcDu44/s640/calcul_trigo.png" width="640" height="445" data-original-width="763" data-original-height="531" /></a></div><br />
<br />
<div class="separator" style="clear: both; text-align: justify;">
C'est alors qu'une révélation m'est apparue et je me suis dit : "Mais pourquoi fais-tu les calculs trigonométriques de cette façon ? GROS BÊTA ! Factorise ton calcul et tu n'auras pas à répéter 12 fois le même champ !!" Je pense que cette petite révélation m'a permis de gagner quelques précieuses minutes me permettant de réaliser correctement la mise en forme ainsi que le nettoyage des infobulles.</div><br />
<br />
<h3>"Mais qu'est-ce que c'est-il donc que ce tableau de bord ?"</h3><br />
<br />
<div class="separator" style="clear: both; text-align: justify;">
C'est ainsi que le 07 juin 2017 à 15h (heure française), j'ai réalisé le tableau de bord ci-dessous. Il se décompose en 2 grande parties : la 1ère partie (à gauche) présente des données décrivant les saisons, ainsi que les différentes stations. La mesure principale présentée est la température moyenne sur une période duement choisie par l'utilisateur. On peut par exemple remarquer qu'il a fait en moyenne 14,6°C l'été au Royaume-Uni (waouh, quelle chaleur...), qu'il fait généralement plus chaud dans le sud du Royaume-Uni, de même dans les lieux urbanisés... La 2e partie de cette 1ère partie (vous suivez ?!) présente pour chaque année la différence en °C par rapport la première année. On remarque aisément que cela ne cesse d'augmenter, la courbe de tendance étant là pour faciliter l'analyse. La 2e partie du tableau de bord se trouvant à droite est constituée de 2 graphiques. Tout d'abord, le "radar chart" qui montre telle une horloge l'évolution des températures selon les 12 mois de l'année sur 100 ans. Dans ce cas là la couleur représente la différence en °C par rapport à la première année. On voit d'ailleurs clairement que plus on s'éloigne du centre plus on devient orange donc chaud. L'analyse de ce graphique pouvant être difficile, un surligneur est disponible afin de voir où se positionne une année en particulier. Si on choisit par exemple 2015, on s'aperçoit que le printemps et l'été ont plutôt été moins chaud qu'en 1917 mais qu'en revanche l'automne et l'hiver ont été plus chauds et tout particulièrement les mois de novembre et de décembre. Enfin, la 2e partie de cette 2e partie présente l'écart en °C entre la dernière année et la première année de la période choisie par l'utilisateur. Ce "compteur" essaie, en un clin d'oeil, de montrer que oui, en effet, il y a du réchauffement climatique (ou en tout cas qu'on peut être à même de se poser la question...).</div><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://public.tableau.com/views/IronViz2017_0/HeyDonaldIsthereGlobalWarmingintheUK?:embed=y&:display_count=yes" imageanchor="1" style="margin-left: 1em; margin-right: 1em;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy3PcyzvepVfOFqA8sn-N8fUi6nsbwEbVxx7q2O8EQ0nQSAdY5oZQ-19RAMv6ryjk8KeHVen7oMcwR-OPD90czcTB-BuohETNdoRvvxft9139KYnRgNFuTkN5s9p8tqMnous8IC8YmWng/s640/miniature_dashboard.png" width="640" height="350" data-original-width="1600" data-original-height="876" />
</a>
</div><br />
<br />
<div class="separator" style="clear: both; text-align: justify;">
Même si le sort de ce concours n'a pas été à mon avantage, cela a été, comme la première fois en 2014, une expérience vraiement intéressante et enrichissante. Par rapport à Seattle en 2014, je suis arrivé avec l'optique d'essayer de me dépasser et ne pas être trop frileux. Le défi a donc été de réaliser un tableau de bord complet comptant un "radar chart" en moins de 20 minutes. Et je suis personnellement ravi d'avoir réussi à tout construire et mettre en forme dans le temps imparti ! :-)</div><br />
<br />
J'espère que cette visualisation vous plaira autant que ce que je me suis amusé à la réaliser.<br />Anonymoushttp://www.blogger.com/profile/04345009273762315545noreply@blogger.com1tag:blogger.com,1999:blog-278583945868866001.post-20005704926382375572017-03-20T12:02:00.001+01:002017-06-13T11:08:14.993+02:00#IronViz !?! Mais quésaco ?!?Comme vous avez pu le remarquer, la première session de l'<a href="https://public.tableau.com/fr-fr/s/announcing-iron-viz-geospatial-contest" target="_blank">IronViz</a> est ouverte ! OUAAIIIIS SUUUUPEEEEER !! ... Bon... tout ça c'est bien beau mais : qu'est-ce que l'IronViz ?! Eh oui !! Eh bien chaque année, Tableau organise un concours de visualisation de données se déroulant en plusieurs phases avec à la clé un voyage complet pour la conférence Tableau aux USA. l'IronViz, c'est ça ! C'est pas beau, hein ?!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://media.giphy.com/media/BQAk13taTaKYw/giphy.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="215" src="https://media.giphy.com/media/BQAk13taTaKYw/giphy.gif" width="400" /></a></div>
<a name='more'></a><br />
<h3>
3 sessions pour se qualifier</h3>
<br />
Le concours de l'IronViz se déroule en plusieurs étapes. Il y a tout d'abord des qualifications réparties en 3 phases de sélections. La première (celle qui est actuellement en cours jusqu'au 26 mars) se déroule en début d'année. Il y en a une seconde au mois de mai et une dernière durant l'été. Lors de ces phases de qualification le déroulement est simple : un thème est donné et tout le monde peut participer pour réaliser une visualisation de données. Le but est d'être bien évidemment le meilleur en terme de visuel mais aussi d'analyse, de story-telling, de design... En général, les participants ont 2 semaines pour trouver un jeu de données, réaliser une ou plusieurs visualisations et les déposer sur le site qui va bien.<br />
<br />
A l'issue de la date limite de publication, un jury est organisé par Tableau pour sélectionner la meilleure réalisation. Celle ou celui qui aura la chance d'être choisi sera invité à participer à la conférence annuelle Tableau aux USA (cette année à Las Vegas). Ce qu'il faut comprendre par là c'est que le billet d'avion, le ticket d'entrée à la conférence (full pass) et l'hébergement sont offerts par Tableau. C'est quand même pas mal... :) ! D'un autre côté, un vote est également fait par le "public" via Twitter. Ce vote permet de désigner "le coup de cœur du public". Celle ou celui qui remporte ce vote gagne la modique somme de 500$ de cartes cadeau. Au-delà des prix, la communication et la réputation qui suit le vote et le jury Tableau sont également impressionnants.<br />
<br />
<h3>
Une grande finale aux allures de show télévisé !</h3>
<br />
Ces 3 sessions sont là pour désigner 3 finalistes qui iront se départager en direct-live aux USA dans une arène bouillonnante remplie d'un public en feu. Bon concrètement, la finale se passe durant la conférence (c'est une des sessions les plus vues par les participants à la conférence). Le format est le suivant : 20 minutes pour faire une visualisation avec un jeu de données fourni peu de temps avant. Autant être franc, c'est un "show" à l'américaine avec de la musique, de la fumée, des acclamations, des présentateurs et tout et tout... Honnêtement, ça vaut le coup d'être vu et d'être vécu ! Le vainqueur remporte un prix en dollars et bien évidemment une reconnaissance éternelle ! Sans oublier qu'il peut participer à la conférence et partir quasiment 1 semaine au USA ! Faut avouer : c'est quand même pas mal, non ? :)<br />
<br />
Pour y avoir participer en 2014, je peux dire que c'est une véritable expérience ! Réaliser une visualisation en 20 minutes en découvrant les données peu de temps avant, c'est un gros défi mais c'est aussi super enrichissant ! De plus, ça permet de rencontrer pas mal de personnes de chez Tableau, de discuter avec des Zen Master, de participer à des rendez-vous inattendus (j'ai eu la chance de croiser Hans Rosling le temps d'un petit déjeuner en 2014 grâce à l'IronViz !). Je ne peux que vous conseiller de tenter votre chance ! Et si vous voulez un aperçu de ce que j'ai réalisé en 2014 voici deux liens : la <a href="http://www.altic.org/blog/162-jtrajkovic/493-this-is-data14-ironviz-contest-partie-1-qualification" target="_blank">création de la viz de qualification</a> et le <a href="http://tipsandviz.blogspot.fr/2014/10/this-is-america.html" target="_blank">retour de l'IronViz</a>. Le premier est en français mais le second en anglais.<br />
<br />
<h3>
Les "à-côtés"</h3>
<br />
L'autre côté vraiment intéressant de l'IronViz concerne les visualisations réalisées. Il faut savoir que depuis 2015, le nombre de publications lors des IronViz ne cesse de croître. C'est un très bon moyen de voir ce qu'il est possible de faire avec Tableau. Etant donné que c'est un concours Tableau Public, la majorité des classeurs sont téléchargeables et analysables. C'est un moyen de pouvoir profiter de ce qui se fait et de trouver de l'inspiration pour des travaux futurs. C'est également un moyen de trouver des blogs intéressants parlant de Tableau avec des astuces, des visualisations inattendues... bref, c'est intéressant de voir ce qui se fait et d'y participer ! :)<br />
<br />
Alors, prêt pour la grande aventure ?<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://media.giphy.com/media/XdreKrQI1LjcQ/giphy.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://media.giphy.com/media/XdreKrQI1LjcQ/giphy.gif" width="400" /></a></div>
Anonymoushttp://www.blogger.com/profile/04345009273762315545noreply@blogger.com0tag:blogger.com,1999:blog-278583945868866001.post-76753414099455888952017-03-13T17:07:00.000+01:002017-06-13T11:07:59.194+02:00Tableau 10.2 : Les fichiers géospatiaux<h2>
<span style="font-size: x-large; font-weight: bold;">
Hello World [Map] !!</span></h2>
<div style="text-align: justify;">
<span style="font-size: small;"><span style="font-weight: normal;">Tableau 10.2 est arrivé il y a environ 2 semaines et avec cette nouvelle version des fonctionnalités toutes neuves font leur apparition ! Parmi toutes celles qu'on retrouve sur ce <a href="https://www.tableau.com/fr-fr/new-features/10.2" target="_blank">magnifique article web</a>, mon cœur a déclaré sa flamme, belle et pure, à l'intégration des fichiers géospatiaux. Eh oui, Mesdames, Mesdemoiselles, Messieurs, Tableau lit ENFIN les fichiers géospatiaux et comprend, a fortioti, la géométrie !! Si c'est pas un progrès de "déglingos" ça ?!</span></span>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://media.giphy.com/media/u7hjTwuewz3Gw/giphy.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://media.giphy.com/media/u7hjTwuewz3Gw/giphy.gif" width="320" /></a>
</div>
<br />
<span style="font-size: small;"><span style="font-weight: normal;">Vous imaginez tout ce qu'il est possible de faire en terme de cartographie dorénavant ? On n'a pas les communes de France ? PAF, le <a href="http://www.data.gouv.fr/fr/datasets/decoupage-administratif-communal-francais-issu-d-openstreetmap/" target="_blank">shapefile</a> provenant d'Open Street Map. On veut présenter les tracés des lignes de chemins de fers et c'est pénible de les redessiner en "custom polygons" ? BIM, un géojson qui va bien issue d'Open Street Map ou du portail Open Data de la SNCF ! On est sportif et on a une envie de faire une visualisation "Quantified Myself" ? CRAC, le fichier kml de mes itinéraires de footing... Ah la la, que c'est beau, mais que c'est BEAU !! A croire que Tableau cherche à nous simplifier la vie ! Bon ce ne sont pas les idées qui manquent mais concrètement, comment ça marche ? Et, est-ce que ça fonctionne bien ? C'est ce que nous allons essayer de voir ensemble, durant les 5 prochaines minutes de lecture de cet extraordinaire billet de blog.</span></span>
<br />
<a name='more'></a><br />
<h2>
<span style="font-size: large; font-weight: bold;">Alors, comment que ça marche donc ?</span></h2>
<br />
<span style="font-size: small;"><span style="font-weight: normal;">Bon. Soyons honnête, pour tester tout ça on s'est dit : "Testons tout ça en utilisant un shapefile." ça paraît dingue mais ça s'est passé comme ça. Du coup, nous sommes allé gentiment sur le portail Open Data du gouvernement français (http://www.data.gouv.fr/fr/datasets/geofla-r/) récupérer le découpage administratif des communes (rôle géographique qui brille par son absence dans Tableau) issu de Géofla, un service proposé par l'IGN. Après un petit traitement obligatoire pour convertir les coordonnées Lambert 93 (système de coordonnées franco-français) en coordonnées WGS84 (utilisé quasiment par tout le monde, si je ne m'abuse), nous avons pu tenter la connexion de Tableau à ce magnifique fichier shapefile. Et là, quelle ne fut pas notre surprise : ça fonctionne ! HALLELUJAH !.... bon, on se calme, rien n'est fait, ceci n'est que la connexion au fichier... En revanche, aussi étrange et mystérieux que cela puisse paraître, Tableau reconnaît bien les différents attributs présents dans le shapefile. Eh oui ! Cela veut dire qu'en plus de la géométrie des communes, on retrouve le code insee et la population ! Tout ça devient de plus en plus fou !</span></span>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFiV-OCJKQxHt__JrL8p8jftbPYDn6NT71IYohWWV3c1qG7z70vDGZNgFHQWXDIM50Ab2VXMo5pYMrxls0ySycZ3pbGGTF8iqwFr8bfmAylX2_Ij7QUf_DDcg7t-TNMIcie3qGqih6yd8/s1600/image1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="326" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFiV-OCJKQxHt__JrL8p8jftbPYDn6NT71IYohWWV3c1qG7z70vDGZNgFHQWXDIM50Ab2VXMo5pYMrxls0ySycZ3pbGGTF8iqwFr8bfmAylX2_Ij7QUf_DDcg7t-TNMIcie3qGqih6yd8/s640/image1.png" width="640" /></a>
</div>
<br />
<span style="font-size: small;"><span style="font-weight: normal;">Donc la source de données est construite, fabuleux, ne reste plus qu'à créer des viz, c'est quand même l'intérêt de la chose !! Ni une ni deux, on bascule sur l'interface de conception et on glisse et dépose ce qui va bien c'est à dire : la géométrie (qui devient donc un nouveau rôle géographique de Tableau ?!? :D .... non, non, il ne faut pas rêver tout de même... :( ), le code insee et la population (pour faire une joooooolie légende des couleurs). Allez soyons fou-fou, on va même calculer une densité de population (sum([Population])/sum([Superficie])). Et c'est assez fou car tout ce petit monde fonctionne sans problème et sans latence. J'avoue avoir eu, à un moment, une petite larme de joie en repensant à tout ce temps passé à construire les fichiers de polygones personnalisés depuis mes débuts avec la version 7.0 de Tableau...</span></span>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijN14TbGeBeeYmzXN3ejCxBtukX9SsC5qJgOcTJ74BvYDvf8G6ANRIOzRYXHW_vaA66a5wQqwcM_-noDAP8fdckT-R7TF-9RLBCqtBXwZ1NJRC73r1X9-2d0T5mXhpt54ANqFx4FBOvjw/s1600/image2_2.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="346" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijN14TbGeBeeYmzXN3ejCxBtukX9SsC5qJgOcTJ74BvYDvf8G6ANRIOzRYXHW_vaA66a5wQqwcM_-noDAP8fdckT-R7TF-9RLBCqtBXwZ1NJRC73r1X9-2d0T5mXhpt54ANqFx4FBOvjw/s640/image2_2.gif" width="640" /></a>
</div>
<br />
<span style="font-size: small;"><span style="font-weight: normal;">Tout ça c'est très bien et très intéressant mais bon, ne nous leurrons pas, il faut pousser le test plus loin... beaucoup plus loin... Comme dirait Benjamin Parker : "Un grand pouvoir implique de grandes responsabilités". C'est pourquoi, Maurice, nous avons osé pousser le bouchon plus loin en se posant ces questions : et qu'en est-il des fichiers GEOJSON ? et peut-on faire des jointures de fichiers spatiaux ? et pourquoi pas des cartes à 2 couches de fichiers spatiaux ?! Tout ceci est dingue ! Mais nous n'avions pas vu que notre aventure ne faisait que commencer...</span></span>
<br />
<br />
<h2>
<span style="font-size: large; font-weight: bold;">"Allez Hop, on y va, en route pour l'aventure !"</span></h2>
<br />
<span style="font-size: small;"><span style="font-weight: normal;">La deuxième phase de notre test, ô combien aventureux et plein d'audace, nous a conduit à utiliser un développement fait en interne. Eh oui, ce test était fait pour mettre à l'épreuve nos compétences et nos réalisations... Nous avons donc jeté notre dévolu sur une API d'isochrone ! TA-DAA ! Bon, le but de cette API est de retourner des fichiers GEOJSON contenant la géométrie des isochrones en fonction d'une liste de points fournis au préalable. En gros, on donne un fichier CSV avec des points d'intérêts et la machine nous renvoie des GEOJSON avec les isochrones correspondant à chaque point d'intérêt. Tout ça est très prometteur mais une question fondamentale subsiste : qu'allons-nous utiliser comme fichier source ? Et c'est à ce moment précis que nos esprits se sont éclairés pour nous révéler la solution : des magasins issus du répertoire SIRENE ! Eh oui, vous n'êtes pas sans savoir "[qu']une courbe isochrone est une courbe géométrique délimitant les points accessibles par un véhicule – terrestre ou aérien – en un temps donné" (dixit wikipédia). Dans notre cas ce ne sera pas des courbes mais plutôt des zones. Toujours est-il que pour être pertinent il nous faut des isochrones correspondant à un point d'intérêt accessible en voiture (nous calculons actuellement des isochrones pour du transport routier) par exemple des magasins et non pas la salle de bain de l'appartement de Chuck Norris... bien que...</span></span>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://media.giphy.com/media/3hvmlYNsOTFWE/giphy.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="207" src="https://media.giphy.com/media/3hvmlYNsOTFWE/giphy.gif" width="320" /></a>
</div>
<br />
<span style="font-size: small;"><span style="font-weight: normal;">La première étape a donc été de constituer un jeu de données provenant du répertoire SIRENE (en Open Data depuis janvier 2017). Pour rester le plus possible cohérent, nous avons choisi comme périmètre les grandes enseignes de la vente de meubles à savoir : ALINEA, BUT, CONFORAMA, FLY et IKEA. Cela nous a permis de ressortir environ 530 points d'intérêt correspondant évidemment à 530 magasins. Après avoir constitué un fichier CSV contenant le SIRET (code unique de l'établissement), la latitude, la longitude et deux paramètes de fonction (le pas et le rang) permettant de définir nos isochrones, nous avons envoyé tout ce petit monde à notre API qui, en un temps record de plusieurs dizaines de minutes, nous a retourné 530 fichiers GEOJSON. Et voilà, la magie de la technologie moderne avait fait son oeuvre. Nous avons ensuite forgé en secret dans nos bureaux "un GEOJSON pour les gouverner tous, un GEOJSON pour les trouver, un GEOJSON pour les amener tous et dans Tableau les lier". Ceci nous a permis de créer ce qui suit, une extraordinaire carte des isochrones de chaque magasin.</span></span>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioUWtqYHL1S9IpVzjngWfp825udluqljHM5Xad9wcNwPbwVewZkx9gfafVXT2-U6sOsclGBupb6CqrEegeihD4_Udkl0sClh90lDtELuDH4Uds0nXFgBDbK-LXEkPP1ExVxhFgAJKxOPQ/s1600/image3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="314" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioUWtqYHL1S9IpVzjngWfp825udluqljHM5Xad9wcNwPbwVewZkx9gfafVXT2-U6sOsclGBupb6CqrEegeihD4_Udkl0sClh90lDtELuDH4Uds0nXFgBDbK-LXEkPP1ExVxhFgAJKxOPQ/s640/image3.png" width="640" /></a>
</div>
<br />
<span style="font-size: small;"><span style="font-weight: normal;">Après avoir fêté dignement notre réussite, nous nous sommes aperçu que, bon, cette carte était quand même plutôt pauvre... Nous avons donc décidé d'utiliser d'autres fichiers spatiaux pour enrichir notre visuel. De la même manière que pour les isochrones, nous avons créé un fichier avec chaque point d'intérêt géolocalisé et nous avons réutilisé le shapefile des communes françaises. Cela nous a permis de construire une source de données beaucoup plus intéressante. A cela nous avons joint un extrait de données Tableau contenant les informations relatives à chaque SIRET (adresse, effectif, activité, nature juridique...). Cette étape nous a permis de tester une autre nouvelle fonctionnalité de Tableau 10.2 : les jointures sur des calculs ! En effet, pour joindre les différents fichiers, il a été nécessaire de faire des calculs avant les jointures notamment pour convertir certains types de données et pour concaténer des champs (par exemple SIRET = SIREN + code NIC). Tout ceci nous a permis d'obtenir cette magnifique source de données :</span></span>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQw16xD41Nkr27LSWZEP_vrWbC4Pg9-JOnrMRGhpIPD787LgwuC76C-0S2V16GJaGck_GGVNHkrUy1AJ1XfXHZ12WsXS7AX0jJ9Sb3F_54YFzRAWBacdMebNHRCxEJnsMnssxZp1e8HMM/s1600/image4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQw16xD41Nkr27LSWZEP_vrWbC4Pg9-JOnrMRGhpIPD787LgwuC76C-0S2V16GJaGck_GGVNHkrUy1AJ1XfXHZ12WsXS7AX0jJ9Sb3F_54YFzRAWBacdMebNHRCxEJnsMnssxZp1e8HMM/s640/image4.png" width="640" /></a>
</div>
<br />
<span style="font-size: small;"><span style="font-weight: normal;">Vous ne serez pas sans remarquer que nous utilisons, au passage, une fonctionnalité récente (version 10.0) qui nous permet de croiser différents systèmes sources. Cet outil est un vrai concentré de technologie, n'est-ce pas ? Suite à tout cela, il ne restait plus que la construction du tableau de bord. Une seule question restait en suspend : est-il possible de faire des cartes doubles avec des fichiers spatiaux ? La réponse est évidemment oui !</span></span>
<br />
<br />
<h2>
<span style="font-size: large; font-weight: bold;">Une carte c'est bien, deux cartes c'est mieux !</span></h2>
<br />
<span style="font-size: small;"><span style="font-weight: normal;">Lors de la construction du tableau de bord nous avons souhaité placer à la fois les magasins sous forme de points et également les zones isochrones. Nous sommes d'accord pour dire que c'est mieux d'avoir l'endroit où se situe le magasin en plus de ses zones isochrones. Pour cela, la jointure entre les deux fichiers GEOJSON (les isochrones et les magasins) a été salvatrice. Etant donné que la géométrie est interprétée comme telle par Tableau, les coordonnées géographiques sont donc "générées". Cette particularité fait que pour construire une carte double, il est obligatoire d'avoir des coordonnées "générées" des deux côtés. Eh oui, il n'est malheureusement pas possible de superposer des coordonnées "générées" et des coordonnées lues à partir d'un fichier source. Triste monde me dirait vous... Heureusement, nous avions prévu le coup en amont en créant ces deux fichiers GEOJSON. Cela nous a donc permis de construire LA carte, THE carte :</span></span>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKp690n2qfw_oBtiBUINAQFEd_A4HUTQPycdH2drXilr6DsFENKxhVhK7PW2_AelZy9Me__wGnihtReHia9suuPco3ygXyBP7OhfBTYf2OUemD8lWrTKAxADl_yw9cRFq_Aq5lcwRGaAE/s1600/image5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="338" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKp690n2qfw_oBtiBUINAQFEd_A4HUTQPycdH2drXilr6DsFENKxhVhK7PW2_AelZy9Me__wGnihtReHia9suuPco3ygXyBP7OhfBTYf2OUemD8lWrTKAxADl_yw9cRFq_Aq5lcwRGaAE/s640/image5.png" width="640" /></a>
</div>
<br />
<span style="font-size: small;"><span style="font-weight: normal;">Pour aller un peu plus loin dans l'analyse et la mise en forme, nous avons créé quelques feuilles en plus notamment pour compter les magasins, les communes d'implémentation et l'effectif total approximatif (arrondi à la centaine près dans le répertoire SIRENE), ainsi qu'un graphique en barre pour présenter l'âge, la durée d'activité et de nouveau l'effectif de chaque magasin. Ce premier tableau de bord nous a paru intéressant pour analyser la stratégie d'implémentation des magasins. On a notamment remarqué que l'enseigne IKEA est placée tout autour de Paris. On se doute que les magasins sont d'une superficie très grande, ce qui empêche d'en construire en centre ville, mais il est important de remarquer qu'à 30/35 minutes de voitures du centre de Paris, il y a un magasin IKEA. Seul point noir pour cette enseigne, au nord ouest, il y a une zone de vide où il serait potentiellement intéressant de construire un établissement. Nous avons également créé un second tableau de bord où cette fois nous avons positionné toutes les enseignes afin de voir les zones de recouvrement des concurrents.</span></span>
<br />
<br />
<div class="tableauPlaceholder" id="viz1489421363933" style="position: relative;">
<noscript>
<a href='http://tipsandviz.blogspot.fr/2017/03/tableau-102-les-fichiers-geospatiaux.html'><img alt=' ' src='https://public.tableau.com/static/images/Is/Isochrones/Chalandisedesmagasins/1_rss.png'
style='border: none' /></a>
</noscript><object class="tableauViz" style="display: none;"><param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' /> <param name='site_root' value='' /><param name='name' value='Isochrones/Chalandisedesmagasins' /><param name='tabs' value='no' /><param name='toolbar' value='yes' /><param name='static_image' value='https://public.tableau.com/static/images/Is/Isochrones/Chalandisedesmagasins/1.png' /> <param name='animate_transition' value='yes' /><param name='display_static_image' value='yes' /><param name='display_spinner' value='yes' /><param name='display_overlay' value='yes' /><param name='display_count' value='yes' /></object></div>
<script type="text/javascript"> var divElement = document.getElementById('viz1489421363933'); var vizElement = divElement.getElementsByTagName('object')[0]; if ( divElement.offsetWidth > 800 ) { vizElement.style.width='1104px';vizElement.style.height='1169px';} else if ( divElement.offsetWidth > 500 ) { vizElement.style.width='100%';vizElement.style.height='1069px';} else { vizElement.style.width='100%';vizElement.style.height='1069px';} var scriptElement = document.createElement('script'); scriptElement.src = 'https://public.tableau.com/javascripts/api/viz_v1.js'; vizElement.parentNode.insertBefore(scriptElement, vizElement); </script>
<br />
<h2>
<span style="font-size: large; font-weight: bold;">Bon, et dans tout ça les nouvelles fonctionnalités ?</span></h2>
<br />
<span style="font-size: small;"><span style="font-weight: normal;">Pour conclure cette grande aventure, je dirai que nous avons réussi à tester comme nous le souhaitions cette intégration des fichiers spatiaux. Cette fonctionnalité m'a fait "rêver" depuis l'annonce faite il y a déjà plus d'un an et force est de contaster qu'elle fonctionne vraiment bien. D'un point de vue purement technique, les performances sont bonnes (à voir avec des très très gros fichiers) avec des fichiers tels que les 37 000 communes françaises ou les 530 magasins, les jointures sont possibles, la lecture des données GEOJSON est bien réalisée. Un seul bémol concernant le rôle géographique "geométry" : en effet, nous avons tenter de construire un "web data connector" pour interroger directement l'API mais malheureusement il est impossible de trouver le rôle géographique "geometry" ce qui ne permet pas de générer les coordonnées géographiques. C'est relativement dommage... D'un point de vue fonctionnel, les applications peuvent être nombreuses d'autant plus que les représentations cartographiques sont de plus en plus utilisées. Certains clients pourront dorénavant cartographier leur propres découpages commerciaux ou leur points d'intérêt en quelques clics et sans les désavantages des "customs polygons".</span></span>
<br />
<span style="font-size: small;"><span style="font-weight: normal;">Bref, autant être honnête, cette fonctionnalité est globalement une réussite. Comme dirait Cyril Lignac : "Simple mais efficace !". Enfin, je remercie Franck Nguyen, mon padawan, pour son aide tout au long de cette traversée. Et merci à vous pour la lecture de ce billet de blog !</span></span>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT1K3i2oGHH1tgawitG9Mwz_8ZWdNyuoWoTe79-e-SkAj1Q2FGFGSNMPE7ExHdgCMOHTerC8qHDF67GPeKZqJosYmM50n6Tt_nKP1qpDjfsEi9YvYpdMogK8gHJ-0BKfq1l5416LtAxmk/s1600/image6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT1K3i2oGHH1tgawitG9Mwz_8ZWdNyuoWoTe79-e-SkAj1Q2FGFGSNMPE7ExHdgCMOHTerC8qHDF67GPeKZqJosYmM50n6Tt_nKP1qpDjfsEi9YvYpdMogK8gHJ-0BKfq1l5416LtAxmk/s400/image6.jpg" width="400" /></a>
</div>
</div>
Anonymoushttp://www.blogger.com/profile/04345009273762315545noreply@blogger.com2tag:blogger.com,1999:blog-278583945868866001.post-76703836056289876752016-09-19T12:03:00.002+02:002016-09-19T12:10:38.189+02:00Catch me if you can !<h1>
When is my next train?</h1>
<h1>
<div style="font-size: medium; font-weight: normal; text-align: justify;">
Currently I am lucky because I have some time to create vizzes with Tableau 10. I am very curious about Device Designer efficiency and use. That is why I did a couple weeks ago a viz about french wine. This week, I used Open Data about subway in Paris (again!). Since my first wiz about Paris' subway, I want to show visualisation about time and trip. that is why I chose GTFS files (all data are available here : <a href="http://data.ratp.fr/explore/dataset/offre-transport-de-la-ratp-format-gtfs/" target="_blank">GTFS files</a>).<br />
</br>
<div style="text-align: center;">
<iframe src="//giphy.com/embed/5YS2veXdeDhsI" width="480" height="367" frameBorder="0" class="giphy-embed" allowFullScreen></iframe></div><p><a href="https://giphy.com/gifs/people-help-5YS2veXdeDhsI">via GIPHY</a></p>
<a name='more'></a><br />
My main idea was to create a viz giving next train for each stop in function of the time you are viewing the viz. I knew it was possible in Tableau because, yes, almost everything is possible with Tableau... So I started to donwload data and look into the files. For once, data are really good, well structured and clean. Several files are available. I chose "RATP_GTFS_LINES" archive because it seems to be easier to recognize subway's lines. Here is a screenshot of the dashboard :<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWm8fzYJ1mWJi48ZEAwMrVw1GgnWfns6M6kbs2znKqJkuZvfyjnYrTii_bwByQ4axQ56WZbIxrNyDEyia4YKnC0w1Uu6wSl3aCqMusxVCcX7-Q6XDgbNsuuLzO9AcVY8MrCTMvoWB7yH4/s1600/dashboard.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="572" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWm8fzYJ1mWJi48ZEAwMrVw1GgnWfns6M6kbs2znKqJkuZvfyjnYrTii_bwByQ4axQ56WZbIxrNyDEyia4YKnC0w1Uu6wSl3aCqMusxVCcX7-Q6XDgbNsuuLzO9AcVY8MrCTMvoWB7yH4/s640/dashboard.png" width="640" /></a></div>
<br /></div>
</h1>
<h3>
Union 'em all!</h3>
<h1>
<div style="font-size: medium; font-weight: normal; text-align: justify;">
<br />
OK. So first I told me : "You just have to union all files with Tableau and go for analysis!"... Well... Almost... Unfortunately, I find an issue with union feature. Indeed, I guess it is because my computer is french and CSV in France is seperated by semi-colon and not comma. In Tableau, when I put my first file I just had to specified that the seperator is comma and not semi-colon (by default, as I told before, Tableau is thinking that seperator is semi-colon). Everything was OK. But when I wanted to union a second file, here is the issue : Tableau did not apply configuration to the second file. It gives me a wrong union with all my second file in a column... I was really disappointed because I had 16 files to union for each tables (and I had 5 tables in my datasource). So with a lot of regret, I chose to use an ETL (talend in that case). After this step, I put all my data in Tableau and I was another time disappointed because there was too much rows in my source (for Tableau Public). After a long thought, I chose to only keep a week (already more than 1,600,000 rows). And that's it : my datasource was ready to go!<br />
<br /></div>
</h1>
<h3>
Let's get it started!</h3>
<h1>
<div style="text-align: justify;">
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
My first sheet was, of course, a map. Almost everyone in Paris knows the subway map! To create the map, as usual, I used stops, lines and a pointorder. The pointorder is corresponding to the the position of the stop along the line. This gives me the following map :</div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div class="separator" style="clear: both; font-size: medium; font-weight: normal; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXbuXW181-l5mS6WdvsUTGT4NsNt9H97tQlVkdNs9Y3zWYRDbJxvxbGE-fE2hqy8BrrFDpQTtjH-qmjZLFBXzBKJJlB9zsEQ2dbYxW8rTqOHlrOY8aLl02ambD8OJBofjGLnVlBwKU0tA/s1600/map.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXbuXW181-l5mS6WdvsUTGT4NsNt9H97tQlVkdNs9Y3zWYRDbJxvxbGE-fE2hqy8BrrFDpQTtjH-qmjZLFBXzBKJJlB9zsEQ2dbYxW8rTqOHlrOY8aLl02ambD8OJBofjGLnVlBwKU0tA/s640/map.png" width="640" /></a></div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
We can see that there are points on lines corresponding to stops. I used a double axis allowing me to have to "layouts" : one for the lines and one for the stops. After building this map, I tried to use the real path of lines (available as an open data file) but it was to heavy to join all the real path and all the GTFS files (to heavy for Tableau Public, if I want to do this for a Tableau Server it is possible!).</div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
My second sheets was about frequency of trains. Indeed, I told me it could be interesting to have a chart showing how many trains are going through a stop. To do this I used a count dictinct of trips. In GTFS you have stops, stop_times and trips. A trip is corresponding to a travel on a line (so for stops which have several lines such as Châtelet (5 lines), you have more trips than a stop with 1 line!). To have a good presentation I put a time axis on X axis. This time axis is cut by hour for one day. This gives a good view on how many trains are going through a stop in 1 hour. Here it is :</div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div class="separator" style="clear: both; font-size: medium; font-weight: normal; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX53KSHIRMgOQhH0b7hEs_IAvG-u_f7Zk2uHK8XJAF8X1qdxjCq0GUQnnOCW7mhjk9VVbsTjL2BAhsFSnFpV4ciqggLoSyNDlgzGDUu5WS0xDvJddNoKYDqJ6kTUW4eMlSkVTfpi65rjc/s1600/frequency.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="340" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX53KSHIRMgOQhH0b7hEs_IAvG-u_f7Zk2uHK8XJAF8X1qdxjCq0GUQnnOCW7mhjk9VVbsTjL2BAhsFSnFpV4ciqggLoSyNDlgzGDUu5WS0xDvJddNoKYDqJ6kTUW4eMlSkVTfpi65rjc/s640/frequency.png" width="640" /></a></div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
Finally, for this chart, I want to show where you are when you are viewing the viz : this is the red bar.</div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
The third part of the dashboard is about next trains. It was the most difficult part to create not because of technically issue but more about desing. Indeed, I woould like to recreate a subway dock with the same pane and all the equipment... but it was too hard to do. I chose to just reproduce the name of the station and the pane giving next trains. That is why you will find a digital clock, the name write un white on a blue background, the subway line and a table with next trains. The clock is just a "bonus" and it was a challenge for me...</div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div class="separator" style="clear: both; font-size: medium; font-weight: normal; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimy5f7QneYitQcwk8YG3CazhUpLTnodBK9eME0q3yoITlX-9BgXgByFAzktqw0djxqmbC_pAjsPtAn3eCzUW7sL_jigyX21aaft2ms9iPH9QuJ7C5TyPgmsMm27MAK6ewEx0eAZxkXKTk/s1600/clocksandall.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimy5f7QneYitQcwk8YG3CazhUpLTnodBK9eME0q3yoITlX-9BgXgByFAzktqw0djxqmbC_pAjsPtAn3eCzUW7sL_jigyX21aaft2ms9iPH9QuJ7C5TyPgmsMm27MAK6ewEx0eAZxkXKTk/s400/clocksandall.png" width="252" /></a></div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
In this part of the dashboard, there are 6 sheets : the stop's name, the clock, the little "M", time as a number, subway's lines and the table with next trains. Technically, there are 2 complicated sheets : the clock and the table.</div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
About the clock, I used once again trigonometry. As I did with <a href="http://tipsandviz.blogspot.com/2015/07/how-to-create-radar-chart-in-tableau.html" target="_blank">radar chart</a> and as Andy Kriebel did it too in his blogpost about <a href="http://www.vizwiz.com/2016/05/tableau-tip-tuesday-how-to-create_17.html" target="_blank">monthly radar chart</a>, I created 2 calculated field corresponding to X axis and Y axis. To create a clock, it is the same way than to create a monthly radar chart. Indeed, there are 12 hours on a clock so you just have to use <b style="background-color: white; color: #252525; font-family: sans-serif; font-size: 14px; line-height: 22.4px; text-align: start;"><span class="lang-grc" lang="grc" style="font-family: "Arial Unicode MS", "DejaVu Sans", Athena, Gentium, "Palatino Linotype", "Lucida Sans Unicode", "Lucida Grande", Code2000, sans-serif;">π/6 </span></b>angles (you can cut your trigonometry circle into 12 slices so <b style="background-color: white; color: #252525; font-family: sans-serif; font-size: 14px; line-height: 22.4px; text-align: start;"><span class="lang-grc" lang="grc" style="font-family: "Arial Unicode MS", "DejaVu Sans", Athena, Gentium, "Palatino Linotype", "Lucida Sans Unicode", "Lucida Grande", Code2000, sans-serif;">2</span></b><b style="background-color: white; color: #252525; font-family: sans-serif; font-size: 14px; line-height: 22.4px; text-align: start;"><span class="lang-grc" lang="grc" style="font-family: "Arial Unicode MS", "DejaVu Sans", Athena, Gentium, "Palatino Linotype", "Lucida Sans Unicode", "Lucida Grande", Code2000, sans-serif;">π/12</span></b>). This gives me the basis of my calculated field. The other part is about drawing the lines. My first idea was to create a second datasource with all the rows and columns needed to draw the clock.</div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div class="separator" style="clear: both; font-size: medium; font-weight: normal; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdwtEbJfzbXTAxqvSF6rURPvnJnERy_KFeWrzZop6SHMXtapvha9cwI4mrZSucg-SJ1F-3n9MPz_VL-dO6AxV_-Djn3cey6QG1lEKFOE-ajlDGBShFTe_ZTT65jmdSVQh8ITI1padec4Q/s1600/clock_data.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdwtEbJfzbXTAxqvSF6rURPvnJnERy_KFeWrzZop6SHMXtapvha9cwI4mrZSucg-SJ1F-3n9MPz_VL-dO6AxV_-Djn3cey6QG1lEKFOE-ajlDGBShFTe_ZTT65jmdSVQh8ITI1padec4Q/s640/clock_data.png" width="284" /></a></div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
As you can see on the picture, there are 4 columns. I chose to cut the time by minutes. I created a column measure giving me 2 values : hour and minute, and a pointorder giving me 1 and 2 (or 0 and 1). The column value gives for the measure hour the hour of time and for the measure minute minutes of time. These 4 columns allow me to create the hands of a watch. To draw the watch, I create a sheet organized like this :</div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div class="separator" style="clear: both; font-size: medium; font-weight: normal; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTgpDfmb-hd_etr9bO5zwQOX6vPfcpgwJdlnNdLlr3moC4Mi7T9EmRrTI0H1N4nr3WXafAkncd2M_3ct8G8zxrVI0xKGe0J4sDivxNxnMSYimkrzrkjZRP5kVakDhKTf2ExMMuN-evsWo/s1600/clock_sheet.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="512" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTgpDfmb-hd_etr9bO5zwQOX6vPfcpgwJdlnNdLlr3moC4Mi7T9EmRrTI0H1N4nr3WXafAkncd2M_3ct8G8zxrVI0xKGe0J4sDivxNxnMSYimkrzrkjZRP5kVakDhKTf2ExMMuN-evsWo/s640/clock_sheet.png" width="640" /></a></div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
I used a background image to give me the marks of a watch. As you can see, Pointorder is used to give the path for lines and to give the size. There is another calculated field create directly in the mark shelf corresponding to this : dateadd('hour',9,now()). This gives me the hour (I used dateadd() function to be at my locale time in France. Indeed, Tableau Public server seems to be in the USA and the now() function gives me the US time... The two calculated fields used to create the watch are just below :</div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
Calculation for <code>[Xaxis]</code></div>
<pre style="font-size: medium; font-weight: normal;"><code>if [Pointorder]=1
then
if datepart('hour',dateadd('hour',9,[arrival_time]))=datepart('hour',dateadd('hour',9,now()))
and datepart('minute',dateadd('hour',9,[arrival_time]))=datepart('minute',dateadd('hour',9,now()))
then
if [Measure]='hour'
then
-cos(datepart('hour',dateadd('hour',9,now()))/12*2*pi()+pi()/2)*0.5
elseif [Measure]='minute'
then -cos(datepart('minute',dateadd('hour',9,now()))/60*2*pi()+pi()/2)
else 0
end
else 0
end
else 0
end</code></pre>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
Calculation for <code>[Yaxis]</code></div>
<pre style="font-size: medium; font-weight: normal;"><code>if [Pointorder]=1
then
if datepart('hour',dateadd('hour',9,[arrival_time]))=datepart('hour',dateadd('hour',9,now()))
and datepart('minute',dateadd('hour',9,[arrival_time]))=datepart('minute',dateadd('hour',9,now()))
then
if [Measure]='hour'
then
sin(datepart('hour',dateadd('hour',9,now()))/12*2*pi()+pi()/2)*0.5
elseif [Measure]='minute'
then sin(datepart('minute',dateadd('hour',9,now()))/60*2*pi()+pi()/2)
else 0
end
else 0
end
else 0
end</code></pre>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
I chose to multiplicate the hour calculation by 0.5 to have the little hand of the watch smaller than the minute hand.</div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
With this "second datasource" method I had an issue with the filter action coming from the map of my dashboard... So I give another way to create the watch based on my main datasource. I played with subway's lines to create hands of the watch. Indeed, my filter action is not filtering on lines so I can use it to draw the clock. I had to create a new more field corresponding to the point order. The calculted fields are quite different and I had to create a new more field called Pointorder :</div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
Calculation for <code>[Xaxis]</code></div>
<pre style="font-size: medium; font-weight: normal;"><code>if datepart('hour',[arrival_time])<>datepart('hour',dateadd('hour',9,now()))
then
if [ligne_originale]='1' then -cos(datepart('hour',dateadd('hour',9,now()))/12*2*pi()+pi()/2)*0.5
elseif [ligne_originale]='2' then -cos(datepart('minute',dateadd('hour',9,now()))/60*2*pi()+pi()/2)
else 0
end
else 0
end</code></pre>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
Calculation for <code>[Yaxis]</code></div>
<pre style="font-size: medium; font-weight: normal;"><code>if datepart('hour',[arrival_time])<>datepart('hour',dateadd('hour',9,now()))
then
if [ligne_originale]='1' then sin(datepart('hour',dateadd('hour',9,now()))/12*2*pi()+pi()/2)*0.5
elseif [ligne_originale]='2' then sin(datepart('minute',dateadd('hour',9,now()))/60*2*pi()+pi()/2)
else 0
end
else 0
end</code></pre>
<pre style="font-size: medium; font-weight: normal;"><code>
</code></pre>
<div style="font-size: medium; font-weight: normal;">
Calculation for <code>[Pointorder]</code></div>
<pre style="font-size: medium; font-weight: normal;"><code>case [ligne_originale]
when '1' then 1
when '2' then 3
else 2
end</code></pre>
<div style="font-size: medium; font-weight: normal;">
With those fields my new sheet is organized like this :</div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div class="separator" style="clear: both; font-size: medium; font-weight: normal; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsx9OtjzoNWfD5FWANmJC0tZdSCFUUDWZoFqX5wZOxAdzldIaVkJhIa_09ALgYJ8IAR1hbHS6l-NAjBkdEyYLF4bn0E6OqO2gYfbvBeL-nDqehz-4-H6ig8lcetfxPAXGkj6h1k0B6rnw/s1600/clock_sheet_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="466" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsx9OtjzoNWfD5FWANmJC0tZdSCFUUDWZoFqX5wZOxAdzldIaVkJhIa_09ALgYJ8IAR1hbHS6l-NAjBkdEyYLF4bn0E6OqO2gYfbvBeL-nDqehz-4-H6ig8lcetfxPAXGkj6h1k0B6rnw/s640/clock_sheet_2.png" width="640" /></a></div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
Of course, in all of my field I used the function now() to be based on the current time.</div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
Finally for the table giving next trains, I used some table calculations (rank_unique) to define next trips in function of the current time. The calculated field used to define next trips is quite simple :</div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
Calculation for <code>[all_next_trip]</code></div>
<pre style="font-size: medium; font-weight: normal;"><code>if
maketime(datepart('hour',[arrival_time]),datepart('minute',[arrival_time]),0)
>=
maketime(datepart('hour',dateadd('hour',9,now())),datepart('minute',dateadd('hour',9,now())),0)
then
str(maketime(datepart('hour',[arrival_time]),datepart('minute',[arrival_time]),0))
end</code></pre>
<div style="font-size: medium; font-weight: normal;">
The rank_unique() function is computing along this field in an ascendant order. This allows me to display only the first and second trains.</div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
After all these sheets, I built the dashboard and put some filter actions. The most important is the filter action coming from the map and filtering all the other sheets. I also put a "refresh" button because I found that Tableau Public used cache and does not display correctly the current time. So if there is a mistake when you view the viz just try to click on the refresh button.
</br>
I hope this post was interesting and useful! Here is the final viz!</div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
</div>
<div class='tableauPlaceholder' id='viz1474279066034' style='position: relative'><noscript><a href='#'><img alt='Catch me if you can!When is my next train? ' src='https://public.tableau.com/static/images/Ca/CatchMeIfYouCan/Catchmeifyoucan/1_rss.png' style='border: none' /></a></noscript><object class='tableauViz' style='display:none;'><param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' /> <param name='site_root' value='' /><param name='name' value='CatchMeIfYouCan/Catchmeifyoucan' /><param name='tabs' value='no' /><param name='toolbar' value='yes' /><param name='static_image' value='https://public.tableau.com/static/images/Ca/CatchMeIfYouCan/Catchmeifyoucan/1.png' /> <param name='animate_transition' value='yes' /><param name='display_static_image' value='yes' /><param name='display_spinner' value='yes' /><param name='display_overlay' value='yes' /><param name='display_count' value='yes' /></object></div> <script type='text/javascript'> var divElement = document.getElementById('viz1474279066034'); var vizElement = divElement.getElementsByTagName('object')[0]; if ( divElement.offsetWidth > 800 ) { vizElement.style.width='894px';vizElement.style.height='869px';} else if ( divElement.offsetWidth > 500 ) { vizElement.style.width='894px';vizElement.style.height='869px';} else { vizElement.style.width='100%';vizElement.style.height='1069px';} var scriptElement = document.createElement('script'); scriptElement.src = 'https://public.tableau.com/javascripts/api/viz_v1.js'; vizElement.parentNode.insertBefore(scriptElement, vizElement); </script>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
Feel free to leave a message!</div>
</h1>
Anonymoushttp://www.blogger.com/profile/04345009273762315545noreply@blogger.com1tag:blogger.com,1999:blog-278583945868866001.post-35973891056230362252016-08-30T17:58:00.003+02:002016-08-30T17:58:28.100+02:00Le Tableau Nouveau est arrivé : Tableau 10 !<h1>
Les vins AOC/AOP en France</h1>
<div style="text-align: justify;">
Après de bonnes vacances d'été, le temps est arrivé de retrouver notre sérieux. C'est pourquoi j'ai choisi comme sujet les vins AOC/AOP en France. Les données sont issues du portail gouvernemental Open Data <a alt="dataGouv" href="http://data.gouv.fr" target="_blank">data.gouv.fr</a> ainsi que de <a alt="wikipedia" href="http://www.wikipedia.fr" target="_blank">Wikipedia</a> et d'un site spécialisé sur le vin <a alt="wineSearcher" href="http://www.winesearcher.com" target="_blank">Wine Searcher</a>. Donc soyons sérieux : parlons vins !<br />
</br>
<div style="text-align: center;">
<iframe src="//giphy.com/embed/3oEjI08ShgxBoFdiQU" width="480" height="270" frameBorder="0" class="giphy-embed" allowFullScreen></iframe></div>
<a href="http://giphy.com/gifs/hbo-six-feet-under-fisher-family-hbo-3oEjI08ShgxBoFdiQU">via GIPHY</a></p>
<a name='more'></a><br />
Pour cette visualisation il a été nécessaire de récupérer les AOP et AOC présents dans les fichiers fournis par le portail data.gouv.fr et de les joindre aux communes françaises. Tableau ne dispose actuellement pas des polygones de chaque commune française. C'est pourquoi dans ce cas précis l'utilisation de l'extrait de données disponible sur le site <a alt="tableau-mapping" href="http://tableaumapping.bi" target="_blank">tableaumapping.bi</a> est obligatoire. Les communes présentes dans cette extrait sont toutefois celles du découpage 2013. Pour plus de sécurité i lest possible de recréer cet extrait de données en récupérant les données géométrique de chaque commune via le site de l'IGN Geofla. Ce service de l'IGN permet de récupérer des fichiers shapefile correspondant à toutes les communes françaises. En revanche, i lest nécessaire de traiter ce fichier avant de pouvoir l'utiliser dans Tableau. Dans mon cas, je n'ai pas récupéré le dernier découpage administratif présent sur Geofla mais celui déjà traité présent dans l'extrait de données issu de tableaumapping.bi. Concernant les autres chiffres, Wikipédia m'a permit de récupérer une synthèse de la production viticole française et Wine Searcher une grille des vins les plus chers du monde. Enfin, les itinéraires des routes du vin ont été créés manuellement via Google Maps et traités avec QGis pour récupérer les informations utilisables par Tableau.<br />
<br />
Cette visualisation m'a permit d'utiliser complètement Tableau 10 pour la première fois. Il existe notamment 2 versions de la visualisation : une pour la consultation mobile et une autre pour la consultation "Desktop". Cette nouvelle fonctionnalité de Tableau 10 présente lors de la création de tableaux de bord permet de corriger quelques problèmes quant à la consultation "multi-devices" d'un même tableau de bord. De plus, la mise en forme et la charte par défaut utilisés par Tableau 10 sont d'une efficacité redoutables par rapport aux versions antérieures. Il est désormais moins consommateur de faire une mise en forme épurée. Enfin, au niveau des performances globales, Tableau 10 est à mon sens plus rapide et performant que les version antérieures. La différence était nettement moins marquée entre les version 8 et 9. Bien entendu, il existe nombre d'autres nouvelles fonctionnalités à tester !<br />
</div>
<i>N'hésitez pas à laisser un message !</i><br />
<script src="https://public.tableau.com/javascripts/api/viz_v1.js" type="text/javascript"></script><br />
<div class='tableauPlaceholder' id='viz1472568951682' style='position: relative'><noscript><a href='#'><img alt='Vins AOC AOP ' src='https://public.tableau.com/static/images/AO/AOCAOP_v10/VinsAOCAOP/1_rss.png' style='border: none' /></a></noscript><object class='tableauViz' style='display:none;'><param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' /> <param name='site_root' value='' /><param name='name' value='AOCAOP_v10/VinsAOCAOP' /><param name='tabs' value='no' /><param name='toolbar' value='yes' /><param name='static_image' value='https://public.tableau.com/static/images/AO/AOCAOP_v10/VinsAOCAOP/1.png' /> <param name='animate_transition' value='yes' /><param name='display_static_image' value='yes' /><param name='display_spinner' value='yes' /><param name='display_overlay' value='yes' /><param name='display_count' value='yes' /></object></div> <script type='text/javascript'> var divElement = document.getElementById('viz1472568951682'); var vizElement = divElement.getElementsByTagName('object')[0]; if ( divElement.offsetWidth > 800 ) { vizElement.style.width='904px';vizElement.style.height='2169px';} else if ( divElement.offsetWidth > 500 ) { vizElement.style.width='904px';vizElement.style.height='2169px';} else { vizElement.style.width='100%';vizElement.style.height='2069px';} var scriptElement = document.createElement('script'); scriptElement.src = 'https://public.tableau.com/javascripts/api/viz_v1.js'; vizElement.parentNode.insertBefore(scriptElement, vizElement); </script>
<div style="text-align: center;">
<br />
Merci ! :-)</div>
Anonymoushttp://www.blogger.com/profile/04345009273762315545noreply@blogger.com0tag:blogger.com,1999:blog-278583945868866001.post-84635355621480134062016-04-20T18:49:00.001+02:002016-04-21T10:31:48.373+02:00Pourquoi Tableau 10 sera une version vraiment majeure! Acte I<div class="separator" style="clear: both; text-align: start;">
Tableau 9.3 est à peine arrivé que la version 10 est déjà en beta test... La beta 1 est en effet sorti il y a à peine une semaine. Cette nouvelle mouture de Tableau a vraiment des atouts intéressants. Pour le moment seules quelques évolutions sont disponibles, en attendant les prochaines itérations de la beta, mais ce que nous avons pu tester nous a vraiment séduit.</div>
<div class="separator" style="clear: both; text-align: start;">
<br /></div>
<div style="text-align: center;">
<iframe allowfullscreen="" class="giphy-embed" frameborder="0" height="257" src="//giphy.com/embed/8MPtQ1ranGmze?html5=true&hideSocial=true" width="480"></iframe>
</div>
<a name='more'></a><br />
<h2 style="clear: both;">
1. Connexion multi-sources de données</h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3gSEi4OGi0Omi39cnUyl7ExRnF6Vjey-blf9Ztiyirndi-BczIiqJSpIC7pz7XmMv_GFVYWkn1Sm8Zl_UhzRauW4_jh0qFWk3s2sLqywNka8To5NVE7ZPEkw0lOD0erzl5hicT7zERDo/s1600/image1.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="297" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3gSEi4OGi0Omi39cnUyl7ExRnF6Vjey-blf9Ztiyirndi-BczIiqJSpIC7pz7XmMv_GFVYWkn1Sm8Zl_UhzRauW4_jh0qFWk3s2sLqywNka8To5NVE7ZPEkw0lOD0erzl5hicT7zERDo/s400/image1.gif" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: start;">
<br /></div>
<div class="separator" style="clear: both; text-align: start;">
Cette nouvelle fonctionnalités risque de conquérir plus d'un utilisateur! Le principe est simple : les sources de données utilisables dans Tableau pourront être basées sur des données provenant de plusieurs systèmes différents. Prenons quelques exemples concrets : il sera désormais possible de croiser des tables provenant de 2 base de données MySQL différentes (MySQL ne permettant pas de croiser les schémas) ; un utilisateur pourra croiser des données provenant d'une requête SQL exécutée sur un PostgreSQL et d'un fichier CSV. Cela va ouvrir encore plus la capacité à restituer des analyses de données précises et efficaces. En revanche, cela ne supprimera pas les étapes d'intégration de données dans certains cas. En effet, il peut être préférale de traiter au préalable les données via un ETL ou autre afin de structurer le tout dans un système homogène. Cela dépendra bien évidemment des besoins.</div>
<h2 style="clear: both;">
2. Filtre "cross datasources"</h2>
<div class="separator" style="clear: both; text-align: start;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizzPEv43i5nnN3qElPgBHFlxkBCihFO1SjAlkaVGg1BCGNuxjfSK6-FA56LijKKlMURY6eDX7b6OLpO65GaVIpn5E3LzCMTeFO5hJJJwUr8WSnd3lhDNJ3qWwd0y0kTLK508jjx0rWzbw/s1600/image2.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="296" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizzPEv43i5nnN3qElPgBHFlxkBCihFO1SjAlkaVGg1BCGNuxjfSK6-FA56LijKKlMURY6eDX7b6OLpO65GaVIpn5E3LzCMTeFO5hJJJwUr8WSnd3lhDNJ3qWwd0y0kTLK508jjx0rWzbw/s400/image2.gif" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: start;">
<br /></div>
<div class="separator" style="clear: both; text-align: start;">
Comme pour les sources de données, il sera possible dans Tableau 10 de créer des filtres ayant une action sur des sources de données différentes. Cette fonctionnalité va considérablement changer les développements effectués avec Tableau. En effet, là où il était nécessaire et indispensable de créer des paramètres et d'intéragir avec, un simple filtre permettra de réaliser les mêmes actions.</div>
<h2 style="clear: both;">
3. Zone géographique personnalisée</h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM63TB4-jwAP8H6IpG5xDbR9jsHkU2u5zEy1x_I59AcldsO91QXe1N6S5ACTXS06pvVreC6uqP0AUhmCiLG8wJElklJykNHlYrOdxvkAMaexgXxKc8MduGeAnTpwxes1HBjmERQkaVn8o/s1600/image3.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM63TB4-jwAP8H6IpG5xDbR9jsHkU2u5zEy1x_I59AcldsO91QXe1N6S5ACTXS06pvVreC6uqP0AUhmCiLG8wJElklJykNHlYrOdxvkAMaexgXxKc8MduGeAnTpwxes1HBjmERQkaVn8o/s400/image3.gif" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: start;">
<br /></div>
<div class="separator" style="clear: both; text-align: start;">
Une autre évolution importante concerne les représentations géographiques dans Tableau. En effet, il sera désormais envisageable de créer, à la volée, des zones géographiques personnalisées. Cette fonctionnalité va en réalité fusionner des polygones à la volée afin de créer une zone correspondant à la sélection des éléments faite par l'utilisateur. Ceci passe par la création d'un groupe. Là où avant Tableau ne faisait que "grouper" les différents membres sélectionnés, dorénavant il fusionnera les zones pour en créer des nouvelles. Les indicateurs pourront donc être agrégés en fonction de ces nouvelles zones.</div>
<div class="separator" style="clear: both; text-align: start;">
<br /></div>
<div class="separator" style="clear: both; text-align: start;">
<i><b>La suite à la prochaine itération de la beta!</b></i></div>
<div class="separator" style="clear: both; text-align: center;">
</div>Anonymoushttp://www.blogger.com/profile/04345009273762315545noreply@blogger.com0tag:blogger.com,1999:blog-278583945868866001.post-20016581969601462042016-04-20T15:25:00.000+02:002016-04-21T19:38:32.936+02:00#FoodTipsMonth<h1>
Enjoy your meal!</h1>
<div style="text-align: justify;">
April is the #FoodTipsMonth and time for the first IronViz (about food of course).for <a alt="IronVizApril" href="http://public.tableau.com/s/blog/2016/04/food-fight-announcing-our-first-iron-viz-feeder-contest" target="_blank">IronViz</a> on Tableau Public. So I decided to do a small vizualisation about food. Moreover, one of the datasources for IronViz contest is <a alt="OpenFoodFacts" href="http://fr.openfoodfacts.org/" target="_blank">Open Food Facts</a>.<br />
<div style="text-align: center;">
<iframe allowfullscreen="" class="giphy-embed" frameborder="0" height="269" src="//giphy.com/embed/if6gABfFedYuQ" width="480"></iframe></div>
<a href="http://giphy.com/gifs/batman-day-hot-dog-if6gABfFedYuQ">via GIPHY</a><br />
<a name='more'></a><br />
<h2>
Data</h2>
Open Food Facts is a french project so I told me "Yeah! Let's use this datasource!". Moreover, I met Stéphane Gigandet, the creator, once in 2012. At this moment, he was just presenting his project. And now, WAOUH, almost 50,000 products around the world and almost 40,000 for France! So we (my colleagues and me) chose to download the database and see what is in the file. My colleague (and padawan! :) ) <a alt="GiselleMarin" href="https://public.tableau.com/profile/giselle8443#!/" target="_blank">Giselle Marin</a> used <a alt="Trifacta" href="https://www.trifacta.com/" target="_blank">Trifacta</a> to do some data-preparation quickly. She gave me a CSV file that I used to create my vizualisation.<br />
<h2>
First version</h2>
When I opened the file with Tableau, I had no particular idea of what I want to show... I discovered the file quickly through Tableau. Some drag & drop, some charts and I was more sure about what to do. My first idea was to show products in function of nutriments. But I was not really satisfied with that... The second and final idea came when I was on the Internet looking for informations about nutriments. I thought "What if I use RDA (Recommended Dietary Allowances)? What can I do with that?". And that is why I try to create a vizualisation combining food and nutriments.<br />
When I had this idea, I started to looking for informations about RDA. I hesitated between the creation of a second data-source or just hard-cording the different RDA for each nutriment. I chose to hard-code RDA (because, yes, I can't use Tableau 10 to do the vizualisation on Tableau Public... and can't use cross database features... I was so sad...). That was how I created the first version of my vizualisation: a tool which gives you informations about what you're eating.
<br />
<h2>
Second version</h2>
The second version was more complex and more complete. Indeed, I was not really satisfied with the first version. I was thinking that it is too simple and not enough interesting. Lucky me, I had an entire week-end to think about it. And the next monday, I came to my office with a complete new idea. Why not add Body Mass Index (BMI) and personal energy needs? And why not add sports which allow you to eliminate energy? That is why I created a second version. I looked for informations about BMI on the Internet. I found what I want on <a alt="CDC" href="http://www.cdc.gov/healthyweight/assessing/bmi/" target="_blank">CDC website</a> and, of course, <a alt="WikipediaBMI" href="https://fr.wikipedia.org/wiki/Indice_de_masse_corporelle" target="_blank">Wikipedia</a> (in french!). These informations allow me to use equations to calculate BMI in function of parameters.<br />
I also looked for informations about energy needs. I found a website which is describing all equation to calculate energy needs in function of the age, the gender, the weight, the height. This is a canadian website named <a alt="SanteCanada" href="http://www.hc-sc.gc.ca/fn-an/nutrition/reference/table/index-fra.php" target="_blank">Santé Canada</a>. Almost all of the equations wrote on the website was used in my vizualisation. About sports to eliminate energy, I found informations on a website about diet! You can find informations I used on the website <a alt="RegimeMaigrir" href="http://www.regimesmaigrir.com/calories/calories-depensees-par-activite.php" target="_blank">RegimesMaigrir</a>.<br />
<h2>
Calculations</h2>
I almost created 30 calculated fields using parameters, LoD and table calculations. For example, this is the calculated field used to give the energy needs:
<br />
<pre><code class="sql">//Besoin énergétique estimé (kcal/jour)
if [Sexe]=1
then
if [Age]>=19
then 354 - (6.91*[Age]) + [CA]*((9.36*[Weight]) + (726*[Height]))
elseif [Age]>=9 and [Age]<19 -="" 135.3="" 25="" eight="" elseif="" ge="" then="">=3 and [Age]<9 -="" 135.3="" 20="" eight="" elseif="" ge="" then="">1 and [Age]<3 -="" 100="" 20="" 84="" eight="" else="" end="" ge="" if="" then="">=19
then 662 - (9.53*[Age]) + [CA]*((15.91*[Weight]) + (539.6*[Height]))
elseif [Age]>=9 and [Age]<19 -="" 25="" 88.5="" eight="" elseif="" ge="" then="">=3 and [Age]<9 -="" 20="" 88.5="" eight="" elseif="" ge="" then="">1 and [Age]<3 -="" 100="" 20="" 84="" code="" eight="" else="" end="" then=""></3></9></19></3></9></19></code></pre>
This calculated field is using 4 parameters. Each parameters is filled by the user: age, weigth, height and sexe. It is also using an other calculated field named [CA] (a coefficient based on the activity of the user). The LoD calculations are used to give me the average nutriments content for a product. Indeed, in the database, each product is sliced in several code and each code has its own nutriments teneur. To make it easier, I chose to use the average of codes for each product. Moreover, my vizualisation is based on 5 parameters allowing the users to choose between 1 and 5 products, and 5 other parameters for the quantities of each product. So I had to consider each product choosen and each quantity to give the right result. Here it is an example for the sugar content:
<br />
<pre><code>if min([product_name])=[Product 1] then
sum({fixed [product_name]:avg([sugars_100g])})*[Quantity P1]/100
elseif min([product_name])=[Product 2] then
sum({fixed [product_name]:avg([sugars_100g])})*[Quantity P2]/100
elseif min([product_name])=[Product 3] then
sum({fixed [product_name]:avg([sugars_100g])})*[Quantity P3]/100
elseif min([product_name])=[Product 4] then
sum({fixed [product_name]:avg([sugars_100g])})*[Quantity P4]/100
elseif min([product_name])=[Product 5] then
sum({fixed [product_name]:avg([sugars_100g])})*[Quantity P5]/100
end
</code></pre>
After all these calculations, I used table calculations to display the percentage compared to RDA. Indeed, I had to calculate the sum of nutriments content for all 5 products (and considering quantities) and compare them to the RDA. About the energy, I had to compare to the energy needs based on the parameters age, gender, weight, height and activity.<br />
All these calculations give the result displaying on the vizualisation!
<br />
<h2>
And about sports?</h2>
Data about sports are in the same data-source. I chose to use an UNION to create the datasource. As <a alt="VizPainter" href="https://twitter.com/VizPainter" target="_blank">Joshua Milligan (aka VizPainter)</a> explains in <a alt="unionArticle" href="http://vizpainter.com/9-tips-and-tricks-for-using-unions-in-tableau-9-3/" target="_blank">his article</a> I used UNION fetaure to had data to my primary source. This is much better than data-blending. Indeed, that is allowing me to use a calculated field based on energy content of the meal chosen by the user and to return the corresponding time for each sport. Here it is the calculated field:
<br />
<pre><code>lookup([window_sum([_energy]])],first())
/
(sum(if [POIDS_KG]=50 then [CALORIES_BRULEES_KCAL] end)*[Weight]/50)
</code></pre>
The first part of the calculated field returns the value of energy content. I used a lookup() because of the UNION. Indeed, the UNION add the lines corresponding to sports data but returns NULL values for nutriments content. So in my chart, if I plot the sports in rows I have all my sports plus a row as NULL. This NULL row had the data about nutriments! That is why I used the lookup() function: to return in each row of my chart the energy content (the first() function return the first line of my chart, in my case the NULL row). After this I just have to hide the NULL row! When I hide a row it does not filter the data! ;-)
<br />
<h2>
The vizualisation</h2>
The vizualisation is really simple. I don't choose to put a lot of design because I thought it is more important to be simple and efficient. But I am still mulling it over to find an other design.</div>
<i>Feel free to leave a message or a note about this work.</i><br />
<script src="https://public.tableau.com/javascripts/api/viz_v1.js" type="text/javascript"></script><br />
<div class="tableauPlaceholder" style="height: 1669px; width: 904px;">
<noscript><a href='http://tipsandviz.blogspot.com/2016/04/foodtipsmonth.html'><img alt='Personal coach: Enjoy your meal! ' src='https://public.tableau.com/static/images/En/EnjoyYourMeal/Enjoyyourmeal/1_rss.png' style='border: none' /></a></noscript><object class="tableauViz" height="1669" style="display: none;" width="904"><param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' /> <param name='site_root' value='' /><param name='name' value='EnjoyYourMeal/Enjoyyourmeal' /><param name='tabs' value='no' /><param name='toolbar' value='yes' /><param name='static_image' value='https://public.tableau.com/static/images/En/EnjoyYourMeal/Enjoyyourmeal/1.png' /> <param name='animate_transition' value='yes' /><param name='display_static_image' value='yes' /><param name='display_spinner' value='yes' /><param name='display_overlay' value='yes' /><param name='display_count' value='yes' /><param name='showTabs' value='y' /></object></div>
<div style="text-align: center;">
<br />
Thank you!</div>
Anonymoushttp://www.blogger.com/profile/04345009273762315545noreply@blogger.com9tag:blogger.com,1999:blog-278583945868866001.post-22024532907624639972016-04-14T16:25:00.001+02:002016-04-14T16:27:49.348+02:00Network Chart<h1>
Everything is linked...</h1>
<div style="text-align: justify;">
</br>
I was working for a customer since December on a really big project. During development, they ask me to show training journey with an original chart (they had a prototype but it was not really understandable). They also saw several charts really interesting among which Network one. That is why I try to do it!<br />
<a name='more'></a><br />
<h2>First try</h2>
First I try to build a dataset in Excel based on a MySQL export. It was succesful but really annoying because I had to refresh the file each time a training is insert in the database... Moreover I added a background image to have lines. But if I ddid it like this it was because I thought the analysis was a "one shot" piece of work. I have to note that I built this first chart with a development database. Indeed, Data integration was not ended and validated by users when I started to work on this dashboard.<br />
I was really glad to succes the Network chart but I was also thinking about maintenance... and about that I was really pessimistic! Indeed, for me it could be "easy" to maintain the workbook and the dashboard but for my customer I was not sure (mainly due to a lack of time). So the evening, when I was at home, I was thinking about an other solution to do it. And the following day, I rolled up my sleeves and started to do some SQL!<br /></br>
<h2>Build a suitable dataset</h2>
I write a query which allow me to create lines. Trainings were really specific because of a hierarchy: the first package is the "father" of the two others. So I try to structure my query to have a hierarchy in the lines. To do this, I used <code>UNION</code> (not with Tableau because I worked with a version 9.0) to create links between training's packages (just like <a alt="VizPainter" href="https://twitter.com/VizPainter" target="_blank">Joshua Milligan (aka VizPainter)</a> explains in <a alt="unionArticle" href="http://vizpainter.com/9-tips-and-tricks-for-using-unions-in-tableau-9-3/" target="_blank">his article</a>). Just below, this is my query:<br />
</br>
<pre><code class="sql">select
'reseau' as `type`,
null AS `ID`,
tt.code AS `CODE_FORMATION`,
null AS `DATE_OBTENTION`,
null AS `duree_formation`,
null AS `code (network_dim)`,
tt.categorie AS `categorie`,
tt.line as `line`,
tt.orderpoint as `orderpoint`
from (
select
t.categorie,
t.code,
t.line,
t.orderpoint as orderpoint
from (
select
c1.categorie,
trim(c1.code) as code,
concat(c1.categorie,"-",c1.code) as line,
2 as orderpoint
from network_dim c1
union all
select
c2.categorie,
null as code,
concat(c2.categorie,"-",c2.code) as line,
1 as orderpoint
from network_dim c2
union all
select distinct
c4.categorie,
null as code,
if(c4.categorie='A',concat(c4.categorie,"-",c3.categorie),
if(c3.categorie=c4.categorie,concat('A',"-",c3.categorie),null)
) as line,
if(c4.categorie='A',1,2) as orderpoint
from network_dim c3
join (select cc.categorie from network_dim cc) c4
where if(c4.categorie='A',concat(c4.categorie,"-",c3.categorie),
if(c3.categorie=c4.categorie,concat('A',"-",c3.categorie),null)
) is not null
and if(c4.categorie='A',concat(c4.categorie,"-",c3.categorie),
if(c3.categorie=c4.categorie,concat('A',"-",c3.categorie),null)
)!='A-A'
) t
order by t.categorie, t.code) tt
</code></pre>
</br>
This query creates also <code>[orderpoint]</code> and <code>[line]</code> which they are essential to build the lines. Actually, I am not entirely satisfied because there still are hard-coded variables... I am still thinking about another solution more dynamic! But, with this query, I can refresh my data to have informations about employees and their training journey. Otherwise, to have informations about employees, I added a second <code>UNION</code> to my query. This <code>UNION</code> allow me to have all the informations baout employees such as their names, age, job, graduation date...
</br>
<h2>Great! Now let's do the chart!</h2>
<br />So after dataset creation, there is the most important part of the job: build the chart! To do it, I used (one more time!) trigonometry! And yes, it was painful... again... But I was really glad when my chart appears on my screen! To have it displayed correctly, I created two calculated fields in Tableau. These two fields (named <code>X</code> and <code>Y</code>) gives me coordinates for each training and category. Let's have a look to them:</br>
<pre><code>if isnull([categorie])=false and isnull([Corr])=true then
case [categorie]
when 'A1' then 2
when 'A' then 0
when 'A2' then -2
end
else
case [categorie]
when 'A' then
case [Corr]
when 'Notions de base' then cos(pi()/([nb_formation_cat]-1))
when 'Construire un graphique' then cos(2*pi()/([nb_formation_cat]-1))
when 'Tableau de bord' then cos(3*pi()/([nb_formation_cat]-1))
when 'Source de données' then cos(4*pi()/([nb_formation_cat]-1))
when 'Actions' then cos(0)
end
when 'A1' then
case [Corr]
when 'LoD Calcul' then cos(0+pi()/4)+2
when 'Trucs et astuces' then cos(2*pi()/([nb_formation_cat]-1)+pi()/4)+2
when 'Géocodage' then cos(3*pi()/([nb_formation_cat]-1)+pi()/4)+2
end
when 'A2' then
case trim([Corr])
when 'Administration' then cos(6*2*pi()/([nb_formation_cat]+1)+pi()/4)-2
when 'Web Authoring' then cos(2*pi()/([nb_formation_cat]+1)+pi()/4)-2
when 'Monitoring' then cos(2*2*pi()/([nb_formation_cat]+1)+pi()/4)-2
when 'Autorisations' then cos(3*2*pi()/([nb_formation_cat]+1)+pi()/4)-2
when 'Conffiguration' then cos(4*2*pi()/([nb_formation_cat]+1)+pi()/4)-2
when 'Installation' then cos(5*2*pi()/([nb_formation_cat]+1)+pi()/4)-2
end
end
end
</code></pre></br>
Each field calculates coordinates with trigonometry formulas. To be more clear, <code>[Corr]</code> is corresponding to "training_code" in my dataset. So the calculation (here it is <code>X</code> field) has two parts: the first one test with a <code>case</code> function the <code>[categorie]</code> and gives me the coordinates. This is the circle for each <code>[categorie]</code>. On the other hand, the second part of the calculation test each <code>[Corr]</code> for each <code>[categorie]</code> and gives me coordinates also (this part is really annoying for me because there is a lot of thing "hard-coded"...). Obviously, <code>Y</code> field has the same construction. Okay! So now, let's have some drag & drop!
</br>
<h2>The best part of the job!</h2>
So to build the chart, we have to put the <code>X</code> field in the columns shelf and the <code>Y</code> one in the rows shelf (theses fields have to be aggregated with an average). We can put <code>[line]</code> in the detail and <code>[orderpoint]</code> in the path too. After this, we put <code>[categorie]</code> as an ATTRIBUTE in the color shelf. That gives us this:<br />
</br>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXSSMGzifNesCNqE2gK9LHxROTFLkstUjlhQVX6EXQmk3aAlDybaGUu8UcfmQ-v1J7jQHrq8VO05ZdG6iEro0vIo-S10aUTF5fbr2pfDGOpkKqF8i1F4Z9L4s9i23XL_m3Ar5kl5Hu2sc/s1600/imag1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXSSMGzifNesCNqE2gK9LHxROTFLkstUjlhQVX6EXQmk3aAlDybaGUu8UcfmQ-v1J7jQHrq8VO05ZdG6iEro0vIo-S10aUTF5fbr2pfDGOpkKqF8i1F4Z9L4s9i23XL_m3Ar5kl5Hu2sc/s640/imag1.png" /></a></div>
</br>
To hide the point corresponding to the star (due to <code>ATTR([categorie])</code>), we just have to do a right click on the color legend and choose "Hide". This is the first part of the chart. To do the second part, we have to duplicate the <code>X</code> or <code>Y</code> field (in the exemple, I choose the <code>X</code>). The second field will not be a line chart but a shape (in the Mark shelf). To have the most efficient effect, we have to create some calculated field. Let's have an explanation.<br />
The first field compare a parameter <code>[ID]</code> and the field <code>[ID]</code>. This field is essential.</br>
<pre><code>Field [FILTRE_ID]
[Paramètres].[ID]=[ID]
</code></pre></br>
With this field we will create several others. The first field created tells me if a specific <code>[ID]</code>, chosen by my parameter, took the course or not. Indeed, as the formula shows below, I ask Tableau to do a distinct count of my <code>[FILTRE_ID]</code>. If the distinct count is equal to 1 I return 1, if not I return 2.</br>
<pre><code>Field [formation_shape]
if countd([Paramètres].[ID]=[ID])=1 then '1' else '2' end</code></pre></br>
The second field is essential for the graduation's date. Indeed, I use the field <code>[FILTRE_ID]</code> to display the right date for the right ID.</br>
<pre><code>Field [formation_date]
if [FILTRE_ID]=true then [DATE_OPTENTION] end</pre></code></br>
These 3 fields are the basis of the chart. After the creation of these fields, we have to put it on the Mark shelf. The field <code>[formation_shape]</code> goes in the color and <code>[formation_date]</code> in the label as an attribute.
</br>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHt-YgGXKbOnRznPqMEQvMauqKU9a_-APAdX6Es5GI1R227an9j39Uz5-WbZ23clah6WXoP81nz6JxG1CvHoTrTevwWazfBA8gyI-_WAvV6ACr3K7Q7m3KsOS44_WFQcwisic2m4yn2t0/s1600/image2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHt-YgGXKbOnRznPqMEQvMauqKU9a_-APAdX6Es5GI1R227an9j39Uz5-WbZ23clah6WXoP81nz6JxG1CvHoTrTevwWazfBA8gyI-_WAvV6ACr3K7Q7m3KsOS44_WFQcwisic2m4yn2t0/s640/image2.png" /></a></div>
</br>
To have a better design, I created 3 other fields, all 3 for formatting my chart. These fields allow me to display the right category and the right course for each circle.</br>
</br>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjelmqYaZI1juS1RnBt64KuOaXVpApAvbCUV_BAi6-OH5VR3X-OWiuAOl2iEM8HYO8jjGL7G56OKrSjwboBqBxsusu_C_Trm8HJ6ArsBEdFx62My4Y6bRL4WyIWEssX6qlppZpGvK6_yUU/s1600/image3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjelmqYaZI1juS1RnBt64KuOaXVpApAvbCUV_BAi6-OH5VR3X-OWiuAOl2iEM8HYO8jjGL7G56OKrSjwboBqBxsusu_C_Trm8HJ6ArsBEdFx62My4Y6bRL4WyIWEssX6qlppZpGvK6_yUU/s640/image3.png" /></a></div>
</br>
The last step is to have some formatting stuff such as delete lines and grid, hide axis, change font and color... and voilà!
</br>
</br>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZnvnIsHIxUFauXk0tcsTMFohkwQYMrbkrV4BBo-Al3wDDL5uWb89KmzMQHe2QZL9Ej7rav5MgUWJtZyxcGiovZI1oTOes89CPvvIzO7LSzXFGHT6cFDUmR1oQKo__LjpGFj2crVQWyvA/s1600/image4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZnvnIsHIxUFauXk0tcsTMFohkwQYMrbkrV4BBo-Al3wDDL5uWb89KmzMQHe2QZL9Ej7rav5MgUWJtZyxcGiovZI1oTOes89CPvvIzO7LSzXFGHT6cFDUmR1oQKo__LjpGFj2crVQWyvA/s640/image4.png" /></a></div>
</br>
<h2>When to use it?</h2>
</br>
As an exemple, I choose to use it to display training's monitoring. My idea here is to have a dashboard allowing people to follow each employee and its training's journey. The parameter allow to choose an employee and see data about it!
</br>
</div>
</br>
<i>Feel free to leave a message or a note about this work.</i><br />
</br>
<script type='text/javascript' src='https://public.tableau.com/javascripts/api/viz_v1.js'></script><div class='tableauPlaceholder' style='width: 804px; height: 1069px;'><noscript><a href='http://tipsandviz.blogspot.com/2016/04/network-chart.html'><img alt=' ' src='https://public.tableau.com/static/images/ne/network_graph_9_3/Suivideformation/1_rss.png' style='border: none' /></a></noscript><object class='tableauViz' width='804' height='1069' style='display:none;'><param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' /> <param name='site_root' value='' /><param name='name' value='network_graph_9_3/Suivideformation' /><param name='tabs' value='no' /><param name='toolbar' value='yes' /><param name='static_image' value='https://public.tableau.com/static/images/ne/network_graph_9_3/Suivideformation/1.png' /> <param name='animate_transition' value='yes' /><param name='display_static_image' value='yes' /><param name='display_spinner' value='yes' /><param name='display_overlay' value='yes' /><param name='display_count' value='yes' /><param name='showTabs' value='y' /></object></div>
<div style="text-align: justify;">
<br />
Thank you!</div>Anonymoushttp://www.blogger.com/profile/04345009273762315545noreply@blogger.com2tag:blogger.com,1999:blog-278583945868866001.post-73211496111751228622015-11-16T18:16:00.000+01:002015-11-18T12:34:26.889+01:00#ParisAttacks - How Twitter tells the story<h1>
#ParisAttacks - How Twitter tells the story</h1>
<div style="text-align: justify;">
</br>
This is an analysis of Twitter's hashtags after the week-end. I used a website (www.takwalker.com) to get the data. The dataset is aggregated for each hour of each days from Friday 13rd November 2015 to today. I chose to try to tell the story with Twitter's data.<br />
<a name='more'></a><br />
<h2>Why this data-visualisation?</h2>
I did this data-visualisation because I was really moved by all these attacks. Victims were in my age group… I live in Paris Xe so it was in my neighbourhood… I love going to concerts, drinking a beer with friends… being alive finally ! It was a way for me to pay tribute to victims.<br /></br>
<h2>Why these data?</h2>
I chose to use aggregated data because I did not have so much time. But I was really interested by row data with geolocations, users… I was also interested by retweets and bookmarks. In fact I would have loved to have each tweet… But as I told before, I did not have so much time.<br /></br>
<h2>Why did I choose a red color palette for all the story?</h2>
It was difficult for me to choose a design. I tried different palettes but none was good enough. When I tried the red palette, I told myself « Wow ! This is really agressive ! » and I thought about it a long time. I chose to use this even if it is agressive because, indeed, #ParisAttacks were really agressive… When my colleagues and friends looked at my visualization, they told me that there is too much red and it is agressive. I told them that it is the aim of red palette. I want readers to have the same feeling than me about #ParisAttacks. Apparently, it is working...<br /></br>
<h2>Why did I choose a story?</h2>
First I tried to do the visualisation in a one page presentation. But when I looked at the data and how hashtags move, I told myself a story could be a good solution. So I put annotations, corresponding to events Firday night, to comment hashtags’ variations.<br /></br>
</div>
</br>
<i>Feel free to leave a message or a note about this work.</i><br />
</br>
<script type='text/javascript' src='https://public.tableau.com/javascripts/api/viz_v1.js'></script><div class='tableauPlaceholder' style='width: 920px; height: 669px;'><noscript><a href='http://tipsandviz.blogspot.fr/2015/11/parisattacks-how-twitter-tells-story.html'><img alt='Titre de l'histoire ' src='https://public.tableau.com/static/images/Pa/ParisAttacks-HowTwittertellsthestory/ParisAttacks/1_rss.png' style='border: none' /></a></noscript><object class='tableauViz' width='920' height='669' style='display:none;'><param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' /> <param name='site_root' value='' /><param name='name' value='ParisAttacks-HowTwittertellsthestory/ParisAttacks' /><param name='tabs' value='no' /><param name='toolbar' value='yes' /><param name='static_image' value='https://public.tableau.com/static/images/Pa/ParisAttacks-HowTwittertellsthestory/ParisAttacks/1.png' /> <param name='animate_transition' value='yes' /><param name='display_static_image' value='yes' /><param name='display_spinner' value='yes' /><param name='display_overlay' value='yes' /><param name='display_count' value='yes' /><param name='showVizHome' value='no' /><param name='showTabs' value='y' /><param name='bootstrapWhenNotified' value='true' /></object></div>
<div style="text-align: justify;">
<br />
Thank you!</div>Anonymoushttp://www.blogger.com/profile/04345009273762315545noreply@blogger.com13tag:blogger.com,1999:blog-278583945868866001.post-12591606695765505712015-08-14T12:42:00.000+02:002015-08-14T12:42:02.325+02:00Hacker Month -- Tableau Public<h1>
French Presidential election in 2012</h1>
<div style="text-align: justify;">
</br>
This month, Tableau Public launch the <a alt="hackermonth" href="http://public.tableau.com/s/blog/2015/08/hacker-month-out-ordinary-vizzes" target="_blank">Hacker Month</a> which promote out of the ordinary vizzes. I chose to remake an old viz I have done 3 years ago about the Presidential election. This viz was created during the "inter-rounds weeks" and the aim was to simulate the final result: who will be the next president ?!<br />
<a name='more'></a><br />
The main trick is about parameters. Indeed, I used parameters to allow users to simulate final result in function of the transfer of votes between candidates. Users can type a value from 0 to 100 and give a little part to abstention. This trick is used to calculate the result for France and for each county. The parameters was inserted in calculations to provide a percentage corresponding to the candidate's result. Here is an example of the calculation:</br>
</br>
<pre><code>(([% Voix/Exp HOLLANDE]+[% Voix/Exp BAYROU]*([BAYROU pour HOLLANDE]/100)+
[% Voix/Exp LE PEN]*([LE PEN pour HOLLANDE]/100)+[% Voix/Exp ARTHAUD]+
[% Voix/Exp JOLY]+[% Voix/Exp MÉLENCHON]+[% Voix/Exp POUTOU])
/
([% Voix/Exp SARKOZY]+[% Voix/Exp BAYROU]*([BAYROU pour SARKOZY]/100)+
[% Voix/Exp LE PEN]*([LE PEN pour SARKOZY]/100)+[% Voix/Exp CHEMINADE]+
[% Voix/Exp DUPONT-AIGNAN]+[% Voix/Exp HOLLANDE]+[% Voix/Exp BAYROU]*([BAYROU pour HOLLANDE]/100)+
[% Voix/Exp LE PEN]*([LE PEN pour HOLLANDE]/100)+[% Voix/Exp ARTHAUD]+
[% Voix/Exp JOLY]+[% Voix/Exp MÉLENCHON]+[% Voix/Exp POUTOU]))*100</code></pre>
</br>
The first part of the calculation is the percentage for the left side candidate and the second part is the total. This calculation gives me a percentage used in a bar chart. The same method was used to create the map (the difference is that I chose voices quantity instead of percentage).
</br>
Moreover, I tried to create a map wich shows an overview of french counties in function of the political side. This map was different compared to the press. Indeed, this was not a map in function of political party and it tried to show a different view of french counties. For instance, it is not because a county chose UMP (right side) that the global trend is right side and vice-versa!<br />
</br>
The last trick I used was to show bar charts in tooltips. This trick is really great because it allow users to know the distibution for each county. To do this a method is existing using special characters and formulas. Here is an example of calculation:<br />
<br />
<pre><code>Left("██████████████████████████████████████████████████",ROUND([% Gauche carte 2nd tour]/2))</code></pre>
<br />
This calculation could be set in the tooltip to create a bar. In this case, the measure is relative (percentage) and divided by 2 because I used 50 special characters (and no 100 one). The result is a bar chart in the tooltip that we can customize (color, font...).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifh_rRuJMHRHpHgWRgC7ntcIGRStVnSMT61QMYuQp-yIh29gQ1iogbAjdelZ7qSFCOZBgZYRApqbtMmmIzYw4SU-Xn0j5s3iGJqSNBSFh4EET8_2l2wLqR63b-HOBLwMRSXchO3NKe6ms/s1600/presidential_election1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="388" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifh_rRuJMHRHpHgWRgC7ntcIGRStVnSMT61QMYuQp-yIh29gQ1iogbAjdelZ7qSFCOZBgZYRApqbtMmmIzYw4SU-Xn0j5s3iGJqSNBSFh4EET8_2l2wLqR63b-HOBLwMRSXchO3NKe6ms/s640/presidential_election1.png" width="640" /></a></div>
<br />
</br>
The last trick I used 3 years ago was a custom geocoding. Indeed, in 2012 counties for France was not available in Tableau Desktop. That is why I created a dataset allowing me to draw counties. If I had to remake it now, I think I will build the dataset in another way to make it easier to use.</br>
</div>
</br>
<i>Don't hesitate to leave a message or a note about this work.</i><br />
</br>
<script src="https://public.tableau.com/javascripts/api/viz_v1.js" type="text/javascript"></script>
<script type='text/javascript' src='https://public.tableau.com/javascripts/api/viz_v1.js'></script>
<div class='tableauPlaceholder' style='width: 904px; height: 869px;'>
<noscript>
<a href='#'><img alt='2012 Presidential Election simulator ' src='https://public.tableau.com/static/images/Fr/FrenchPresidentialElection2012Remake/2012PresidentialElectionsimulator/1_rss.png' style='border: none' />
</a>
</noscript>
<object class='tableauViz' width='904' height='869' style='display:none;'>
<param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' />
<param name='site_root' value='' />
<param name='name' value='FrenchPresidentialElection2012Remake/2012PresidentialElectionsimulator' />
<param name='tabs' value='no' />
<param name='toolbar' value='yes' />
<param name='static_image' value='https://public.tableau.com/static/images/Fr/FrenchPresidentialElection2012Remake/2012PresidentialElectionsimulator/1.png' />
<param name='animate_transition' value='yes' />
<param name='display_static_image' value='yes' />
<param name='display_spinner' value='yes' />
<param name='display_overlay' value='yes' />
<param name='display_count' value='yes' />
<param name='showVizHome' value='no' />
<param name='showTabs' value='y' />
<param name='bootstrapWhenNotified' value='true' />
</object>
</div>
<div style="text-align: justify;">
<i>Source:</i>
<a alt="InsideAirbnbGetData" href="http://insideairbnb.com/get-the-data.html" target="_blank">InsideAirbnb - Get the data</a>
<br />
Thank you for the reading!</div>Anonymoushttp://www.blogger.com/profile/04345009273762315545noreply@blogger.com22tag:blogger.com,1999:blog-278583945868866001.post-71065805025212318942015-07-23T15:05:00.000+02:002015-07-28T15:19:45.212+02:00How to create a radar chart in Tableau<h1>
Radar chart: I can see you...</h1>
<div style="text-align: justify;">
After my last blog post about <a href="http://tipsandviz.blogspot.fr/2015/07/which-shape-are-you.html" target="_blank">The Social Progress Index</a>, I had a question about the creation of a radar chart. I will try to answer the question clearly during this blog post. On my own, I think radar chart is intersting if you want to compare members of a dimension in function of several metrics (you can also use Parallels coordinates). For example, when you want to buy a smartphone you can compare several devices with a radar chart (metrics: battery, camera, memory...). Let's try to explain how to create this in Tableau.<br />
<br />
<h3>
Trigonometry, my best friend ever!</h3>
<div>
<br /></div>
To create a radar chart, I have to use trigonometry formulas... You remember the circle with Pi and number and stuff like that... ?
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://commons.wikimedia.org/wiki/File:Unit_circle_angles_color.svg#/media/File:Unit_circle_angles_color.svg"><img alt="Unit circle angles color.svg" height="400" src="https://upload.wikimedia.org/wikipedia/commons/4/4c/Unit_circle_angles_color.svg" width="400" /></a></div>
"<a href="https://commons.wikimedia.org/wiki/File:Unit_circle_angles_color.svg#/media/File:Unit_circle_angles_color.svg">Unit circle angles color</a>" by <a class="new" href="https://commons.wikimedia.org/w/index.php?title=User:Jim.belk&action=edit&redlink=1" title="User:Jim.belk (page does not exist)">Jim.belk</a> - <span class="int-own-work" lang="en">Own work</span>. Licensed under <a href="http://creativecommons.org/licenses/by-sa/3.0" title="Creative Commons Attribution-Share Alike 3.0">CC BY-SA 3.0</a> via <a href="https://commons.wikimedia.org/wiki/">Wikimedia Commons</a>.<br />
<br />
Well... It is important to use it to create axis and it depends on number of metrics you want to display. Indeed, if you want to display 5 axis (= 5 metrics) you have to use differents formulas than 6 axis chart. In my case I used a 12 axis chart so I had to use several formulas (as on the image above).<br />
Thanks to Internet I was able to find the different formulas and create a calculation in Tableau for X axis and Y axis.<br />
<br />
Calculation for <code>[Xaxis]</code>
<br />
<pre><code>case [Dimension]
when "Member 1" then 0
when "Member 2" then [Value] *(1/2)
when "Member 3" then [Value] *(sqrt(3)/2)
when "Member 4" then [Value]
when "Member 4" then [Value] *(sqrt(3)/2)
when "Member 5" then [Value] *(1/2)
when "Member 6" then 0
when "Member 7" then [Value] *(-1/2)
when "Member 8" then [Value] *(-sqrt(3)/2)
when "Member 9" then [Value] *(-1)
when "Member 10" then [Value] *(-sqrt(3)/2)
when "Member 11" then [Value] *(-1/2)
end</code></pre>
<br />
Calculation for <code>[Yaxis]</code><br />
<pre><code>case [Dimension]
when "Member 1" then [Value]
when "Member 2" then [Value]*(sqrt(3)/2)
when "Member 3" then [Value]*(1/2)
when "Member 4" then 0
when "Member 5" then ([Value])*(-1/2)
when "Member 6" then [Value]*(-sqrt(3)/2)
when "Member 7" then [Value]*(-1)
when "Member 8" then [Value]*(-sqrt(3)/2)
when "Member 9" then [Value]*(-1/2)
when "Member 10" then 0
when "Member 11" then [Value]*(1/2)
when "Member 12" then [Value]*(sqrt(3)/2)
end</code></pre>
<br />
It is very important to have the same <code>[Value]</code> scale for each <code>[Dimension]</code> members! Indeed, the 12 axis have to be the same. In my case the scale was from 0 to 100.<br />
<br />
<h3>
Build the radar to detect everything</h3>
<div>
<br /></div>
After the creation of calculations, I had to build the chart. To do this, I just have to drag and drop the <code>[Yaxis]</code> on the lines shelf and the <code>[Xaxis]</code> on the columns shelf.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjStWG8TmrHcBB7KX1__JdiScQC31FJJLhdOSfOtMjCuo8oI4BjRccJ6ZfxRRJ2vp2d-jsjRHoTYnJa7tD7ywEgrNzVeeMSbBzKA1v-pgu1aHqoaBOK3rCs4TQNp2WzO0wuR9VOVibdxFw/s1600/Step1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjStWG8TmrHcBB7KX1__JdiScQC31FJJLhdOSfOtMjCuo8oI4BjRccJ6ZfxRRJ2vp2d-jsjRHoTYnJa7tD7ywEgrNzVeeMSbBzKA1v-pgu1aHqoaBOK3rCs4TQNp2WzO0wuR9VOVibdxFw/s640/Step1.png" width="640" /></a></div>
<br />
You can note that I use the aggregation Average (because Sum will returns a wrong result). Here I have only 1 point. To create the radar I have to use several dimensions (in my case, <code>[Country]</code> and <code>[IndexType]</code>). The <code>[IndexType]</code> allows me to draw 12 axis because this is a dimension with 12 members; <code>[Country]</code> allows me to draw 1 radar by country. If I want to draw the average radar chart, I can remove the <code>[Country]</code> field. To have several points I add <span style="font-family: monospace;">[IndexType]</span> on the Mark shelf as a Level of Detail.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQKabIsf5sRIl67ezGOKLO6Q5lLORt29sY_jxTv7xd41hkG8vJxEz31d04vHKqZh8-g7Mq7Tmsbz_4xXCkuF4ttaVunVO8dNJeKl2a1IS_H5Xq5Hq57jdUm16ViVOkfNdjIyhSC7EPuY4/s1600/Step2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="484" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQKabIsf5sRIl67ezGOKLO6Q5lLORt29sY_jxTv7xd41hkG8vJxEz31d04vHKqZh8-g7Mq7Tmsbz_4xXCkuF4ttaVunVO8dNJeKl2a1IS_H5Xq5Hq57jdUm16ViVOkfNdjIyhSC7EPuY4/s640/Step2.png" width="640" /></a></div>
<br />
After I can change the Mark to draw a polygon and add <span style="font-family: monospace;">[Country]</span> as a quick filter.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeadMsBQs_NlmGPQb2b8pc6npsedgDn8sd5pFZWoaX5aJVBl22ZdKfwBX619cAwZtOz6ieYbYJqXsNi0hctGEbI-ECNX7Wih8ueMG1KllsQmYQWU5Petce5LHMhYiW-rzRGuBWwJWET3Y/s1600/Step3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="484" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeadMsBQs_NlmGPQb2b8pc6npsedgDn8sd5pFZWoaX5aJVBl22ZdKfwBX619cAwZtOz6ieYbYJqXsNi0hctGEbI-ECNX7Wih8ueMG1KllsQmYQWU5Petce5LHMhYiW-rzRGuBWwJWET3Y/s640/Step3.png" width="640" /></a></div>
<br />
To have a beautiful radar, the last things to do are put <span style="font-family: monospace;">[IndexType]</span> as a Path to follow and Fix axis between -110 and 110 (or whatever you want to have enough space between borders and chart).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-L_8msR7uYVHW3lOk9mZG8Lt4c8Oa0hU2UYRJgzlQlmt8aAfHzHqfgRIVk06QIe_Hs-SkyrYt5Qe0HbwTvlhXx1cei9ulljQbhgZYdc9VRi4FL6ka8T6_5SSSoQQw7h0VZ1CyddqM_fE/s1600/Step4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="482" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-L_8msR7uYVHW3lOk9mZG8Lt4c8Oa0hU2UYRJgzlQlmt8aAfHzHqfgRIVk06QIe_Hs-SkyrYt5Qe0HbwTvlhXx1cei9ulljQbhgZYdc9VRi4FL6ka8T6_5SSSoQQw7h0VZ1CyddqM_fE/s640/Step4.png" width="640" /></a></div>
<br />
<h3>
Some Formatting and "Voilà"!</h3>
<div>
<br /></div>
To give some design to my chart, I chose to remove grid lines, Zero lines and borders, and to hide headers. Moreover, I chose to give some trnasparency and a border to my polygon in order to have a more beautiful chart.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglaWjBH0grhSe39G1y7Mj22hgaaizIA0wYC7QTI_q4BYUmH98Wufkeu02sa9-Fv-uTU2opBRuBTge3aoGh6Z83I72JOedzxhWBgHR35VwTns1xc1u9XXK4fHZCupLGhSfyU_iv4Jx1nro/s1600/Step5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="484" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglaWjBH0grhSe39G1y7Mj22hgaaizIA0wYC7QTI_q4BYUmH98Wufkeu02sa9-Fv-uTU2opBRuBTge3aoGh6Z83I72JOedzxhWBgHR35VwTns1xc1u9XXK4fHZCupLGhSfyU_iv4Jx1nro/s640/Step5.png" width="640" /></a></div>
<br />
Finally, I drew a background image to have reference axis in order to give some visual impact. Indeed, I think it is better if you know where the maximum is.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV98OUoWEqh9L0HXHWMvDgORxNPp461YsKwn6TQVFAVjAhIq-KFDdVt_-nAHdyK7StfvLONLSbmbPeqJP0rhz6HR7RMov4i-cGmCp4Od63gv1M0SLB3Jf6U2zob12nEF9xJWcl_eFJNdY/s1600/Step6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV98OUoWEqh9L0HXHWMvDgORxNPp461YsKwn6TQVFAVjAhIq-KFDdVt_-nAHdyK7StfvLONLSbmbPeqJP0rhz6HR7RMov4i-cGmCp4Od63gv1M0SLB3Jf6U2zob12nEF9xJWcl_eFJNdY/s320/Step6.png" width="320" /></a></div>
<br />
To add beautiful tooltips, it is important to put <span style="font-family: monospace;">AVG([Value])</span> on the Mark shelf and to configure the tooltip like this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEIGLjZs8GG6p80sE2BRWDp-5eMDtWCJkOqmboW61QFi4nvH0NRgXzhglrthPK1HUxlEmtFem27k8bXDfatGB_ocPH7vNNYKMuxq_gmnt26umGUZ1M3NFuUUcpXDonKZiYdAdPTJoY0Q8/s1600/Tooltip.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="500" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEIGLjZs8GG6p80sE2BRWDp-5eMDtWCJkOqmboW61QFi4nvH0NRgXzhglrthPK1HUxlEmtFem27k8bXDfatGB_ocPH7vNNYKMuxq_gmnt26umGUZ1M3NFuUUcpXDonKZiYdAdPTJoY0Q8/s640/Tooltip.png" width="640" /></a></div>
<br />
And "Voilà"! The radar chart is done!<br />
<br /></div>
<script type='text/javascript' src='http://public.tableau.com/javascripts/api/viz_v1.js'></script>
<div class='tableauPlaceholder' style='width: 820px; height: 979px; text-align: center;'>
<noscript><a href='http://tipsandviz.blogspot.com/2015/07/how-to-create-radar-chart-in-tableau.html'><img alt=' ' src='http://public.tableau.com/static/images/Ra/RadarChart_0/HowtocreateaRadarChart/1_rss.png' style='border: none' /></a></noscript>
<object class='tableauViz' width='820' height='979' style='display:none;'><param name='host_url' value='http%3A%2F%2Fpublic.tableau.com%2F' />
<param name='site_root' value='' />
<param name='name' value='RadarChart_0/HowtocreateaRadarChart' />
<param name='tabs' value='no' />
<param name='toolbar' value='yes' />
<param name='static_image' value='http://public.tableau.com/static/images/Ra/RadarChart_0/HowtocreateaRadarChart/1.png' />
<param name='animate_transition' value='yes' />
<param name='display_static_image' value='yes' />
<param name='display_spinner' value='yes' />
<param name='display_overlay' value='yes' />
<param name='display_count' value='yes' />
<param name='showVizHome' value='no' />
<param name='showTabs' value='y' />
<param name='bootstrapWhenNotified' value='true' />
</object></div>
<br />
Thank you for the reading!Anonymoushttp://www.blogger.com/profile/04345009273762315545noreply@blogger.com64tag:blogger.com,1999:blog-278583945868866001.post-81341874274554088742015-07-17T17:38:00.003+02:002015-07-17T17:38:38.215+02:00Which shape are you?<h1>The Social Progress Index</h1>
</br>
<div style="text-align: justify;">
<p>Two weeks ago, I was browsing the <a alt="TableauForum" href="http://community.tableau.com/welcome" target="_blank">Tableau community forum</a> and I found an interesting question about reference line. The question was about to create a band reference line but just for few members in a dimension (<a alt="QuestionForum" href="http://community.tableau.com/message/388191?et=watches.email.thread#388191" target="_blank">Here is the question</a>). This question drove me to an other question: Is it possible to create a "dynamic" reference line?</p>
<p>To answer it, I chose a dataset about Social metrics in the world: <a alt="SPI" href="http://www.socialprogressimperative.org/data/spi" target="_blank">The Social Progress Index</a>. With this dataset I tried to create a "dynamic" reference line.</p>
<p>As you can see in the visualisation below, when you click on a country on the map the reference line in the distribution graphic shows the average gap. The average gap is represented by a grey band calculated when the user click on a country. My idea was to show the gap when a country is highlighted and the average line in the other hand. To do this I used th LoD. It was just my second time with LoD... and it was very interesting!</p>
<p>The formula used in the LoD calculation allows me to calculate the general average: <code>{ EXCLUDE [Country]: avg([Value]) }</code>. To build the reference band, I chose the average for each country as the end and my LoD calculation as the begin. The 9.0 version of Tableau allows me to show re-calculated reference lines when a mark is selected so I used it to redraw the reference band! Because in fact, the band is equal to 0 when no selection is provided. After this I chose to add some other graphics such as the radar graph to show the shape of each country and a map to allow the selection.</p></div>
<p><i>Feel free to leave a message or a note about this work!</i></p></br>
</br>
<script type='text/javascript' src='https://public.tableau.com/javascripts/api/viz_v1.js'></script>
<div class='tableauPlaceholder' style='width: 904px; height: 1469px;'>
<noscript>
<a href='#'>
<img alt=' ' src='https://public.tableau.com/static/images/So/SocialProgressIndex/TheSocialProgressIndex/1_rss.png' style='border: none' />
</a>
</noscript>
<object class='tableauViz' width='904' height='1469' style='display:none;'>
<param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' />
<param name='site_root' value='' />
<param name='name' value='SocialProgressIndex/TheSocialProgressIndex' />
<param name='tabs' value='no' />
<param name='toolbar' value='yes' />
<param name='static_image' value='https://public.tableau.com/static/images/So/SocialProgressIndex/TheSocialProgressIndex/1.png' />
<param name='animate_transition' value='yes' />
<param name='display_static_image' value='yes' />
<param name='display_spinner' value='yes' />
<param name='display_overlay' value='yes' />
<param name='display_count' value='yes' />
<param name='showVizHome' value='no' />
<param name='showTabs' value='y' />
<param name='bootstrapWhenNotified' value='true' />
</object>
</div>
</br>
<div style="text-align: justify;">
<p><i>Source:</i></br>
<a alt="SPI" href="http://www.socialprogressimperative.org/data/spi" target="_blank">The Social Progress Index - Data</a></br>
</p>
<p>Thank you for the reading!</p></div>Anonymoushttp://www.blogger.com/profile/04345009273762315545noreply@blogger.com6tag:blogger.com,1999:blog-278583945868866001.post-12031090679011444742015-06-29T18:20:00.002+02:002015-07-22T16:55:03.133+02:00Inside Airbnb dataset<h1>Analysis of Airbnb data</h1>
</br>
<div style="text-align: justify;">
<p>Thanks to <a alt="jewelloree" href="http://www.jewelloree.com/2015/06/02/data-feed-inside-airbnb/" target="_blank">Jewel Loree</a> from Tableau Public, I found a dataset about Airbnb. The timing was excellent because I had to choose an Airbnb accomodation for a training in Luxembourg a few weeks ago. When I discovered the website <a alt="insideairebnb" href="http://insideairbnb.com/" target="_blank">Inside Airbnb</a>, I was suprised to find a lot of CSV files concerning several cities around the world. As a French, I chose to start my analysis with Paris but actually, I downloaded all the files to build the visualisation below.</p>
<a name='more'></a><br />
<p>The visualisation is built in 2 parts. The first part called "Global view" try to present the data from 10 cities with a map and a radar graph. The map is available in two types: by neighbourhood and by hexbin. To draw hexbin, I used the method describe by <a alt="databender" href="http://blog.databender.net/2015/03/06/im-too-hexy-for-this-viz/" target="_blank">The Last Data Bender</a> wich allow to use polygon and no shape (I think it is more flexible and beautiful). The second part is about hosts. I chose to show how the accomodations are distributed by hosts and by city. In this part, each accomodation is located on a map and the Airbnb URL is available.</p></div>
<p><i>Don't hesitate to leave a message or a note about this work.</i></p></br>
</br>
<script type='text/javascript' src='https://public.tableau.com/javascripts/api/viz_v1.js'></script>
<div class='tableauPlaceholder' style='width: 904px; height: 933px;'>
<noscript>
<a href='http://tipsandviz.blogspot.fr/2015/06/inside-airbnb-dataset.html'>
<img alt=' ' src='https://public.tableau.com/static/images/In/InsideAirbnb/InsideAirbnb/1_rss.png' style='border: none' />
</a>
</noscript>
<object class='tableauViz' width='904' height='933' style='display:none;'>
<param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' />
<param name='site_root' value='' />
<param name='name' value='InsideAirbnb/InsideAirbnb' />
<param name='tabs' value='no' />
<param name='toolbar' value='yes' />
<param name='static_image' value='https://public.tableau.com/static/images/In/InsideAirbnb/InsideAirbnb/1.png' />
<param name='animate_transition' value='yes' />
<param name='display_static_image' value='yes' />
<param name='display_spinner' value='yes' />
<param name='display_overlay' value='yes' />
<param name='display_count' value='yes' />
<param name='showVizHome' value='no' />
<param name='showTabs' value='y' />
<param name='bootstrapWhenNotified' value='true' />
</object>
</div>
</br>
<div style="text-align: justify;">
<p><i>Source:</i></br>
<a alt="InsideAirbnbGetData" href="http://insideairbnb.com/get-the-data.html" target="_blank">InsideAirbnb - Get the data</a></br>
</p>
<p>Thank you for the reading!</p></div>Anonymoushttp://www.blogger.com/profile/04345009273762315545noreply@blogger.com3tag:blogger.com,1999:blog-278583945868866001.post-61573280688862422562015-03-18T00:04:00.002+01:002015-03-18T14:29:41.598+01:00IronViz Wiki Contest entry - The Eiffel Tower<h1>History of the Eiffel Tower</h1>
</br>
<div style="text-align: justify;">
<p>IronViz time is here! This post is about my entry for the <a alt="WikiDataContestPage" href="https://public.tableau.com/s/wiki-data-viz-contest" target="_blank">Wiki Contest</a>. I have to admit that it was difficult to find a topic. First, I told me that it was too difficult to find a good and interesting topic with enough data and enough time to prepare these data... but in fact I found a topic yesterday evening during the Tableau User Group in Paris. During a conversation with co-leaders, they told me that we have to tell everybody : "French people do Tableau too !" That is why I choose to do a viz about <a alt="vizLink" href="https://public.tableau.com/views/IronVizWikiContest-TheEiffelTower/HistoryofEiffelTower?:embed=y&:showTabs=y&:display_count=yes" target="_blank">The Eiffel Tower</a>. I think it is a great construction and a great symbol for France!</p>
<p>You can find the viz just below. I tried to tell a story with the data of Wikipedia. I tried to present information about visitors, about the construction and the replicas. I put the sources just after the viz.</p></div>
<p><i>This post will be updated soon with more information about the method and the data.</i></p></br>
</br>
<script type='text/javascript' src='https://public.tableau.com/javascripts/api/viz_v1.js'></script>
<div class='tableauPlaceholder' style='width: 1004px; height: 934px;'>
<noscript>
<a href='http://tipsandviz.blogspot.fr/2015/03/ironviz-wiki-contest-entry-eiffel-tower.html'>
<img alt=' ' src='https://public.tableau.com/static/images/Ir/IronVizWikiContest-TheEiffelTower/Welcome/1_rss.png' style='border: none' />
</a>
</noscript><object class='tableauViz' width='1004' height='934' style='display:none;'>
<param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' />
<param name='site_root' value='' />
<param name='name' value='IronVizWikiContest-TheEiffelTower/Welcome' />
<param name='tabs' value='yes' />
<param name='toolbar' value='yes' />
<param name='static_image' value='https://public.tableau.com/static/images/Ir/IronVizWikiContest-TheEiffelTower/Welcome/1.png' />
<param name='animate_transition' value='yes' />
<param name='display_static_image' value='yes' />
<param name='display_spinner' value='yes' />
<param name='display_overlay' value='yes' />
<param name='display_count' value='yes' />
<param name='showVizHome' value='no' />
<param name='showTabs' value='y' />
</object>
</div>
</br>
<div style="text-align: justify;">
<p><i>Sources :</i></br>
<a alt="Source1a" href="http://fr.wikipedia.org/wiki/Histoire_de_la_tour_Eiffel" target="_blank">History of the Eiffel Tower</a></br>
<a alt="Source1b" href="http://fr.wikipedia.org/wiki/Donn%C3%A9es_techniques_de_la_tour_Eiffel" target="_blank">Technical details of the Eiffel Tower</a></br>
<a alt="Source2" href="http://fr.wikipedia.org/wiki/Fr%C3%A9quentation_de_la_tour_Eiffel" target="_blank">Frequentation of the Eiffel Tower</a></br>
<a alt="Source3" href="http://fr.wikipedia.org/wiki/R%C3%A9pliques_et_imitations_de_la_tour_Eiffel" target="_blank">Replicas of the Eiffel Tower</a></br>
<a alt="Image" href="http://commons.wikimedia.org/wiki/File:Tour_eiffel_de_nuit.jpg#/media/File:Tour_eiffel_de_nuit.jpg" target="_blank">Welcome image</a></br>
</p>
<p>Thank you for the reading! And please vote for me!</p></div>Anonymoushttp://www.blogger.com/profile/04345009273762315545noreply@blogger.com0tag:blogger.com,1999:blog-278583945868866001.post-21146454279731842352014-10-09T11:44:00.001+02:002015-07-22T16:54:38.052+02:00This is America !!<h1>IronViz - Part 2: Contest and Viz</h1>
</br>
<div style="text-align: justify;">
<p>This second post is here to relate you my IronViz in Seattle. Already one month and I can tell this was a dream !! Indeed, 3 weeks before the #DATA14, I would not able to predict this journey. That was an unbelievable adventure. For me and my wife (she accepts to be with me in a conference linked to my job !) it was my first time to the United States of America !! And it was amazing ! Each person I met in Seattle was gentle and lovely. I can espacially thank <a alt="TaraWalkerTabPubProfile" href="http://public.tableausoftware.com/profile/tlwalker#!/" target="_blank">Tara Walker</a>, <a alt="JewelLoreeTabPubProfile" href="http://public.tableausoftware.com/profile/jewel.loree#!/" target="_blank">Jewel Loree</a> and <a alt="RossPerezTabPubProfile" href="http://public.tableausoftware.com/profile/rosstest#!/" target="_blank">Ross Perez</a> from Tableau Software, and <a alt="JeffreyTabPubProfil" href="http://public.tableausoftware.com/profile/jeffs8297#!/" target="_blank">Jeffrey Shaffer</a> and <a alt="JohnMathisTabPubProfile" href="http://public.tableausoftware.com/profile/john.m5592#!/" target="_blank">John Mathis</a> my contestants for their welcome. They were very gentle with me in spite of the language !</p>
<a name='more'></a><br />
<p>But let me go through my topic: how I lived the IronViz contest ! First, it was very impressive to be a part of a huge conference like #DATA14. It was funny to see my biopic in the section "speakers" on the TC14 website... Around 6,000 people included Tableau Zen Masters and other VIP. It was the first time for me to be in a Conference like that. I was present in TCEU 2012 (Barcelona) and 2013 (London) but in Seattle.... Waooh !! Many and many sessions, speakers, sponsors, Tableau-junky... With so many people I just was able to attend keynotes. On the other hand, I have to admit that the IronViz contest was in my mind during all the conference... The contest, that was the biggest thing in my mind during this week. The rules were clear: 20 minutes, 1 dataset, 3 contestants and 1 winner! I was very nervous...</p></div>
<p><i>The viz is at the end of the post.</i></p></br>
<h3>1. The dataset & the idea</h3>
</br>
<div style="text-align: justify;">
<p>The dataset was about Yelp, a search engine specialized in restaurants, casinos, hotels... The data included Las Vegas and Phoenix (in fact they included more data because of some mess in the file...). There was a lot of lines in the extract (more than 1 million) so the workbook was a little bit slow during opening and during analysis. To analyze the dataset and find a good idea for the contest I used the same process than I use with customers: discovery, idea, creation, user experience. This process allow me to do several iteration and try to improve the viz. The delay was very short so the number of iteration too. But thanks to this process I was able to find new ideas during each iteration. For example, I find the idea of totals during the last one. Each iteration was a training for the contest so I tried to do quicker each time. To be ready the D-Day, it was important to know each step of the creation by heart. I can tell that all every night was short !!</p>
<p>My idea was to tell a story to the judges. This story was about notes attributed to business locations. Because of the dataset's size I chose to focus my viz on Las Vegas. That is why I put some global filters to limit the perimeter and analyze Las Vegas'data only. The first graphe I built was the map. In my mind I told me: "If there is geographical coordinates, try to do a map !" I think it is the better way to quickly see each location. All the graphe I built for the viz have the same color legend based on the number of stars attributed to places. It is important because it was like a road to follow during the story. Because there was a date field I chose to create a timeline with the number of reviews for each number of stars. The aim of this graphe was to show that most of the notes are between 3 and 4.5 stars. Two conclusions came to me: reviewers are very gentle with places or only the reviewers which love place write comments... The last two grahes are lists about places. One shows the top/bottom 10 of places in Las Vegas (in terms of number of reviews) and the sceond one shows the total of places for each number of stars (this one is complementary to the timeline.</p></div>
</br>
<h3>2. The D-Day</h3>
</br>
<div style="text-align: justify;">
<p>The IronViz day was the thursday on the morning (the night before was very short...). I was very nervous to do a viz in less than 20 minutes in front of thousand attendees. Hopefully my sous-vizzers, <a alt="TaraTwitter" href="https://twitter.com/tara_lynn_walk" target="_blank">Tara Walker</a>, helped me during all the week to be ready the D-Day. With all the training I did during the week I was confident about the time. On the other side, I was more sceptical about my skills in statistics. Indeed I bet all the contest on the storypoints and the easy of use. That is why my viz does not have complicated graphes and consequently strong analysis.</p>
<p>The process to build tmy IronViz is simple: 3 dashboards with 5 graphes each. Each graphe is build then the 3 dashboards. In chronological order, I first put the filters to limit the number of lines. Then I built the map with Latitude and Longitude and put the number of stars in color. After that, I built the top 10 sheets with the creation of an index. To build this sheet I chose to shut down the automatic updates to avoid wasting time and I put all the dimensions needed and the index. To create the top I configure the index to be calculated in a descendant way based on the number of reviews. Of course to create the bottom the index was calculated in an ascendant way based on the same measure. The mark type is shape and was configured to display stars. The timeline was built with the review date and the number of reviews. The dimension number of stars was put on colors. The last graphe was the total built with the dimension number of stars and the measure number of places (it is a distinct count of ID_business).</p>
<p>To create the story it was necessary to build 3 different dashboards. Indeed, the first one displays all the graphes with the 10 worst places, in the second one the 10 worst places is replaced by the top 10 and the last one displays all the graphes but have 3 quick filters allowing the users to seek for places. The storypoints allowed me to exclude especially values of the dimension number of stars: the first point excludes data with a note higher to 2 stars and the second one excludes data lower to 4 stars. I succeeded to do the entire viz in 17 minutes. I was proud to be so fast... but after the contest I told me that it might be better to do it slower but with more statistical points.</p>
<p>The judges were very kind with me and my job. They told me that my viz was the more simple of the contest. The colors was a good choice because the red is related to bad stuffs and the green is the opposite. They loved the storypoints and especially the focus on the worst places because in most of cases the focus is done on the best things. In the final viz, I put quick filters with drop-down menus. The judges told me that it is not the best way to allow users to look for a specific place. That is why, in this post, I replace menus by typing boxes.</p>
<p>You can find the viz at the end of the post. Please comment and share, I will be glad to discuss about it !</p></div>
</br>
<h3>Feedback</h3>
</br>
<div style="text-align: justify;">
<p>After one month, I can tell that it was very rewarding to do the contest. Right after the contest I have the chance to met <a alt="RyanSleeperTabPubProfile" href="http://public.tableausoftware.com/profile/osmguy#!/" target="_blank">Ryan Sleeper</a> the 2013 IronViz Champion, <a alt="KellyMartinTabPubProfile" href="http://public.tableausoftware.com/profile/kelly#!/" target="_blank">Kelly Martin</a> a 2013 IronViz contestant and now Zen Master, <a alt="RamonMartinezTabPubProfile" href="http://public.tableausoftware.com/profile/ramon.martinez#!/" target="_blank">Ramon Martinez</a>, Jock Mackinlay... and other impressive Tableau users.</p>
<p>Of course, congratulations to my two opponents during the contest <a alt="JeffreyTabPubProfil" href="http://public.tableausoftware.com/profile/jeffs8297#!/" target="_blank">Jeffrey Shaffer</a> and <a alt="JohnMathisTabPubProfile" href="http://public.tableausoftware.com/profile/john.m5592#!/" target="_blank">John Mathis</a> ! You can take a look to their IronViz feedback <a alt="IronVizJeffreyShaffer" href="http://www.dataplusscience.com/IronVizShaffer.html" target="_blank">here for Jeffrey</a> and <a alt="IronVizJohnMathis" href="http://datographer.blogspot.co.uk/2014/09/recap-iron-viz-reviewing-reviewers.html" target="_blank">here for John</a>.</p>
</div>
</br>
<script type='text/javascript' src='https://public.tableausoftware.com/javascripts/api/viz_v1.js'>
</script>
<div class='tableauPlaceholder' style='width: 984px; height: 659px;'>
<noscript>
<a href='#'>
<img alt='To be or not to be in Las Vegas ! ' src='http://public.tableausoftware.com/static/images/M2/M27W2PNGP/1_rss.png' style='border: none' />
</a>
</noscript>
<object class='tableauViz' width='984' height='659' style='display:none;'>
<param name='host_url' value='https%3A%2F%2Fpublic.tableausoftware.com%2F' />
<param name='path' value='shared/M27W2PNGP' />
<param name='toolbar' value='yes' />
<param name='static_image' value='http://public.tableausoftware.com/static/images/M2/M27W2PNGP/1.png' />
<param name='animate_transition' value='yes' />
<param name='display_static_image' value='yes' />
<param name='display_spinner' value='yes' />
<param name='display_overlay' value='yes' />
<param name='display_count' value='yes' />
<param name='showVizHome' value='no' />
<param name='showTabs' value='y' />
</object>
</div>Anonymoushttp://www.blogger.com/profile/04345009273762315545noreply@blogger.com1tag:blogger.com,1999:blog-278583945868866001.post-27201905787942854922014-10-02T23:32:00.001+02:002014-10-09T11:49:57.975+02:00This is #DATA14<h1 style="text-align: justify;">
IronViz Contest - Part 1: Qualification</h1>
<br />
<div style="text-align: justify;">
Here is my first blog post about Tableau Software, my job tool. This blog will try yo present and explain my work with Tableau Desktop with customers and Tableau Public with Open Data. I will try to give some tips about Tableau and to explain some tricky vizzes.</div>
</br>
<div style="text-align: justify;">
This first blog post comes after #DATA14, the Tableau Conference which took place in Seattle a month ago. I had a chance to be a part of this story thanks to my qualification for the IronViz contest. This post will try to give an answer at this question: how did I win the Storytelling Viz Contest ? I am going to explain my viz (Les Accidents de la route en 2012).</div>
</br>
<a name='more'></a><br />
<h3>1. Roads accidents story</h3>
</br>
<div style="text-align: justify;">
The visualisation which allow me to go to Seattle in September is available <a alt="Viz" href="http://www.altic.org/altic-blog-buzz/le-labo/dataviz">here (in french)</a>. This is a story built with 6 différent parts. Each part presents a specific point of view and try to answer a specific question. In fact each part is a dashboard and these dashboards are built with the same method: 3 or 4 views (more views will give too much informations), a map in each dashbord (the map is always on the upper right) and a comment to give the main information on the upper right. About the Story, the aim was to give a general analysis on the 1st point to go to specific analysis for the other points.</div>
</br>
<div style="text-align: justify;">
<script src="https://public.tableausoftware.com/javascripts/api/viz_v1.js" type="text/javascript"></script></div>
<div class="tableauPlaceholder" style="height: 769px; text-align: center; width: 984px;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.blogger.com/blogger.g?blogID=278583945868866001" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a></div>
<noscript><a href='#'><img alt=' ' src='https://public.tableausoftware.com/static/images/Ac/Accidents2012/Lesaccidentsdelarouteen2012/1_rss.png' style='border: none' /></a></noscript><object class="tableauViz" height="769" style="display: none;" width="984"><param name='host_url' value='https%3A%2F%2Fpublic.tableausoftware.com%2F' /> <param name='site_root' value='' /><param name='name' value='Accidents2012/Lesaccidentsdelarouteen2012' /><param name='tabs' value='no' /><param name='toolbar' value='yes' /><param name='static_image' value='https://public.tableausoftware.com/static/images/Ac/Accidents2012/Lesaccidentsdelarouteen2012/1.png' /> <param name='animate_transition' value='yes' /><param name='display_static_image' value='yes' /><param name='display_spinner' value='yes' /><param name='display_overlay' value='yes' /><param name='display_count' value='yes' /><param name='showVizHome' value='no' /></object></div>
<br />
<h3>2. Hours of work and weeks of analysis</h3>
</br>
<div style="text-align: justify;">
This visualisation is built on strong analysis. The datas (available here: <a alt="DataGouv" href="http://www.data.gouv.fr/">data.gouv.fr</a>) were analyzed and analyzed again to create a first prototype. After that, my dear colleagues had tested the viz to have a feedback. This step allow me to change analysis, graphes, colors, etc. In fact, this process is important to have a final version because it includes several iterations. Each version of the workbook had changes about analysis but noew graphes and views too. The aim of this process is to provide an easy but efficient experience to the users!</div>
<br />
<h3>3. Fast & Furious by Tableau !</h3>
<br />
<div style="text-align: justify;">
This part of the post will explain how I did a beautiful car in Tableau. The car was the longer development of the viz. To create this graphe, I had to use a specific dataset which I created directly in Tableau. I used the annotation feature and a picture of a car to create cartesians coordinates. I found a drawing of standard car on the Internet to be able to create points (of course, I can't draw a car myself!).</div>
<br />
<div style="text-align: center;">
<img alt="plan_voiture" src="http://altic.org/images/stories/blog_altic/tableau/1334831035_plan-voiture.jpg" style="height: 100%; width: 500px;" /></div>
<br />
<div style="text-align: justify;">
The first step was to keep in mind the size of the picture. Indeed, this size was used to tell Tableau Desktop to use this picture as a background. I chose to divide by 2 the width because it was easier to create all the points: the Y axis was in the middle of the sheet so I just had to do a symetrical operation to have all the car.</div>
<br />
<div style="text-align: center;">
<img alt="voiture1" src="http://altic.org/images/stories/blog_altic/tableau/voiture_1.png" style="height: 100%; vertical-align: middle; width: 500px;" /></div>
<br />
<div style="text-align: justify;">
Through the annotation feature, I create several points corresponding to the right side of the future car. Nest, I had duplicated with an axial symtrical operation (that keeps the car geometry and divides the creation time by 2 !!). All these points was put in an Excel file used as a TDE in Tableau.</div>
<br />
<div style="text-align: center;">
<img alt="voiture2" src="http://altic.org/images/stories/blog_altic/tableau/voiture_2.png" style="height: 100%; vertical-align: middle; width: 500px;" /></div>
<br />
<div style="text-align: justify;">
The second step was to put some colors and try to design a road. To do this I used the zero line to draw the middle road band and I chose a background color as grey to do the road itself. Moreover, I created 2 reference bands that I put in green to represent roadsides.</div>
<br />
<div style="text-align: center;">
<img alt="voiture3" src="http://altic.org/images/stories/blog_altic/tableau/voiture_3.png" style="height: 100%; vertical-align: middle; width: 500px;" /></div>
<br />
<div style="text-align: justify;">
The last step was to use the "car dataset" with the blending feature. This feature allowed me to put metrics on the different parts of the car. I used a ratio aggregation <code>count([nb_accidents])/total(count([nb_accidents]))</code> and checked that the result was alright.</div>
<br />
<div style="text-align: center;">
<img alt="blending" src="http://altic.org/images/stories/blog_altic/tableau/blending.png" style="height: 100%; vertical-align: middle; width: 500px;" /></div>
<br />
<h3>4. Some design and... Voilà!</h3>
</br>
<div style="text-align: justify;">
After all the iterations I had to do the conditioning. To be simple I chose to use a white background. I chose tu use red-green divergent palette because the red color means hazardous situations and it was important to show where it is very dangerous (the more is red, the more is lethal).</div>
</br>
<div style="text-align: justify;">
All this work allow me to really test the storypoints feature. I think this feature is a really good one because you can analyze the same dataet several times with different point of view. On the other hand, I hope that this part of Tableau will be more flexible especially with formatting options and link between the story and the dashobards or sheets. But, yeah, it is very powerful.</div>
</br>
<div style="text-align: justify;">
You want to read this post in French ? <a alt="Viz" href="http://altic.org/blog/162-jtrajkovic/493-this-is-data14-ironviz-contest-partie-1-qualification">Click here</a>.</div>Anonymoushttp://www.blogger.com/profile/04345009273762315545noreply@blogger.com0