• Stars
    star
    116
  • Rank 303,894 (Top 6 %)
  • Language
    R
  • Created over 7 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Create maps made of (ridge) lines

R-CMD-check Codecov test coverage CRAN_Status_Badge

linemap: Create Maps Made of Lines

Example

The package contains two functions: linemap() and getgrid()

linemap()

linemap() displays a map made of lines using a data frame of gridded data.

library(linemap)
library(sf)
data("popOcc")
occitanie <- st_read(system.file("gpkg/geofla.gpkg", 
                                 package = "linemap"),
                     layer = "Occitanie")
opar <- par(mar=c(0,0,0,0), bg = "ivory2")
plot(st_geometry(occitanie), col="ivory1", border = NA)
linemap(x = popOcc, var = "pop", k = 2.5, threshold = 50,
        col = "ivory1", border = "ivory4", lwd = 0.6, add = TRUE)
par(opar)

mordor

getgrid()

getgrid() transforms a set of polygons (sf objects) into a suitable data frame for linemap().

library(linemap)
library(sf)
bretagne <- st_read(system.file("gpkg/geofla.gpkg", 
                                package = "linemap"),
                    layer = "Bretagne")
france <- st_read(system.file("gpkg/geofla.gpkg", 
                              package = "linemap"),
                  layer = "France")
plot(st_geometry(bretagne))

bretagne

bret <- getgrid(x = bretagne, cellsize = 2000, var = "POPULATION")
bret[6010:6014,]
X Y POPULATION
6010 340217.1 6783195 670.7509
6011 342217.1 6783195 1050.2651
6012 344217.1 6783195 1410.0992
6013 346217.1 6783195 2304.2012
6014 348217.1 6783195 2875.4047
opar <- par(mar = c(0,0,0,0))
plot(st_geometry(france), col="lightblue3", border = NA, bg = "lightblue2",
     xlim = c(min(bret$X), max(bret$X)), ylim= c(min(bret$Y), max(bret$Y)))
linemap(x = bret, var = "POPULATION", k = 5, threshold = 1,
        col = "lightblue3", border = "white", lwd = 0.8,
        add = TRUE)
par(opar)

mordor2

Blogposts

linemap (rgeomatic)

Graphiques linéaires géospatiaux (MTMX):

movinglines

Installation

Stable

install.packages('linemap')

Dev

library(devtools)
install_github("riatelab/linemap")

Inspiration

Unknown Pleasures (Joy Division)
Population Lines: How and Why I Created It (James Cheshire)
GeospatialLineGraphs (Ryan Brideau)

Alternative

More Repositories

1

cartography

Thematic Cartography for R
R
398
star
2

bertin

A package to draw maps in javascript
JavaScript
304
star
3

osrm

Interface between R and the OpenStreetMap-based routing service OSRM
R
237
star
4

mapsf

Thematic cartography with R
R
224
star
5

magrit

Thematic cartography entirely in the browser ♥
TypeScript
127
star
6

maptiles

Download, compose and display map tiles with R
R
97
star
7

tanaka

Tanaka Maps with R
R
78
star
8

geotoolbox

geojson toolbox
JavaScript
59
star
9

geoviz

d3-based javascript library for thematic maps
JavaScript
42
star
10

mapiso

Transformation of regularly spaced grids into contour polygons
R
34
star
11

dicopal.js

Discrete color palettes (hundreds of them!) for JavaScript
TypeScript
32
star
12

SpatialPosition

R package for computing spatial position models
R
31
star
13

potential

An R package to compute the potential model as defined by Stewart (1941).
R
25
star
14

geoverview

Quick geojson overview and summary
JavaScript
25
star
15

bertinR

A wrapper for bertin.js
R
23
star
16

statsbreaks

A javascript package to group the values of a statistical series into classes (discretization)
JavaScript
22
star
17

ReproducibleCartography

ICC 2017 Reproducible Cartography
HTML
18
star
18

mapinsetr

Create map inset
R
17
star
19

fisheye

Transform base maps using log-azimuthal projection
R
15
star
20

maplegend

Create legends for maps and other graphics.
R
12
star
21

flows

Flow selection and analysis
R
11
star
22

go-cart-wasm

Flow-based cartograms (Gastner-Seguy-More 2018 algorithm) for the Web
JavaScript
9
star
23

regioviz

Regioviz - Outil de visualisation et de comparaison régionale 📊 📈
JavaScript
8
star
24

intro_sf

Faire des cartes avec R - Introduction au package sf
8
star
25

MTA

Multiscalar Territorial Analysis
R
7
star
26

anfdataviz

HTML
6
star
27

gepaf

Encode and decode the Google Encoded Polyline Algorithm Format
R
6
star
28

cartostats

Reproducible Cartography
HTML
4
star
29

geocountries

A tool to get ISO codes and geometries from country names
JavaScript
3
star
30

basemaps

2
star
31

map-templates

R programmes to build map templates for Magrit (with boxes for overseas and outermost territories), with data.
R
2
star
32

MAGRIT-formations

Supports pour les formations en cartographie avec Magrit
HTML
2
star
33

rgvzall

Tool for regional comparison and data visualisation with data for France, Europe and Tunisia
JavaScript
2
star
34

world

country base map
1
star
35

MDM

non
HTML
1
star
36

cartographie-reproductible

Cartographie Reproductible
JavaScript
1
star
37

regiovizlab

Landing page for Regioviz (RIATE version)
HTML
1
star
38

anticartogram

HTML
1
star
39

linearcorrelation

Statistical operators for bi-variate analysis
JavaScript
1
star