D3, Data Visualization – Créer un nuage de mots en Data Visualisation sur la base d’un texte
Data Visualization, c’est un mot que l’on entend souvent sans forcément très bien savoir ce qu’il recouvre et quel sésame à utiliser pour nous ouvrir le monde merveilleux des “dataviz”. On a donc choisi à la fois de rappeler l’intérêt éventuel d’une “dataivz” pour rehausser du contenu et par conséquent de faire un POC (Proof Of Concept) avec la bibliothèque javascript D3.
1. Pourquoi la “Data Visualization” ?
Bon, expédions dès à présent les banalités d’usage sur “l’infobesité(*)” dont au quotidien nous sommes des victimes consentantes. Phénomène qui s’articule, disons-le, autour de 2 principes fondateurs(**) :
- Le temps réel, une information purement émotionnel, qui suscite au choix la jalousie, l’effroi ou la pitié.
- Le temps suspendu ce que l’on nomme habituellement la réflexion, souvent pénétrante parfois indigeste. Cela peut même se révéler aride comme un tableur CSV, sexy comme un manuel de statistique imprimé sur papier bible.
(*)Merci à E pour ce rappel, il s’agit de la contraction entre information + obésité = infobesité mais que l’on avait plus réduit encore à un banal infosité incomprehensible
(**) ces affirmations péremptoires n’impliquent que leur auteur.
L’une ou l’autre de ces tendances peut occasionner de sérieux cas d’indigestion voir de rejet temporaire de toute information.
C’est donc ici qu’intervient le Data Visualization, le nouvel eldorado du “storytelling digital” pour traiter les données brutes livrées à flot continu et donner une consistance à cette information pléthorique.
En effet, la visualisation reste le moyen le plus approprié pour faire comprendre l’essentiel d’une information à l’aide de ce que l’on pourrait nommer la concision visuelle.
Certes, les mauvaises langues pourront prétendre que réduire l’information à sa portion congrue en la simplifiant, c’est la tronquer, la manipuler… en effet, mais le trop plein d’information ne tue-t-il pas l’information ? A cette question cornélienne, on se garde bien de trancher.
De manière pratique, on va voir ce qu’une bibliothèque javascript comme D3 peut apporter à la réflexion sur l’information. On a choisi D3 car c’est sans doute la bibliothèque javascript la plus aboutie et la plus accessible vu le nombre d’exemples à monter soi-même que l’on trouve sur le Web. Il existe néanmoins de très nombreuses alternatives sur le marché, plus ou moins intuitives comme Raphaël par exemple. Enfin, il existe un peu de littérature sur le maniement de D3, les deux ouvrages de référence sont cités en fin d’article.
2. Qu’est-ce que D3
D3 est l’abréviation qui désigne une bibliothèque javascript utilisée pour créer des “data visualizations”. Toutefois, cette abréviation est une contraction de “Data-Driven Documents”. En gros, D3 convertit en HTML ou en SVG, les données brutes que vous lui fournissez.
Cette bibliothèque JS conçu à l’origine par Mike Bostock est disponible sur gratuitement sur GitHub et le site officiel est la suivante : d3js.org
Notre cas pratique est simple, il a pour objectif de créer un nuage de mots à partir de 2 discours de Manuel Valls sur la sécurité.
En effet, on parle beaucoup des éléments de langages, à savoir les mots-clés dont les hommes politiques français et d’ailleurs nous martèlent à longueur d’intervention.
Pour illustrer une possible application de l’intérêt de la “dataviz” à cette question journaliste. On va donc explorer le champs sémantique de Manuel Valls sur la sécurité au travers deux des ses discours. On a seulement choisi deux discours certes représentatifs mais c’est un léger mais c’est faute de pouvoir en trouver plus sur le Web !
- Discours 1 : Discours de Manuel Valls à l’Assemblée nationale en hommage aux victimes des attentats
http://www.gouvernement.fr/partage/3118-seance-speciale-d-hommage-aux-victimes-des-attentats-allocution-de-manuel-valls-premier-ministre - Discours 2 : Discours du Premier ministre à Beauvais (Oise) sur la sécurité
http://www.gouvernement.fr/partage/2499-discours-du-premier-ministre-a-beauvais-oise-sur-la-securite
Quelques articles sur les éléments de langage
Pour en savoir un peu plus, voilà quelques articles sur cette notion de “éléments de langage”.
- http://www.liberation.fr/politiques/2015/03/22/les-dix-elements-de-langage-que-vous-entendrez-ce-soir_1226056
- http://www.huffingtonpost.fr/news/elements-de-langage/
- http://www.lefigaro.fr/vox/politique/2014/12/08/31001-20141208ARTFIG00051-elements-de-langage-formules-mecaniques-parlez-vous-le-manuel-valls.php
1. Lister les mots-clés et la fréquence d’utilisation
Ce script bash wf.sh
permet de lister les mots-clés et la fréquence d’apparition de chacun de ces mots dans un texte.
Source : Exemple 15.12. Analyse de fréquence d’apparition des mots http://abs.traduc.org/abs-5.3-fr/ch15s04.html
On prend par exemple ce texte : valls_special_1.txt qui contient.
./wf.sh valls_special_1.txt
22 république
22 mais
21 aux
20 ne
19 notre
17 tous
16 président
15 français
14 trois
14 se
2. Calcul des pondérations
Nous voilà bien avec notre liste de mots-clés mais ensuite…
Bien sur l’objectif est d’utiliser le script existant de Jason Davies pour générer notre nuage de mots en dataviz.
Toutefois, l’exemple donné par Jason Davies dans Github ne donne pas de coefficient de pondération pour chaque mot. En cherchant un peu, on peut trouver facilement la ressource qui nous fait défaut.
Un développeur de Google du nom de Sahand Saba a la solution. Il a réfléchi à la question de pondération sur les oeuvres de scientifiques. En conséquence, il nous faut constituer une liste de mots avec des pondérations de la forme ci-dessous, comme sur les exemples de Sahand Saba.
var words = {"c’est":0.88200706,"france":0.64680517,"république":0.43120345,"président":0.31360251,"français":0.29400235,"qu’il":0.25480204,"devons":0.25480204,"ministre":0.23520188,"messieurs":0.23520188,"terroristes":0.21560172,"services":0.21560172,"encore":0.21560172,"nationale":0.19600157,"monsieur":0.19600157,"message":0.19600157,"laïcité":0.19600157.... /* etc */ "absence":0.01960016,"aborder":0.01960016}; |
Du même on va en profiter pour changer la police de caractères de Open Sans
à Impact
//fontFamily = "Open Sans"; // BEURK fontFamily = "Impact"; // YAMMY |
- http://sahandsaba.com/visualizing-philosophers-and-scientists-by-the-words-they-used-with-d3js-and-python.html
- https://github.com/jasondavies/d3-cloud
3. A l’aide d’excel
Avec excel, on va calculer les pondération de chaque mot, puis on va concatener ces données pour générer du code PHP afin de créer directement le tableau associatif qui sera injecté pour créer notre dataviz.
Excel – Calcul des pondérations
Excel – Concaténation
4. Petite nettoyage sémantique
Bien sûr, on va un peu nettoyer le fichier des mots sans intérêt. La règle que l’on a posé est la suivante : tous les mots qui dépassent en longueur le mot france*
seront enlevés. On va donc pouvoir enlever les expressions usuelles notamment les articles définis ou indéfinis qui ne présentent aucun intérêt : les, de, la, et, à….
* Pour information, la longueur du mot de france
est de 6.
/* DATA : generated via excel */ $words = array ( array("c’est",0.4663212435), array("france",0.3419689119), array("république",0.2279792746), array("président",0.1658031088), /* the full list is here */ array("aborder",0.0103626943) ); /* OUTPUT */ /* "c’est":0.4663212435,"france":0.3419689119,"république":0.2279792746,"président":0.1658031088,...,"aborder":0.0103626943 */ for ($row = 0; $row < count($words); $row++) { $word = trim($words[$row][1]); $stat = trim($words[$row][0]); $word_length = strlen(trim($words[$row][0])); // length /* Show me a word greater than France */ /* The result will be injected in the D3 js script */ if ($word_length >= 6) { echo ('"'.trim($words[$row][0]).'":'); // word echo (''.(($words[$row][1])).','); // stat } else { // The word is smaller or equal to 6, not meaningful } }// EOL |
5. Les nuages de mots
Voilà le résultat des éléments de langage de ces deux discours de Manuel Valls. Le code source de chacune de ses images est disponible ci-dessous.
Discours 1 : Discours de Manuel Valls à l’Assemblée nationale en hommage aux victimes des attentats
Discours 2 : Discours du Premier ministre à Beauvais (Oise) sur la sécurité
Sans être journaliste, cette image peut étayer une analyse sur les éléments de langage d’un homme politique par exemple. D’ailleurs, un des articles cités plus bas reprend ce type d’illustration. A l’oeuvre dans ces images, l’illustration du volontarisme affirmée et assumée de Manuel Valls. Pour souligner d’ailleurs, cette posture quasi guerrière, nous avons choisi pour la police Impact
bien plus percutante 😉
Ultime conclusion, D3 est aussi très fortiche sur dataviz sur les cartes. Ce sera sans doute l’objet d’un article.
6. Quelques ouvrages sur D3 notamment
Deux ouvrages bien faits pour apprendre à maitriser la bibliothèque D3.
7. Les source du nuage de mots
Discours 1 : Discours de Manuel Valls à l’Assemblée nationale en hommage aux victimes des attentats (discours_1_hommage.html)
<!doctype html> <meta charset="utf-8"> <head> </head> <body> <script src="../lib/jquery/jquery-1.11.1.min.js"></script> <script src="../lib/d3/d3.js"></script> <script src="../d3.layout.cloud.js"></script> <div style="padding: 5px;" id="word-cloud"></div> <script> var words = {"c’est":0.88200706,"france":0.64680517,"république":0.43120345,"président":0.31360251,"français":0.29400235,"qu’il":0.25480204,"devons":0.25480204,"ministre":0.23520188,"messieurs":0.23520188,"terroristes":0.21560172,"services":0.21560172,"encore":0.21560172,"nationale":0.19600157,"monsieur":0.19600157,"message":0.19600157,"laïcité":0.19600157,"jamais":0.19600157,"terrorisme":0.17640141,"réponses":0.17640141,"renseignement":0.17640141,"n’est":0.17640141,"mesdames":0.17640141,"déjà":0.17640141,"comment":0.17640141,"valeurs":0.15680125,"l’on":0.15680125,"j’ai":0.15680125,"l’intérieur":0.1372011,"liberté":0.1372011,"après":0.1372011,"accepter":0.1372011,"toujours":0.11760094,"radicalisation":0.11760094,"prendre":0.11760094,"moyens":0.11760094,"l’école":0.11760094,"l’islam":0.11760094,"groupes":0.11760094,"gouvernement":0.11760094,"forces":0.11760094,"depuis":0.11760094,"également":0.09800078,"toutes":0.09800078,"sommes":0.09800078,"quelques":0.09800078,"quartiers":0.09800078,"protection":0.09800078,"policiers":0.09800078,"personnes":0.09800078,"parlement":0.09800078,"ministres":0.09800078,"madame":0.09800078,"l’etat":0.09800078,"l’esprit":0.09800078,"l’assemblée":0.09800078,"janvier":0.09800078,"grande":0.09800078,"d’une":0.09800078,"députés":0.09800078,"démocratie":0.09800078,"débat":0.09800078,"doivent":0.09800078,"devant":0.09800078,"était":0.07840063,"travaux":0.07840063,"travail":0.07840063,"société":0.07840063,"rappelé":0.07840063,"propositions":0.07840063,"possible":0.07840063,"peut-on":0.07840063,"peuple":0.07840063,"passer":0.07840063,"partout":0.07840063,"nouveau":0.07840063,"nombreux":0.07840063,"l’ensemble":0.07840063,"l’avez":0.07840063,"l’antisémitisme":0.07840063,"justice":0.07840063,"hauteur":0.07840063,"filières":0.07840063,"familles":0.07840063,"d’être":0.07840063,"d’ailleurs":0.07840063,"détermination":0.07840063,"djihadistes":0.07840063,"demandé":0.07840063,"côtés":0.07840063,"couleurs":0.07840063,"contre":0.07840063,"compatriotes":0.07840063,"chacun":0.07840063,"autres":0.07840063,"apporter":0.07840063,"événements":0.05880047,"victimes":0.05880047,"unité":0.05880047,"tribune":0.05880047,"tolérance":0.05880047,"s’est":0.05880047,"s’attaque":0.05880047,"sécurité":0.05880047,"surveillance":0.05880047,"souvent":0.05880047,"situation":0.05880047,"semaine":0.05880047,"saluer":0.05880047,"réseaux":0.05880047,"réponse":0.05880047,"répondre":0.05880047,"riposte":0.05880047,"rester":0.05880047,"religieux":0.05880047,"qu’ils":0.05880047,"questions":0.05880047,"question":0.05880047,"quelle":0.05880047,"présidents":0.05880047,"présence":0.05880047,"principes":0.05880047,"premier":0.05880047,"permis":0.05880047,"particulièrement":0.05880047,"parcours":0.05880047,"nécessaires":0.05880047,"nécessaire":0.05880047,"nouvelle":0.05880047,"notamment":0.05880047,"niveau":0.05880047,"national":0.05880047,"musulmans":0.05880047,"moment":0.05880047,"mesures":0.05880047,"menace":0.05880047,"membres":0.05880047,"marquent":0.05880047,"magnifique":0.05880047,"l’éducation":0.05880047,"l’avons":0.05880047,"l’année":0.05880047,"l’ai":0.05880047,"l’action":0.05880047,"l’acte":0.05880047,"instant":0.05880047,"individus":0.05880047,"implacable":0.05880047,"immense":0.05880047,"fondamentale":0.05880047,"fidèle":0.05880047,"fermeté":0.05880047,"effort":0.05880047,"d’autres":0.05880047,"décidé":0.05880047,"direction":0.05880047,"dimanche":0.05880047,"différence":0.05880047,"diagnostic":0.05880047,"dernier":0.05880047,"contrôle":0.05880047,"combat":0.05880047,"chaque":0.05880047,"antiterroriste":0.05880047,"antisémitisme":0.05880047,"allons":0.05880047,"étrangers":0.03920031,"étiez":0.03920031,"vérité":0.03920031,"volonté":0.03920031,"vincennes":0.03920031,"utilisés":0.03920031,"urgences":0.03920031,"universelle":0.03920031,"universel":0.03920031,"trafics":0.03920031,"toulouse":0.03920031,"théâtres":0.03920031,"terroriste":0.03920031,"territoire":0.03920031,"techniques":0.03920031,"sénat":0.03920031,"surtout":0.03920031,"sujets":0.03920031,"soutiens":0.03920031,"solidarité":0.03920031,"soldats":0.03920031,"siècles":0.03920031,"seulement":0.03920031,"semaines":0.03920031,"sceaux":0.03920031,"savons":0.03920031,"savoir":0.03920031,"samedi":0.03920031,"responsables":0.03920031,"respect":0.03920031,"reprises":0.03920031,"renforts":0.03920031,"renforcé":0.03920031,"renforcer":0.03920031,"renforcement":0.03920031,"religion":0.03920031,"rappeler":0.03920031,"rapidement":0.03920031,"raison":0.03920031,"racisme":0.03920031,"qu’un":0.03920031,"qu’elle":0.03920031,"pénitentiaire":0.03920031,"puisse":0.03920031,"prône":0.03920031,"présente":0.03920031,"préfets":0.03920031,"préfecture":0.03920031,"proches":0.03920031,"problème":0.03920031,"prison":0.03920031,"preuve":0.03920031,"pouvons":0.03920031,"police":0.03920031,"plusieurs":0.03920031,"plateforme":0.03920031,"phénomènes":0.03920031,"phénomène":0.03920031,"personnels":0.03920031,"passage":0.03920031,"parquet":0.03920031,"parlementaires":0.03920031,"origines":0.03920031,"n’en":0.03920031,"normal":0.03920031,"nation":0.03920031,"musulman":0.03920031,"mobilisés":0.03920031,"mission":0.03920031,"militaires":0.03920031,"mettre":0.03920031,"menons":0.03920031,"menaces":0.03920031,"meilleure":0.03920031,"matière":0.03920031,"l’épreuve":0.03920031,"l’égalité":0.03920031,"l’une":0.03920031,"l’oublions":0.03920031,"l’ordre":0.03920031,"l’occasion":0.03920031,"l’heure":0.03920031,"l’europe":0.03920031,"l’education":0.03920031,"l’autre":0.03920031,"l’administration":0.03920031,"jérusalem":0.03920031,"jusqu’au":0.03920031,"juridiques":0.03920031,"journalistes":0.03920031,"jeunesse":0.03920031,"intérêts":0.03920031,"intérieure":0.03920031,"intérieur":0.03920031,"international":0.03920031,"importe":0.03920031,"héros":0.03920031,"hémicycle":0.03920031,"humains":0.03920031,"hommes":0.03920031,"guerre":0.03920031,"groupe":0.03920031,"graves":0.03920031,"gouvernements":0.03920031,"gendarmes":0.03920031,"fraternité":0.03920031,"fraternelle":0.03920031,"fièrement":0.03920031,"fierté":0.03920031,"femmes":0.03920031,"extérieurs":0.03920031,"européens":0.03920031,"européen":0.03920031,"entier":0.03920031,"ensemble":0.03920031,"d’unité":0.03920031,"d’opération":0.03920031,"d’etat":0.03920031,"d’entre":0.03920031,"d’enquête":0.03920031,"démocratique":0.03920031,"délinquance":0.03920031,"défense":0.03920031,"décembre":0.03920031,"débats":0.03920031,"donner":0.03920031,"diversité":0.03920031,"dispositif":0.03920031,"dignité":0.03920031,"dernière":0.03920031,"derniers":0.03920031,"demande":0.03920031,"davantage":0.03920031,"croire":0.03920031,"crimes":0.03920031,"conscience":0.03920031,"concitoyens":0.03920031,"comprendre":0.03920031,"complexe":0.03920031,"communauté":0.03920031,"commun":0.03920031,"commission":0.03920031,"citoyen":0.03920031,"certains":0.03920031,"celles":0.03920031,"cazeneuve":0.03920031,"capables":0.03920031,"bernard":0.03920031,"autour":0.03920031,"apportera":0.03920031,"adopté":0.03920031,"abattre":0.03920031,"œuvre":0.01960016,"évoqué":0.01960016,"évidemment":0.01960016,"étroitement":0.01960016,"étroit":0.01960016,"étrangères":0.01960016,"établissements":0.01960016,"éprouvante":0.01960016,"épreuves":0.01960016,"épineuse":0.01960016,"émanant":0.01960016,"élevés":0.01960016,"élevé":0.01960016,"église":0.01960016,"écrit":0.01960016,"économique":0.01960016,"écoles":0.01960016,"éclaté":0.01960016,"échecs":0.01960016,"échanges":0.01960016,"yémen":0.01960016,"voulez":0.01960016,"votées":0.01960016,"votant":0.01960016,"vitalité":0.01960016,"visera":0.01960016,"vigilants":0.01960016,"vigilance":0.01960016,"viennent":0.01960016,"victoire":0.01960016,"venons":0.01960016,"vallaud-belkacem":0.01960016,"urvoas-verchere":0.01960016,"urvoas":0.01960016,"urgence":0.01960016,"urbains":0.01960016,"unités":0.01960016,"ténue":0.01960016,"tâche":0.01960016,"tunisien":0.01960016,"tueries":0.01960016,"trouvé":0.01960016,"trouver":0.01960016,"trompés":0.01960016,"tristesse":0.01960016,"trente":0.01960016,"traverser":0.01960016,"travers":0.01960016,"travailler":0.01960016,"travaillent":0.01960016,"travaille":0.01960016,"travaillant":0.01960016,"traquant":0.01960016,"transformation":0.01960016,"traiter":0.01960016,"tragédie":0.01960016,"tragiques":0.01960016,"touchée":0.01960016,"touché":0.01960016,"totale":0.01960016,"tombés":0.01960016,"tombait":0.01960016,"tombaient":0.01960016,"tolérant":0.01960016,"tiendra":0.01960016,"textes":0.01960016,"territoriales":0.01960016,"territorial":0.01960016,"terrible":0.01960016,"terres":0.01960016,"termes":0.01960016,"tentent":0.01960016,"tentation":0.01960016,"telles":0.01960016,"s’organisent":0.01960016,"s’interroger":0.01960016,"s’interroge":0.01960016,"s’imposent":0.01960016,"s’imposaient":0.01960016,"s’ils":0.01960016,"s’il":0.01960016,"s’attaquer":0.01960016,"s’appuyant":0.01960016,"s’apprend":0.01960016,"sévérité":0.01960016,"sérénité":0.01960016,"sérieux":0.01960016,"ségolène":0.01960016,"système":0.01960016,"synagogues":0.01960016,"synagogue":0.01960016,"symptôme":0.01960016,"suspectes":0.01960016,"susceptibles":0.01960016,"suivre":0.01960016,"suffisamment":0.01960016,"strict":0.01960016,"stratégiques":0.01960016,"spécifiques":0.01960016,"spectacle":0.01960016,"souverains":0.01960016,"souvenant":0.01960016,"soutien":0.01960016,"soumettre":0.01960016,"soulignez":0.01960016,"soulevé":0.01960016,"sommes-nous":0.01960016,"somalie":0.01960016,"sollicitée":0.01960016,"solennelle":0.01960016,"soldat":0.01960016,"soient":0.01960016,"sociaux":0.01960016,"sobriété":0.01960016,"singulier":0.01960016,"similaire":0.01960016,"significatif":0.01960016,"signes":0.01960016,"signalement":0.01960016,"shabbat":0.01960016,"seules":0.01960016,"serviteurs":0.01960016,"serviront":0.01960016,"service":0.01960016,"servent":0.01960016,"serait":0.01960016,"septembre":0.01960016,"sentons":0.01960016,"sentie":0.01960016,"sensibles":0.01960016,"savent":0.01960016,"sang–froid":0.01960016,"salles":0.01960016,"salariés":0.01960016,"saisir":0.01960016,"réveil":0.01960016,"réunion":0.01960016,"résultats":0.01960016,"résignation":0.01960016,"républicains":0.01960016,"répond":0.01960016,"répercuter":0.01960016,"réinsertion":0.01960016,"régner":0.01960016,"réforme":0.01960016,"réelle":0.01960016,"récidiviste":0.01960016,"récidive":0.01960016,"réalité":0.01960016,"réagi":0.01960016,"règlementaires":0.01960016,"rivés":0.01960016,"risques":0.01960016,"risque":0.01960016,"revendiquons":0.01960016,"revendiquant":0.01960016,"retrouvée":0.01960016,"ressenti":0.01960016,"responsabilité":0.01960016,"respectant":0.01960016,"représentation":0.01960016,"représentait":0.01960016,"représentaient":0.01960016,"reprendront":0.01960016,"renouveler":0.01960016,"renforce":0.01960016,"rendre":0.01960016,"rencontré":0.01960016,"remontant":0.01960016,"remercier":0.01960016,"remercie":0.01960016,"remarquable":0.01960016,"relâche":0.01960016,"religions":0.01960016,"relatives":0.01960016,"regardons":0.01960016,"recueillement":0.01960016,"recueillait":0.01960016,"recteurs":0.01960016,"recrutements":0.01960016,"reconnaissent":0.01960016,"recherchés":0.01960016,"rebeller":0.01960016,"rassemblé":0.01960016,"rassemblements":0.01960016,"rapporteur":0.01960016,"rappelant":0.01960016,"radicalisés":0.01960016,"radicalisées":0.01960016,"radicalisme":0.01960016,"qu’on":0.01960016,"qu’est":0.01960016,"qu’entre":0.01960016,"qu’en":0.01960016,"qu’assume":0.01960016,"quelqu’un":0.01960016,"quelque":0.01960016,"quasiment":0.01960016,"péril":0.01960016,"pénitentiaires":0.01960016,"pédagogie":0.01960016,"puissent":0.01960016,"puisqu’on":0.01960016,"puisque":0.01960016,"publiques":0.01960016,"publication":0.01960016,"public":0.01960016,"prévu":0.01960016,"préventive":0.01960016,"présidée":0.01960016,"présidente":0.01960016,"présents":0.01960016,"présentation":0.01960016,"présent":0.01960016,"préfet":0.01960016,"prédicateurs":0.01960016,"précédent":0.01960016,"précèdent":0.01960016,"précisément":0.01960016,"précipitation":0.01960016,"protéiforme":0.01960016,"protégé":0.01960016,"protéger":0.01960016,"prolongée":0.01960016,"prolongement":0.01960016,"projet":0.01960016,"prohibant":0.01960016,"progressivement":0.01960016,"progression":0.01960016,"programmée":0.01960016,"profonde":0.01960016,"profond":0.01960016,"professionnalisme":0.01960016,"professionnalisation":0.01960016,"profaner":0.01960016,"produits":0.01960016,"prochain":0.01960016,"processus":0.01960016,"prisons":0.01960016,"priorité":0.01960016,"principe":0.01960016,"presse":0.01960016,"premiers":0.01960016,"pratique":0.01960016,"pouvoir":0.01960016,"pourvus":0.01960016,"poursuivre":0.01960016,"pourraient":0.01960016,"potentiels":0.01960016,"possibles":0.01960016,"possibilité":0.01960016,"posent":0.01960016,"posant":0.01960016,"pompili":0.01960016,"politiques":0.01960016,"politique":0.01960016,"policière":0.01960016,"points":0.01960016,"pleinement":0.01960016,"pinacle":0.01960016,"peut-être":0.01960016,"peuples":0.01960016,"perpétrées":0.01960016,"permettrez":0.01960016,"permettre":0.01960016,"permettent":0.01960016,"permettant":0.01960016,"permanente":0.01960016,"permanence":0.01960016,"perdre":0.01960016,"patriotique":0.01960016,"patrie":0.01960016,"patrick":0.01960016,"parvenir":0.01960016,"paroles":0.01960016,"paraboles":0.01960016,"palpée":0.01960016,"oublie":0.01960016,"organisée":0.01960016,"orateurs":0.01960016,"opérationnelle":0.01960016,"offense":0.01960016,"occidentales":0.01960016,"obtiennent":0.01960016,"obsèques":0.01960016,"obligera":0.01960016,"obligations":0.01960016,"objectif":0.01960016,"n’ont":0.01960016,"n’avaient":0.01960016,"négliger":0.01960016,"négationnisme":0.01960016,"nécessité":0.01960016,"nouvel":0.01960016,"nombreuses":0.01960016,"niveaux":0.01960016,"neutraliser":0.01960016,"nationaux":0.01960016,"nantes":0.01960016,"m’indiquer":0.01960016,"m’exprimerai":0.01960016,"m’excusant":0.01960016,"m’adresser":0.01960016,"mélange":0.01960016,"musulmane":0.01960016,"municipale":0.01960016,"mouvant":0.01960016,"mosquées":0.01960016,"mosquée":0.01960016,"montré":0.01960016,"montez":0.01960016,"montauban":0.01960016,"moments":0.01960016,"moindre":0.01960016,"mobilisation":0.01960016,"misère":0.01960016,"missions":0.01960016,"ministère":0.01960016,"mineurs":0.01960016,"milquet":0.01960016,"milliers":0.01960016,"mienne":0.01960016,"mettent":0.01960016,"mesure":0.01960016,"mercredi":0.01960016,"menée":0.01960016,"mennucci":0.01960016,"menacés":0.01960016,"menacé":0.01960016,"menacer":0.01960016,"matériels":0.01960016,"massif":0.01960016,"martyre":0.01960016,"marseillaise":0.01960016,"marché":0.01960016,"marches":0.01960016,"manière":0.01960016,"manifesté":0.01960016,"malien":0.01960016,"malheureusement":0.01960016,"majorité":0.01960016,"maintes":0.01960016,"l’évaluation":0.01960016,"l’état":0.01960016,"l’émotion":0.01960016,"l’élément":0.01960016,"l’égard":0.01960016,"l’un":0.01960016,"l’opération":0.01960016,"l’obscurantisme":0.01960016,"l’objet":0.01960016,"l’islamisme":0.01960016,"l’intérêt":0.01960016,"l’intolérance":0.01960016,"l’intimité":0.01960016,"l’instar":0.01960016,"l’initiative":0.01960016,"l’indignation":0.01960016,"l’idée":0.01960016,"l’homme":0.01960016,"l’hommage":0.01960016,"l’histoire":0.01960016,"l’expérience":0.01960016,"l’exigence":0.01960016,"l’examen":0.01960016,"l’espère":0.01960016,"l’espace":0.01960016,"l’engagement":0.01960016,"l’encontre":0.01960016,"l’emporterait":0.01960016,"l’embrigadement":0.01960016,"l’autorité":0.01960016,"l’attente":0.01960016,"l’attaque":0.01960016,"l’approche":0.01960016,"l’appliquer":0.01960016,"l’apologie":0.01960016,"l’ancien":0.01960016,"l’afrique":0.01960016,"l’acquisition":0.01960016,"l’accepter":0.01960016,"l’abnégation":0.01960016,"légitime":0.01960016,"législatives":0.01960016,"législatifs":0.01960016,"légal":0.01960016,"lycées":0.01960016,"lumières":0.01960016,"lumière":0.01960016,"lucidité":0.01960016,"lucide":0.01960016,"longtemps":0.01960016,"libertés":0.01960016,"leçons":0.01960016,"leçon":0.01960016,"leroux":0.01960016,"lequel":0.01960016,"latron":0.01960016,"larmes":0.01960016,"laquelle":0.01960016,"lanzmann":0.01960016,"lancerons":0.01960016,"laissé":0.01960016,"laissons":0.01960016,"l'organisation":0.01960016,"l'intérieur":0.01960016,"l'image":0.01960016,"kilomètres":0.01960016,"keÏta":0.01960016,"j’étais":0.01960016,"j’avais":0.01960016,"j’appelle":0.01960016,"justes":0.01960016,"juridique":0.01960016,"juives":0.01960016,"judiciaire":0.01960016,"joëlle":0.01960016,"joué-lès-tours":0.01960016,"jeunes":0.01960016,"jean-jacques":0.01960016,"irako-syriennes":0.01960016,"intérieurs":0.01960016,"intégré":0.01960016,"intégral":0.01960016,"intransigeance":0.01960016,"intolérables":0.01960016,"interviennent":0.01960016,"interrogeant":0.01960016,"interprètes":0.01960016,"internet":0.01960016,"interdisant":0.01960016,"intellectuels":0.01960016,"insupportable":0.01960016,"insultes":0.01960016,"insuffisances":0.01960016,"inquiétude":0.01960016,"inquiets":0.01960016,"initiative":0.01960016,"informaticiens":0.01960016,"individuelles":0.01960016,"indispensables":0.01960016,"indispensable":0.01960016,"indignés":0.01960016,"inconsolable":0.01960016,"incarne":0.01960016,"inadmissibles":0.01960016,"inacceptable":0.01960016,"impérieux":0.01960016,"important":0.01960016,"implacablement":0.01960016,"immensément":0.01960016,"ignobles":0.01960016,"ici-même":0.01960016,"ibrahim":0.01960016,"hésitations":0.01960016,"humoriste":0.01960016,"historique":0.01960016,"histoire":0.01960016,"heures":0.01960016,"halimi":0.01960016,"habité":0.01960016,"généreuse":0.01960016,"générale":0.01960016,"général":0.01960016,"gravité":0.01960016,"gratitude":0.01960016,"grands":0.01960016,"grandeur":0.01960016,"globale":0.01960016,"ghettos":0.01960016,"gestes":0.01960016,"garder":0.01960016,"gagner":0.01960016,"frontière":0.01960016,"fresnes":0.01960016,"frappé":0.01960016,"frappant":0.01960016,"française":0.01960016,"fracturé":0.01960016,"fourni":0.01960016,"fortement":0.01960016,"formulées":0.01960016,"formule":0.01960016,"formes":0.01960016,"forment":0.01960016,"formation":0.01960016,"fondamentales":0.01960016,"fois-ci":0.01960016,"fichier":0.01960016,"feront":0.01960016,"façon":0.01960016,"farouche":0.01960016,"familiale":0.01960016,"faisant":0.01960016,"faible":0.01960016,"facilité":0.01960016,"exprimerons":0.01960016,"existent":0.01960016,"existe":0.01960016,"exigence":0.01960016,"exceptionnelles":0.01960016,"exceptionnelle":0.01960016,"examinés":0.01960016,"europe":0.01960016,"essentiels":0.01960016,"essence":0.01960016,"esprits":0.01960016,"envoyé":0.01960016,"entretenir":0.01960016,"entourages":0.01960016,"entendre":0.01960016,"enseigner":0.01960016,"enseignements":0.01960016,"enseignant":0.01960016,"enrichi":0.01960016,"ennemi":0.01960016,"enjeux":0.01960016,"engagés":0.01960016,"engagement":0.01960016,"enfants":0.01960016,"enceinte":0.01960016,"emportées":0.01960016,"employons":0.01960016,"emplois":0.01960016,"efforts":0.01960016,"d’éviter":0.01960016,"d’éventuels":0.01960016,"d’état":0.01960016,"d’établissements":0.01960016,"d’émotion":0.01960016,"d’émancipation":0.01960016,"d’élégance":0.01960016,"d’élite":0.01960016,"d’écouter":0.01960016,"d’universel":0.01960016,"d’un":0.01960016,"d’origine":0.01960016,"d’ordres":0.01960016,"d’opinion":0.01960016,"d’octobre":0.01960016,"d’obsèques":0.01960016,"d’israël":0.01960016,"d’investigation":0.01960016,"d’intégration":0.01960016,"d’intervention":0.01960016,"d’internet":0.01960016,"d’insolence":0.01960016,"d’information":0.01960016,"d’indifférence":0.01960016,"d’imposer":0.01960016,"d’importance":0.01960016,"d’impertinence":0.01960016,"d’ici":0.01960016,"d’exigence":0.01960016,"d’exception":0.01960016,"d’examiner":0.01960016,"d’esprit":0.01960016,"d’engager":0.01960016,"d’engagement":0.01960016,"d’avril":0.01960016,"d’armes":0.01960016,"d’application":0.01960016,"d’angélisme":0.01960016,"d’activités":0.01960016,"d’action":0.01960016,"développent":0.01960016,"détestations":0.01960016,"détenus":0.01960016,"désormais":0.01960016,"désintégration":0.01960016,"dérouler":0.01960016,"dérogeraient":0.01960016,"déposer":0.01960016,"déplacements":0.01960016,"dépasse":0.01960016,"départs":0.01960016,"démonstration":0.01960016,"démocraties":0.01960016,"démarches":0.01960016,"délits":0.01960016,"délinquants":0.01960016,"délicate":0.01960016,"décrit":0.01960016,"décrets":0.01960016,"déclarer":0.01960016,"décisions":0.01960016,"débordés":0.01960016,"drapeau":0.01960016,"dramatiquement":0.01960016,"doutez":0.01960016,"double":0.01960016,"donnons":0.01960016,"donneurs":0.01960016,"domine":0.01960016,"domicile":0.01960016,"djihadisme":0.01960016,"djihad":0.01960016,"dizaines":0.01960016,"diversifier":0.01960016,"dissimule":0.01960016,"dispositions":0.01960016,"disposition":0.01960016,"dispositifs":0.01960016,"disposer":0.01960016,"dispensée":0.01960016,"disons-le":0.01960016,"disent":0.01960016,"discrète":0.01960016,"disais":0.01960016,"différentes":0.01960016,"difficiles":0.01960016,"difficile":0.01960016,"devront":0.01960016,"deuxième":0.01960016,"dernières":0.01960016,"demeurent":0.01960016,"demandons":0.01960016,"debout":0.01960016,"damien":0.01960016,"d'être":0.01960016,"d'étudier":0.01960016,"d'engagement":0.01960016,"d'autres":0.01960016,"c’était":0.01960016,"c’est-à-dire":0.01960016,"cérémonie":0.01960016,"céder":0.01960016,"cyberattaques":0.01960016,"curieuse":0.01960016,"culture":0.01960016,"cultes":0.01960016,"créés":0.01960016,"créé":0.01960016,"créteil":0.01960016,"créer":0.01960016,"création":0.01960016,"cruelle":0.01960016,"croyances":0.01960016,"croyance":0.01960016,"criminelles":0.01960016,"coûteux":0.01960016,"coïncidence":0.01960016,"coopération":0.01960016,"conviction":0.01960016,"contrôler":0.01960016,"continuons":0.01960016,"contact":0.01960016,"consécutifs":0.01960016,"consultation":0.01960016,"considérés":0.01960016,"conservatisme":0.01960016,"conquête":0.01960016,"connues":0.01960016,"connue":0.01960016,"connaître":0.01960016,"connaitre":0.01960016,"connaissent":0.01960016,"connaissance":0.01960016,"congé":0.01960016,"confrères":0.01960016,"confronté":0.01960016,"confrontations":0.01960016,"conflit":0.01960016,"confirmé":0.01960016,"confessionnelles":0.01960016,"confession":0.01960016,"conditions":0.01960016,"condamnés":0.01960016,"condamnées":0.01960016,"concordance":0.01960016,"concerné":0.01960016,"concerner":0.01960016,"concentré":0.01960016,"compétences":0.01960016,"compte":0.01960016,"comprends":0.01960016,"complices":0.01960016,"compatibles":0.01960016,"compassion":0.01960016,"combattre":0.01960016,"collèges":0.01960016,"collectivités":0.01960016,"collectivement":0.01960016,"cohérent":0.01960016,"claude":0.01960016,"clamer":0.01960016,"clairement":0.01960016,"claire":0.01960016,"citoyens":0.01960016,"ciotti":0.01960016,"cimetière":0.01960016,"choses":0.01960016,"choisir":0.01960016,"chevillée":0.01960016,"chercheurs":0.01960016,"charlie":0.01960016,"charge":0.01960016,"changé":0.01960016,"chacune":0.01960016,"certes":0.01960016,"cercueils":0.01960016,"centrale":0.01960016,"catégorique":0.01960016,"capitales":0.01960016,"capitale":0.01960016,"calendrier":0.01960016,"cacher":0.01960016,"budgétaires":0.01960016,"budgets":0.01960016,"briser":0.01960016,"bravoure":0.01960016,"boubacar":0.01960016,"bondées":0.01960016,"boiteux":0.01960016,"blessés":0.01960016,"blasphème":0.01960016,"bienveillant":0.01960016,"besoins":0.01960016,"beauvau":0.01960016,"beaucoup":0.01960016,"battre":0.01960016,"battons":0.01960016,"bataille":0.01960016,"bastions":0.01960016,"basculer":0.01960016,"basculent":0.01960016,"barkhane":0.01960016,"barbarie":0.01960016,"baisser":0.01960016,"aériens":0.01960016,"automne":0.01960016,"aurons":0.01960016,"auprès":0.01960016,"aumôniers":0.01960016,"aujourd’hui":0.01960016,"augmenté":0.01960016,"auditionnés":0.01960016,"au-delà":0.01960016,"attentif":0.01960016,"attendue":0.01960016,"attaques":0.01960016,"attaquer":0.01960016,"attaque":0.01960016,"attachement":0.01960016,"assurée":0.01960016,"assurent":0.01960016,"associées":0.01960016,"assemblée":0.01960016,"assassinés":0.01960016,"assassiné":0.01960016,"ardent":0.01960016,"arborons":0.01960016,"appuyer":0.01960016,"apporté":0.01960016,"apporte":0.01960016,"application":0.01960016,"antisémites":0.01960016,"antimusulmans":0.01960016,"anti-terroriste":0.01960016,"anonymes":0.01960016,"anciens":0.01960016,"analystes":0.01960016,"amélioré":0.01960016,"amplifier":0.01960016,"alliés":0.01960016,"africains":0.01960016,"afghano-pakistanaise":0.01960016,"affront":0.01960016,"affectés":0.01960016,"affecterons":0.01960016,"affaires":0.01960016,"adressé":0.01960016,"adopter":0.01960016,"administrative":0.01960016,"adaptées":0.01960016,"actions":0.01960016,"acheter":0.01960016,"accès":0.01960016,"accueillir":0.01960016,"accroître":0.01960016,"accomplir":0.01960016,"accomplie":0.01960016,"accompagner":0.01960016,"acceptent":0.01960016,"acceptable":0.01960016,"absence":0.01960016,"aborder":0.01960016,}; function drawWordCloud(rescale) { width = 1200; height = 1200; /* Impact is more visual for our purpose */ fontFamily = "Impact"; var fill = d3.scale.category20(); d3.layout.cloud().size([width, height]) .words(Object.keys(words).map(function(d) { return { text: d, size: 7 + words[d] * rescale }; })) .padding(5) .rotate(function() { // return ~~(Math.random() * 2) * 90; return 0; }) .font(fontFamily) .fontSize(function(d) { return d.size; }) .on("end", draw) .start(); function draw(words) { d3.select("#word-cloud").append("svg") .attr("width", width) .attr("height", height) .append("g") .attr("transform", "translate(" + width / 2 + ", " + height / 2 + ")") .selectAll("text") .data(words) .enter().append("text") .style("font-size", function(d) { return d.size + "px"; }) .style("font-family", fontFamily) .style("fill", function(d, i) { return fill(i); }) .attr("text-anchor", "middle") .attr("transform", function(d) { return "translate(" + [d.x, d.y] + ")rotate(" + d.rotate + ")"; }) .text(function(d) { return d.text; }); } } drawWordCloud(250); </script> </body> </html> |
Discours 2 : Discours du Premier ministre à Beauvais (Oise) sur la sécurité
<!doctype html> <meta charset="utf-8"> <head> </head> <body> <script src="../lib/jquery/jquery-1.11.1.min.js"></script> <script src="../lib/d3/d3.js"></script> <script src="../d3.layout.cloud.js"></script> <div style="padding: 5px;" id="word-cloud"></div> <script> var words = {"sécurité":0.84876543,"c’est":0.77160494,"contre":0.54012346,"résultats":0.42438272,"délinquance":0.42438272,"forces":0.38580247,"souvent":0.30864198,"justice":0.30864198,"police":0.27006173,"l’ordre":0.27006173,"depuis":0.27006173,"cambriolages":0.27006173,"violence":0.23148148,"travail":0.23148148,"messieurs":0.23148148,"l’etat":0.23148148,"gendarmerie":0.23148148,"français":0.23148148,"œuvre":0.19290123,"violences":0.19290123,"victimes":0.19290123,"république":0.19290123,"prévention":0.19290123,"policiers":0.19290123,"nombre":0.19290123,"moyens":0.19290123,"l’on":0.19290123,"l’intérieur":0.19290123,"gendarmes":0.19290123,"délinquants":0.19290123,"confiance":0.19290123,"conditions":0.19290123,"cazeneuve":0.19290123,"bernard":0.19290123,"armée":0.19290123,"société":0.15432099,"saluer":0.15432099,"résidences":0.15432099,"publique":0.15432099,"pragmatique":0.15432099,"monsieur":0.15432099,"mesdames":0.15432099,"l’action":0.15432099,"j’ai":0.15432099,"gouvernement":0.15432099,"encore":0.15432099,"d’un":0.15432099,"d’agir":0.15432099,"derniers":0.15432099,"sommes":0.11574074,"réalité":0.11574074,"renforcer":0.11574074,"qu’ils":0.11574074,"prioritaire":0.11574074,"principales":0.11574074,"phénomènes":0.11574074,"permettre":0.11574074,"particulièrement":0.11574074,"obtenus":0.11574074,"ministre":0.11574074,"l’oise":0.11574074,"l’insécurité":0.11574074,"l’ensemble":0.11574074,"lutter":0.11574074,"locaux":0.11574074,"garantir":0.11574074,"efficacement":0.11574074,"d’abord":0.11574074,"devons":0.11574074,"concitoyens":0.11574074,"combat":0.11574074,"citoyens":0.11574074,"chaque":0.11574074,"avoirs":0.11574074,"autant":0.11574074,"augmenté":0.11574074,"approche":0.11574074,"était":0.07716049,"également":0.07716049,"vidéo-protection":0.07716049,"toutes":0.07716049,"territoires":0.07716049,"terrain":0.07716049,"surtout":0.07716049,"stratégies":0.07716049,"statistique":0.07716049,"seules":0.07716049,"services":0.07716049,"service":0.07716049,"septembre":0.07716049,"sentiment":0.07716049,"saisie":0.07716049,"républicain":0.07716049,"répression":0.07716049,"répondre":0.07716049,"réformes":0.07716049,"rÉsultats":0.07716049,"risques":0.07716049,"retour":0.07716049,"quartiers":0.07716049,"publics":0.07716049,"président":0.07716049,"progrès":0.07716049,"procureurs":0.07716049,"première":0.07716049,"pouvons":0.07716049,"portent":0.07716049,"peuvent":0.07716049,"personnes":0.07716049,"permettent":0.07716049,"nécessite":0.07716049,"nécessaires":0.07716049,"notamment":0.07716049,"niveau":0.07716049,"montée":0.07716049,"missions":0.07716049,"mission":0.07716049,"ministère":0.07716049,"matière":0.07716049,"marquée":0.07716049,"malgré":0.07716049,"madame":0.07716049,"l’uniforme":0.07716049,"l’implication":0.07716049,"l’engagement":0.07716049,"l’efficacité":0.07716049,"l’année":0.07716049,"lourdes":0.07716049,"jamais":0.07716049,"implique":0.07716049,"habitants":0.07716049,"grande":0.07716049,"gauche":0.07716049,"féliciter":0.07716049,"frappe":0.07716049,"financier":0.07716049,"filières":0.07716049,"femmes":0.07716049,"familles":0.07716049,"efforts":0.07716049,"d’une":0.07716049,"d’habitude":0.07716049,"département":0.07716049,"démontrent":0.07716049,"démocratie":0.07716049,"démarche":0.07716049,"domaine":0.07716049,"doivent":0.07716049,"dissuasion":0.07716049,"dispositifs":0.07716049,"dispositif":0.07716049,"diminué":0.07716049,"difficiles":0.07716049,"dernier":0.07716049,"demeure":0.07716049,"c’est-à-dire":0.07716049,"criminels":0.07716049,"criminelles":0.07716049,"crapuleuses":0.07716049,"conséquences":0.07716049,"confisqués":0.07716049,"confiscation":0.07716049,"chiffres":0.07716049,"chercher":0.07716049,"certains":0.07716049,"capital":0.07716049,"budget":0.07716049,"beaucoup":0.07716049,"attentes":0.07716049,"associant":0.07716049,"années":0.07716049,"année":0.07716049,"agissent":0.07716049,"adaptées":0.07716049,"action":0.07716049,"acteurs":0.07716049,"accomplies":0.07716049,"évolution":0.03858025,"évoluer":0.03858025,"éviter":0.03858025,"études":0.03858025,"étroit":0.03858025,"établir":0.03858025,"équipes":0.03858025,"éprouvantes":0.03858025,"élèvent":0.03858025,"élargir":0.03858025,"économique":0.03858025,"échéant":0.03858025,"âgées":0.03858025,"véritable":0.03858025,"voyons":0.03858025,"voulons":0.03858025,"voitures":0.03858025,"vivent":0.03858025,"violentes":0.03858025,"vigilance":0.03858025,"viendront":0.03858025,"vertueux":0.03858025,"veillé":0.03858025,"veillant":0.03858025,"valeurs":0.03858025,"urbaines":0.03858025,"unités":0.03858025,"témoins":0.03858025,"trouvant":0.03858025,"troisième":0.03858025,"travers":0.03858025,"travaillent":0.03858025,"traumatismes":0.03858025,"traumatisme":0.03858025,"tranquillité":0.03858025,"traiter":0.03858025,"trafics":0.03858025,"traduit":0.03858025,"toujours":0.03858025,"touche":0.03858025,"totale":0.03858025,"tomber":0.03858025,"territoire":0.03858025,"s’introduire":0.03858025,"s’attaquer":0.03858025,"s’agit":0.03858025,"s’agissant":0.03858025,"sénatrice-maire":0.03858025,"sénateur":0.03858025,"sécurisation":0.03858025,"sÉcuritÉ":0.03858025,"systématiquement":0.03858025,"systèmes":0.03858025,"symbolique":0.03858025,"supprimés":0.03858025,"supplémentaires":0.03858025,"structurées":0.03858025,"statistiques":0.03858025,"souhaite":0.03858025,"sociale":0.03858025,"slogan":0.03858025,"simple":0.03858025,"significatifs":0.03858025,"signal":0.03858025,"servir":0.03858025,"seront":0.03858025,"serait":0.03858025,"sensibles":0.03858025,"sensibilisation":0.03858025,"semaines":0.03858025,"secondaires":0.03858025,"savons":0.03858025,"savoir":0.03858025,"satisfaire":0.03858025,"sapeurs-pompiers":0.03858025,"sanction":0.03858025,"saisis":0.03858025,"saisir":0.03858025,"saisies":0.03858025,"révéler":0.03858025,"résoudre":0.03858025,"répétées":0.03858025,"réponses":0.03858025,"réparation":0.03858025,"régulière":0.03858025,"régler":0.03858025,"régional":0.03858025,"régime":0.03858025,"réforme":0.03858025,"réalisation":0.03858025,"rÉfÉrence":0.03858025,"reversé":0.03858025,"revendus":0.03858025,"revanche":0.03858025,"restaurer":0.03858025,"reposer":0.03858025,"repose":0.03858025,"renforçant":0.03858025,"renforcées":0.03858025,"renforcÉs":0.03858025,"relâche":0.03858025,"regarder":0.03858025,"redoubler":0.03858025,"reculé":0.03858025,"recrutés":0.03858025,"recouvrement":0.03858025,"reconstruit":0.03858025,"reconnaisse":0.03858025,"reconnaissante":0.03858025,"reconnaissances":0.03858025,"rassemblement":0.03858025,"rassemble":0.03858025,"rappeler":0.03858025,"rappel":0.03858025,"racket":0.03858025,"qu’on":0.03858025,"qu’est":0.03858025,"quotidien":0.03858025,"questionner":0.03858025,"question":0.03858025,"publiques":0.03858025,"public":0.03858025,"préservé":0.03858025,"présence":0.03858025,"préfet":0.03858025,"précisément":0.03858025,"précis":0.03858025,"protéger":0.03858025,"protègent":0.03858025,"propre":0.03858025,"projet":0.03858025,"progresser":0.03858025,"profond":0.03858025,"professionnels":0.03858025,"produit":0.03858025,"procédures":0.03858025,"procès":0.03858025,"proche":0.03858025,"problèmes":0.03858025,"privée":0.03858025,"priver":0.03858025,"prises":0.03858025,"prioritaires":0.03858025,"prioritairement":0.03858025,"prennent":0.03858025,"premiers":0.03858025,"pragmatiques":0.03858025,"pouvoirs":0.03858025,"poursuivre":0.03858025,"pourraient":0.03858025,"pourquoi":0.03858025,"postes":0.03858025,"possibilités":0.03858025,"porter":0.03858025,"polémiques":0.03858025,"polices":0.03858025,"pointe":0.03858025,"plusieurs":0.03858025,"pertinence":0.03858025,"persévérer":0.03858025,"personne":0.03858025,"pensons":0.03858025,"penser":0.03858025,"patrouilles":0.03858025,"patrimoine":0.03858025,"passant":0.03858025,"partir":0.03858025,"partenariat":0.03858025,"partenaires":0.03858025,"paient":0.03858025,"obtient":0.03858025,"obtenons":0.03858025,"objectifs":0.03858025,"objectif":0.03858025,"n’oublie":0.03858025,"n’ont":0.03858025,"n’est":0.03858025,"n’accepte":0.03858025,"nécessitent":0.03858025,"nuisent":0.03858025,"nouvelles":0.03858025,"nouvelle":0.03858025,"notable":0.03858025,"nationaux":0.03858025,"national":0.03858025,"nation":0.03858025,"métiers":0.03858025,"méthodes":0.03858025,"méthode":0.03858025,"municipales":0.03858025,"municipale":0.03858025,"moment":0.03858025,"moi-même":0.03858025,"modestes":0.03858025,"ministères":0.03858025,"militaires":0.03858025,"mettre":0.03858025,"mettons":0.03858025,"mettent":0.03858025,"mettant":0.03858025,"mesures":0.03858025,"mesurer":0.03858025,"menons":0.03858025,"meilleures":0.03858025,"matiÈre":0.03858025,"matinée":0.03858025,"manière":0.03858025,"maintien":0.03858025,"l’élucidation":0.03858025,"l’outil":0.03858025,"l’oublie":0.03858025,"l’organisation":0.03858025,"l’intimité":0.03858025,"l’interpellation":0.03858025,"l’insee":0.03858025,"l’hôtel":0.03858025,"l’hémorragie":0.03858025,"l’honneur":0.03858025,"l’heure":0.03858025,"l’explosion":0.03858025,"l’esprit":0.03858025,"l’espace":0.03858025,"l’autorité":0.03858025,"l’ampleur":0.03858025,"l’ai":0.03858025,"l’agence":0.03858025,"l’affaire":0.03858025,"l’acharnement":0.03858025,"légal":0.03858025,"lorsque":0.03858025,"longtemps":0.03858025,"logement":0.03858025,"lisible":0.03858025,"libertés":0.03858025,"lequel":0.03858025,"laxiste":0.03858025,"justice)":0.03858025,"judicieux":0.03858025,"jeunes":0.03858025,"itinérante":0.03858025,"investissements":0.03858025,"inversé":0.03858025,"inutiles":0.03858025,"interministériel":0.03858025,"intercommunales":0.03858025,"insécurité":0.03858025,"innovantes":0.03858025,"initiées":0.03858025,"initiatives":0.03858025,"indépendance":0.03858025,"industriels":0.03858025,"individus":0.03858025,"indispensable":0.03858025,"incitatif":0.03858025,"incapable":0.03858025,"inauguré":0.03858025,"importantes":0.03858025,"immédiate…":0.03858025,"immobiliers":0.03858025,"idées":0.03858025,"hommes":0.03858025,"hausse":0.03858025,"généraux":0.03858025,"guidé":0.03858025,"gestion":0.03858025,"france":0.03858025,"fragiles":0.03858025,"fortement":0.03858025,"formes":0.03858025,"fondements":0.03858025,"fonctionnent":0.03858025,"fonctionnaires":0.03858025,"finances":0.03858025,"fiabilisation":0.03858025,"fermeté":0.03858025,"favorisés":0.03858025,"faibles":0.03858025,"facteurs":0.03858025,"facilité":0.03858025,"exposés":0.03858025,"existe":0.03858025,"exemple":0.03858025,"excellents":0.03858025,"evidemment":0.03858025,"essentiels":0.03858025,"essentiel":0.03858025,"envoyer":0.03858025,"envers":0.03858025,"enregistrés":0.03858025,"enjeux":0.03858025,"engagé":0.03858025,"enfants":0.03858025,"encourageants":0.03858025,"empêcher":0.03858025,"emploient":0.03858025,"emparés":0.03858025,"effectifs":0.03858025,"d’élucidation":0.03858025,"d’outils":0.03858025,"d’obtenir":0.03858025,"d’investigation":0.03858025,"d’insécurité":0.03858025,"d’identité":0.03858025,"d’exercice":0.03858025,"d’enregistrements":0.03858025,"d’en":0.03858025,"d’efforts":0.03858025,"d’autre":0.03858025,"d’autant":0.03858025,"d’attaques":0.03858025,"d’ailleurs":0.03858025,"d’activités":0.03858025,"d’action":0.03858025,"d’accueil":0.03858025,"dévouement":0.03858025,"déterminée":0.03858025,"détermination":0.03858025,"déployé":0.03858025,"dépassant":0.03858025,"démontrons":0.03858025,"démontre":0.03858025,"démenti":0.03858025,"délinquant":0.03858025,"délictuelles":0.03858025,"déjà":0.03858025,"définitive":0.03858025,"définis":0.03858025,"dédommager":0.03858025,"décisions":0.03858025,"décision":0.03858025,"décennie":0.03858025,"début":0.03858025,"débats":0.03858025,"dÉlinquance":0.03858025,"durée":0.03858025,"durable":0.03858025,"drogue":0.03858025,"donner":0.03858025,"domaine-là":0.03858025,"diversité":0.03858025,"disait":0.03858025,"directeurs":0.03858025,"diminution":0.03858025,"dimensions":0.03858025,"différentes":0.03858025,"difficulté":0.03858025,"devrait":0.03858025,"devenir":0.03858025,"devant":0.03858025,"deuxième":0.03858025,"dernières":0.03858025,"c’était":0.03858025,"culpabilité":0.03858025,"créent":0.03858025,"crédibilité":0.03858025,"création":0.03858025,"critique":0.03858025,"couvrir":0.03858025,"courbé":0.03858025,"courage":0.03858025,"coproduction":0.03858025,"coopération":0.03858025,"conçoit":0.03858025,"contribué":0.03858025,"contribuent":0.03858025,"contribue":0.03858025,"contraints":0.03858025,"continuera":0.03858025,"continuer":0.03858025,"contextes":0.03858025,"construire":0.03858025,"constatés":0.03858025,"conseil":0.03858025,"connaissez":0.03858025,"connais":0.03858025,"conformément":0.03858025,"confiscations":0.03858025,"concrètement":0.03858025,"concernés":0.03858025,"concerner":0.03858025,"concernant":0.03858025,"comprennent":0.03858025,"comprendre":0.03858025,"compatriotes":0.03858025,"commissariats":0.03858025,"commis":0.03858025,"commerciaux":0.03858025,"combien":0.03858025,"combattre":0.03858025,"cohérente":0.03858025,"clivages":0.03858025,"claires":0.03858025,"cinglant":0.03858025,"ciblant":0.03858025,"choses":0.03858025,"changer":0.03858025,"chacun":0.03858025,"celles":0.03858025,"cartographique":0.03858025,"cambriolées":0.03858025,"cambriolage":0.03858025,"bénéfice":0.03858025,"budgets":0.03858025,"brigades":0.03858025,"blessés":0.03858025,"besoins":0.03858025,"beauvais":0.03858025,"baissé":0.03858025,"baisse":0.03858025,"avaient":0.03858025,"auxquelles":0.03858025,"auprès":0.03858025,"attaqués":0.03858025,"attaques":0.03858025,"assurées":0.03858025,"associe":0.03858025,"aspirent":0.03858025,"arrêtés":0.03858025,"armÉe":0.03858025,"après":0.03858025,"apporté":0.03858025,"anti-vol":0.03858025,"anti-cambriolages":0.03858025,"année-là":0.03858025,"angélique":0.03858025,"améliorer":0.03858025,"améliorant":0.03858025,"allés":0.03858025,"agressions":0.03858025,"agissant":0.03858025,"agents":0.03858025,"affecte":0.03858025,"adoptée":0.03858025,"administrative":0.03858025,"actuel":0.03858025,"activités":0.03858025,"accroître":0.03858025,"(police":0.03858025,"(agrasc)":0.03858025}; function drawWordCloud(rescale) { width = 1200; height = 1200; /* Impact is more visual for our purpose */ fontFamily = "Impact"; var fill = d3.scale.category20(); d3.layout.cloud().size([width, height]) .words(Object.keys(words).map(function(d) { return { text: d, size: 7 + words[d] * rescale }; })) .padding(5) .rotate(function() { // return ~~(Math.random() * 2) * 90; return 0; }) .font(fontFamily) .fontSize(function(d) { return d.size; }) .on("end", draw) .start(); function draw(words) { d3.select("#word-cloud").append("svg") .attr("width", width) .attr("height", height) .append("g") .attr("transform", "translate(" + width / 2 + ", " + height / 2 + ")") .selectAll("text") .data(words) .enter().append("text") .style("font-size", function(d) { return d.size + "px"; }) .style("font-family", fontFamily) .style("fill", function(d, i) { return fill(i); }) .attr("text-anchor", "middle") .attr("transform", function(d) { return "translate(" + [d.x, d.y] + ")rotate(" + d.rotate + ")"; }) .text(function(d) { return d.text; }); } } drawWordCloud(250); </script> </body> </html> |
En savoir plus
- Le site officiel de D3, Data-Driven Documents
http://d3js.org/ - Un site de ressources sur la data visualisation : Visualising Data
http://www.visualisingdata.com/index.php/resources/ - The Journalist’s Toolbox
http://www.journaliststoolbox.org/ - The mbostock’s blocks
http://bl.ocks.org/mbostock - La galerie D3
https://github.com/mbostock/d3/wiki/Gallery - Les différents types de JSON (10 Example JSON Files)
http://www.sitepoint.com/10-example-json-files/ - Un script bien utile sur l’ analyse de fréquence d’apparition des mots
http://abs.traduc.org/abs-5.3-fr/ch15s04.html - Un certain nombre de discours et de rapports du gouvernement français
http://www.gouvernement.fr/discours-et-rapports - U.S. Census offre, via son API, le plus grand nombre de données possibles sur la population et l’économie américaine.
http://www.census.gov/ - Quelques projets intéressants et aboutis basés sur D3
http://exploringdata.github.io/tags/d3/ - Create dynamic Word Cloud using d3.js
http://stackoverflow.com/questions/26881137/create-dynamic-word-cloud-using-d3-js - D3 Word Cloud with PubNub History API Demo
https://github.com/pubnub/d3-wordcloud - Topic Clouds using D3 Word Cloud Layout
https://gist.github.com/emeeks/3361332 - Permit Description Word Cloud
http://axtheset.github.io/grand-rapids-civicdata/wordcloud.html - Building a Word Cloud Using D3.js for Data Analysis with CivicData
http://devblog.accela.com/2015/03/18/building-a-word-cloud-using-d3-js-for-data-analysis-with-civicdata/ - Très intéressant : Visualizing Philosophers And Scientists By The Words They Used With Python and d3.js
http://sahandsaba.com/visualizing-philosophers-and-scientists-by-the-words-they-used-with-d3js-and-python.html - Experiment with interactive wordcloud of #smwgla Twitter community profile descriptions (making a JSON query on Google Spreadsheet data)
https://mashe.hawksey.info/2012/09/experiment-with-interactive-wordcloud-of-smwgla-twitter-community-profile-descriptions/ - Régions, départements et communes métropolitaines françaises au format GeoJSON
https://github.com/gregoiredavid/france-geojson - GeoFLA & D3.js : carte interactive des départements français
http://lookingfora.name/2013/06/14/geofla-d3-js-carte-interactive-des-departements-francais/