Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have many attributes which are stored in an Excel table. They refer to USA counties. I need to somehow connect those attributes to polygons in some format (don't know which is the best) and visualize it by Leaflet or similar API. Those attributes need to be in popups.

What do you recommend? How can I connect spatial data (polygons of counties) with attributes stored in Excel table? I'm using software like ArcGIS and Quantum GIS. I am opened to MySQL and PostgreSQL regards to databases if you recommend those.

Please try to explain with more details and exact steps so I can be sure I understand.

share|improve this question
    
Excel is limiting when you start getting large numbers of rows. postgres/postgis be recommended even for the spatial indexing which will speed up the searches. –  Mapperz Jan 24 '13 at 4:25
    
Question on joining excel to spatial attribute table: I have tried joining and the excel table is joining the spatial attribute table BUT in the columns the data is showing as 'null' ie no data is pulling through from the Excel table? It was suggested that " Set the file type filter to ‘All files’. Otherwise your Excel-file will not be visible" - But I have no clue as where to go to set the file type filter to All? –  user18557 May 27 '13 at 14:53
add comment

1 Answer

up vote 6 down vote accepted

If you don't need some kind of routine or script, here is the simple procedere using QGis (Master 1.9, but 1.8 should also work).

  • Add your shapefile as vector layer in QGIS
  • Add your table (can be .csv or .xls files) to QGis in the same way -> Add Vector Layer
  • Both, table and layer should now be visible in the layer table of contents. Now make a simple Join by selecting Join in the Layer properties. Here choose a connecting attribute, which occurs in both datasets (such as the county name or a previously created ID-Number).
  • Afterwards your shapes attribute table can easily be exported as .csv or whatever (mmqgis plugin for instance).

Of course there are many more scripted solutions utilizing R, python, Postgis or others possible.

EDIT: Depending on the structure of your dataset (which i don't know) you maybe have to pre process your data first (calculate aggregate means per country, ... )

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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