Pages Menu
TwitterRss
Categories Menu

Posted by on Sep 7, 2010 in R Spatial, Resources | 2 comments

Writing a Spatial Function: The Location Quotient

Background:
In some cases it is necessary to conduct the same analysis multiple times on either the same or different data. In such circumstances it is worth writing a function to simplify the code. In this example the location quotient provides a simple calculation easily written in to a function.

The location quotient (LQ) is an index for comparing a region’s share of a particular activity with the share of that same activity found at a more aggregate spatial level (a good book on this kind of thing is Burt et al.). In this example we take a shapefile of London Boroughs that contains information on the population of each borough and the percentage of sports participation in each borough. In this case there is little point in calculating the LQ as the percentage alone would be more meaningful. The focus here is how to undertake the methods, not their appropriate use, or the validity of the results.

Data Requirements:

London Sport Participation Shapefile: Download (requires unzipping)

Install the following packages (if you haven’t already done so):

maptools, RColorBrewer.

Click here to view the tutorial code.

Share on Facebook
Bookmark this on Google Bookmarks
Share on reddit
Bookmark this on Digg
Share on StumbleUpon
Share on LinkedIn

2 Comments

  1. Any chance you could update the text file? Link no longer works.

    • I have now done this, thanks.

Post a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>