R

Access Global Climate and Weather Data in R

Masumbuko Semba
Climatic change in the last few decades has had a widespread impact on both natural and human systems, observable on all continents. Ecological and environmental models using climatic data often rely on gridded data, such as WorldClim. WorldClim is a set of global climate layers (gridded climate data in GeoTiff format) that can be used for mapping and spatial modeling. WordlClim version 2 contains average monthly climatic gridded data for the period 1970-2000 with different spatial resolutions, from 30 seconds (~1 km2) to 10 minutes (~340 km2).

Working with NetCDF files in R

Masumbuko Semba
R
Introduction Network Common Data Form (NetCDF) is a widely used format for storing array–based data as variables. NetCDF are developed and maintained by Unidata was originally developed for storing and distributiing climate data , such as those generatd by climate simulation or reanalysis models. It has also been adopted in other fields, particularly in oceanography, where large mutidimensional arrays of data are generatted from satellite observation systems. The NetCDF format is a platform-independent because can be transeerred among servers and coputers that are running different operating systems, without a need to convert the file that fit a particular sytem.

Working with Raster Dataset in R

Masumbuko Semba
We begin with answering the questions. And the possible reason to reach the goal is to define questions like; what is a raster dataset? What tools/functions are used to import raster in R? How to I work with and plot raster data in R How missing or bad data in R are handled with R Objectives Describe the fundamental attributes of a raster dataset Explore raster attributtes and metadata Import raster dataset into R workspace visualize raster object Distinguish single versus multi-bands rasters Introduction to Raster data This this section introduce you to the fundamental principles, packages and metadata/raster attributes that are needed to work with raster data in R.

Control flow in R

Masumbuko Semba
R
One of the prime purposes of using a computer is to automate a task that would be very tedious to perform by hand. The usual implication is that some task is to be performed over and over again in some systematic way. This chapter will be concerned with the programming concept of a control flow, a feature that is at the heart of nearly every computer algorithm. The two important control flows statements are* count-controlled* loops like for loops and conditional statements such as if-else construct.

Time interval with lubridate in R

Masumbuko Semba
R
Time Interval You can save an interval of time an an interval object in R with lubridate. This is quite useful for example, you want to understand the interval between two or more successive CTD casts algoa = list.files("d:/semba/CTDs/algoa/processing/updown files/", pattern = "dst", full.names = TRUE) we notice that the files has an .cnv extenstion, which is oce–readable. We therefore load the oce package together the package in tidyverse.