Publications by Phuong Linh
Geospatial vector data: Part 4 Informative Map
1 Clear Workspace rm(list = ls()) 2 Load library library(ggplot2) # ggplot() fortify() library(dplyr) # %>% select() filter() bind_rows() library(rgdal) # readOGR() spTransform() library(raster) # intersect() library(ggsn) # north2() scalebar() library(rworldmap) # getMap() 3 Data input GBIF data for the Brown Trout (Ca hoi nau) brown_tro...
4288 sym R (5113 sym/25 pcs) 8 img
Geospatial vector data: GBIF & Flickr data - Part 1
I. INTRODUCTION 1 Statement So called “big data” are being increasingly used in the life sciences because they provide a lot of information on large scales and very fine resolution. However, these datasets can be quite tricky to work with. Most of the time the data is in the form of presence-only records. Volunteers, or social media users, t...
1979 sym R (2888 sym/16 pcs) 3 img
data wrangling: strsplit, trim, str_replace
1 Load library library(ggplot2) library(dplyr) library(pastecs) library(fpc) library(FactoMineR) library(readxl) library(xlsx) 2 Data input df1 <- read_excel("df.xlsx") 3 Data wrangling # Remove someone doesnt know the product df<-df1[!(df1$`1.Do you know the product?` =="No"),] Let use strsplit: # string split s <- strsplit(df$`3. Channel`,spl...
385 sym R (1834 sym/9 pcs) 2 img
Open Street Map Data & Rayshader Map
3-layers Open Street Map Data & Rayshader Map rm(list = ls()) 1 Loading library library(tidyverse) ## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ── ## ✓ ggplot2 3.3.5 ✓ purrr 0.3.4 ## ✓ tibble 3.1.6 ✓ dplyr...
507 sym R (3977 sym/30 pcs) 1 img
Discrete Choice Models - Part 1
rm(list = ls()) 1 Data library(foreign) clogit <- read.csv("clogit.csv") summary(clogit) ## MODE TTME INVC INVT ## Min. :0.00 Min. : 0.00 Min. : 2.00 Min. : 63.0 ## 1st Qu.:0.00 1st Qu.: 0.75 1st Qu.: 23.00 1st Qu.: 234.0 ## Median :0.00 Median :35.00 Median : 39.00 ...
1886 sym R (15577 sym/34 pcs)
Hanoi City Map
1 Library Loading # Clear workspace: rm(list = ls()) library(tidyverse) ## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ── ## ✓ ggplot2 3.3.5 ✓ purrr 0.3.4 ## ✓ tibble 3.1.6 ✓ dplyr 1.0.8 ## ✓ tidyr 1.2...
279 sym R (2864 sym/16 pcs) 2 img
Panel Data Model
1 Library Loading library(readxl) library(skimr) #summary statistics library(foreign) #panel data models library(plm) # Lagrange multiplier test and panel models 2 Import Dataset data <- read_excel("Grunfeld_data.xlsx") df <- data.frame(data) head(df) ## invest value capital firm year firmcod ## 1 317.6 3078.5 2.8 General Moto...
2000 sym R (6367 sym/21 pcs)
Spatial autocorrelation analysis - Part 1
1 Objective Run various measures of spatial correlation Evaluate both global and local measures of spatial autocorrelation Identify spatial clusters library(tidyverse) library(sf) library(sp) library(spdep) library(rgdal) # Bindings for the Geospatial Data Abstraction Library library(rgeos) # Interface to Geometry Engine - Open Source library(t...
1436 sym R (3325 sym/26 pcs) 13 img
Spatial autocorrelation analysis - Part 2
1 Objective Run various measures of spatial correlation Evaluate both global and local measures of spatial autocorrelation Identify spatial clusters 2 Key focus Moran Statistics Getis-Ord approach (Hot-spot) 3 Preliminary material Moran’s I Interpretations of Moran’s I Moran Scatter Plot Geary’s C Local Spatial Autocorrelation Clusters...
2948 sym R (14197 sym/45 pcs) 10 img
Vietnam Administrative Map
1 Administrative Map of Vietnam 1.1 Vietnam Map - Whole country # Clear workspace # Load package library(tidyverse) # Get geo-spatial data for Vietnam link1 <- "https://raw.githubusercontent.com/nguyenduy1133/data/main/Dia_phan_Tinh_cap_nhat.geojson?fbclid=IwAR1cPIIswZ9y8ZvsmW8ioqh57malxnlrBr2L3EjYRfMPiDjCqu4kCA2PUxQ" link2 <- "https://data....
912 sym R (10063 sym/19 pcs) 7 img 1 tbl