See below three practical exercises. Please choose the one you are most interested in. In case you are quick, try the remaining exercises.
Add a control for the distance to Boris’ home (10 Downing St, London SW1A 2AB, UK).
You could either find the coordinates manually or you use tmaptools
function geocode_OSM()
using OpenStreetMaps.
There are also Google Maps APIs like ggmap
or mapsapi
but they require registration.
How could we improve the interpolation of traffic counts based on idw()
?
Can you think of a way of testing if higher order neighbours add additional information to the SLX regression model?
nblag()
is helpful.In case you are interested in geo-spatial data analysis, try the following. Note that this might be a bit more tricky and may require some time.
Add the amount of particulate matter (PM10, e.g. 2017) from Defra and check if pollution influences the house values
Note the following important sentence: “The coordinate system is OSGB and the coordinates represent the centre of each 1x1km cell.”
st_buffer()
with the options nQuadSegs = 1, endCapStyle = 'SQUARE'
provides an easy way to get points into grids
Add some more demographic variables from the Census 2011.
The nomisr
package provides an API to nomis. See the Vignette. Make sure to restrict your request to London only (Guest users are limited to 25,000 rows per query).
You can browse the available data online, such as the Census 2011 key statistics.