Sandbox: Difference between revisions
Juha Villman (talk | contribs) No edit summary |
|||
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> | |||
<!-- __OBI_TS:1332833567 --> | <!-- __OBI_TS:1332833567 --> |
Revision as of 13:04, 31 October 2012
Moderator:Ehac (see all) |
|
Upload data
|
jepjep
Wikitab
http://ytoswww/yhteiset/YMAL/Projects/
Edited by ehacfff math ei jekkase Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle L_{Aeq} = 10 \log \int_{t_0}^{t_1} \frac{p_A^2(t)}{p_0^2} dt }
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \alpha + 8884444}
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \textstyle L_{Aeq} = 10 \log \int_{t_0}^{t_1} \frac{p_A^2(t)}{p_0^2} dt }
ovariable merge testing
Static GoogleMaps test
Kuopio buildings on Google maps test
GoogleMaps Sorvi MML TEST
GoogleMaps PostgreSQL test 2
GoogleMaps PostgreSQL test
Opasnet.csv test
Opasnet.data and BUGS test
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \alpha 444 + 9999 / 123}
Hello
- this works
Bluebox
- works
- ok
R-tools code include example
Rectangle area test
MassHEIS test