Skip to content

Instantly share code, notes, and snippets.

💭
Doing digital humanities

Yannick Rochat yrochat

💭
Doing digital humanities
Block or report user

Report or block yrochat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View fifa.csv
We can make this file beautiful and searchable if this error is corrected: Any value after quoted field isn't allowed in line 1.
"journal";"note";"auteur";"url";"annee";"texte"
"gamekult";"70";"puyo";"http://www.gamekult.com/jeux/test-fifa-17-SU3050706473t.html#ps4";"2017";"Si vous avez un tant soit peu suivi l'actualité de FIFA 17 depuis son annonce, vous savez déjà qu'il ne s'agit pas d'un FIFA +1 comme il en paraît chaque année. Pour ce millésime 2016, la simu d'EA Sports fait peau neuve en se dotant d'un nouveau moteur, le Frostbite cher à Battlefield, histoire de se mettre à niveau tout en bénéficiant des améliorations régulières apportées par les ingénieurs maison. Forcément, qui dit nouveau moteur sous-entend une liste considérable de changements et de petits ajustements, pour ne pas dire de concessions ; Konami avait d'ailleurs essuyé les plâtres il y a quelques années en osant le pari du Fox Engine, qui a longtemps tâtonné avant de parvenir à un compromis satisfaisant en 2016. FIFA 17 saura-t-il trouver la bonne formule dès le coup d'envoi ? \n Si l'on se place du point de vue dév, FIFA 17 tient du petit exploit. Même si le pr
@yrochat
yrochat / fifa.R
Last active Mar 25, 2019
The code for article #20 on my blog (about FIFA)
View fifa.R
rm(list=ls())
library(readr) # importation
library(RTextTools) # classification de textes
library(textreuse) # plagiat
library(tm) # text mining
library(ggplot2) # visualisations
library(lsa) # latent semantic analysis
library(stringr) # manipulation de chaines de caractères
@yrochat
yrochat / dist_eucl.csv
Created Oct 5, 2016
These are distances between articles (see my blog, post #20 about FIFA).
View dist_eucl.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 41 columns, instead of 35. in line 1.
"","puyo_17","puyo_16","puyo_15","puyo_14","puyo_13","puyo_12","puyo_11","puyo_10","puyo_09","puyo_08","puyo_07","puyo_06","puyo_05","puyo_04","puyo_03","akouel_02","anark_01","karaaj_17","karaaj_16","anagund_15","karaaj_14","anagund_13","rivaol_12","rivaol_11","rivaol_10","rivaol_09","rivaol_08","rivaol_07","rivaol_06","jihem_05","jihem_04","pilou_03","pilou_02","anonyme_01","mathieu_17","gianni_17","sharouda_17","absalon_17","de_caro_17","budry_carbo_17"
"puyo_17",0,60.1414998150196,62.8887907341205,58.4037670017954,60.522723005496,63.4428877022476,62.88083968905,59.2705660509498,62.2494979899437,62.1288982680363,64.55230437405,63.9296488336984,58.5491246732178,65.4140657657052,61.5060972587271,65.8634952003004,70.2780193232564,64.6065012208524,67.1192967781993,63.3798075099633,68.1909084849293,66.9253315270085,69.28924880528,69.2531587727231,69.0362223763728,65.6962708226274,65.7267069006199,64.7919748117003,63.7808748764079,66.873013989202,69.6778300465794,67.4907401055878,72.6498451478047,72.152616030189
View unicode.R
library(rvest)
library(xml2)
library(stringr)
library(lubridate)
library(ggplot2)
unicode.html <- read_html("https://en.wikipedia.org/wiki/Unicode")
unicode.df <- html_table(xml_find_one(unicode.html, "//*[@id='mw-content-text']/table[4]"), fill = T)[-1,]
colnames(unicode.df)[c(6,7)] <- c("Total", "Notable additions")
@yrochat
yrochat / allgames.R
Created Jan 21, 2016
Extract from the Mobygames db the number of video games per year
View allgames.R
url <- "http://www.mobygames.com/browse/games/"
years <- as.character(1971:2015)
# library(plyr)
# l_ply(years, function(x) dir.create(str_c("allgames/", x, "/")))
library(rvest)
library(stringr)
View index.html
<!DOCTYPE html>
<!-- Initial code was (long ago) 04_force.html by Scott Murray -->
<html lang="en">
<head>
<meta charset="utf-8">
<title>Network transition</title>
<script src="https://cdn.rawgit.com/maladesimaginaires/intnetviz/master/include/js/d3.v3.js" charset="utf-8"></script>
<script src="https://cdn.rawgit.com/maladesimaginaires/intnetviz/master/include/js/d3.slider.js" charset="utf-8"></script>
<link rel="stylesheet" href="https://cdn.rawgit.com/maladesimaginaires/intnetviz/master/include/css/d3.slider.css" />
<link rel="stylesheet" href="https://cdn.rawgit.com/maladesimaginaires/intnetviz/master/include/css/styles.css" />
View index.html
<!DOCTYPE html>
<!-- Initial code was (long ago) 04_force.html by Scott Murray -->
<html lang="en">
<head>
<meta charset="utf-8">
<title>Network transition</title>
<script src="https://cdn.rawgit.com/maladesimaginaires/intnetviz/master/include/js/d3.v3.js" charset="utf-8"></script>
<script src="https://cdn.rawgit.com/maladesimaginaires/intnetviz/master/include/js/d3.slider.js" charset="utf-8"></script>
<link rel="stylesheet" href="https://cdn.rawgit.com/maladesimaginaires/intnetviz/master/include/css/d3.slider.css" />
<link rel="stylesheet" href="https://cdn.rawgit.com/maladesimaginaires/intnetviz/master/include/css/styles.css" />
@yrochat
yrochat / CH_public_spending.csv
Last active Aug 31, 2015
Public spending for education and in total in Switzerland
View CH_public_spending.csv
Dépenses totales en milliers de francs Dépenses totales en francs par habitant Dépenses totales en francs par habitant Dépenses d'éducation en milliers de francs Dépenses d'éducation en francs par habitant Dépenses d'éducation en francs par habitant Pourcentage
Zurich 21235238 58469 16505 6290164 15919 4466 29.6
Berne 14420559 49497 13887 3769395 13648 3797 26.1
Lucerne 4567436 36992 11602 1387554 11584 3594 30.4
Uri 488755 45597 13747 112840 10643 3161 23.1
Schwyz 1667038 37325 10976 436568 10032 2914 26.2
Obwald 460599 44071 13477 116891 10717 3237 25.4
Nidwald 452261 44270 12575 131104 11207 3153 29
Glaris 456347 38949 11853 125035 10584 3176 27.4
Zoug 1855086 56970 16110 480909 14730 4125 25.9
@yrochat
yrochat / README.md
Created May 6, 2015
Network Transition v.0.0.1
View README.md

Contexte

La toute première étape d'un système de visualisation dynamique (temporelle) de réseaux.

View auth.R
rm(list=ls())
library(twitteR)
library(httr)
# 1. Find OAuth settings for twitter:
# https://dev.twitter.com/docs/auth/oauth
oauth_endpoints("twitter")
Sys.setenv(TWITTER_CONSUMER_SECRET = "")
You can’t perform that action at this time.