Archives de catégorie : R-EN

Blog posts in english

Cartographic Explorations of the OpenStreetMap Database with R

This post exposes some cartographic explorations of the OpenStreetMap (OSM) database with R.
These explorations begin with the downloading and the cleaning of OSM data. Then I propose a set of map visualizations of the spatial distributions of bars and restaurants in Paris. Of course, these examples could be adapted to other spatial contexts and thematics (e.g. pharmacies in Roma, bike parkings in Dublin…).

This reproducible analysis is hosted on GitHub (code + data + walk-through).

The osmdata package from rOpenSci is used to download OSM data.

The cleaning is a rather manual task done thanks to the sf package.

Most of the mapping is done with sf and cartography.

Interactive maps are handled with the leaflet package.

Smoothed maps are computed with spatstat.

mtmx has done the same kind of analyses using a different data source (Sirene database): Bistrographie (in French).

[edit]
This blog post: What should I have for lunch? by Emma Vestesson.
[/edit]

New version of the cartography package

A new version of the cartography package (v2.0.1) has arrived on CRAN.

cartography allows various cartographic representations such as proportional symbols, chroropleth, typology, flows or discontinuities maps. It also offers several features enhancing the graphic presentation of maps like cartographic palettes, layout elements (scale, north arrow, title…), labels, legends or access to some cartographic APIs.

Up to version 1.4.2 cartography was mainly based on sp and rgeos for its spatial data management and geoprocessing operations. These dependencies have been as much as possible replaced by sf functions since version 2.0.0.
Most functions are kept unchanged except for the addition of an x argument used to take sf objects as inputs.
See the NEWS file for the full list of changes and see sf README in case of installation problems with sf.
Continuer la lecture de New version of the cartography package

Create and integrate maps in your R workflow with the cartography package

The cartography package allows various cartographic representations such as proportional symbols, chroropleth, typology, flows or discontinuities. In addition it also proposes some useful features like cartographic palettes, layout (scale, north arrow, title…), labels, legends or access to cartographic API to ease the graphic presentation of maps. Continuer la lecture de Create and integrate maps in your R workflow with the cartography package