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
1
vote
1 answer

Cartogram in R not distorting countries as expected

I'm using the cartogram package in R to make a world map of living languages. The country map is from Natural Earth, and the language count from the Ethnologue. w <- readOGR('.','ne_110m_admin_0_map_units') L <-…
Rodrigo
  • 4,706
  • 6
  • 51
  • 94
1
vote
1 answer

D3.js - Changes from path.area in version 2 to version 4

I am trying to update d3-cartogram to work with D3.js version 4. So far, everything is going fine — I've just been updating all the functions so that they're written in the flattened namespace of version 4. For example, instead of d3.geo.path(),…
Harry Stevens
  • 1,373
  • 1
  • 15
  • 18
1
vote
1 answer

Issue with Plotting Counties Using spmap

I am trying to plot the counties in the continental U.S. by a value that the counties have associated with them. I am using the spmap package. My shape files comes from: https://www.census.gov/geo/maps-data/data/cbf/cbf_counties.html. I am using…
bill999
  • 2,147
  • 8
  • 51
  • 103
1
vote
1 answer

"Cartograms with d3 " how to use data from MySQL?

demo is here:a d3-cartogram demo It gets data from a .csv file . how could I use data from MySQL or static data in HTML File? I tried some ways but didn't work.
1
vote
0 answers

Install Rcartogram: error on R CMD INSTALL

I am trying to use the Rcartogram package. After following the instructions in the answer by Geoff, I received an error that I can't resolve: C:\R\R-3.2.3\library\Rcartogram>R CMD INSTALL --debug . processing '.' a directory * installing to library…
Hugh
  • 15,521
  • 12
  • 57
  • 100
1
vote
1 answer

Error when creating features in d3.js cartogram

I'm making a simple cartogram with d3.js and I'm stuck with an error drawing the original map. I've written a gist with the example here. The error I'm getting is when I try to create the features like this: geometries =…
plablo09
  • 353
  • 2
  • 4
  • 12
1
vote
1 answer

Population-weighted polygon distortion (cartograms)

I'm trying to create a map in R that conveys both the shape of underlying geometry (i.e., the physical boundaries) and the relative importance of the object in terms of an associated value. For concreteness, I'd like to focus on reproducing (a…
MichaelChirico
  • 33,841
  • 14
  • 113
  • 198
1
vote
0 answers

Updating several d3.js cartograms in the same container

I'm trying to update 4 cartograms in the same div. First I create 4 original maps, each in its own svg, like this: function makeMaps(data){ var mapsWrapper = d3.select('#maps'); data.forEach(function(topoJSON,i){ var quantize =…
plablo09
  • 353
  • 2
  • 4
  • 12
1
vote
0 answers

Algorithm applied in three.js

In past questions had been asked about this, I understand from reading much better algorithm. This time I have developed but I have a mistake somewhere. Here's what I've been functional, they are 7 polygons and each with an assigned value…
user5115790
1
vote
1 answer

Cartogram using angularjs and d3 TypeError: undefined is not a function

I am creating a cartogram of srilanka using d3.js and angularJS. I have a controller and a function to create it. It returns an error saying TypeError: undefined is not a function HTML:
Sajeetharan
  • 216,225
  • 63
  • 350
  • 396
1
vote
2 answers

Downloading Package "Cart" in R

Does anybody know where I can download the R package "cart" that can help create Gastner's "Mapping with Diffusion-based Cartograms" ? I tried a install.package on R and says it's not available for R 2.15. There is a page on R-forge about it but it…
Concerned_Citizen
  • 6,548
  • 18
  • 57
  • 75
0
votes
1 answer

R Cartogram issue: Error in Fij[distance <= radius[j]] <- Fbij[distance <= radius[j]] : NAs are not allowed in subscripted assignments

I am trying to create a cartogram using the R cartogram package. My code looks as follows: #Create the dataframe data(wrld_simpl) world_map4 <- wrld_simpl news2 <- news %>% group_by(iso_a3) %>% select(iso_a3, Mentions_sum, Goldstein_avg) %>%…
0
votes
0 answers

How can I add two columns of data to the 'hue' section on Geoplot-Geopandas for a cartogram map?

Having trouble selecting 'male' and 'female' for hue when creating a cartogram with geoplot (using geopandas). I have only managed to select the total population but I would like to compare the state populations of male to female. I understand that…
0
votes
0 answers

IllegalArgumentException: Shell is not a LinearRing, reading .shp file. CARTOGRAM

I used to run this code from " https://residentmario.github.io/geoplot/gallery/plot_obesity.html" , with no errors. but now I get this error when I run it " IllegalArgumentException: Shell is not a LinearRing IllegalArgumentException: Shell is not a…