Data sources for Spain and Madrid

Various shapefiles (e.g. districts, neighborhoods) for the city of Madrid are available here.

The "Centro Nacional de Información Geográfica" makes shapefiles for many territorial units available here 

I have not yet found a good source for downloading information about things like income and race outside Madrid at relatively low levels.  I also do not have shapefiles outside Madrid for census sections or anything else smaller than municipalities.  But presumably this exists, maybe at the above web page? 

The Madrid Autonomous Community also has a Statistics Center.

This is the official website for statistical data in Madrid. It has a lot of data at low levels of aggregation:

http://www.madrid.es/portales/munimadrid/es/Inicio/Ayuntamiento/Estadistica/Areas-de-informacion-estadistica/Areas-de-informacion-estadistica?vgnextfmt=detNavegacion&vgnextoid=9023c9fa0b23a210VgnVCM2000000c205a0aRCRD&vgnextchannel=b65ef78526674210VgnVCM1000000b205a0aRCRD

 

Here is a map of the most voted party in the 2011 general election by census section:

http://www.madrid.es/UnidadesDescentralizadas/UDCEstadistica/Nuevaweb/Elecciones%20y%20Participación%20Ciudadana/Elecciones/congreso%202011/mapas/secciones/G010307020009.pdf

 

I would still like to link up census section maps and electoral data.  Presumably this is possible given these maps. 

 

Here you can download the electoral results data at the neighborhood level for several elections:

http://www-2.munimadrid.es/CSE6/control/seleccionDatos?numSerie=7010301012

 

Here you should be able to download the data for elections results data at the lowest possible level of aggregation (mesa electoral) for all Spain (bottom of the webpage, "Datos de Mesas" section):

http://www.infoelectoral.mir.es/min/areaDescarga.html?method=inicio 

 

I still haven’t figured out how to deal with these data, and I do not have shapefiles or other identifying information for Mesas.