Category Archives: training

HERG Writing Retreat at Dartington Hall

Over a fresh, sunny three days in early January, I joined 17 academic writers at Dartington Hall, Totnes for a writing retreat. What is a writing retreat, I hear you ask? Well, for academics working at a university, one of the key ways of conveying findings from their research is by writing papers that are published in academic journals. Writing these papers (often 5000 – 8000 words long) is a very time intensive task and also often key to promotion up through the university structure.

m00265_header_hall

Writing a paper can be a lonely task and is often something that gets pushed down people’s to do lists, because usually there are no specific deadlines, other than the ones you invent yourself (which are easily changed!). At the session we had participants with a range of experience, from PhD students writing their first or second paper, to experienced academics writing their thirtieth paper!

We used the opportunity to support each other by sharing ideas about writing processes, where to start and how to make the best use of the time available. We also had dedicated writing sessions (either 60 or 90 minutes) where we worked in the same room on our individual papers. This was a very new experience for me, and the “peer” pressure of everyone else writing (and not checking emails, Facebook etc.) for a specific period worked very well.

m00265_picture_hall

I was writing up an article on how we can ensure research is reproducible, using our recent PopChange project as an example. I hope to be presenting the research at the GISRUK conference in Manchester in March and will be submitting the paper for publication soon after!

My thanks go to Sarah Dyer and Dave Simm of the Higher Education Research Group for the Royal Geographical Society who organised the writing retreat and made sure everything ran to plan.

Cross-posted from http://www.clearmapping.co.uk/our-blog/item/475-herg-writing-retreat-at-dartington-hall.html

Creating choropleth maps in R with the darkest colour at the top

I’ve just been through the process of contributing to the source code of a package in R (in a very small way) so here’s a short piece on how easy it was, and why anyone can do it! I originally wrote this post in August last year, but waited to post it until the new version of maptools was released. I missed this (we are now at 0.8-39!) and have only just rediscovered this post. It’s all still relevant though!

I have been using the Maptools library extensively in my use of R as a GIS, as well as in my teaching material (hosted at https://github.com/nickbearman/intro-r-spatial-analysis). The default plot order in the legend is to have the darkest colour at the bottom of the legend, and the lightest colour at the top. This was just something I accepted, and to be honest, never really thought about before.

I recently delivered a training course on R to some staff at the ONS (Office for National Statistics, England & Wales) and they said that their best practice guidelines are to have the darkest colour at the top of the legend. They asked me how to do this, which I didn’t know!

After some fiddling about with an R script, I created a version which worked for them. I then thought it might be useful to integrate this into the Maptools library, and emailed the package author, Roger Bivand. He was very helpful, and I added the additional code to the sourcefiles for Maptools. These are now avaliable in version 0.8-37 (or later), which has recently be released. Running update.packages(“maptools”) should get you the new version.

To reverse the colours is a simple matter of changing the legend code in two places. Using the example from the helpfile, the original line:

legend(x=c(5.8, 7.1), y=c(13, 14.5), legend=leglabs(brks), fill=colours, bty="n")

The revised line:

legend(x=c(5.8, 7.1), y=c(13, 14.5), legend=leglabs(brks, reverse = TRUE), fill=rev(colours), bty="n")

To give you some nice visual examples:

Rplot Rplot_reverse

Or for those of you who have attended my R course:

normal-order reverse-order

The file I updated is at https://r-forge.r-project.org/scm/viewvc.php/pkg/R/colslegs.R?view=markup&root=maptools (this link shows the changes), and I also updated the helpfile. If you’ve done some R scripting, then it is not too difficult to do. Any questions, please post them here. Good luck!

 

R for Spatial Analysis Courses in Liverpool and London

This week I have run two courses on ‘Introduction to Using R for Spatial Analysis’ which have been very successful. Both courses sold out, with 15 people attending in Liverpool and 20 in London. We had people with a wide range of GIS and R experience, ranging from no experience in either GIS or R, to significant experience in one but little in the other.

2015-12-02 11.34.09We covered the basics of using R through the RStudio interface, which I find makes R easier to understand for newbies! I certainly found it much easier to learn R using RStudio, and still use it everyday for my R work (I’ve opened the native R interface maybe twice since I started using it!). We also looked projections and coordinate systems (which were at the bottom of a GIS problem a colleague had today) and at spatial data representation, particularly how to create a representative, truthful choropleth map, and I made use of a blog post about this very issue, which I recently tweeted.

2015-12-02 11.34.21We also had a number of very interesting discussions about the pros and cons of R vs other GIS software, such as ArcGIS or QGIS, as well as other languages, such as Python. Each has their own pros and cons, and in my work I regularly use a mix of these, depending on what I am trying to achieve.

 I am also in the process of developing an intermediate course that will focus more on spatial analysis. If you are interested in finding out more about when either the basic or the intermediate courses will be run again, please send me a message (using the contact form on this site) and I will add you to a list to hear about future courses.

All of the material from this course is freely available, and hosted on GitHub. Head over to http://github.com/nickbearman/intro-r-spatial-analysis and you can view the material yourself and work through it at your own pace. You can even use it to contribute to new teaching material, and if you do, please also make your material available through Creative Commons so others can benefit from it as well.

Cross-posted at http://geographicdatascience.com/blog/training/R-for-Spatial-Analysis-Courses-in-Liverpool-and-London/.

Introduction to Using R for Spatial Analysis

On Friday 23rd January 2015, I ran a one day workshop on an Introduction to Using R for Spatial Analysis. We had 18 participants (thanks for squeezing in, everyone!) from a wide variety of backgrounds in R, from never having used R to using R relatively regularly, but not used it as a GIS. The course ran really well, and I was very happy with it, given that it was the first time I had run this course in this format. If you are interested in attending this course in the future, please send me a message (using the contact form on this site) and I will add you to a list to hear about future courses.

I’ve attached the materials I used to this blog post (see below). My material available under the Creative Commons Attribution-ShareAlike 4.0 International License (seehttp://creativecommons.org/licenses/by-sa/4.0/deed.en for details), which means that the material I created for this training session is free for anyone to use, as long as you attribute the material to me, and make any material you derive from this available under the same license. I would also ask you to let me know when you use my material, as it’s useful for me to know how many people are using it, and what sort of courses they are using it for.

Introduction to QGIS: Understanding and Presenting Spatial Data

On Thursday 22nd January 2015, I ran a one day workshop on an Introduction to QGIS: Understanding and Presenting Spatial Data. We had 14 participants from a wide variety of backgrounds, academic areas and geographic locations. The course ran very well, and the participants seemed to enjoy taking the course as much as I enjoyed delivering it! If you are interested in attending this course in the future, please send me a message (using the contact form on this site) and I will add you to a list to hear about future courses.

I’ve attached the materials I used to this blog post (see below). My material available under the Creative Commons Attribution-ShareAlike 4.0 International License (see http://creativecommons.org/licenses/by-sa/4.0/deed.en for details), which means that the material I created for this training session is free for anyone to use, as long as you attribute the material to me, and make any material you derive from this available under the same license. I would also ask you to let me know when you use my material, as it’s useful for me to know how many people are using it, and what sort of courses they are using it for.

Introduction to QGIS: Understanding and Presenting Spatial Data

On Monday 17th November, I ran a day course on Spatial Data and QGIS with 15 participants. We had people from a wide range of backgrounds and interests, including geology, politics, health and many other disciplines. We looked at some of the theory behind GIS, such as projections and coordinate systems, as well as practical elements on how to use QGIS. I managed to get QGIS version 2.6 (Brighton) installed on the University systems, which only came out towards the end of October, so it was great that the participants could see and use the latest version. We also looked at the process of classifying data for cholopleth maps, including the important decisions to make when selecting colours, number of classes and method of classification.

I’ve attached the materials I used to this blog post (see below). I took the decision to make my material available under the Creative Commons Attribution-ShareAlike 4.0 International License (see http://creativecommons.org/licenses/by-sa/4.0/deed.en for details), which means that the material I created for this training session is free for anyone to use, as long as you attribute the material to me, and make any material you derive from this available under the same license. I would also ask you to let me know when you use my material, as it’s useful for me to know how many people are using it, and what sort of courses they are using it for.

In this form, some of the resources will be more useful than others, but I hope they are helpful. Any comments are gratefully received, either via email, or through  comments below.

Happy GISing!

Resources: