This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: "Election map and graphic" | |
| author: "NHIEP Seila" | |
| date: "`r Sys.Date()`" | |
| format: | |
| html: | |
| code-fold: true | |
| toc: true | |
| toc-title: TRUE | |
| editor: visual |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: "Election Visualization" | |
| author: "Seila" | |
| date: "5/15/2022" | |
| #output: html_document | |
| output: pdf_document | |
| #output: word_document | |
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ##### Call Library ---- | |
| { | |
| library(tidyverse) | |
| library(tidyxl) | |
| library(unpivotr) | |
| library(readxl) | |
| library(ggplot2) | |
| library(plotly) | |
| library(crosstalk) | |
| library(bizdays) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: "STT Demo" | |
| date: "5/08/2021" | |
| output: | |
| flexdashboard::flex_dashboard: | |
| orientation: rows | |
| theme: flatly | |
| storyboard: FALSE | |
| #css: my-custom-rules.css | |
| fig_mobile: TRUE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: "PCAsia Work Plan 2021" | |
| author: "NHIEP Seila" | |
| output: | |
| flexdashboard::flex_dashboard: | |
| orientation: rows | |
| theme: flatly | |
| #“default”,“cerulean”,“journal”,“flatly”,“darkly”,“readable”,“spacelab”,“united”,“cosmo”,“lumen”,“paper”,“sandstone”,“simplex”,“yeti” | |
| vertical_layout: fill | |
| social: [ "menu" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: "TimesheetPCAsia" | |
| output: | |
| flexdashboard::flex_dashboard: | |
| orientation: rows | |
| theme: flatly | |
| storyboard: FALSE | |
| #css: my-custom-rules.css | |
| fig_mobile: TRUE | |
| vertical_layout: fill |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(raster) | |
| openfile = "F:/Mommy/RDataThesis/FRUGMdata" | |
| files <- dir(openfile, pattern="..tif$",full.names=TRUE, ignore.case = TRUE) | |
| for (i in 1:(length(files))) {assign(substr(files[i],(nchar(openfile)+2),(nchar(files[i])-4)), raster(files[i]))} | |
| print(ls()) | |
| # lf = list(AHP2000,AHP2009,road,ue1989,ue2000,ue2009,restrict) | |
| # plot(lf[[4]]) | |
| ########################################### | |
| ####################################################### | |
| #plot(ugmf|road) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(tidyr) | |
| library(dplyr) | |
| library(readxl) | |
| ##### Set Working Directory ##### | |
| setwd("F:/Rscript2020/data") | |
| ##### list the files in directory ##### | |
| emif = read_xlsx("Gear-and-distance.xlsx", sheet = 3) | |
| ####### Column name in text starting with 01 02 03 ... ############### | |
| gf = emif %>% gather(categories, Numberofboat, "01km":"60km", na.rm = FALSE, convert = TRUE) | |
| names(gf) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ##### Call Library ##### | |
| library(rgdal) | |
| library(raster) | |
| ##### Set Working Directory ##### | |
| setwd("F:/PICAtlas/Atlas 2016/Imagery/Sentinel 2019/IMGDATA") | |
| ##### list the files in directory ##### | |
| rnf = list.files() | |
| ##### Read JPEG2000 from drive ##### | |
| for (i in 1:(length(rnf))) { | |
| # assign(scan("",what="char",skip=1,quiet=TRUE,nlines=1), raster(paste0(getwd(),"/",lc8f[i]))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Gifvideo = function(dirlsat8,dirlsat7,odri,lsat8video,lsat8gif){ | |
| packages <- c( "RStoolbox", "raster", "caret", "randomForest", "e1071", "animation","rgdal") | |
| lapply(packages, library, character.only = TRUE) | |
| file8 = list.files(dirlsat8, pattern = "*MTL.txt$" , all.files= TRUE) | |
| dirMTLfile8 <- paste0(dirlsat8,"/",file8) | |
| metaData <- readMeta(dirMTLfile8, raw = TRUE) | |
| lsat8 <- stackMeta(dirMTLfile8) |
NewerOlder