Skip to content

Instantly share code, notes, and snippets.

View tts's full-sized avatar

Tuija Sonkkila tts

View GitHub Profile
@tts
tts / gist:1026801
Created June 15, 2011 09:39
Building a VCALENDAR file
#!/bin/bash
# Yahoo!Pipesin tuottaman iCal-muotoisen tiedoston URL
url='http://pipes.yahoo.com/pipes/pipe.run?_id=6602675e62d5d95c7333285517e6a471&_render=ical&urlinput1=http%3A%2F%2Fspreadsheets.google.com%2Fpub%3Fkey%3Dtd1iey6KTeeTgGlE6U3_PPg%26output%3Dcsv'
# Haetaan data, ja tallennetaan se tiedostoksi
curl $url -o tolisten.ics
# Otetaan alussa olevat metatiedot talteen
grep X-WR tolisten.ics >XWR
@tts
tts / gist:2862877
Created June 3, 2012 10:01
Selection of MARC fields from Vaski library consortia open bibliographic data
<xsl:stylesheet xmlns:marc="info:lc/xmlns/marcxchange-v1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="marc" version="1.0">
<xsl:output encoding="UTF-8" indent="yes" method="xml"/>
<!--
Selection of MARC fields from
Vaski library consortia open bibliographic data
@tts
tts / gist:2862888
Created June 3, 2012 10:06
XML2CSV transformation of a selection of MARC fields from Vaski library consortia open bibliographic data
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0">
<xsl:output encoding="UTF-8" method="text" indent="no"/>
<!--
Selection of MARC fields from Vaski library consortia open bibliographic data
Transformation from XML to CSV. Field separator ";"
@tts
tts / vaskidentograph.r
Created June 3, 2012 10:16
One-by-one dentogpraph of classification of Vaski library consortia open bibliographic data
################################################################
#
# Checkerboard one-by-one dentograph of library classifications.
# Example: Vaski
#
# Tuija Sonkkila
# 2012-05-31
#
# based on
#
@tts
tts / gist:2867922
Created June 4, 2012 11:55
One-by-one dentogpraph of fiction classification of Helmet library open bibliographic data
################################################################
#
# One-by-one checkerboard dentograph of library classifications.
# Example: Helmet fiction
#
# Tuija Sonkkila
# 2012-05-31
#
# based on
#
@tts
tts / gist:2867937
Created June 4, 2012 12:01
Two-by-two dentogpraph of classification of Vaski library consortia open bibliographic data
################################################################
#
# Two-by-two checkerboard dentograph of library classifications.
# Example: Vaski
#
# Tuija Sonkkila
# 2012-06-04
#
# based on
#
@tts
tts / gist:2909853
Created June 11, 2012 12:24
Library statistics from Excel files and visualizing with Google Motion Chart
########################################################
#
# Extracting library statistics
# from tilastot.kirjastot.fi Excel files
# and visualizing them with a Google Motion Chart
#
# Data:
# Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
#
# Tuija Sonkkila 2012-06-10
@tts
tts / gist:2995732
Created June 26, 2012 13:15
Text mining tweets from a list of Top100 Finns
# Text mining suomitop100 list tweets
# https://twitter.com/#!/niku_hooli/ylen-suomitop100-lista/
#
# Tuija Sonkkila
# 2012-06-26
#
# Mining code is based on
# http://heuristically.wordpress.com/2011/04/08/text-data-mining-twitter-r/
#
# I am a total newbie in text mining, but some remarks are fairly obvious.
@tts
tts / gist:3002229
Created June 27, 2012 07:31
Returning the screen names of Twitter list members by the cursor
# Returning the screen names of members of a Twitter list by the cursor
#
# Example list https://twitter.com/#!/niku_hooli/ylen-suomitop100-lista/
#
# Tuija Sonkkila
# 2012-06-27
#
# Twitter API https://dev.twitter.com/docs/api/1/get/lists/members
# Function adapted from http://lists.hexdump.org/pipermail/twitter-users-hexdump.org/2011-December/000015.html
@tts
tts / gist:3002512
Created June 27, 2012 08:46
Return tweets from Twitter users that are members of a given list
# Return tweets from Twitter users that are members of a given list
#
# Example list: https://twitter.com/#!/niku_hooli/ylen-suomitop100-lista/
#
# Tuija Sonkkila
# 2012-06-27
#
library(RCurl)
library(RJSONIO)