Cartograms for spatial data visualization Fran cois Libois INRA - - PowerPoint PPT Presentation

cartograms for spatial data visualization
SMART_READER_LITE
LIVE PREVIEW

Cartograms for spatial data visualization Fran cois Libois INRA - - PowerPoint PPT Presentation

Cartograms for spatial data visualization Fran cois Libois INRA and Paris School of Economics, France Belgian Stata User Group Meeting - September, 6 th 2016 Fr. Libois (INRA & PSE) Cartograms 2016 Bruxelles 1 / 21 Maps as


slide-1
SLIDE 1

Cartograms for spatial data visualization

Fran¸ cois Libois∗

∗ INRA and Paris School of Economics, France

Belgian Stata User Group Meeting - September, 6th 2016

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 1 / 21

slide-2
SLIDE 2

Maps as visualization tools of the world

Powerful visualization tools when used with caution... BUT maps may also produce very biased views of the world.

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 2 / 21

slide-3
SLIDE 3

Which parts of the world have the lowest population density?

Population density 369.715 - 24617.92 (30) 194.865 - 369.715 (30) 114.555 - 194.865 (30) 75.88 - 114.555 (30) 51.835 - 75.88 (30) 27.37 - 51.835 (30) 11.26 - 27.37 (30) 0 - 11.26 (30)

Cartogram: Mercator projection (conformal)

Population density by country

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 3 / 21

slide-4
SLIDE 4

Which parts of the world have the lowest population density?

Population density 369.715 - 24617.92 (30) 194.865 - 369.715 (30) 114.555 - 194.865 (30) 75.88 - 114.555 (30) 51.835 - 75.88 (30) 27.37 - 51.835 (30) 11.26 - 27.37 (30) 0 - 11.26 (30)

Cartogram: NSIDC-EASE projection (equal area cylindrical)

Population density by countries

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 4 / 21

slide-5
SLIDE 5

Which parts of the world have the lowest population density?

Population density 369.715 - 24617.92 (30) 194.865 - 369.715 (30) 114.555 - 194.865 (30) 75.88 - 114.555 (30) 51.835 - 75.88 (30) 27.37 - 51.835 (30) 11.26 - 27.37 (30) 0 - 11.26 (30)

Cartogram: NSIDC-EASE projection (equal area cylindrical)

Population density by countries

Mercator projection:

◮ larger size distortion as distance to equator increases ◮ inflates the importance of some countries

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 4 / 21

slide-6
SLIDE 6

Which parts of the world have the lowest population density?

Population density 369.715 - 24617.92 (30) 194.865 - 369.715 (30) 114.555 - 194.865 (30) 75.88 - 114.555 (30) 51.835 - 75.88 (30) 27.37 - 51.835 (30) 11.26 - 27.37 (30) 0 - 11.26 (30)

Cartogram: NSIDC-EASE projection (equal area cylindrical)

Population density by countries

Mercator projection:

◮ larger size distortion as distance to equator increases ◮ inflates the importance of some countries

Equal area projection (NSDIC-EASE)

◮ large shape distortion ◮ area preserving

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 4 / 21

slide-7
SLIDE 7

Which parts of the world have the lowest population density?

Population density 369.715 - 24617.92 (30) 194.865 - 369.715 (30) 114.555 - 194.865 (30) 75.88 - 114.555 (30) 51.835 - 75.88 (30) 27.37 - 51.835 (30) 11.26 - 27.37 (30) 0 - 11.26 (30)

Cartogram: NSIDC-EASE projection (equal area cylindrical)

Population density by countries

Mercator projection:

◮ larger size distortion as distance to equator increases ◮ inflates the importance of some countries

Equal area projection (NSDIC-EASE)

◮ large shape distortion ◮ area preserving

Are area and shape the relevant characteristics for population density?

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 4 / 21

slide-8
SLIDE 8

But most of the population lives in densely populated countries...

Population density 369.715 - 24617.92 (30) 194.865 - 369.715 (30) 114.555 - 194.865 (30) 75.88 - 114.555 (30) 51.835 - 75.88 (30) 27.37 - 51.835 (30) 11.26 - 27.37 (30) 0 - 11.26 (30)

Cartogram: NSIDC-EASE projection, reweighted by country population using ScapeToad

Population density by countries

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 5 / 21

slide-9
SLIDE 9

But most of the population lives in densely populated countries...

Population density 369.715 - 24617.92 (30) 194.865 - 369.715 (30) 114.555 - 194.865 (30) 75.88 - 114.555 (30) 51.835 - 75.88 (30) 27.37 - 51.835 (30) 11.26 - 27.37 (30) 0 - 11.26 (30)

Cartogram: NSIDC-EASE projection, reweighted by country population using ScapeToad

Population density by countries

The area of countries can represent their relative importance in terms of population

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 5 / 21

slide-10
SLIDE 10

The plan...

Create a cartogram using ScapeToad (http://scapetoad.choros.ch) Create an (animated) map using Stata and spmap package by Maurizio Pisati Produce a short movie using FFmpeg (http://ffmpeg.org)

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 6 / 21

slide-11
SLIDE 11

Cartogram creation: open ScapeToad and add a vector layer

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 7 / 21

slide-12
SLIDE 12

Cartogram creation: create cartogram

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 8 / 21

slide-13
SLIDE 13

Cartogram creation: choose the spatial coverage

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 9 / 21

slide-14
SLIDE 14

Cartogram creation: choose the attribute - the weighting variable

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 10 / 21

slide-15
SLIDE 15

Cartogram creation: other layers and constraints

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 11 / 21

slide-16
SLIDE 16

Cartogram creation: quality of the cartogram

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 12 / 21

slide-17
SLIDE 17

Cartogram creation: computations

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 13 / 21

slide-18
SLIDE 18

Cartogram creation: report

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 14 / 21

slide-19
SLIDE 19

Cartogram creation: export to shape file

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 15 / 21

slide-20
SLIDE 20

Cartogram created

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 16 / 21

slide-21
SLIDE 21

French population density

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 17 / 21

slide-22
SLIDE 22

Some Stata code

Import shape files in Stata using shp2dta by Kevin Crow

shp2dta using francecartogram1975.shp, database(deptpop1975) /// coord(deptpop1975coord) replace genid(id)

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 18 / 21

slide-23
SLIDE 23

Some Stata code

Import shape files in Stata using shp2dta by Kevin Crow

shp2dta using francecartogram1975.shp, database(deptpop1975) /// coord(deptpop1975coord) replace genid(id)

Create maps

use deptpop1975, clear spmap popdens using deptpop1975coord, id(id) /// plotregion(icolor(white)) graphregion(icolor(white)) /// clmethod(custom) clbreaks(0 20 40 60 80 100 150 200 500 1000 25000) fcolor(Rainbow) /// title("France: population by department") subtitle("1975") /// note("Cartogram: Lambert 93 projection, reweighted by d´ epartement" "population using ScapeToad") /// legstyle(1) legtit("Population density") legcount

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 18 / 21

slide-24
SLIDE 24

Some Stata code

Export the maps and create a video

graph export france-popdens1975.png, replace width(960) height(540) winexec "C:/ffmpeg/ static/bin/ffmpeg.exe" ///

  • report -framerate 2/3 -start number 1975 -i france-popdens%04d.png ///
  • c:v libx264 -r 24 -pix fmt yuv420p france popdens video.mp4
  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 19 / 21

slide-25
SLIDE 25

Some Stata code

Export the maps and create a video

graph export france-popdens1975.png, replace width(960) height(540) winexec "C:/ffmpeg/ static/bin/ffmpeg.exe" ///

  • report -framerate 2/3 -start number 1975 -i france-popdens%04d.png ///
  • c:v libx264 -r 24 -pix fmt yuv420p france popdens video.mp4

Animated slide using beamer in L

AT

EX

\animategraphics[controls,buttonsize=0.3cm,autoplay,loop, height=0.8 \textheight] {0.75} {"france-popdens"} {1975} {2015}

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 19 / 21

slide-26
SLIDE 26

Many thanks

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 20 / 21

slide-27
SLIDE 27

Which parts of the world have the lowest population density?

Population density 369.715 - 24617.92 (30) 194.865 - 369.715 (30) 114.555 - 194.865 (30) 75.88 - 114.555 (30) 51.835 - 75.88 (30) 27.37 - 51.835 (30) 11.26 - 27.37 (30) 0 - 11.26 (30)

Cartogram: NSIDC-EASE projection, reweighted by country population using spmap

Population density by countries

  • Fr. Libois (INRA & PSE)

Cartograms 2016 Bruxelles 21 / 21