1

I am using the Cartogram plugin to build a world map showing population size. I have all required data in the attribute table.

My source layer looks like this: enter image description here

The plugin starts processing, but the output layer looks like nothing happened:

enter image description here

What could the problem be? I used this dataset for polygon layer and this downloaded as a CSV file, with CRS 4326.

4
  • I recommend not thinking about GIS SE as being some sort of online GIS tutor. For your questions to be answered here they should as much as possible describe not just what you want to do, but precisely what you have tried and where you are stuck trying that.
    – PolyGeo
    Commented May 2, 2017 at 9:30
  • Are you sure the population is stored in a field with integer or real datatype? A text field can not be used for cartograms.
    – AndreJ
    Commented May 2, 2017 at 15:34
  • Yes, population field has datatype "real".
    – Geoguest
    Commented May 2, 2017 at 15:57
  • i see the same issue (it makes changes, but very small ones). can you edit your question to mention which dataset you're using (looks like Natural Earth?), which projection (4326?) and whether it's multipolygon / polygon?
    – Steven Kay
    Commented May 2, 2017 at 17:08

2 Answers 2

2

The QGIS cartogram plugin seem to work a bit fragile. I get cartograms for Europe, America and Africa, but the whole world seems to be too big for the plugin.

Alternatively, you can add the standalone program ScapeToad. It can read and write shapefiles, and has more tools to control the output. You can still load the result into QGIS:

enter image description here

I used the Natural Earth ne_110m_admin_0_countries shapefile, with the pop_est field for calculating. Make sure that all countries have positive values for that.

There are other ways to get cartograms with R:

https://www.r-bloggers.com/cartograms-with-r/

https://github.com/pvictor/topogRam

https://github.com/chxy/cartogram

but I have not yet tested those.

0

I agree with AndreJ - I've used scapetoad for a few years and it works really well (but slowly, for good results)

However, with the cartogram plugin, check out the "add demo layer" menu option. It adds a layer showing Danish regions. Running on this gives a valid result

enter image description here

I noticed that the demo uses a local UTM projection in meters. I think this is key. You're using a projection in degrees.

I was able to get a worldwide example to work, using the same example as AndreJ, but by reprojecting the shapefile to EASE Grid (epsg:3410) to get coordinates worldwide in meters, and using MapColour1 as the value (which has a fairly small range, 1-10 or so)

enter image description here

That's a hacky way to do it and i don't recommend it as the distortions will mess with the areas of the cartogram, but it does suggest the cause...

I think that the ratio of the area to the value is key to getting this plugin to work.

I think you might need to experiment with reprojecting/scaling the polygons and/or scaling your values up or down to get a decent result.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.