[OSGeo Africa] Comparing census and elections datasets

Hanlie Pretorius hanlie.pretorius at gmail.com
Wed Apr 9 04:34:35 PDT 2014


Hi Adi,

I'm not sure if this approach will work for you because I'm not 100%
clear on what you want to do, but here goes.

I would convert the vector data to raster data using the same cell
size. You can choose the size of the cell based on the kind of
accuracy you would like. The bigger the cells the greater the error
introduced and the smaller the cell the longer it will take to
process.

So you can, for example, convert the 2009 census data to a raster and
then convert it back to a vector using the 2011 census boundaries in
vector format. You can then use an average, median, maximum, minimum
etc, type of operation to determine the value that should be
associated with the reconstituted polygon. Or you can convert both
datasets to rasters and then compare them cell by cell.

Rasters can only have numerical values, so you would have to 'code'
your rasters to equate numerical values with categorical data. GRASS
GIS is very useful for this type of 'coding' since it will store your
mapping of numbers to category names inside the raster. I'm not sure
if other software can do this as well.

You would also have to use a raster per theme, e.g. one for winning
party, one for % voter turnout etc.

If this doesn't answer your question, or you want more opinions, try
the GRASS GIS user mailing list, they're great at answering such
'theoretical' (not software specific) questions.

Regards
Hanlie

2014-04-08 7:12 GMT+02:00, Adi Eyal <adi at code4sa.org>:
> Hi All
>
> I would like map demographic data from the 2011 census on top of
> elections results from 2009. There seem to be two problems with doing
> this.
>
> 1. Old wards have disappeared and new ones have been created by MDB.
> 2. In some cases the same ward id has been re-used for completely
> different polygons.
>
> In short, the obvious approach of joining two datasets won't work. It
> is possible (but difficult) to calculate approximations by overlapping
> shapes from the two maps and using some sort of algorithm (possibly
> assuming uniform distribution of data points) to slice up one shape
> and fit it into another.
>
> I don't want to go down that route.
>
> Is there another to go about this?
>
> Thanks
> Adi
>
> --
> Adi Eyal
> Director
> Code for South Africa
> Promoting informed decision-making
>
> phone: +27 78 014 2469
> skype: adieyalcas
> linkedin: http://za.linkedin.com/pub/dir/Adi/Eyal
> web: http://www.code4sa.org
> twitter: @soapsudtycoon
>
> For more information on how to participate in the open data community
> in South Africa, go to: http://www.code4sa.org/#community
> _______________________________________________
> Africa mailing list
> Africa at lists.osgeo.org
> You can UNSUBSCRIBE at http://lists.osgeo.org/mailman/listinfo/africa
>


More information about the Africa mailing list