Questions tagged [cartogram]

A cartogram is a map where surfaces are proportional to a given statistical variable.

A cartogram is a map where surfaces are proportional to a given statistical variable.

Useful link

42 questions
33
votes
2 answers

Cartogram + choropleth map in R

I've been using ggplot2 lately to create a bunch of choropleths. I was wondering if it was possible to use ggplot2 to create a map similar to this (from WorldMapper): It's a choropleth where the shapefile polygons are distorted to represent…
baha-kev
  • 3,029
  • 9
  • 33
  • 31
16
votes
5 answers

Drawing cartograms with Matplotlib?

In case somebody doesn't know: A cartogram is a type of map where some country/region-dependent numeric property scales the respective regions so that that property's density is (close to) constant. An example is from worldmapper.org. In this…
gspr
  • 11,144
  • 3
  • 41
  • 74
7
votes
2 answers

Algorithm (and tools) to create a weighted-cartogram from a shapefile?

What algorithm can I use to produce a weighted-cartogram such as the one below: ? I can generate a shapefile plot using code from R, .NET libraries and also using PostGIS. However I can't find the search terms to use to find an implementation of…
JustinJDavies
  • 2,663
  • 4
  • 30
  • 52
7
votes
1 answer

Use Rcartogram on a SpatialPolygonsDataFrame object

I'm trying to do the same thing asked in this question, Cartogram + choropleth map in R, but starting from a SpatialPolygonsDataFrame and hoping to end up with the same type of object. I could save the object as a shapefile, use scapetoad, reopen it…
duncandoo
  • 313
  • 2
  • 6
6
votes
2 answers

installing Rcartogram packages - error message

I am trying to build a cartogram like here Installation from the link does not work: `install.packages('Rcartogram', repos = 'http://www.omegahat.org/R', type = 'source')` Installing package into ‘C:/Users/Milena/Documents/R/win-library/3.2’ (as…
SuzukiBlue
  • 135
  • 1
  • 8
4
votes
1 answer

Dissolving hexmap polygon shape files

I am trying to produce an outline for a hexagonal cartogram by dissolving the inner polygons via the unionSpatialPolygons or aggregate functions. I am getting stray hexs that do not dissolve... a dummy example to show the problem: # grab a dummy…
guyabel
  • 8,014
  • 6
  • 57
  • 86
4
votes
0 answers

Creating Hexagonal Cartogram JSON file in d3

I am trying to make a hexagonal cartogram in d3.js, similar to the one found here. Mike Bostock mentions this in his (awesome) Eyeo 2013 talk, and has created a tool to allow a user to point-and-click draw a hexagonal polygon (here). What I'm…
mollymerp
  • 1,542
  • 9
  • 14
3
votes
1 answer

"Error: attribute d: Expected number"

I'm trying to create a cartogram using cartogram.js and d3.js. I've used the examples found in the cartogram.js repo and here to put together a script that generates a world map inside an SVG using the d3.geo.mercator() projection and now I'm trying…
James Brooks
  • 33
  • 1
  • 1
  • 7
3
votes
0 answers

R - installing FFTW3 package on Windows machine

I am trying to build a cartogram with R following the algorithm of Gastner & Newman on diffusion-based methods for producing density-equalizing maps I have found a recipe on how to do it with help of the Getcartr and Rcartogram packages; however,…
SuzukiBlue
  • 135
  • 1
  • 8
2
votes
1 answer

Global cartogram in R

I am trying to create a global cartogram using the cartogram package in R. I am trying to use the data from wrld_simpl. What I expect is a cartogram in which the Population ("Pop2005" variable) is plotted. The code I have developed is…
2
votes
1 answer

Issue while creating cartogram plot in r

I am new to Spatial data & cartogram lib and getting some issues while trying to recreate plot from: https://www.r-graph-gallery.com/a-smooth-transition-between-chloropleth-and-cartogram.html Lib &…
ViSa
  • 1,563
  • 8
  • 30
2
votes
0 answers

Maps in R using Cartogram function

I am struggling with an error that returns after applying cartogram_cont() function Here is the code and the error carto3 <- cartogram_cont(map33, "resi_eur_avg", itermax=5) The error message appears after the first iteration as: Mean size error…
2
votes
1 answer

Error with Plotting Cartogram - 'This function does not give correct centroids and distances for longitude/latitude data.'

I'm trying to use the wrld_simple data from the maptools package to plot a Cartogram that involves some European countries based on their Population in 2005: countries = c('Austria', 'Belgium', 'Bulgaria', 'Cyprus', 'Czech Republic', 'Denmark',…
Dan
  • 61
  • 4
2
votes
1 answer

Creating a Cartogram in R

I am trying to make a cartogram in R to show the number of occurrences in each area of the UK. My data currently looks like this: Area Occurences lon lat 1 Greater London East North UK 200 -0.0936496…
George
  • 674
  • 2
  • 7
  • 19
2
votes
1 answer

using cartogram.js for visualizing information in a global map

I'm trying to adapt this example http://prag.ma/code/d3-cartogram/ to show information about obesity in 2002, 2005 and 2010 around the world. This the visualization: http://datauy.github.io/obesity-cartogram with a link to the code in the same page.…
gaba
  • 73
  • 1
  • 6
1
2 3