Sunday, September 20, 2015

Blog Statistics with StatCounter & R

If you're interested in analysing your blog's statistics this can easily be done with a web-service like StatCounter (free, only registration needed, quite extensive service) and with R.
After implementing the StatCounter script in the html code of a webpage or blog one can download and inspect log-files with R with some short lines of code (like below) and then inspect visitor activity..

url <- "http://statcounter.com/p7447608/csv/download_log_file?form_user=MYUSERNAME&form_pass=MYPASSWORD"
file <- paste(tempdir(), "\\log", ".CSV", sep = "")
download.file(url, dest = file)
log <- read.csv(file, as.is = T, header = T)

str(log)

'data.frame': 500 obs. of 19 variables:
$ Date.and.Time : chr "2011-12-19 23:32:30" "2011-12-19 23:20:04" "2011-12-19 23:16:24" "2011-12-19 23:14:40" ...
$ IP.Address : chr "93.129.245.130" "128.227.27.189" "207.63.124.250" "140.247.40.121" ...
$ IP.Address.Label: logi NA NA NA NA NA NA ...
$ Browser : chr "Chrome" "Firefox" "Chrome" "Firefox" ...
$ Version : chr "16.0" "8.0" "15.0" "6.0" ...
$ OS : chr "MacOSX" "WinXP" "Win7" "MacOSX" ...
$ Resolution : chr "1280x800" "1680x1050" "1280x1024" "1280x800" ...
$ Country : Factor w/ 44 levels "Argentina","Australia",..: 17 44 44 44 44 44 44 44 44 44 ...
$ Region : chr "Nordrhein-Westfalen" "Florida" "Illinois" "Massachusetts" ...
$ City : chr "Köln" "Gainesville" "Chicago" "Cambridge" ...
$ Postal.Code : int NA 32611 NA 2138 2138 NA 10003 2138 2138 2138 ...
$ ISP : chr "Telefonica Deutschland GmBH" "UNIVERSITY OF FLORIDA" "Illinois Century Network" "Harvard University" ...
$ Returning.Count : int 2 0 4 2 2 0 0 2 2 2 ...
$ Page.URL : chr "http://onlinetrickpdf.blogspot.com/2015/09/r-function-google-scholar-webscraper.html" "http://onlinetrickpdf.blogspot.com/2015/09/if-then-vba-script-usage-in-arcgis.html" "http://onlinetrickpdf.blogspot.com/2015/09/how-to-link-to-google-docs-for-download.html" "http://onlinetrickpdf.blogspot.com/2015/09/two-way-permanova-adonis-with-custom.html" ...
$ Page.Title : Factor w/ 53 levels "","onlinetrickpdf*",..: 36 50 23 46 10 20 13 9 10 46 ...
$ Came.From : chr "http://stackoverflow.com/questions/5005989/how-to-download-search-results-on-google-scholar-using-r" "http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&ved=0CCwQFjAC&url=http%3A%2F%2Fonlinetrickpdf.blogspot.com%2F2011%"| __truncated__ "" "" ...
$ SE.Name : chr "" "" "" "" ...
$ SE.Host : chr "" "" "" "" ...
$ SE.Term : chr "" "" "" "" ...
Read more »

Calculate Single Contour-Line from DEM with QGIS / GDAL

In QGIS:

- from menu: Raster / Extraction / Contour

- define output name path/to/output.shp

- alter GDAL call for single contour line at 900 m asl:
gdal_contour -fl 900 "path/to/dem_raster.asc" "path/to/output.shp"


- for removing small poplygons or lines add area or length field (attr table / field calc or vector / geometry / add geometry)

- query by length or area to deselect unwanted iso-lines


Finally, you can export the contours as KML and check it in Google Earth:


I downloaded my DEM-rasters (Nord-Tirol, Österreich) HERE
Read more »

How to Download and Run Google Docs Script in the R Console

...There is not much to it:
upload a txt file with your script, share it for anyone with the link, then simply run something like the below code. 

ps: When using the code for your own purpose mind to change "https" to "http" and to insert your individual document id.
pss: You could use download.file() in this way for downloading any file from Google Docs..


# Example 1:
setwd(tempdir())
download.file("http://docs.google.com/uc?export=download&id=0B2wAunwURQNsMDViYzllMTMtNjllZS00ZTc4LTgzMzEtNDFjMWQ3MTUzYTRk",
              destfile = "test_google_docs.txt", mode = "wb")
# the file contains: x <- sample(100); plot(x)
source(paste(tempdir(), "/test_google_docs.txt", sep = ""))
# remove files from tempdir:
unlink(dir())

# Example 2:
setwd(tempdir())
download.file("http://docs.google.com/uc?export=download&id=0B2wAunwURQNsY2MwMzNhNGMtYmU4Yi00N2FlLWEwYTctYWU3MDhjNTkzOTdi",
              destfile = "google_docs_script.txt", mode = "wb")
# the downloaded script is the GScholarScraper-Function,
# read it and run an example:
source(paste(tempdir(), "/google_docs_script.txt", sep = ""))
# remove files from tempdir:
unlink(dir())

EDIT, MARCH 2013:
Method is outdated, use Tony's from below!
Read more »

Convert OpenStreetMap Objects to KML with R

A quick geo-tip:
With the osmar and maptools package you can easily pull an OpenStreetMap object and convert it to KML, like below (thanks to adibender helping out on SO). I found the relation ID by googling for it (www.google.at/search?q=openstreetmap+relation+innsbruck).

# get OSM data
library(osmar)
library(maptools)

innsbruck <- get_osm(relation(113642), full = T)
sp_innsbruck <- as_sp(innsbruck, what = "lines")

# convert to KML
for( i in seq_along(sp_innsbruck) ) {
kmlLine(sp_innsbruck@lines[[i]], kmlfile = "innsbruck.kml",
lwd = 3, col = "blue", name = "Innsbruck")
}

shell.exec("innsbruck.kml")
Read more »

Retrieve GBIF Species Occurrence Data with Function from dismo Package

..The dismo package is awesome: with some short lines of code you can read & map species distribution data from GBIF (the global biodiversity information facility) easily:






library(dismo)

# get GBIF data with function:
myrger <- gbif("Myricaria", "germanica", geo = T)

# check:
str(myrger)

# plot occurrences:
library(maptools)
data(wrld_simpl)
plot(wrld_simpl, col = "light yellow", axes = T)
points(myrger$lon, myrger$lat, col = "red", cex = 0.5)
text(-140, -50, "MYRICARIA\nGERMANICA")
Read more »

Taxonomy with R: Exploring the Taxize-Package

http://upload.wikimedia.org/wikipedia/commons/6/68/Ernst_Haeckel_-_Tree_of_Life.jpgFirst off, I'd really like to give a shout-out to the brave people who have created and maintain this great package - the fame is yours!

So, while exploring the capabilities of the package some issues with the ITIS-Server arose and with large datasets things weren't working out quite well for me.
I then switched to the NCBI API and saw that the result is much better here (way quicker, on first glance also a higher coverage).
At the time there is no taxize-function that will pull taxonomic details from a classification returned by NCBI, that's why I plugged together a little wrapper - see here:

# some species data:
spec <- data.frame("Species" = I(c("Bryum schleicheri", "Bryum capillare", "Bryum argentum", "Escherichia coli", "Glis glis")))
spl <- strsplit(spec$Species, " ")
spec$Genus <- as.character(sapply(spl, "[[", 1))

# for pulling taxonomic details we'd best submit higher rank taxons
# in this case Genera. Then we'll submit Genus Bryum only once and
# save some computation time (might be an issue if you deal
# with large datasets..)

gen_uniq <- unique(spec$Genus)

# function for pulling classification details ("phylum" in this case)
get_sys_level <- function(x){ require(taxize)
a <- classification(get_uid(x))
y <- data.frame(a[[1]]) # if there are multiple results, take the first..
z <- tryCatch(as.character(y[which(y[,2] == "phylum"), 1]), # in case of any other errors put NA
error = function(e) NA)
z <- ifelse(length(z) != 0, z, NA) # if the taxonomic detail is not covered return NA
return(data.frame(Taxon = x, Syslevel = z))
}

# call function and rbind the returned values
result <- do.call(rbind, lapply(gen_uniq, get_sys_level))
print(result)
# Taxon Syslevel
# 1 Bryum Streptophyta
# 2 Escherichia Proteobacteria
# 3 Glis Chordata

# now merge back to the original data frame
spec_new <- merge(spec, result, by.x = "Genus", by.y = "Taxon")
print(spec_new)
# Genus Species Syslevel
# 1 Bryum Bryum schleicheri Streptophyta
# 2 Bryum Bryum capillare Streptophyta
# 3 Bryum Bryum argentum Streptophyta
# 4 Escherichia Escherichia coli Proteobacteria
# 5 Glis Glis glis Chordata
#
Read more »

Download all Documents from Google Drive with R

A commentator on my blog recently asked if it is possible to retrieve all direct links to your Google Documents. And indeed it can be very easily done with R, just like so:









# you'll need RGoogleDocs (with RCurl dependency..)
install.packages("RGoogleDocs", repos = "http://www.omegahat.org/R", type="source")
library(RGoogleDocs)



gpasswd = "mysecretpassword"
auth = getGoogleAuth("kay.cichini@gmail.com", gpasswd)
con = getGoogleDocsConnection(auth)

CAINFO = paste(system.file(package="RCurl"), "/CurlSSL/ca-bundle.crt", sep = "")
docs <- getDocs(con, cainfo = CAINFO)

# get file references
hrefs <- lapply(docs, function(x) return(x@access["href"]))
keys <- sub(".*/full/.*%3A(.*)", "\\1", hrefs)
types <- sub(".*/full/(.*)%3A.*", "\\1", hrefs)

# make urls (for url-scheme see: http://techathlon.com/download-shared-files-google-drive/)
# put format parameter for other output formats!
pdf_urls <- paste0("https://docs.google.com/uc?export=download&id=", keys)
doc_urls <- paste0("https://docs.google.com/document/d/", keys, "/export?format=", "txt")

# download documents with your browser
gdoc_ids <- grep("document", types)
lapply(gdoc_ids, function(x) shell.exec(doc_urls[x]))

pdf_ids <- grep("pdf", types, ignore.case = T)
lapply(pdf_ids, function(x) shell.exec(pdf_urls[x]))

Read more »

Make a KML-File from an OpenStreetMap Trail

Ever wished to use a trail on OSM on your GPS or smartphone? With this neat little R-Script this can easily be done. You'll just need to search OpenStreetMap for the ID of the trail (way), put this as argument to osmar::get_osm, convert to KML and you're good to go!




# get OSM data
library(osmar)
library(maptools)

rotewandsteig <- get_osm(way(166274005), full = T)
sp_rotewandsteig <- as_sp(rotewandsteig, what = "lines")

# convert to KML
kmlLine(sp_rotewandsteig@lines[[1]], kmlfile = "rotewandsteig.kml",
lwd = 3, col = "blue", name = "Rotewandsteig")

# view it
shell.exec("rotewandsteig.kml")
Read more »

Custom Feature Edit Forms in QGIS with Auto-Filling Using PyQt

For anyone interested in the capabilities of customized feature edit forms in QGIS I'd like to reference the following GIS-Stackexchange posting: http://gis.stackexchange.com/questions/107090/auto-populate-field-as-concatenation-of-other-fields
Read more »

knitr-Example: Use World Bank Data to Generate Report for Threatened Bird Species

I'll use the below script that retrieves data for threatened bird species from the World Bank via its API and does some processing, plotting and analysis. There is a package (WDI) that allows you to access the data easily.









# world bank indicators for species - 
# I'll check bird species:
code <- as.character(WDIsearch("bird")[1,1])
bird_data <- WDI(country="all", indicator=code, start=2010, end=2012)

# remove NAs and select values in the range 50 - 1000:
bird_data_sub <- bird_data[!is.na(bird_data$EN.BIR.THRD.NO)&
bird_data$EN.BIR.THRD.NO < 1000&
bird_data$EN.BIR.THRD.NO > 50, ]

# change in numbers across years 2010 and 2011:
change.no <- aggregate(EN.BIR.THRD.NO ~ country, diff,
data = bird_data_sub)
# plot:
par(mar = c(3, 3, 5, 1))
plot(x = change.no[,2], y = 1:nrow(change.no),
xlim = c(-12, 12), xlab = "", ylab = "",
yaxt = "n")
abline(v = 0, lty = 2, col = "grey80")
title(main = "Change in Threatened Bird Species in\nCountries with Rich Avifauna (>50)")
text(y = 1:nrow(change.no),
x = -2, adj = 1,
labels = change.no$country)
segments(x0 = 0, y0 = 1:nrow(change.no),
x1 = change.no[, 2], y1 = 1:nrow(change.no))

# test hypothesis that probability of species decrease is
# equal to probability of increase:
binom.test(sum(change.no < 0), sum(change.no != 0))
For generating the report you can source the script from dropbox.com and stitch it in this fashion:
stitch("http://dl.dropbox.com/s/ga0qbk1o17n17jj/Change_threatened_species.R")
..this is one line of code - can you dig it?..
BTW, for simplicity I use knitr::stitch with its default template...

You should get something like THIS PDF.

EDIT, MARCH 2013
OUTDATED! you can use this approach instead:

library(knitr); library(RCurl); library(WDI)

destfile = "script.txt"
x = getBinaryURL("https://dl.dropbox.com/s/ga0qbk1o17n17jj/Change_threatened_species.R", followlocation = TRUE, ssl.verifypeer = FALSE)
writeBin(x, destfile, useBytes = TRUE)
source(paste(tempdir(), "/script.txt", sep = ""))

stitch(paste(tempdir(), "/script.txt", sep = ""))
Read more »

Quick GIS-Tip: Permanentely Sort Attribute Table by Attribute

Here's a short shell-script (I have C:\OSGeo4W64\bin\ on my PATH) for sorting GIS data, a sqlite-db in this case, and saving it in the newly created order to a file. The DB is sorted in ascending order by the attribute 'Name' and written to a file with the KML Driver.

cd C:/Users/Kay/Documents/Web/Openlayers/Docs/Digitizing
ogr2ogr -sql "SELECT * FROM 'trails-db' ORDER BY Name ASC" -f "KML" trails.kml trails.sqlite
Read more »

Function to Collect Geographic Coordinates for IP-Addresses

I added the function IPtoXY to onlinetrickpdf-Archives which collects geographic coordinates for IP-addresses.
It uses a web-service at http://www.datasciencetoolkit.org// and works with the base R-packages.

# System time to collect coordinates of 100 IP-addresses:
> system.time(sapply(log$IP.Address[1:100], FUN = IPtoXY))
       User      System verstrichen
       0.05        0.02       33.10
Read more »

Use GDAL from R Console to Split Raster into Tiles

When working with raster datasets I often encounter performance issues caused by the large filesizes. I thus wrote up a little R function that invokes gdal_translate which would split the raster into parts which makes subsequent processing more CPU friendly. I didn't use built-in R functions simply because performance is much better when using gdal from the command line..

The screenshot to the left shows a raster in QGIS that was split into four parts with the below script.



## get filesnames (assuming the datasets were downloaded already. 
## please see http://onlinetrickpdf.blogspot.co.at/2013/06/use-r-to-bulk-download-digital.html
## on how to download high-resolution DEMs)
setwd("D:/GIS_DataBase/DEM")
files <- dir(pattern = ".hgt")

## function for single file processing mind to replace the PATH to gdalinfo.exe!
## s = division applied to each side of raster, i.e. s = 2 gives 4 tiles, 3 gives 9, etc.
split_raster <- function(file, s = 2) {

filename <- gsub(".hgt", "", file)
gdalinfo_str <- paste0("\"C:/OSGeo4W64/bin/gdalinfo.exe\" ", file)

# pick size of each side
x <- as.numeric(gsub("[^0-9]", "", unlist(strsplit(system(gdalinfo_str, intern = T)[3], ", "))))[1]
y <- as.numeric(gsub("[^0-9]", "", unlist(strsplit(system(gdalinfo_str, intern = T)[3], ", "))))[2]

# t is nr. of iterations per side
t <- s - 1
for (i in 0:t) {
for (j in 0:t) {
# [-srcwin xoff yoff xsize ysize] src_dataset dst_dataset
srcwin_str <- paste("-srcwin ", i * x/s, j * y/s, x/s, y/s)
gdal_str <- paste0("\"C:/OSGeo4W64/bin/gdal_translate.exe\" ", srcwin_str, " ", "\"", file, "\" ", "\"", filename, "_", i, "_", j, ".tif\"")
system(gdal_str)
}
}
}

## process all files and save to same directory
mapply(split_raster, files, 2)
Read more »

Get Long-Term Climate Data from KNMI Climate Explorer

You can query global climate data from the KNMI Climate Explorer (the KNMI is the Royal Netherlands Metereological Institute) with R.


Here's a little example how I retreived data for my hometown Innsbruck, Austria and plotted annual total precipitation. You can choose station data by pointing at a map, by setting coordinates, etc.



# get climate (precipitation) data from url:
# http://climexp.knmi.nl/selectstation.cgi?id=someone@somewhere

# station INNSBRUCK, FLUGHAFEN (11120), 47.27N, 11.35E:
ibk_dat <- read.table("http://climexp.knmi.nl/data/pa11120.dat", sep = "",
row.names = 1, col.names = 0:12)

# cut off first and last yr, due to missing data..
ibk_dat <- ibk_dat[c(-1, -50,]

# plot yearly sums:
windows(width = 15, height = 5)
plot(rowSums(ibk_dat), type = "s", ylab = "Annual Total Precipitation (mm)",
xlab = NA, col = "blue", xaxt = "n", lwd = 1.5, las = 2, cex.axis = 0.8,
main = "INNSBRUCK FLUGHAFEN, 47.27N, 11.35E, 593m, WMO station code: 11120")
axis(1, labels = rownames(ibk_dat), at = 1:nrow(ibk_dat), las = 2, cex.axis = 0.85)

abline(h = mean(rowSums(ibk_dat)), col = 1, lty = 2, lwd = 1.2)
text(1250, adj = 0, "Long-term average", cex = 0.75)
arrows(x0 = 2.5, y0 = 1220,
x1 = 2.5, y1 = 930, length = 0.05)
Read more »

An Image Crossfader Function

Some project offspin, the jpgfader-function (the jpgfader-function in funny use can be viewed HERE):


# purpose: crossfade 2 jpeg images
# packages: jpeg
# arguments: img1 (path.to.img1), img2 (path.to.img2),
# outpath(defaults to current directory), outname,
# frames
# output: png


require(jpeg)

jpgfader <- function(img1 = NA, img2 = NA, outpath = NA, frames = NA, outname = NA){

if(is.na(outpath)) {outpath <- path.expand("~")}

# stop if images are missing
if(is.na(img1)|is.na(img2)) stop(cat("\nAt least one image is missing!\n"))
if(is.na(outname)) {outname = "img.1.2"}

if(is.na(frames)) {frames = 10}
# read 2 jpegs, assuming same size!
pic.1 <- readJPEG(img1)
pic.2 <- readJPEG(img2)

# warn if images dont have same size:
if(sum(dim(pic.1) != dim(pic.2))>1) warning(cat("\nImages do not have same dimensions!"))

# create new array with 4 dimensions, the new dimension
# representing alpha:

by = 1/(frames-1)
alpha = seq(0, 1, by)
n = length(alpha)

for(j in n:1){

pic.2.a <- array(data = c(as.vector(pic.2),
rep(alpha[j], dim(pic.1)[1]*dim(pic.1)[2])),
dim = c(dim(pic.1)[1], dim(pic.1)[2], 4))

# assign output file name:
pic.out <- paste(outpath, "\\", outname, ".", j ,".png", sep = "")

# and open device:
png(pic.out, width = dim(pic.1)[2], height = dim(pic.1)[1])

# plot-parameters:
par(mar = rep(0, 4), oma = rep(0, 4), new = F)

# print img.a to plot region:
plot(1:2,
xlim = c(0, dim(pic.1)[2]), ylim = c(0, dim(pic.1)[1]),
xlab="", ylab="", type = "n",
yaxs ="i", xaxs = "i")
rasterImage(pic.1, 0, 0, dim(pic.1)[2], dim(pic.1)[1])

# overplotting with new alpha-pic,
# starting with full transparency, decreasing in steps, showing pic.2
# finally:
rasterImage(pic.2.a, 0, 0, dim(pic.1)[2], dim(pic.1)[1])
dev.off()
}
}

# Example, with 2 images, one system.file and one altered
# version of it:

# make black jpg and save to default system folder
Rlogo <- readJPEG(system.file("img", "Rlogo.jpg", package="jpeg"))
Rlogo[] <- 0
jpeg(path.expand("~\\Rlogo_Black.jpg"), dim(Rlogo)[2], dim(Rlogo)[1])
par(mar = rep(0, 4), oma = rep(0, 4))

# save black image:
plot(1:2,
xlim = c(0, 1), ylim = c(0, 1),
xlab="", ylab="", type = "n",
yaxs ="i", xaxs = "i")
rasterImage(Rlogo, 0, 0, 1, 1)
dev.off()

# function call:
jpgfader(img1 = system.file("img", "Rlogo.jpg", package="jpeg"),
img2 = path.expand("~/Rlogo_black.jpg"),
outname = "img12",
outpath = path.expand("~"),
frames = 10)

# see the images:
browseURL(path.expand("~"))

# remove files:
# files <- dir(path.expand("~"), full.names = T)
# file.remove(c(files[grep("img12.", files)],
path.expand("~/Rlogo_black.jpg")))
Read more »

Add Comments in MS-Word using VBA

This VBA procedure (1) Searches words ("Str1", "Str2",..) and adds commentboxes to it and (2) changes the initials used in the box:

Sub CommentBox()

Dim range As range
Dim i As Long
Dim TargetList
Dim cm As Comment

TargetList = Array("Str1", "Str2")

For i = 0 To UBound(TargetList)

Set range = ActiveDocument.range

With range.Find
.Text = TargetList(i)
.Format = True
.MatchCase = False
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False

Do While .Execute(Forward:=True) = True

Set cm = range.Comments.Add(range:=range, Text:="Hallo")
cm.Author = "InternalName"
cm.Initial = "Initials"

Loop

End With

Next

With ActiveDocument.Styles("Kommentartext").Font
.Size = 12
.Bold = True
.Italic = True
.Color = wdColorBlue
End With

End Sub


Read more »

Custom Google Hybrid Mapsource for MOBAC and GALILEO

For anyone having trouble with the shipped Google Hybrid mapsource, as I encountered them - here is a custom mapsource which worked for me. Save this as XML (under Win7) to ..



Custom Google Hybrid
10
19
png
None
http://mt{$serverpart}.google.com/vt/lyrs=y&x={$x}&y={$y}&z={$z}
0 1
#000000


And for any Galileo user interested, I also add a custom mapsource:



Google Hybrid
http://mt{$serverpart}.google.com/vt/lyrs=y&x={$x}&y={$y}&z={$z}
0 1

Read more »

..Some More Regex Examples Added to Collection


Find the below examples added to my list of regex-examples HERE.
ps: just found THIS very informative presentation on regex.





str <- c("i.e., George W. Bush", "Lyndon B. Johnson, etc.")
gsub("([A-Z])[.]?", "\\1", str)
# this will find abbreviated names and remove the fullstops:
# the uppercase letters followed by a full-stop are matched by
# [A-Z][.]? = repeated at most once. the parentheses delineate a
# back reference, i.e. the uppercase letter, which will be
# replaced by \\1 which is the first backreference.

# output:
[1] "i.e., George W Bush" "Lyndon B Johnson, etc."

str <- c("George W. Bush", "Lyndon B. Johnson")
sub(" .*", "", str)
# keeps the first word and removes the rest.
# matches and replaces the substring comprised of the first
# white space followed by any single character,
# designated by the period, repeated zero or more times, as
# given by the asterisk.

# output:
[1] "George" "Lyndon"

sub("\\s\\w+$", "", str)
# removes the last word plus the preceding space in a string.
# looks for a space followed by any word which is the last one:
# the dollar sign $ is a meta-character that matches the
# beginning and end of a line.

# output:
[1] "George W." "Lyndon B."

sub(".*\\s(\\w+$)", "\\1", str)
# keep only the last word of a string.
# looks for anything, repeated arbitrarily often followed by a
# space ".*\\" and a word which is the last in line.
# for this word you put brackets for a back-reference, which is
# returned by "\\1", the 1st back-reference.

# output:
[1] "Bush" "Johnson"

str <- c("&George W. Bush", "Lyndon B. Johnson?")
gsub("[^[:alnum:][:space:].]", "", str)
# keep alphanumeric signs AND full-stop, remove anything else,
# that is, all other punctuation. what should not be matched is
# designated by the caret.

# output:
[1] "George W. Bush" "Lyndon B. Johnson"
Read more »

R-Function to Read Data from Google Docs Spreadsheets

I used this idea posted on Stack Overflow to plug together a function for reading data from Google Docs spreadsheets into R.










google_ss <- function(gid = NA, key = NA) 
{
if (is.na(gid)) {stop("\nWorksheetnumber (gid) is missing\n")}
if (is.na(key)) {stop("\nDocumentkey (key) is missing\n")}
require(RCurl)
url <- getURL(paste("https://docs.google.com/spreadsheet/pub?key=", key,
"&single=true&gid=", gid, "&output=csv", sep = ""),
cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl"))
read.csv(textConnection(url), header = T, sep = ",")
}

## Example:
## Mind that the worksheets are numbered consecutively from 0 to n,
## irrespective of the actual worksheet-name.
## The key should be put in apostrophes.
## And, the URL works only for published spreadsheets!

(data <- google_ss(gid = 0,
key = "0AmwAunwURQNsdDNpZzJqTU90cmpTU0sza2xLTW9fenc"))
Read more »

Programmatically Download CORINE Land Cover Seamless Vector Data with R

Thanks to a helpful SO-Answer I was able to download all CLC vector data (43 zip-files) programmatically:








require(XML)

path_to_files <- "D:/GIS_DataBase/CorineLC/Seamless"
dir.create(path_to_files)
setwd(path_to_files)

doc <- htmlParse("http://www.eea.europa.eu/data-and-maps/data/clc-2006-vector-data-version-2")
urls <- xpathSApply(doc,'//*/a[contains(@href,".zip/at_download/file")]/@href')

# function to get zip file names
get_zip_name <- function(x) unlist(strsplit(x, "/"))[grep(".zip", unlist(strsplit(x, "/")))]

# function to plug into sapply
dl_urls <- function(x) try(download.file(x, get_zip_name(x), mode = "wb"))

# download all zip-files
sapply(urls, dl_urls)

# function for unzipping
try_unzip <- function(x) try(unzip(x))

# unzip all files in dir and delete them afterwards
sapply(list.files(pattern = "*.zip"), try_unzip)

# unlink(list.files(pattern = "*.zip"))
Read more »

Default Convenience Functions in R (Rprofile.site)

I keep my blog-reference-functions, snippets, etc., at github and want to source them from there. This can be achieved by utilizing a function (source_https, customized for my purpose HERE). The original function was provided by the R-Blogger Tony Breyal - thanks Tony! As I will use this function quite frequently I just added the function code to my Rprofile.site and now am able to source from github whenever running code from the R-console. This is very handy and I thought it might be worth to share..
Read more »

Dear Silvio!..

R-Code to produce this nice gif-animated greeting card can be viewed HERE.

Photobucket
Read more »

Species Recording Form

When recording species abundance data you often have endless rows with species names and one gets swollen eyes from searching the right line for each data-entry. Therefore I made myself a handy xls-file to collect species abundance data.
In it a VBA-macro is called with a keybord short-cut which matches a species short name you type in the active cell and jumps to the line with that species, the search entry is deleted automatically and you are in the cell where you want to add data... (download).
Read more »

MS Word 2010, Find & Replace with Wildcards

Quite often I need to re-format citations in my texts, i.e., missing brackets around the year of a publication. In MS Word I simlpy solve such issues with the find and replace option using wildcards. I.e. for the issue with years without brackets:

short cut crtl-h
then put ([1-2][0-9]{3}) in the find-box and
(^&) in the replace box
hit 'replace' and you're done

The find string will search for any 4-digit number starting with 1 or 2 followed by 3 digits between 0 and 9 and will be replaced by the same number put inbetween round brackets. Note that the brackets in the find-string denote a token which then can be referenced by the string ^& in the replace step.
Read more »

Grand Theft Auto III: San Andreas

Grand Theft Auto III: San Andreas

                                        




Five years ago, Carl Johnson escaped from the pressures of life in Los Santos, San Andreas, a city tearing itself apart with gang trouble, drugs and corruption. Where filmstars and millionaires do their best to avoid the dealers and gangbangers.



Now, it’s the early 90’s. Carl’s got to go home. His mother has been murdered, his family has fallen apart and his childhood friends are all heading towards disaster.
On his return to the neighborhood, a couple of corrupt cops frame him for homicide. CJ is forced on a journey that takes him across the entire state of San Andreas, to save his family and to take control of the streets.
Rockstar Games brings its biggest release to mobile yet with a vast open-world covering the state of San Andreas and its three major cities – Los Santos, San Fierro and Las Venturas – with enhanced visual fidelity and over 70 hours of gameplay.
Grand Theft Auto: San Andreas features:
• Remastered, high-resolution graphics built specifically for mobile including lighting enhancements, an enriched color palette and improved character models.
• Cloud save support for playing across all your mobile devices for Rockstar Social Club Members.
• Dual analog stick controls for full camera and movement control.
• Three different control schemes and customizable controls with contextual options to display buttons only when you need them.
• Compatible with the MoGa Wireless Game Controllers and select Bluetooth and USB gamepads.
• Integrated with Immersion tactile effects. 
• Tailor your visual experience with adjustable graphic settings.
Languages Supported: English, French, Italian, German, Spanish, Russian and Japanese.

Find out more:
www.rockstargames.com
See videos:
www.youtube.com/rockstargames
Follow us:
www.facebook.com/rockstargames
www.twitter.com/rockstargames

Additional information from Google Play

or

Download APK+ DATA here
Read more »

Transformation of Several Variables in a Dataframe

This is how I transform several columns of a dataframe, i.e., with count-data into binary coded data (this would apply also for any other conversion..).

count1 <- count2 <- count3 <- count4 <- sample(c(rep(0, 10), 1:10))
some <- LETTERS[1:20]
thing <- letters[1:20]
mydf <- data.frame(count1, count2, count3, count4, some, thing)

ids <- grep("count", names(mydf))
myfun <- function(x) {ifelse(x > 0, 1, 0)}
mydf[, ids] <- lapply(mydf[, ids], myfun)

p.s.: Let me know if you know of a slicker way.
Read more »

A Function for Adding up Matrices with Different Dimensions

I couldn't find a function that can handle matrices with different dimensions and thus coded one myself.  It can sum up matrices and also copes with matrices with different dimensions.


# File: combmat.R
# Purpose: add up matrices with different dimensions
# Input: a list of 2-dimensional matrices
# Output: a combined matrix
# Author: Kay Cichini
# Date: Nov. 23th 2011

combmat <- function(m_l = list(NA)){
n_m <- length(m_l) # no. of matrices used
rownames_l <- lapply(m_l, rownames) # list of rownames
colnames_l <- lapply(m_l, colnames) # list of colnames
rownames_new <- unique(unlist(rownames_l)) # new, general rownames
colnames_new <- unique(unlist(colnames_l)) # new, general colnames

dimnames_new = list(rownames_new, colnames_new)
m_new <- matrix(nrow = length(rownames_new),
ncol = length(colnames_new),
data = 0,
dimnames = dimnames_new)

m_interm_arr <- # array of intermediate
array(m_new, dim = c(length(rownames_new), # matrices with same no. of
length(colnames_new), n_m), # dimensions as elements in
dimnames = dimnames_new) # list of input matrices

# take i-th element in list of imput matrices and add
# its values according to the appropiate row and col indexes
# in i-th dimension (i-th matrix) within array:
for (i in 1:n_m) {
m_interm_arr[,,i][rownames_l[[i]], colnames_l[[i]]] <- m_l[[i]]
}
return(apply(m_interm_arr, c(1,2), sum))
}

# Example:
print(m1 <- matrix(sample(1:40), 4, 10, dimnames = list(1:4,1:10)))
print(m2 <- matrix(sample(1:40), 10, 4, dimnames = list(1:10,1:4)))

combmat(m_l = list(m1, m2))

It is very likely that someone else may come to a more effective approach - I'd be happy to here about improvements or if there is a package/function doing the same...
Read more »

How to Integrate OpenStreetMap Nominatim Search into a Webpage or OpenLayers Map

Here' a concise example on how to integrate Nominatim search into a webpage:
http://jsfiddle.net/gimoya/yp8hmog7

And here's a live Openlayers example:
http://gimoya.bplaced.net/Openlayers/Bergfex/bergfex.html


Read more »

Paper Camera v4.4.1 Apk

Paper Camera v4.4.1 Apk



Real time cartoon and painting effects displayed on your camera feed! See the world through a new, original, stylish and captivating lens, have a wonder in your own home and discover how cool is now your world in cartoon!


This is the ultimate collection of cartoon/sketch/comic book/half tone/noir/neon and many other effects painted directly in your camera, no more boring post-effects, it’s all real time, you simply won’t stop wondering, wherever you are, having a look at things and cartoon-ize them!
You can wave your phone around and see the world change before your eyes, take pictures and record videos using any of the stylish cartoon effects or apply them to your existing photos.
What’s New
4.4.1
– Improved text rendering (effect names and tweaks)
– Added localisation to 11 new languages


Requires Android: 2.1 and up

Additional information from Google Play

or

Download here or here

 

Read more »

ZEDGE™ Ringtones & Wallpapers v4.4.3 (Ad-Free) Apk

ZEDGE™ Ringtones & Wallpapers v4.4.3 (Ad-Free) Apk

 

ZEDGE™ offers free wallpapers, ringtones and notification sounds to easily customize your device. In addition we offer you personalized game recommendations.
Features available in ZEDGE™ include:


• Search with suggestions
• Categories with sort options
• Set ringtones and notification sounds from within the ZEDGE™ app, including individual contact ringtones
• Set wallpapers from within the app
• Option to add favorites without downloading
• Settings for automatically changing wallpapers
• Multiple options for sharing ZEDGE™ content with other apps and people
• Widget for quickly changing wallpapers
• Widget for quickly launching your favorite games
What’s New
– Bug fixes and performance/stability improvements





Requires Android Varies with device

Additional information from Google Play

or

Download here or here

Read more »

Use Case: Make Contour Lines for Google Earth with Spatial R

Here's comes a script I wrote for creating contour lines in KML-format to be used with Google Earth https://github.com/gimoya/onlinetrickpdf-Archives/blob/master/R/r_contours_for_google_earth.R

If you want to check or just use the datasets I created for the Alps region, you can download it here: http://terrain-overlays.blogspot.co.at/index.html
Read more »

WhatsApp+ v6.24D Patched Apk

WhatsApp+ v6.24D Patched Apk

Overview: What is WhatsApp+? Basically it is a customizable WhatsApp where you can change lots of colours, sizes, and many other visual MODs In addition you can increase upload media limit (stock limit is 16Mb) to send large music files or videos.




You can increase quality of pictures sent (by default resolution is decreased quite a lot) You can share music just with one click You can add contact profile pictures to their chats You can hide contact profile pictures and show phonebook pictures (in chat screen) Built-in theme viewer and downloader. Check WhatsApp+ users themes online and apply theme if you like And more to come Remember to previously uninstall whatsapp if you come from the official version (if not you will get the “not installed” error)
What’s New:
– Cracked by Krowne
– Fixed: problems when installing on android gingerbread (2.3.X)
– Other improvements and bug fixes
Instructions To INSTALL (UNROOT):
1) First backup your conversations by pressing OPTION button
Go to Settings>Chat settings>Backup Conversations
2) Then Uninstall OLDER WHATSAPP & Install ONLY WA+ apk …
3) Click AGREE & CONTINUE
4) If you have BACKED UP your CHATS then there should be Restore BUTTON , PRESS IT
(If you Dont get restore button then install original whatsapp from play store , do verification process and then chat with 1-2 person again backup and then uninstall it again install apk that i given to you there will definitely get RESTORE button)
5) Wait it might take some long
6) Press Continue and then
7) Press MENU button And You can see HIDE ONLINE STATUS button press it and BOOM …(If you cant see that menu then goto PLUS=> 2. Main/chats screen =>Untick 2.3 HIDE STATUS MOD MENU)
8) Enjoy Whatsapp+ with hiding last seen feature enabled
Instructions To INSTALL (ROOT):
* FIRST YOU NEED TO INSTALL ORIGINAL WHATSAPP WITH A REGISTRED PHONE NUMBER.

Read more »

Web-Scraper for Google Scholar Updated!

I have updated the Google Scholar Web-Scraper Function GScholarScaper_2 to GScholarScraper_3 (and GScholarScaper_3.1) as it was outdated due to changes in the Google Scholar html-code. The new script is more slender and faster. It returns a dataframe or optionally a CSV-file with the titles, authors, publications & links. Feel free to report bugs, etc.



Update 11-07-2013: bug fixes due to google scholar code changes - https://github.com/gimoya/onlinetrickpdf-Archives/blob/master/R/Functions/GScholarScraper_3.2.R. Note that since lately your IP will be blocked by Google at about the 1000th search result (cumulated) - so there's not much fun when you want to do some extensive bibliometrics..
Read more »

Notification Toggle Premium v3.2.1 Apk

Notification Toggle Premium v3.2.1 Apk

 

Notification Toggle creates notifications in the Android status bar to let you quickly switch WiFi, Bluetooth, Silent mode, Screen rotation and Flight mode on and off or to adjust the screen brigthness (and many more…)
You can also add shortcut to your own apps into the notification bar!


In the settings, you can choose which notifications should be active. All icons & colors can easily be changed through the app for full customization!
Now with Android Wear integration! Select which toggles you want to see on your Wear smartwatch and say “Start toggles” to switch your phone to silent, lock it, turn on the flashlight…
Some notes:
• Not every toggle will work on every device
• Some settings aren’t changeable by user apps, so it will bring you directly to the Android settings
• Exclude from task-killers!
• Some toggles require root access
• The app can not remove the build-in toggle notification on Samsung phones
• Please read the FAQ in the app before posting a review
——————–
Available toggles & shortcuts:
• WiFi
• Bluetooth
• Sound / Vibration, Sound / Silent, Sound menu
• Brightness mode / menu / 5 predefined stages
• Screen timeout dialog
• Wake lock
• Rotation
• Flight mode
• Mobile data
• NFC
• Flashlight (might require “TeslaLED” app)
• Sync & Sync now
• WiFi- & USB-Tethering
• Music: previous / next / pause
• WiFi settings / advanced settings
• Bluetooth settings, Bluetooth visbility
• GPS
• Mobile data settings
• Data usage
• Battery
• Camera
• next Wallpaper (requires “Wallpaper Changer” app)
• Lockscreen (requires “Delayed Lock” app)
• Shutdown & Reboot (requires root)
What’s New
– re-added “persistent Wear notification” option

Additional information from Google Play

or

Download here or here

Read more »

Vidstitch Pro – Video Collage v1.6.3 Apk

Vidstitch Pro – Video Collage v1.6.3 Apk


 

■ #Vidstitch – Now on Android!
■ Featured on 148apps, Stelapps, and many more!
#Vidstitch seamlessly combines your videos and photos to share your collage on Instagram. It’s easy!


We engineered this app from the ground up to be an intuitive and effortless experience for you. #Vidstitch is intelligent and automagically optimizes for Instagram. Just choose your videos and photos and let #Vidstitch handle everything in the background.
≈ Less is More ≈
◎ Simple and intuitive user interface
◎ Choose your frame
◎ Combine your videos and photos
◎ Share your #Vidstitch on Instagram, Facebook, or Twitter
≈ Features ≈
◉ Combine videos and pics
◉ Multiple frames to choose from
◉ Rotate your video or pic (long press)
◉ Play preview before saving
◉ Post to Facebook, Twitter, and Instagram
◉ Simple and Intuitive UI
◉ Optimized for Android
◉ Add multiple video clips
◉ Add your own soundtrack
◉ Animated GIF support! Select the length of animation under video settings.
◉ Single frames to allow you to post your full size videos without cropping!
≈ Upcoming updates ≈
◎ Video cropping
◎ More music options
≈ Notes from Developer ≈
◉ Regarding Instagram bugs. Please update to the latest version of Instagram.
What’s New
– Music Cropping!
– 100s of NEW frames!

Put your business online!  Get a $8.99 .COM/.NET from GoDaddy! Put your business online!  Get a $5.99 .COM/.NET from GoDaddy!

Requires Android: 4.1 and up

Additional information from Google Play

or

Download here or here

Read more »

So, What Are You? ..A Plant? ..An Animal? -- Nope, I'm a Fungus!


Lately I had a list of about 1000 species names and I wanted to filter out only the plants as that is where I come from. I knew that Scott Chamberlain has put together the ritis package which obviously can do such things. However, I knew of ITIS before and was keen to give it a shot..

Here's what I've come up with (using the ITIS API, updated on 11. Dec 2012, previous version had a flaw with indefinite matches.. Should be ok now. However, there are of course species that are not covered by the database, i.e. Ixodes, see below):



library(XML)
get_tsn <- function(sp_name) {
require(XML)
units <- tolower(unlist(strsplit(sp_name, " ")))

# valid string?
if (length(units) > 2) { stop("...No valid search string submitted (two words seperated by one space)!") }

itis_xml <- htmlParse(paste("http://www.itis.gov/ITISWebService/services/ITISService/searchByScientificName?srchKey=",
sp_name, sep=""))
tsn <- xpathSApply(itis_xml, "//tsn", xmlValue)
unitname1 <- tolower(gsub("\\s+", "", xpathSApply(itis_xml, "//unitname1", xmlValue)))
unitname2 <- tolower(gsub("\\s+", "", xpathSApply(itis_xml, "//unitname2", xmlValue)))
unitname3 <- tolower(gsub("\\s+", "", xpathSApply(itis_xml, "//unitname3", xmlValue)))

# sp_name = only Genus, get tsn were sp_name matches perfectly and unitname2 (lower level taxon) is absent
if (length(units) == 1) {
return(tsn[tolower(sub("\\s+", "", unitname1)) == tolower(sp_name) & unitname2 == ""]) }

# sp_name = Genus and Epitheton, get tsn where both match perfectly and unitname3 (lower level taxon) is absent
if (length(units) == 2) {
return(tsn[unitname1 == units[1] &
unitname2 == units[2] &
nchar(unitname3) == 0]) }
}

get_kngdm <- function(tsn) {
kngdm <- xpathSApply(htmlParse(paste("http://www.itis.gov/ITISWebService/services/ITISService/getKingdomNameFromTSN?tsn=",
tsn, sep="")),
"//kingdomname", xmlValue)
return(kngdm)
}

get_tsn_kngdm <- function(x) {y = get_tsn(x)
z = get_kngdm(y)
return(list(Name = x, TSN = y, Kingdom = z))
}

# I had some API-related errors (I guess it was mysteriously not answering in
# some cases). I couldn't resolve this and thus implemented tryCatch
get_tsn_kngdm_try <- function(x) tryCatch(get_tsn_kngdm(x), error = function(e) NULL)

sp_names <- c("Clostridium", "Physcia", "Ixodes", "LYNX", "Homo sapiens", "Canis lupus")

system.time(result <- data.frame(do.call(rbind, lapply(sp_names, FUN = get_tsn_kngdm_try))))
result

system.time(result <- data.frame(do.call(rbind, lapply(sp_names, FUN = get_tsn_kngdm_try))))
#
# result
# User System verstrichen
# 1.54 0.01 33.66
# Name TSN Kingdom
# 1 Clostridium 555645 Monera
# 2 Physcia 14024 Fungi
# 3 Viola 22030 Plantae
# 4 Ixodes
# 5 LYNX 180581 Animalia
# 6 Homo sapiens 180092 Animalia
# 7 Canis lupus 180596 Animalia
#
Read more »

Fit Sigmoid Curve with Confidence Intervals

Sigmoid curve fitting for transpiration measurements from porometer at different water potentials (pressure):









por<-data.frame(list(structure(list(run = structure(c(1L, 1L, 1L, 1L, 2L, 2L,
2L, 2L, 3L, 3L, 3L, 3L), .Label = c("1", "3", "4"), class = "factor"),
press = c(15, 21, 24, 29.5, 15, 21, 24, 29.5, 15, 21, 24,
29.5), tr_rel = c(1, 0.459454191, 0.234697856, 0.135282651,
1, 0.853283066, 0.306314797, 0.186302231, 1, 0.42980063,
0.103882476, 0.086463799), tr = c(513, 235.7, 120.4, 69.4,
318.3, 271.6, 97.5, 59.3, 476.5, 204.8, 49.5, 41.2)), .Names = c("run",
"press", "tr_rel", "tr"), row.names = c(NA, -12L), class = "data.frame")))

summary(mod1<-nls(tr ~ SSlogis( log(press), Asym, xmid, scal),data=por))

press_x <- seq(10, 40, length = 100)

predict(mod1, data.frame(press = press_x))

with(por, plot(press,tr,xlim=c(10,35),ylim=c(0,500)))

lines(press_x, predict(mod1, data.frame(press = press_x)))

## note that the variable in SSlogis is named "press"
## and the same name should appear on the left-hand side
## of "=" in the data frame

###http://finzi.psych.upenn.edu/R/Rhelp02/archive/42932.html
###calc. of conf. intervalls, by linear approximation

se.fit <- sqrt(apply(attr(predict(mod1, data.frame(press = press_x)),"gradient"),1,
function(x) sum(vcov(mod1)*outer(x,x))))

###plot points and curve plus ci's

matplot(press_x, predict(mod1, data.frame(press = press_x))+outer(se.fit,qnorm(c(.5, .025,.975))),
type="l",lty=c(1,3,3),ylab="transp",xlab="waterpot")
with(por, matpoints(press,tr,pch=1))

###hhbio.wasser.tu-dresden.de/projects/modlim/doc/modlim.pdf
###R squared for non-linear Regression

Rsquared <- 1 - var(residuals(mod1))/var(por$tr)

###add r^2 to plot:

text(35,550,bquote(R^2==.(round(Rsquared, 3))))
asym<-coef(mod1)[1]
y_tenth<-asym*0.1
abline(h=asym)
abline(h=y_tenth,lty=5)

text(10,65,"10% of max. transpiration",adj=0)

###finding y by x

x<-15
y<-SSlogis(log(x), coef(mod1)[1], coef(mod1)[2] ,coef(mod1)[3])
y

###alternative way
###y = Asym/(1+exp((xmid-log(x))/scal))

y<-coef(mod1)[1]/(1+exp((coef(mod1)[2]-log(x))/coef(mod1)[3]))

###finding x by y

Asym=coef(mod1)[1]
xmid=coef(mod1)[2]
scal=coef(mod1)[3]

y_tenth<-asym*0.1
x_tenth<-exp((xmid-log(Asym/y_tenth-1)*scal));names(x_tenth)<-"x"
x_tenth

abline(v=x_tenth)
text(10,25,paste("at waterpot.:",
round(x_tenth,2)),adj=0)
Read more »

Next Level Web Scraping



The outcome presented above will not be very useful to most of you - still, this could be a good example for what possibly can be done via webscraping in R.

Background: TIRIS is the federal geo-statistical service of North-Tyrol, Austria. One of many great things it provides are historical and recent aerial photographs. These photographs can be addressed via URL's. This is the basis of the script: the URL's are retrieved, some parameters are adjusted, using the customized addresses images are downloaded and animated by saveHTML from the Animation-Package. The outcome (HTML-Animation) enables you to view and skip through aerial photographs of any location in North-Tyrol, from the year 1940 to 2010, and see how the landscape, buildings, etc. have changed...

View the script HERE.
Read more »

Perfectly Clear v2.5.12 Apk

Perfectly Clear v2.5.12 Apk


Perfect your photos with just one click
Perfectly Clear isn’t a creative filter or enhancer. It’s award-winning technology that overcomes the way your camera distorts images. With a single tap, you get 12 automatic corrections that give you professional-looking photos in seconds.


Capture Life Unfiltered
We don’t mask or saturate anything. We just highlight the beauty that was always there and make your photos as vibrant as life itself.
An unprecedented expansion of phone camera capabilities
For the first time, a single app combines intelligent image correction with powerful capture features. Perfectly Clear takes the limits off your mobile device and creates images that capture the vibrant, vivid colors that you saw with your eyes when you snapped the shot.
Image correction: down to a science
What’s behind our award-winning technology? 12 years of R&D, 10 patented processes, and 12 unique algorithms. We cracked the code on correcting every pixel independently. It’s as if your 21 MP photo was taken with 21 million separate apertures.
Making it easy to look your best (and take the perfect selfie)
Perfectly Clear can detect faces, open eyes, and smiles, while the Beautify setting brightens eyes, evens skin tone, even whitens teeth—all automatically!
Perfection that’s tested 26 million times a day
Major retailers, veteran pros and avid amateurs all depend on our technology to create amazing photos automatically and effortlessly.
Powerful features in your pocket
Advanced panorama, blazingly fast burst, single-tap HDR and advanced face detection give you pro-level capture ability without the expensive, complicated, and bulky gear. Plus, you can separate your focus and exposure points to ensure the perfect photo for all types of scenes.
More wow, less waiting, low cost
Unlike expensive cameras that take up to 10 seconds to process HDR or panorama, our superfast app processes complex features in seconds—and gives you amazing results.
Sophisticated features you’d expect from an expensive pro camera
Perfectly Clear’s impressive range of capture features include a stabilizer, manual focus mode, gridlines, timer, and powerful horizon and tilt indicators, and more.
What’s New
v 2.5.12
1) fix GPS Exif Tag issue
2) fix image rotation on some devices
3) stability improvements



Requires Android: 2.3.3 and up

Additional information from Google Play

or 

Download here or here

 

Read more »

Displaying any Google Maps Content in Google Earth via Network-Links

This is a handy option for displaying Google Maps in Google Earth. This could be any of your own maps created in Google Maps, a route or whatever. One nice feature of GE's Network-Links is that if you or any other contributor of a Google map modifies it (in Google Maps), it will be refreshed also in Google Earth.To do so, just grab the link from Google Maps. Like this one for a route:

https://maps.google.at/maps?saddr=Tivoli+Stadion+Tirol,+Innsbruck&daddr=Haggen,+Sankt+Sigmund+im+Sellrain&hl=de&ll=47.227496,11.250687&spn=0.12007,0.338173&sll=47.230526,11.250825&sspn=0.120063,0.338173&geocode=FagR0QIdYR-uACGQHB8W0fIkjCkfsEUhQ2mdRzGQHB8W0fIkjA%3BFZhY0AId6CypACnvxXqyRz2dRzG6da9r3hgbNA&oq=hagge&t=h&dirflg=h&mra=ls&z=12


Then go to GE and choose "Add" from main menu and "Network-Link" from the submenu. Then paste the above link and append "&output=kml" to it. That's it!
Read more »

VBS Shutdown Timer

When running time comsuming processes I often wish to shutdown automatically after a given time. There are several applications on the internet but I was not really happy with the ones I found. So, I put together a really small VB-Script which in fact does the job perfectly.

Dim Shell : Set Shell = CreateObject("WScript.Shell")

argument_t = inputbox("Time in Seconds:", "Shutdown", "3600")

Shell.Run "C:/Windows/system32/shutdown.exe -f -s -t " & _
argument_t, 0

MsgBox "Press OK if you want to cancel the Shutdown..", _
vbInformation + vbOkayonly, "Cancel Shutdown"

Shell.Run "C:/Windows/system32/shutdown.exe -a", 0

I put the vbs file on my disk and a shortcut to it on the Desktop. You can choose the time until shutdown with an input box.



Read more »

System Tuner Pro v3.2 Apk

System Tuner Pro v3.2 Apk

 

A system suite to monitor and backup apps and tweak your system and CPU
♦♦ Feature set (some require root access) ♦♦
► Application manager *1





◊ Backup and verify app apk/data
◊ System app uninstaller
◊ Share and backup apps to e-mail, DropBox, GDrive, etc…
◊ Move any apps to user, system, SD
◊ Freeze/unfreeze apps, and control app startup and events
◊ Zip align, clear cache, wipe dalvik-cache, fix permissions and optimize databases
► Task manager
◊ Check CPU, network and memory usage
◊ Kill (default) or force-stop *1 any apps or kernel processes
◊ Automatic task killer, memory booster, memory cleaner
► System Control *1
◊ CPU governor, frequency, voltage, GPU controls, thermal and MPDecision controls
◊ Build.prop and sysctl editor (basic and advanced mode)
◊ Boost, analyze and benchmark SD cards
◊ Android memory manager, memory cleaner, f-sync control
◊ Safe: auto-restore CPU settings on boot-loop
► System Monitoring
◊ All Android applications or all processes, CPU, memory
► Status bar notifications
◊ CPU, memory, sd, optionally with graphics in drop-down
► Highly Configurable Widgets
◊ Resizable gauge widget
◊ 1×1 and 2×1 (PRO ONLY) text widgets
◊ 2×1-5×2 graphic widgets (PRO ONLY)
► Terminal Emulator
◊ Command history
◊ Share commands and outputs
► System Logs Reader *1
◊ Logcat or kernel messages
◊ Advanced filtering and search
and much more that meets the eye ☺
*1 Requires root and kernel support for full feature
Caution: Rooting and root brushing your mobile device can compromise its performance or cause malfunctions.
What’s New
3.2:
Fix FC on Android 2.2 and lower

Requires Android: 2.1 and up

Additional information from Google Play

or

Download here or here

Read more »