NavigationUser login 
dylan's blogInteresting use of levelplot() for time series dataSubmitted by dylan on Sat, 20100116 18:58.
Several recent articles appeared on the Rbloggers feed aggregator that demonstrated an interesting visualization of time series data using color. This style of visualization was readily adapted for the time series data I regularly collect (soil moisture and temperature), and quickly implemented with the levelplot() function from the lattice package. I hadn't previously considered using a mixture of factor (categorical) and continuous variables within a call to levelplot(), however the resulting figure was more useful than expected (see above). A single day's observation is represented by a colored strip (redder hues are higher temperature values, and lower soil moisture values), placed along the xaxis according to the date of that observation, and in a row defined by the location where that observation was collected from. Paneling of the data can be used to represent a more complex hierarchy, such as sensor depth or landscape position. At the expense of quantitative data retrieval (which is better supported be scatter plots), qualitative patterns are quickly identified within the new graphic. UnWrapping a Sphere with RSubmitted by dylan on Tue, 20091208 19:48.
( categories: )
Aggregating SSURGO Data in RSubmitted by dylan on Thu, 20090910 15:36.
If you happen to have some of the SSURGO tabular data that includes column names, the following R code may be of general interest for resolving the 1:many:many hierarchy of relationships required to make a thematic map. mukey clay silt sand water_storage 458581 20.93750 20.832237 20.861842 14.460000 458584 43.11513 30.184868 26.700000 23.490000 458593 50.00000 27.900000 22.100000 22.800000 458595 34.04605 14.867763 11.776974 18.900000
( categories: )
Potential Loss of Arable Land in the Central San Joaquin Valley, CASubmitted by dylan on Mon, 20090817 15:19.
Rapid urban and suburban expansion in the San Joaquin Valley have resulted in the loss of millions of acres of prime farmland in the last 100 years. Approximately 11% of class 1 (irrigated) land and 7% of class 2 land have already been paved over in the FresnoMadera region (first image below). Recent projections in the expansion of urban areas in this region suggests that by 2085 an additional 28% of class 1 and 25% of class 2 land will be paved over (second image below). This is a preliminary summary details to follow. ( categories: )
Computing Statistics from Poorly Formatted Data (plyr and reshape packages for R)Submitted by dylan on Thu, 20090709 15:26.
Using R to Create Misc. Patterns [smocking]Submitted by dylan on Sat, 20090704 23:15.
Accessing Soil Survey Data via WebServicesSubmitted by dylan on Thu, 20090528 17:46.
Making Sense of Large Piles of Soils Information: Soil TaxonomySubmitted by dylan on Wed, 20090527 18:43.
( categories: )
Simple Approach to Converting GRASS DBbackendsSubmitted by dylan on Sat, 20090523 21:32.
Currently GRASS uses a single SQLite (filebased) database per mapset convenient if you are interested in joining attribute tables between vectors; but not setinstone as the final approach that will be used by default in GRASS 7. Regardless, converting the backend is a fairly simple matter. Finally, taking the time to convert to an SQLite or Postgresql backend will undoubtably save you time and sanity if you ever find yourself working with vector+attribute data on a regular basis. Having access to a complete implementation of SQL can make extracting, summarizing, joining, and reformatting (column names, types, etc.) tabular data much simpler than what is available in the DBF backend. Also, there are several convenient graphical SQLite managers available, such as SQLite manager, SQLite data browser, and SQLite Admin. ( categories: )
Comparison of Slope and Intercept Terms for MultiLevel Model II: Using ContrastsSubmitted by dylan on Tue, 20090217 04:43.
PremiseSmall update to a similar thread from last week, on the comparison of slope and intercept terms fit to a multilevel model. I finally figured out (thanks RHelp mailing list!) how to efficiently use contrasts in R. The C() function can be called within a model formula, to reset the base level of an unordered factor. The UCLA Stats Library has an extensive description of this topic here. This approach can be used to sequentially test for differences between slope and intercept terms from a multilevel model, by resetting the base level of a factor. See example data and figure below. Note that the multcomp package has a much more robust approach to this type of operation. Details below. # need these library(lattice) # replicate an important experimental dataset set.seed(10101010) x < rnorm(100) y1 < x[1:25] * 2 + rnorm(25, mean=1) y2 < x[26:50] * 2.6 + rnorm(25, mean=1.5) y3 < x[51:75] * 2.9 + rnorm(25, mean=5) y4 < x[76:100] * 3.5 + rnorm(25, mean=5.5) d < data.frame(x=x, y=c(y1,y2,y3,y4), f=factor(rep(letters[1:4], each=25))) # plot xyplot(y ~ x, groups=f, data=d, auto.key=list(columns=4, title='Beard Type', lines=TRUE, points=FALSE, cex=0.75), type=c('p','r'), ylab='Number of Pirates', xlab='Distance from Land') ( categories: )
