[GIS] After joining shapefile with CSV file graduated symbols option unavailable in QGIS

attribute-joinscsvqgissymbology

I have successfully joined data from a csv file to a shapefile in QGIS but for some reason I am having trouble symbolizing my data.

I want to use a graduated symbology however this option is not available for any of the columns for my joined table.

I have tried saving as a new layer but this does not change the issue.

Has anybody got any tips to get around this?

Best Answer

The problem most likely is that all CSV columns have been imported as text fields. Text cannot be used for graduated styles.

To fix this, you need a .csvt file for your CSV which specifies the data type of CSV columns explicitly. Basically, a .csvt file is a text file with only one line, e.g.

"Integer","Real","String"

For a CSV file with three columns. More info: http://underdark.wordpress.com/2011/03/07/how-to-specify-data-types-of-csv-columns-for-use-in-qgis/

You'll be able to verify if specifying data types worked, by checking the csv layer's "Fields" tab and the data types listed there.

Related Question