simsurvey an r based e learning tool for geo
play

SimSurvey - an R-based E-learning tool for geo- 2. Aim of the - PowerPoint PPT Presentation

SimSurvey SimSurvey SimSurvey Outline SimSurvey Outline 1. Introduction SimSurvey - an R-based E-learning tool for geo- 2. Aim of the project statistical analyses 3. SimSurvey 3.1 Structure Mario Gellrich 1 , Rudolf Gubler 2 , Andreas


  1. SimSurvey SimSurvey SimSurvey Outline SimSurvey Outline 1. Introduction SimSurvey - an R-based E-learning tool for geo- 2. Aim of the project statistical analyses 3. SimSurvey 3.1 Structure Mario Gellrich 1 , Rudolf Gubler 2 , Andreas Papritz 1 , Andreas Schönborn 3 , Rainer Schulin 1 3.2 Functionality 4. The graphical user interface (GUI) 1 Institute of Terrestrial Ecosystems, Swiss Federal Institute of Technology ETH Zürich (http://www.ethz.ch) 2 Terraplan Gubler (gubler@terraplan.ch) 3 Armadillo Media GmbH (http://www.armadillo-media.ch) 4.1 How does the GUI work? 4.2 What‘s special? 5. State of project/outlook SimSurvey SimSurvey 1. Introduction SimSurvey 2. Aims Of The Project SimSurvey 1. Introduction 2. Aims Of The Project The aims of the project are to: Problems: 1. Geostatistics is part of the curriculum of environmental a) make the learning of geostatistics easier scientists, but topic is quite difficult for students b) complement lessons for students 2. Students often have little (or no) R-programming skills 3. Installation and updating of R on multiple computers is Development of a web-based E-learning tool often time-consuming

  2. 3.1 SimSurvey – Structure 3.2 SimSurvey – Functionality 3.1 SimSurvey – Structure 3.2 SimSurvey – Functionality SimSurvey SimSurvey SimSurvey SimSurvey Teacher‘s module Student‘s module Teacher‘s module Student‘s module Statistics module Task, financial Hypotheses recources Generator of spatial distribution of pollutants - import/export data Definition of - edit data sampling approach - graphics Sampling Sampling environment - regression Spatial distribution of pollutants - geostatistical analyses - take samples Comparision predicted - view maps Geostatistical observed distribution of analyses - R-console pollutants - manage resources - import maps - view maps yes Alternative - simulate spatially sampling strategies? referenced data no Evaluation of sampling strategies 3.2 SimSurvey – Functionality 4. Graphical user interface (GUI) 3.2 SimSurvey – Functionality 4. Graphical user interface (GUI) SimSurvey SimSurvey SimSurvey SimSurvey SimSurvey is installed on a Linux-Server and runs in a browser The following software is required: • Apache (web server) The graphical user interface (GUI) The graphical user interface (GUI) • Macromedia Flash Player 8 (visualisation) • PHP (interface between Flash, R and MySQL) • R (statistics, text-output, graphics-output) • MySQL (database to block ‘dangerous’ commands in the R-console)

  3. 4. Graphical user interface (GUI) 4. Graphical user interface (GUI) SimSurvey SimSurvey SimSurvey 4.1 How does the GUI work? SimSurvey 4.1 How does the GUI work? Graphics-menu & histogram dialogbox Screenshot menu SimSurvey SimSurvey 4.1 How does the GUI work? SimSurvey 4.1 How does the GUI work? SimSurvey 4.1 How does the GUI work? 4.1 How does the GUI work? 1. Flash uses an XML-file to create a dialogbox 2. The value of the Flash-item hisDdmCol is “blue” Flash-items: 1 label XML-code 2 1 dropdown box 2 <outputField column="left" text="Bar color:" textbox name="hisTxt003"/> 3 <dropDown column="left" name=" hisDdmCol "> button 4 <dropDownItem text="gray" value="gray"/> <dropDownItem text="green" value="green"/> 3 <dropDownItem text="yellow" value="yellow"/> <dropDownItem text="blue" value=“blue"/> <dropDownItem text="red" value=“red"/> <dropDownItem text="wheat" value="wheat"/> </dropDown> 4 Macromedia Flash passes the value of hisDdmCol to PHP. Each Flash-item has a name and value

  4. SimSurvey SimSurvey 4.1 How does the GUI work? SimSurvey 4.1 How does the GUI work? SimSurvey 4.1 How does the GUI work? 4.1 How does the GUI work? 4. The PHP-variable "**eigenschaften2**" is part of a ‘dynamic’ R-script 3. PHP takes the value of hisDdmCol and assigns it to a PHP-variable $eigenschaften2 setwd("**Arbeitsverzeichnis**/") R-code load(".RData") library(grDevices) PHP-code user.workspace <- "**Arbeitsverzeichnis**" if ($_REQUEST["hisDdmV01"]) //graphics, histogram { ################## dynamic part 1 ####################################### start $ausdruck=$_REQUEST["hisTinGrn"]; //title graphic.name <- "**Ausdruck**" if (!$ausdruck) ################## dynamic part 1 ####################################### end { $ausdruck="tmp"; path.to.new.workspace <- paste(c(user.workspace, "/", graphic.name), collapse="") setwd(path.to.new.workspace) } load(paste(c(user.workspace, "/", ".RData"), collapse="")) $variable1=$_REQUEST["hisDdmV01"]; //variable ################## dynamic part 2 ####################################### start $eigenschaften1=$_REQUEST["hisTinCla"]; //number of classes $eigenschaften2=$_REQUEST["hisDdmCol"]; //barcolor sel.var <- "**variable1**" number.classes <- **eigenschaften1** $eigenschaften3=$_REQUEST["histTinXax"]; //label x bar.color <- "**eigenschaften2**" bar.color <- "**eigenschaften2**" $eigenschaften4=$_REQUEST["histTinYax"]; //label y label.xaxis <- "**eigenschaften3**" label.yaxis <- "**eigenschaften4**" $eigenschaften5=$_REQUEST["hisTinTit"]; //plot titel plot.title <- "**eigenschaften5**" $arbeitsverzeichnis=$projektpfad; ################## dynamic part 2 ####################################### end $maske="$pfad/include/graphics/histogram.R"; if (!file_exists("$projektpfad/$ausdruck/")) if(number.classes == "") { hist(dat[[sel.var]], nclass=nrow(dat[[sel.var]])/10, col=bar.color, { xlab=label.xaxis, ylab=label.yaxis, main= plot.title, cex.main=1) mkdir("$projektpfad/$ausdruck/", 0777); } chmod ("$projektpfad/$ausdruck/", 0777); if(number.classes != ""){ } hist(dat[[sel.var]], nclass=number.classes, col=bar.color, $grafikverzeichnis=$ausdruck; xlab=label.xaxis, ylab=label.yaxis , main= plot.title, cex.main=1) } } save(list = ls(all=TRUE), file = ".RData") setwd(user.workspace) quit(save = "yes",status=0,runLast = FALSE) $eigenschaften2=$_REQUEST["hisDdmCol"]; //barcolor SimSurvey 4.1 How does the GUI work? 4.1 How does the GUI work? SimSurvey 4.1 How does the GUI work? 4.1 How does the GUI work? 6. Flash takes the graphic produced by R and visualises it in the browser 5. PHP translates the ‘dynamic’ R-script into a standard R-script and runs it. R-code setwd("/home/mariog/public_html/simsurvey/tmp/ruedi/dornach_project/dornach/") load(".RData") library(grDevices) user.workspace <- "/home/mariog/public_html/simsurvey/tmp/ruedi/dornach_project/dornach" ################## dynamic part 1 ####################################### start graphic.name <- "histogram_001" ################## dynamic part 1 ####################################### end path.to.new.workspace <- paste(c(user.workspace, "/", graphic.name), collapse="") setwd(path.to.new.workspace) load(paste(c(user.workspace, "/", ".RData"), collapse="")) ################## dynamic part 2 ####################################### start sel.var <- "var4" number.classes <- 20 bar.color <- "blue" bar.color <- "blue" label.xaxis <- "cu" label.yaxis <- "Frequency" plot.title <- "Histogram (cu)" ################## dynamic part 2 ####################################### end if(number.classes == ""){ hist(dat[[sel.var]], nclass=nrow(dat[[sel.var]])/10, col=bar.color , xlab=label.xaxis, ylab=label.yaxis, main= plot.title, cex.main=1) } if(number.classes != ""){ hist(dat[[sel.var]], nclass=number.classes, col=bar.color , xlab=label.xaxis, ylab=label.yaxis , main= plot.title, cex.main=1) } save(list = ls(all=TRUE), file = ".RData") col=bar.color setwd(user.workspace) quit(save = "yes",status=0,runLast = FALSE)

  5. SimSurvey SimSurvey 4.1 How does the GUI work? SimSurvey 4.1 How does the GUI work? SimSurvey 4.1 How does the GUI work? 4.1 How does the GUI work? The R-GUI produces graphic output in separate windows. Text-output is displayed in a text-output window. SimSurvey SimSurvey 4.2 What’s special? SimSurvey 5. State of project/outlook SimSurvey 4.2 What’s special? 5. State of project/outlook Done: What is special in R-GUI compared to other R-web interfaces*? • Project/Session management implemeted • R-GUI implemeted (graphics, regression, geo-statistics, R-console) 1. R processes run via “socket connections” (faster than “batch mode”) 2. Interface between R and Macromedia Flash To do: • Sampling environment/handling of recources 3. GUI can easily be extended (modular construction system) • Tests/bug-fixing 5. Flash-R interface user-friendly (movable dialog-boxes and output- windows in one browser-window) • Outlook: • bug-fixed alpha-version available in Summer 2007 • distribution of R-GUI/SimSurvey as open source software for teaching *e.g. R-php (http://dssm.unipa.it/R-php) or Rweb (http://www.math.montana.edu/Rweb)

Recommend


More recommend