I'm quite new to QGIS and I'm searching for a simple way to create a Database that allows me to use the tables in QGIS and R. I have a lot of data stored in Excel spreadsheets wich will be used for the statistical analysis in R.

My tasks in more detail: My first task will be visiualizing the data by joining the tables to a shapefile. Second I want to make some spatial transformations within QGIS with shapefiles and use the newly created data in my statistical analyse. Therefore I will have to join this data to my database.

Last but not least I wan't to assure that the data is stored in a good way for future analises in QGIS and R since the database will be used in other contexts.

Some tolled me that MS Access is a good way to do so. Can anyone of you give me some advice? Maybe on literature and stuff like that too.

  • possible duplicate of Is it possible to run an R script on a layer in QGIS?
    – R.K.
    Sep 24, 2012 at 12:38
  • 3
    @R.K. I don't think it is duplicate, this question is about infrastructure creation, not about just running scripts. Sep 24, 2012 at 12:58
  • I can understand the need for a DB Front end that allows you to control user input, GUI. You'll definitely want to store the actual data in a spatially enabled DB, and potentially connect to it with Access if needed.
    – Roy
    Sep 24, 2012 at 13:53

2 Answers 2


Aside from Spatialite, you might also want to consider PostGIS. Think of it as Spatialite's big brother ;-) It's just another data source for QGIS while you can connect to it using the RODBC package in R.

  • 1
    You can (probably) also get to PostGIS and Spatialite datasets in R using the rgdal package... I say probably because you just need the right drivers.
    – Spacedman
    Sep 24, 2012 at 14:19

Not sure if you will be able to work with MS Access in QGIS (plus I haven't heard about any respectable GIS-project that would use MS databases); MSSQL - is supported (but never tried it myself and never will ;-) ).

Consider possibility to use Spatialite (spatial extension of SQLite). It will be quite suitable to operate Spatialite DB in QGIS and you can easily access Spatialite via R packages: SQLiteMap; RSQlite. This is the recipe I would use for myself.

EDIT: As was mentioned in comments (and I implied it), Spatialite require no server configuration, users administration, etc. And it is easily transportable to another computer by just coping database file.

  • 5
    +1 Don't use MS Access if you don't really have to.
    – underdark
    Sep 24, 2012 at 14:26
  • all right. thanks for your repllies. I think i'll try out PostGIS!
    – Dspanes
    Sep 24, 2012 at 14:50
  • 3
    +1 - Spatialite is a great option - QGIS reads both spatial and non-spatial tables directly, and the RSQLite package in R lets you read sqlite databases. Spatialite's great advantage is that you don't need to install and maintain a database - for all the advantages of PostGIS and MySQL, they need rather a lot of setup. The transportable, no-install nature of SQLite is convenient for your own use as well as sharing.
    – Simbamangu
    Sep 25, 2012 at 18:30
  • 1
    Spatialite = No server configuration! You can copy your database and send it to someone without having to connect anyone to a server.
    – Roy
    Sep 25, 2012 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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