Speaker : Assoc. Prof. Dr. Supet Jirakajohnkool >> Thammasat University, Thailand.
<aside> 💡 Online International Training Course “Exploring the Role of GIS Technology with Environmental Health and Human Health: Impacts, Vulnerability and Adaptations of Climate Change” During the COVID-19 Pandemic 8 – 19 November 2021 Between 12.00-15.00 hrs. in Bangkok, Thailand local time (GMT +7) Faculty of Environment and Resource Studies Mahidol University, Thailand
</aside>
<aside> 💡 Download R script Code for this workshop
</aside>
[<https://drive.google.com/file/d/12qdnU9PsMsuAMBsZUkZAEWKVPRNVk3mO/view?usp=sharing>](<https://drive.google.com/file/d/12qdnU9PsMsuAMBsZUkZAEWKVPRNVk3mO/view?usp=sharing>)
dplyr
functionality
Learn six basic : filter, select, arrange, mutate, summarise, group_by
Participant install 6 packages to R studio.
install.packages("dplyr")
install.packages("data.table")
install.packages("tidyr")
install.packages("lubridate")
install.packages("plotly")
install.packages("tidyverse")
fread: Similar to read.table
but faster and more convenient. All controls such as sep
, colClasses
and nrows
are automatically detected.
It need to install data.table
library.
Then we use fread
to get CSV speadsheet file from webpage.
confirmed <- fread("<https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv>")
# check number of field
ncol(confirmed)
gather
gather Gather columns into key-value pairs. It need to install tidyr
library.
mutate
Create, modify, and delete columns, adds new variables and preserves existing ones; It need to install dplyr
library.
as.POSIXct
is a Date-time Conversion Functions. It need to install base
library.