Python Forum

Full Version: using python with QGIS to disseminate CSV data on a polygon
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,
i am a newbie programmer on QGIS with python.

i am working on QGIS version 3.12.3-București having a python interface prompt to write python code. QGIS is installed on windows 10.

in fact i have file CSV with 2 column and 3 values:

code Temperature
316552 11.5
316552 17.2
316552 24.3

on the other hand i have a map for my country as shape file having a polygon for Beirut city with an id 316552.


my question is: how could i write a python script so as:
1. disseminate the first value 11.5 on the polygon for Beirut with a color red and within a Temperature legend
from 10 - 15 and save this card as card1.png
2. disseminate the second value 17.2 on the polygon for Beirut with a color green and within a Temperature
legend from 16 - 21 and save this card as card2.png
3. disseminate the third value 24.3 on the polygon for Beirut with a color yellow and within a Temperature
legend from 22 - 27 and save this card as card3.png

for any helps or suggestions that would be given by any one will be appreciated.

Thank you in advance.