title: Global cartogram in R
body: <p>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 (&quot;Pop2005&quot; variable) is plotted. The code I have developed is this:</p>
  <pre><code>data(wrld_simpl)
  world&lt;-wrld_simpl
  
  world_sf = st_as_sf(world)
  world_sf_proj = st_transform(world_sf, crs = 3785)
  
  world_cartogram &lt;- cartogram_cont(world_sf_proj, &quot;POP2005&quot;)
  plot(world_cartogram)
  </code></pre>
  <p>Nonetheless, this has resulted in the following figure:
  <a href="https://i.stack.imgur.com/95hQA.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/95hQA.jpg" alt="enter image description here" /></a></p>
  <p>Do you know what is wrong with the code? Maybe the CRS? I have tried to use others CRS but I got the following error:
  &quot;Error: Using an unprojected map. This function does not give correct centroids and distances for longitude/latitude data:
  Use &quot;st_transform()&quot; to transform coordinates to another projection.&quot;</p>