NavigationUser login 
dylan's blogTemporal Trends in Soil Science Jargon  via Google Ngram ViewerSubmitted by dylan on Wed, 20101229 17:25.
( categories: )
Customizing Maps in R: spplot() and latticeExtra functionsSubmitted by dylan on Wed, 20101215 17:00.
I recently noticed the new latticeExtra page on Rforge, which contains many very interesting demos of new latticerelated functionality. There are strong opinions about the "best" graphics system in R (base graphics, grid graphics, lattice, ggplot, etc.) I tend to use base graphics for simple figures and lattice for depicting multivariate or structured data. The sp package defines classes for storing spatial data in R, and contains several useful plotting methods such as the latticebased spplot(). This function, and backend helper functions, provide a generalized framework for plotting many kinds of spatial data. However, sometimes with great abstraction comes great ambiguity many of the arguments that would otherwise allow fine tuning of the figure are buried in documentation for lattice functions. Examples are more fun than links to documentation, so I put together a couple of them below. They describe several strategies for placing and adjusting map legends either automatically, or manually added with the update() function. The last example demonstrates an approach for overplotting 2 rasters. All of the examples are based on the meuse data set, from the gstat package. ( categories: )
Three New SoilsRelated KMZ DemosSubmitted by dylan on Tue, 20101207 18:25.
( categories: )
Updates to the 'aqp' Package for R (version 0.983)Submitted by dylan on Tue, 20101130 22:28.
Just released an updated version of our 'aqp' package for quantitative soils investigations, available on CRAN and RForge. Some of the major changes are listed below: from the aqp NEWS file:  aqp 0.981 (20101123)  * added basic demo: demo(aqp) * soil.slot() now computes aggregate probabilities over userdefined segments * rewrite of weighted profile aggregation functions  aqp package now requires Hmisc package  using Hmisc::wtd.{mean,var,quantile} to compute values + better adjustment of weights when computing weighted SD + fixes longstanding bugs with wt. mean/SD when NA present in x_i and not in wt_i + weighted quantiles now computed * addition of new (experimental) S4 classes and methods  these are now in the aqp_S4 branch * added n.depth.ticks option to profile_plot() * profile_compare() algorithm stabilized, new default settings * removed code in profile_compare() that is now obsolete  note that this will cause changes to numerical classification of soil profiles ( categories: )
A Visualization of Soil Taxonomy Down to the Subgroup LevelSubmitted by dylan on Wed, 20100929 18:44.
It turns out that you can generate a quasinumerical distance between soil profiles classified according to Soil Taxonomy (or any other hierarchical system) using Gower's generalized dissimilarity metric. For example, taxonomic distances computed from subgroup membership are based on the number of matches at the order, suborder, greatgroup, and subgroup level. This approach allows for the derivation of a quasinumerical classification system from Soil Taxonomy, but it is severly limited by the fact that each split in the hierarchy is given equal weight. In other words, the quasinumerical dissimilarity associated with divergence at the soil order level is identical to that associated with divergence at the subgroup level. Clearly this is not ideal. Gower's generalized dissimilarity metric is conveniently implemented in the cluster package for R. I have posted some related material in the past, but left out some of the details regarding which clustering algorithms produce the most useful dendrograms. Divisive clustering best represents the stepwise splits within the hierarchy of Soil Taxonomy, as expressed in terms of pairwise dissimilarities. Code examples are below, along with the data used to generate the figure of California subgroups. Discontinuities in figure below are caused by errors in the underlying data, e.g. mismatches in soil order vs. suborder membership. ( categories: )
More AQP (algorithms for quantitative pedology) ExamplesSubmitted by dylan on Fri, 20100924 03:26.
The aqp package can be downloaded from RForge. AQP Examples: Profile VisualizationSubmitted by dylan on Tue, 20100921 03:27.
Two examples of the output from the profile_plot() function, using data from the Sierra Foothill Region, CA. Soil Properties Visualized on a 1km GridSubmitted by dylan on Tue, 20100831 18:29.
A couple of maps generated from a 1km gridded soil property database, derived from SSURGO data where available with holes filled with STATSGO data. Soil properties visualized at this scale illustrate several important soilforming factors operating within California: sediment source in the Great Valley, the interplay between precipitation and ET, and removal of salts. This database and the details on its creation should be available within a couple of months. This builds on a related post highlighting some of these maps packaged in KMZ format. Check back in a couple of weeks of updates. GRASS Can Make Pretty MapsSubmitted by dylan on Mon, 20100823 23:22.
I have posted a couple examples in the past on the topic of high quality map production from GRASS GIS usually via the Generic Mapping Tools. I am not sure why, but I have previously avoided using the traditional cartographic output module that is bundled with GRASS (ps.map). This is despite the fact that there is now an excellent collection of examples and a very detailed manual page... I now realize that I have been missing out. I needed a map with several "zoomed" insets, on rather short notice, with all of the data derived from work that had previously done in GRASS. Not looking forward to exporting all of the data into a GMTcompatible format, I gave ps.map a try. The following image is a JPG (i.e. degraded) version of the Postscript file generated by ps.map, with no manual intervention (other than page layout). Obviously the labels aren't readable, but that can be fixed within a drawing program like Inkscape. Overall, the results were much better than I was expecting. I'll post some notes and the script used to generate the map next time. ( categories: )
What would a 25th, 50th, and 75th percentile soil profile look like?Submitted by dylan on Wed, 20100811 20:38.
I have mentioned the AQP package in previous entries. One of the functions in this package generates aggregate soil profile data, from a collection of soil profiles that are related by some factor: common lithology, common landscape position, and so on. Typically the mean, or median (50th percentile) is used to generate a new aggregate profile, that is representative of the original collection. Extending this idea, I thought that it would be interesting to generate aggregate profiles that are representative of the 25th and 75th percentiles as well. For the sake of clarity, lets call these three new profiles (25th, 50th, and 75th percentiles) Q25, Q50, and Q75. A 10 cm slicing interval was used as the basis upon which soil properties were aggregated. ( categories: )
