I use a Swiss shape file map (called PLZO_PLZ) available on http://www.cadastre.ch/internet/cadastre/fr/home/products/plz/data.html (ZIP file Shape LV03)

PLZO_PLZ contains a column called PLZ which correspond to a swiss locality. For instance number PLZ 1202 is in Geneva. By the way, PLZ can also be called NPA (same meaning).

My aim is to get a colored map according to the NPA frequency coming from an external CSV file: http://pastebin.com/raw.php?i=iAjV88KQ

For instance NPA not appearing in the CSV should be not colored (white) and NPA coming few time should appear in light blue and the more frequent the NPA is the more dark blue should be the map. According to my CSV NPA 1203 should be the darkest.

Is it possible to obtain what I am looking for with Quantum GIS? (I tried to use "Joins" function in proprieties but it's not working)

enter image description here

Edit: I try to join like this :

enter image description here

  • Doing a table-join is the way to achieve this, so can you explain a little more about how the join is not working? – MappaGnosis Sep 13 '13 at 7:03
  • @MappaGnosis OK I will edit my post – S12000 Sep 13 '13 at 11:36
  • It looks like you don't have a key field to join on that is in both tables. – Darren Cope Sep 13 '13 at 13:18
  • @DarrenCope I don't know what you mean. On my CSV I have NPA and on the map I have PLZ which are both swiss costal codes with 4 numbers... Can you tell me more about the "key field". I'm new to qGIS and don't get it well yet. – S12000 Sep 13 '13 at 15:51
  • 1
    Sorry. I see now what you did. The npa/plz fields are your key columns. See my answer below. – Darren Cope Sep 13 '13 at 17:27

Sorry @Swiss12000:

If I'm interpreting your problem correctly:

You have a .csv file with duplicates in it. You will need to summarize this to create the 'frequency' field you are looking for. You could do this in a pivot table in OpenOffice/Excel/etc. as an example.

Then you would join you new file that contains a unique PLZ ID, and a count of frequencies to your shapefile, and theme on the new count field.

  • Hello, thanks a lot actually I was thinking that quantum GIS will regroup all duplicate by itself. I created the frequency table with R. Now it's perfectely working. Thanks – S12000 Sep 14 '13 at 2:19
  • This page also explains well how to join data in QGIS gis.stackexchange.com/questions/65718/… – S12000 Sep 14 '13 at 2:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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