Difference between revisions of "Sandbox"

From Testiwiki
Jump to: navigation, search
m (Rectangle area test)
Line 455: Line 455:
 
width *  height
 
width *  height
 
</rcode>
 
</rcode>
 +
 +
=== MassHEIS test ===
 +
<rcode name='MassHEISTest' graphics='1'>
 +
library(OpasnetUtils)
 +
library(OpasnetUtilsExt)
 +
library(ggplot2)
 +
library(rgdal)
 +
library(maptools)
 +
library(RColorBrewer)
 +
library(classInt)
 +
library(raster)
 +
 +
data <- MassHEIS.data()
 +
 +
# Plot the data
 +
coordinates(data)=c("longitude","latitude")
 +
proj4string(data)<-("+init=epsg:4326")
 +
epsg4326String <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs")
 +
shp<-spTransform(data,epsg4326String)
 +
 +
#Create blank raster
 +
rast<-raster()
 +
 +
#Set raster extent to that of point data
 +
extent(rast)<-extent(shp)
 +
 +
#Choose number of columns and rows
 +
ncol(rast) <- 64
 +
nrow(rast) <- 64
 +
 +
#Rasterize point data
 +
rast2<-rasterize(shp, rast, shp$anmean, fun=mean)
 +
 +
start <- min(shp$anmean)
 +
end <- max(shp$anmean)
 +
 +
steps <- approx(c(start,end),n=6)$y
 +
colors <- rev(rainbow(length(steps), start=0, end=0.50))
 +
 +
par(mfrow=c(6,1), mar=c(3,1,0,1), cex=1.5)
 +
 +
colorstrip <- function(colors, labels)
 +
{
 +
count <- length(colors)
 +
m <- matrix(1:count, count, 1)
 +
image(m, col=colors, ylab="", axes=FALSE)
 +
axis(1,approx(c(0, 1), n=length(labels))$y, labels)
 +
}
 +
 +
cat("<span style='font-size: 1.2em;font-weight:bold;'>Massachusetts annual mean PM 2.5 microns</span>\n")
 +
 +
 +
colorstrip(colors, steps)
 +
 +
#Plot data
 +
 +
google.show_raster_on_maps(rast2, col=colors, style="height:500px;")
 +
 +
 +
</rcode>
 +
  
 
&nbsp;<!-- __OBI_TS:1332833567 -->
 
&nbsp;<!-- __OBI_TS:1332833567 -->

Revision as of 13:04, 31 October 2012


jepjep

Wikitab

http://ytoswww/yhteiset/YMAL/Projects/

Edited by ehacfff math ei jekkase Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): L_{Aeq} = 10 \log \int_{t_0}^{t_1} \frac{p_A^2(t)}{p_0^2} dt

Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \alpha + 8884444

Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \textstyle L_{Aeq} = 10 \log \int_{t_0}^{t_1} \frac{p_A^2(t)}{p_0^2} dt

ovariable merge testing

+ Show code

Static GoogleMaps test

+ Show code


Kuopio buildings on Google maps test

Building minimum age:

+ Show code


GoogleMaps Sorvi MML TEST

+ Show code

GoogleMaps PostgreSQL test 2

+ Show code

GoogleMaps PostgreSQL test

+ Show code

Opasnet.csv test

+ Show code

Opasnet.data and BUGS test

+ Show code

+ Show code

Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \alpha 444 + 9999 / 123


Hello

  • this works

Bluebox

  • works
  • ok


R-tools code include example

+ Show code

Jatropan viljelyala (ha):

n:

Mitkä tekijät halua eritellä tuloksessa?:
Katalyytin määrä
Ikä
Kastelu
Käytetty puristin

Minkä yhden tekijän halua eritellä kuvaajassa?:

+ Show code

+ Show code

Rectangle area test

width:

Rect height:

+ Show code

MassHEIS test

+ Show code