WAT-E2090 - Water and People in a Changing World L, 16.04.2019-23.05.2019
Kurssiasetusten perusteella kurssi on päättynyt 23.05.2019 Etsi kursseja: WAT-E2090
Osion kuvaus
-
R
- Introduction to R (html)
- RStudio interface cheat sheet (pdf)
- Introduction to raster package (pdf)
- ggplot2 website containing full reference
- Various R package cheat sheets provided by RStudio
- Support: easiest is to google the command or task you want to do; there is lots of help in the web (also, don't forget using ?function). And naturally we, teachers, help too whenever needed...
- R has a strong community around it since it's open source; most likely, someone else has had similar issues than you are having and has asked about it in some forums
Extra data
Week 1:
- runoff, precipitation and temperature under climate change: future_climate_05dgr_corrected.Rdata
- precipitation and temperature based on downscaled IPPC5 (CMIP5) data from worldclim.org, average change of five GCMs under RCP8.5 scenario)
- runoff from The Inter-Sectoral Impact Model Intercomparison Porject (https://www.isimip.org/)
Week 3:
- Food supply data from FAOSTAT (from http://faostat.fao.org): FoodSupplyKcal.xlsx
- Food supply data (same as above) together with the production data: dom_food_prod_supply.xlsx
- BMI (body mass index) data from NCD-RisC (http://www.ncdrisc.org/) including mean BMI as well as share of population overweight and obese: NCD_RisC_Lancet_2017_BMI.xlsx. This data and an example script are available in the git, see "/Supporting materials"
- world cities - you can download them as follows: write the following code to your script. If you want less cities, change 'scale = 50' to 'scale = 110', and if you want more details, change it to 'scale = 10' (note: with scale = 10, it might be rather large file to download!). The script below is also in the git, pull and see "/Supporting materials"
install.packages("rnaturalearth")
library(rnaturalearth)
library(ggplot2)
cities <- ne_download(scale = 50, type = "populated_places", category = "cultural", destdir = tempdir(), load = TRUE,
returnclass = "sf")
ggplot() + geom_sf(data = cities)
With same package, you can also download many other global vector datasets such as roads, lakes, rivers, etc; please check page 9 at
https://cran.r-project.org/web/packages/rnaturalearth/rnaturalearth.pdf
Week 5:
Additional shapefiles. Includes those for continents, countries and large river basins (same data than provided for lecture 4): shp_files2.zip
Week 6:
Same data that given in theme tab, but for year 1990: