Publications by Phuong Linh
data management with R (1)
Objective Loading packages; R: object-oriented programming Cleaning data and core functions pacman::p_load( rio, # importing data here, # relative file pathways janitor, # data cleaning and tables lubridate, # working with dates matchmaker, # dictionary-based cleaning epikit, # age_categories() function ...
1897 sym Python (21078 sym/70 pcs) 1 img 4 tbl
data management with R (2)
Objective Use of the stringr package to evaluate and handle character values (“strings”): Combine, order, split, arrange - str_c(), str_glue(), str_order(), str_split(); Clean and standardise; Adjust length - str_pad(), str_trunc(), str_wrap(); Change case - str_to_upper(), str_to_title(), str_to_lower(), str_to_sentence(); Evaluate and e...
2544 sym Python (17258 sym/126 pcs)
Social Science Survey data with R
Objective Working with SPSS file in R; Understanding variable, label, label value, data type. Library pacman::p_load( here, # relative file pathways haven, # reading sav file sjlabelled, labelled, dplyr, # data cleaning rio, # importing data janitor, # data cleaning and tables lubridate, # w...
953 sym Python (7890 sym/24 pcs) 8 img
data management in R (3)
Objective Understand and usage of functions from the package forcats (a short name for “For categorical variables”) and some base R functions. We also touch upon the use of lubridate and aweek for special factor cases related to epidemiological weeks. Cat ^^ Load packages pacman::p_load( rio, # import/export here, ...
2114 sym Python (9950 sym/56 pcs) 12 img
trackeR - gps data
Objective The trackeR package aims to fill the gap between the routine collection of data from GPSenabled tracking devices and the analyses of such data within the R ecosystem. The package provides utilities to import sports data from GPS-enabled devices, and, after careful processing, organises them in data objects which are organised in sepa...
1559 sym R (7021 sym/28 pcs) 4 img
discrete choice modelling (01) - travel mode data
Package Loading library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union library(AER) ## Loading required package: car ## Loading required package: carData ## ## Atta...
1622 sym R (8586 sym/65 pcs)
Store Performance Analysis
1 Data Processing #---- Change factor to Date Saledata$Date <- as.POSIXct(Saledata$Date, format = '%B %d, %Y') Saledata$Day <- weekdays(as.Date(Saledata$Date)) #---- Adding Day of Week and arrage from Mon to Sun Saledata$Day <- factor(Saledata$Day, levels= c("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")) Sale...
436 sym R (33671 sym/86 pcs) 27 img 2 tbl
Forecast: Holt-Winters Exponential Smoothing
1 Data Loading df <- read.csv("Forecasting.csv", sep = "\t", dec=".", header = TRUE) 2 Data Transform df <- transform(df, Invoice_date = as.Date(as.character(df$Invoice_date), "%Y%m%d")) df <- df %>% separate(Invoice_date, sep="-", into = c("year", "month", "day")) 3 Forecast 3.1 Revenue Calculation df2 <- df %>% group_by(ye...
234 sym R (4797 sym/19 pcs) 8 img
Inventory Analysis - ABC Approach
1 Loading Data wb_sheets <- readxl::excel_sheets(wb_source) print(wb_sheets) ## [1] "DANH MỤC MÃ VÀNG" "DATA ĐẶT HÀNG TỪ KH" "ISSUE 4-8(2019)" ## [4] "ISSUE 9-10(2019)" "ISSUE 1-4 (2020)" "LEAD TIME" # Load everything into the Global Environment wb_sheets %>% purrr::map(function(sheet){ # iterate through each sheet name ...
462 sym R (16078 sym/36 pcs) 4 img
Transport Demand Modelling - Spatial Model - Part 1
1 Import data library(sf) WIfinal = st_read('wi_final_census2_random4.shp') ## Reading layer `wi_final_census2_random4' from data source ## `/Users/admin/Desktop/Linh Data Studio/Transport modelling/wi_final_census2_random4.shp' ## using driver `ESRI Shapefile' ## Simple feature collection with 417 features and 34 fields ## Geometry type: M...
1850 sym R (6096 sym/32 pcs) 4 img