Author: Patrick Schratz

How and why to write a thesis in LaTeX (with template!)

Download master file So you are thinking about writing your bachelor/master thesis in LaTeX because a lot of people told you how great LaTeX is compared to Word when it comes to thesis writing? – Indeed, they are right and and there are various points why! In this post I will explain the advantages of LaTeX compared to Word, provide my master thesis “master file” and give you some help to get you smoothly started with LaTeX! LaTeX vs. Word As this post is in favor of using LaTeX, I will highlight the advantages of LaTeX first. However, I will also try to...

Read More

Easily import personal Python functions

When using Python you will most likely come across personal functions you defined on your own and are not available from a public package. Normally you need to define every custom function you want to use every time you call your script because Python does not know your functions otherwise. This leads to several function definitions at the top of your script which can make your script very long. To avoid this, you can put all your personal functions in their own file and place those in the same directory! Let´s say you have two custom functions, being Dissolve.py...

Read More

Forest-DRAGON 3: Pure And Mixed Pixel Analysis

Download Poster In Forest DRAGON 3, synergy of Earth Observation products to derive information of decadal trends of for- est in northeast China was investigated. Following up the results of Forest-DRAGON 1 and 2, Growing Stock Volume (GSV) products from different years were inves- tigated to derive information on vegetational in north- east China. The BIOMASAR maps of 2005 and 2010, produced within the previous DRAGON projects, set the base for all analyses. We took a closer look at scale prob- lems regarding GSV derivation, which are introduced by differing landcover within one pixel, to investigate dif- ferences throughout...

Read More

Polygon fishnet with custom row/column count

Inspired by this GIS exchange question. Requires function shapewriter. Creates polygon fishnet based on input shapefile. Rows and columns counts have to be specified. Length and height of each zone is calculated within the function in meter using “x/y shapefile extent” / “given number of rows and cols”. fishnet <- function(boundingbox, NumberofZonesX, NumberofZonesY, outname=NULL) { require(raster) require(sp) require(Grid2Polygons) # calculate extends ext = raster::extent(boundingbox) bb <- sp::bbox(boundingbox) # calculates cell size in x and y (in m) based on chosen 'Number of Zones' cs <- c(floor((ext@xmax-ext@xmin)/NumberofZonesX), floor((ext@ymax-ext@ymin)/NumberofZonesY)) # calculates cell offsets cc <- bb[, 1] + (cs/2) # sets...

Read More

Introducing R package ‘oddsratio’

You are dealing with statistical models (GLMs or GAMs) with a binomial response variable? Then the oddsratio package will improve your analysis routine! This package simplifies the calculation of odds ratios in binomial models. For GAMs, it also provides you with the power to insert your results into the smooth functions of your predictors! But let’s start with some basics… – This post refers to package version 0.3.0 – GLM The concept of odds ratio calculation The standard approach to calculate odds ratios in Generalized Linear Models (GLMs) is to exponentiate the function coefficients using exp(coef(model)). Since the coefficients...

Read More