SubjectsSubjects(version: 978)
Course, academic year 2025/2026
   Login via CAS
R a Python in Geosciences - MZ330J02
Title: R a Python in Geosciences
Czech title: R a Python v geovědách
Guaranteed by: Department of Physical Geography and Geoecology (31-330)
Faculty: Faculty of Science
Actual: from 2025
Semester: winter
E-Credits: 4
Examination process: winter s.:
Hours per week, examination: winter s.:0/2, C [HT]
Capacity: unlimited
Min. number of students: unlimited
4EU+: no
Virtual mobility / capacity: no
State of the course: not taught
Language: English
Guarantor: doc. RNDr. Michal Jeníček, Ph.D.
Incompatibility : MZ330P132
Opinion survey results   Schedule   
Annotation
The objective of the course is to provide students with basic principles of using R and Python programming languages in geosciences. Students will learn and practice the most common principles of data assessment typical for geoscience applications based on selected exercises, such as working with large data sets (time series, spatial data), their basic statistical evaluation (correlation, regression, trends in time series, interpolation) and visualisation. The course is focused on 1) assessment and statistical analysis of time series, 2) regression models, 3) methods of quantification of spatial autocorrelation, 4) principal component analysis, 5) working with raster and remote sensing data, and 6) modelling selected environmental processes. A part of the course will also be a “coding club”, which enables students to discuss with lecturers their data and codes used for their final theses.
Last update: Havelková Veronika, Mgr. (31.07.2025)
Literature

-    Bivand, R., Pebesma, E. J., and Gómez-Rubio, V.: Applied Spatial Data Analysis with R, 2nd ed., Springer, New York, 405 pp., 2013.
-    Haan, C. T.: Statistical Methods in Hydrology, 2nd ed., Iowa State Press, Ames, Iowa, 2002.
-    Recommended literature from individual lectures

Last update: Havelková Veronika, Mgr. (31.07.2025)
Requirements to the exam

-   Active attendance at lectures, finishing homework assignments

Last update: Havelková Veronika, Mgr. (31.07.2025)
Syllabus

1)    Introduction to R and RStudio, R projects, packages and functions, examples of good practice when writing the code, keyboard shortcuts, importing data, data types and object classes, basic operations
2)    Regression: syntax of regression models in R, basic and advanced regression models (linear models, GAM, linear mixed-effect model, spatial-lag model)
3)    Charts and data visualisation using the package ggplot2, conversions between long and wide formats
4)    Handling nc raster files with gridded climatic data (CRU, CRU JRA, EOBS) in R
5)    Tidyverse fundamentals: tibbles, pipes, verbs, adverbs; dates and times and time zones
6)    Dealing with spatial data in modern R; tidyverse approach, packages sf, terra and tidyterra
7)    Basics of functional programming in R, nesting and list-columns
8)    Creating simple hydrological models: modelling evapotranspiration, modelling soil moisture based on observed data.
9)    Trends in time series – Mann-Kendall tests, visualisations using heatmaps
10)    Python: Basics, installation of modules, basic commands and syntax
11)    Python: Accessing satellite data using GDAL package
12)    Plotting in Python (Pyplot)

Last update: Havelková Veronika, Mgr. (31.07.2025)
Learning outcomes

-    Participants will adopt R and Python programming languages for selected geoscience applications.
-    Participants will learn how to work with different types of data.
-    Participants can discuss their own scripts and data used for their final theses.

Last update: Havelková Veronika, Mgr. (31.07.2025)
 
Charles University | Information system of Charles University | http://www.cuni.cz/UKEN-329.html