Repair a pandoc-generated LaTeX table with R

Pandoc is a great piece of software but it is not always kind to HTML tables when converting to LaTeX. Especially tables containing <tr> elements with rowspan or <td> elements with colspan attributes end up as sequences of lines of text, not embedded in a table environment like longtableand devoid of both line endings (\\) […]

Text Mining: Detect Strings: Very Fast Word Lookup in a Large Dictionary in R with data.table and matrixStats

Looking up words in dictionaries is the alpha and omega of text mining. I am, for instance interested to know whether a given word from a large dictionary (>100k words) occurs in a sentence or not, for a list of over 1M sentences. The best take at this task is using the Julia language, but […]

Premiers pas avec R et RStudio

Cet exercice a pour préalable d’avoir installé R et RStudio. Se familiariser avec l’interface Ouvrez RStudio. Vous devriez voir l’interface comme à l’image ci-dessous, pour l’heure sans la partie A. La partie C est en principe vide: Les fonctions de ces différentes parties sont les suivantes: Exécutez des lignes de codes dans la console (B) […]

Visualiser des réseaux géographiques

Les réseaux sont “l’autre” espace géographique, souvent négligés dans les approches classiques trop focalisées sur l’espace topographique des étendues euclidiennes des surfaces projetées du globe. Dans cet exercice, nous allons examiner comment les réseaux peuvent être formalisés sous formes de données informatiques et comment ces dernières peuvent être analysés visuellement. La notion mathématique de graphe, […]

Installer R et RStudio comme logiciels indépendants

R est un langage de programmation. Pour que les programmes écrits en R fonctionnent, il est nécessaire d’installer au préalable un environnement d’exécution pour ce langage. RStudio est un environnement de développement (en anglais: IDE: Integrated development environment) pour R. Installer l’environnement d’exécution du langage de programmation R Vous pouvez installer R et RStudio comme […]

Installer Orange Data Mining avec Miniconda

Installer Miniconda Conda est disponible en deux versions : Miniconda et Anaconda. Miniconda n’inclut que les modules essentiels au premier téléchargement. Anaconda est plus complet et vous évite peut-être des téléchargements ultérieurs, mais pèse 4Go sur votre disque dur… Pour macOS Suivre les instructions sur https://conda.io/docs/user-guide/install/macos.html. Vous pouvez ignorer la partie consacrée à l’installation silencieuse […]

Create a subgraph from the neighborhood of specific vertices in igraph

Many user of igraph for R expect the functions ego() and make_ego_graph() , that take a list of vertices as input, to generate a new graph composed of the neighbors of these vertices. Unfortunately, these functions do no such thing. They generate a list of igraph.vs objects, which cannot be further treated as an igraph […]

GéoRécits3D : mapping journeys and shared places in a space-time aquarium

Spatial mobility always involves at least two types of distances: the topographical distance traveled on the surface of the Earth and the time distance taken to do so. GéoRécits3D allows you to map both in a “space-time aquarium” (a cuboid with one dimension dedicated to time). It is written using HTML5 and JavaScript, and uses […]

GéoRécits – an application for mapping journeys and lived spaces

GéoRécits allows you to map interviews pertaining to individuals’ mobility. You can compare individual travel journeys made by several individuals and leading to a common final destination – useful in the analysis of migrations – or analyse travel patterns accomlished for a given duration of time. The two functions of GéoRécits GéoRécits produces three types […]

Dymaxion world map with proportional circles and automatic legend in D3.js v5

The legend for proportional circles sizes is drawn automatically. Reprojectiong on the fly from WGS84 to the newly available AirOcean (Dymaxion projection) in D3v5. Example data: number of political reports sent by Swiss embasies to Bern in all languages and in French specifically betwee 1920 annd 1960. Basemaps are from here. Running D3 version of […]