Quantcast
Channel: Ecostudies » scripting
Browsing all 14 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Calculating bioclim variables in GRASS GIS

A script is provided to calculate Bioclim variables in GRASS GIS on Linux using monthly temperature and rainfall data. Continue reading →

View Article



Image may be NSFW.
Clik here to view.

Importing WorldClim climate .bil datalayers in GRASS GIS

In a previous post I wrote how you can generate bioclimatic data layers based on monthly rainfall and temperature data in GRASS GIS. Monthly climate data for future conditions can be downloaded from...

View Article

Image may be NSFW.
Clik here to view.

Build in functions in R

Almost everything in R is done through functions. Quick-R gives a very useful overview of commonly used numeric and character functions for creating or recoding variables. And while you are at it,...

View Article

Image may be NSFW.
Clik here to view.

MapTiler to create online maps

For a project a few years ago we created a vegetation map for central and southwest Kenya (see http://ecodiv.org/trapnell for more information). The map together with documentation was initially made...

View Article

Image may be NSFW.
Clik here to view.

Finding and removing carriage returns in your SQLite table

The problem with copy data from e.g., an excel or calc sheet into an SQLite database (or any database I reckon) is that the data you copy might include an carriage return. I found this out the hard way...

View Article


Image may be NSFW.
Clik here to view.

Using the GRASS command g.list in R

Running grass commands within R is easy using either the system function or the spgrass6 package. But sometimes the GRASS outputs are not easy to read into a data frame or vector. For example, what if...

View Article

Image may be NSFW.
Clik here to view.

Using the GRASS command g.mlist in R

In this post I was trying to find a way to get a list of GRASS data layers in R. The problem is running the GRASS function ‘g.list’ from R (using system or execGRASS from the spgrass6 package) gives a...

View Article

Image may be NSFW.
Clik here to view.

Finding and renaming long file names with R

I have never given it a though, but there is apparently a limit to the length of file names that can be handled by Windows Explorer of Windows XP. I found out when trying to copy my Zotero folder to …...

View Article


Image may be NSFW.
Clik here to view.

Combining text from data frame in one text string in R

Earlier I wrote about the custom STRJOIN function in OpenOffice. A very handy function when you need to combine all values in a row or column (or combination of the two), separated by a delimiter. In R...

View Article


Image may be NSFW.
Clik here to view.

R/GRASS connection: more than the sum of its parts

GRASS GIS is a very powerfull GIS offering an extensive set of tools for geospatial data management and analysis, image processing, and spatial modeling. The possibility to directly interact with R...

View Article

Image may be NSFW.
Clik here to view.

Start R inside GRASS but keep the terminal prompt

I often run R from within GRASS GIS. For example using R as a scripting language to automate GIS analysis. Or to use statistical models in R on spatial data in GRASS. I used to open R in the terminal....

View Article

Image may be NSFW.
Clik here to view.

Multivariate Environmental Similarity Surfaces (MESS) index in GRASS GIS

The Multivariate Environmental Similarity Surfaces (MESS) is an index that represents how similar a point in space is to a reference set of points, with respect to a set of predictor variables (Elith...

View Article

Image may be NSFW.
Clik here to view.

Creating a raster layer with a weighted random sample of points (or, my first...

I needed to create a raster map layer with a weighted random sample of all raster cells, using the percentage of crop land as weight. I couldn’t find a function to create such a weighted sample, so I...

View Article


Image may be NSFW.
Clik here to view.

PyGRASS equivalent of piping results from one function to another

When using GRASS commands on the command line, one very neat little trick is to ‘pipe’ results from one function directly to another. An example I used in an earlier post is: So, how does that works in...

View Article
Browsing all 14 articles
Browse latest View live




Latest Images