MassHEIS: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(code moved from Sandbox and developed into an interactive model)
 
Line 18: Line 18:
2005;2005;2006;2006;2007;2007;2008;2008|default:2008
2005;2005;2006;2006;2007;2007;2008;2008|default:2008
"
"
embed="0"
embed="1"
graphics='1'>
graphics='1'>
library(OpasnetUtils)
library(OpasnetUtils)
Line 35: Line 35:
if(datatable == "EPAParticulateMatter") {
if(datatable == "EPAParticulateMatter") {
data <- data[data$Year == year, ]
data <- data[data$Year == year, ]
title <- "PM2.5 concentration, annual mean in Massachusetts (ug /m3)"
title <- paste("PM2.5 concentration, annual mean in Massachusetts, ", year, " (ug /m3)", sep ="")
coordinates(data)=c("longitude","latitude")


# ggplot(data, aes(x = Year, y = anmean)) + geom_bar()
# ggplot(data, aes(x = Year, y = anmean)) + geom_bar()
Line 42: Line 43:
colnames(data)[colnames(data) == "HRS_SCORE"] <- "anmean"
colnames(data)[colnames(data) == "HRS_SCORE"] <- "anmean"
title <- "Superfund sites, HRS_SCORE"
title <- "Superfund sites, HRS_SCORE"
coordinates(data)=c("LONGITUDE","LATITUDE")
}
}




# Plot the data
# Plot the data
coordinates(data)=c("longitude","latitude")
proj4string(data)<-("+init=epsg:4326")
proj4string(data)<-("+init=epsg:4326")
epsg4326String <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs")
epsg4326String <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs")

Revision as of 17:15, 31 October 2012

Massachusetts Health and Environment Information System (MassHEIS) is a database maintained by Silent Spring Institute.

Data interface

What data table to use?:

Year of observation? (applies to PM only):

+ Show code