This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# And what's the largest number of men and women in any neighbourhood? | |
max(aggregate(csv$Anzahl, by = list(csv$Bezirk), FUN = sum)[[2]]) | |
# That doesn't really help, does it? So, display more information - in | |
# which row do we have the highest number? | |
which.max(aggregate(csv$Anzahl, by = list(csv$Bezirk), FUN = sum)[[2]]) | |
# Still no use - let's display the entire row: | |
allHoods <- aggregate(csv$Anzahl, by = list(csv$Bezirk), FUN = sum) | |
maxRow <- which.max(allHoods[[2]]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use WWW::Mechanize::Firefox; | |
use Data::Dumper; | |
my $mech = WWW::Mechanize::Firefox->new(create => 1, activate => 1); | |
$mech->get('https://familysearch.org/search/collection/index#count=20&query=%2Bgivenname%3ABenjamin%20%2Bsurname%3ASchuvlein%20%2Bbirth_place%3AGermany%20%2Bbirth_year%3A1910-1914~%20%2Bgender%3AM%20%2Brace%3AWhite&collection_id=2000219'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Now we create the barchart: | |
barplot( height, ylim = c(0, max_bar), # height x axis, length y axis | |
main = "Zu- und Fortzüge nach Berlin", # headline | |
ylab = "Anzahl in 1000", # y axis label | |
names.arg = years, cex.names = 0.5, # year under bar, slightly smaller | |
beside = TRUE, # sideways | |
col = c("#990033", "#009933") # assign colors | |
) | |
# We're adding a shiny legend, placed topleft |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plot( years, num_in, # x, y axis | |
type = "o", col = "blue", # type of plot lines, color | |
xlab = "Jahr", ylab = "Anzahl in Tausend", cex.axis = 0.7, #labels | |
xlim = xrange, ylim = yrange, # length of axis | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# now let's see if sqldf works nicely. :) | |
library(sqldf); | |
file <- '../data/cleaned-einwohnermelderegister-2011.csv' | |
csv <- read.csv(file, header = TRUE, sep = ';') | |
# rename columns like the postgres schema | |
colnames(csv) <- c("official_district", "district", "gender", "nationality", "age", "quantity") | |
# show the three largest districts by inhabitants |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) make sure you actually HAVE postgres AND postgis AND plsql! | |
2) enable postgis extension (may be in a different path or already coming from your distribution) | |
psql -U YOURUSER -d YOURDB -f /usr/share/postgresql/contrib/postgis-2.0/postgis.sql | |
or, on psql shell: | |
CREATE extension postgis; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) have the couchdb source available, geocouch needs some headerfiles | |
2) get and unpack the appropriate branch of geocouch suited for your couchdb version - | |
I have 1.3.0 so I got | |
https://github.com/couchbase/geocouch/tree/couchdb1.3.x | |
3) set environment: | |
export COUCH_SRC=/WHEREVER/apache-couchdb-1.3.0/src/couchdb/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<match target="font" > | |
<edit mode="assign" name="autohint" > | |
<bool>true</bool> | |
</edit> | |
<edit mode="assign" name="hinting" > | |
<bool>true</bool> | |
</edit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ImagePath $[FVWM_USERDIR]/icons:+ \ | |
:$[FVWM_USERDIR]/wallpaper:+ \ | |
:$[FVWM_USERDIR]/buttons:+ \ | |
:$[FVWM_USERDIR]/images:+ | |
DestroyFunc StartFunction | |
AddToFunc StartFunction | |
+ I Module FvwmPager 0 0 | |
+ I Module FvwmButtons 0 0 | |
+ I Module FvwmAuto 750 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CONFIG TOOLS DO NOT OVERRIDE THIS FILE - THEY ALL WORK ON .gtkrc! | |
include "/home/banshee/.themes/MyTheme/gtk-2.0/gtkrc" | |
style "user-font" { | |
font_name = "Bitstream Vera Sans 7" | |
} | |
gtk-font-name="Bitstream Vera Sans 7" | |
gtk-xft-antialias=1 |
OlderNewer