Skip to content

Entry level R maps from African data. English & French training materials for a ~ 4 hour tutorial.

Notifications You must be signed in to change notification settings

afrimapr/r-maps-tutorial-fr-eng

Repository files navigation

Welcome to the afrimapr tutorial : Entry level R maps from African data.

Bienvenue dans le tutoriel afrimapr : Cartes simples avec des données africaines

This repository contains materials in French & English to support a 4 hour + tutorial that can be led or self guided.

It was initially delivered at the useR2021 conference.

It is structured as an RStudio project.

The tutorial is divided into 3 sessions, each can take around 90 minutes. The final session is a practical that gives you some pointers to applying the material from the first two sessions on data of your own choice.

To use the tutorial resources

1. copy the project to your local machine

From RStudio select File, New project, From version control, & paste in the address of this repository. That should create a copy on your local machine.

2. run code to install packages

On your local machine, in RStudio, open the file packages_and_data.R. Press Source to run the whole file, this should install all the packages that you need for the tutorial.

3. choose French or English

In RStudio, open the folder for english or french

4. run code to disply tutorial text and images

In RStudio, open the for_learners folder and open the file 1_tutorial_code_session_one.R and run the first two lines of code. This should open a html document in the RStudio Viewer tab with text, images and code for the tutorial.

5. read text in the Viewer tab, run code in the Console

Read gradually through the tutorial in the Viewer tab. When you come to code sections you can copy & paste code into the R console to run it yourself and experiment with modifying. Static plots will appear in the RStudio Plots tab and you can click on the Viewer tab to return to the tutorial text. Dynamic plots (e.g. from tmap & mapview) will appear in the Viewer tab and you can press the back arrow to return to the tutorial text.

The R file 1_tutorial_code_session_one.R, that you accessed before, contains just the code sections of the tutorial so you can also use this to copy & paste code into the console.

6. repeat for sessions 2 & 3

Sessions 2 & 3 can be run similarly by running the first two lines of the files 2_tutorial_code_session_two.R & 3_tutorial_code_session_three_SOLUTIONS.R

Extra information

The session_info.txt file in the project folder contains the packages and package versions used in this tutorial.

The 'data' folder contains data to use for the practical part of the tutorial in session three if you have not brought your own data.

Licensing & re-use

This course is licensed under a Creative Commons share-alike licence. Creative Commons

Please re-use it and attribute us :-)

Feedback

We welcome feedback, do get in touch or send a pull request.

About

Entry level R maps from African data. English & French training materials for a ~ 4 hour tutorial.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages