Categories
computer

A short script for testing writing many files to a folder

The challenge: We want to see when the number of files in a folder decrease the performance on adding new files into the same folder. Two examples where we may need to do to this are: to get an overview of the performance of the file system node structure, or to test Windows function for […]

Categories
data-work

Work programmatically with Google Spreadsheets Part 2

A while back I wrote a short post on how you can write and read to Google Spreadsheets programmatically using Python and the package ‘gspread’. Last time the reading was done by first creating arrays with the addresses to where the values could be found in the spreadsheet, and then run through all the values […]

Categories
data

Sanntid hjemme: Følg Ruter hjemmefra med Arduino og Python

Sanntidsskjermene som Ruter har satt opp ved flere t-bane, trikk og bussholdeplasser har blitt et kjærkomment bidrag til informasjonen du som reisende får om avganger. Ikke bare kan du ha stålkontroll over hvilke avganger som går, og i hvilken rekkefølge, du blir også oppdatert om estimert ankomsttid slik at du vet at du mista bussen […]

Categories
statistics

Descriptive Statistical Methods in Code

Statistics can be mighty useful, and a little programming helps it getting even better. I often find that I through code can grasp the fundamental function behind how things work, and I have tried to apply this to statistics as well. In this case to descriptive statistics. Join me in this short attempt to let […]

Categories
data-work

Work programmatically with Google Spreadsheets

Some time back I authored a script which reads through a CSV formatted list, and based on the artists’ names tried to decide the nationality of the artists by querying the last.FM search engine and parsing the XML structured result. The script worked, and found and returned about 80% of the artists, and around 80% […]

Categories
data-work

Data-wrangling: find country based on artist name

At the Clouds & Concerts project at the University of Oslo we are working with really interesting topics, based on interesting empirical data. Through our collaboration with the Norwegian streaming service provider WiMP we are together with Telenor and WiMP analysing a vast collection of data. More about the project’s data-part, also the ‘Clouds’ part […]

Categories
Programming

Create Thumbnails Programatically

If you have several images following a certain structure on a web page and want them as thumbnails, it can be useful to programatically create these. The manual way of creating thumbnails (using Photoshop or similar) can often be time consuming while the execution time for a script resizing an image is counted in microseconds. […]

Categories
data

Åpne stortingsdata

For en stund tilbake skrev jeg en liten post om hvordan stortingsdata kunne hentes ned fra Stortingets hjemmesider programmatisk. Som et utgangspunkt for å benytte data, enten til lek eller alvor, mener jeg offentlige data fungerer utmerket. Vi lever jo i et demokratisk samfunn, og uansett hvor mye mye tillit du måtte ha til politikerne […]

Categories
Programming

Screen Scraping med Python

Tim Berners-Lee, Internetts pappa, snakker i et inspirerende TED foredrag om the web of data, og oppfordrer alle til å dele sine data. Ideen med web of data er at webben fram til i dag hovedsakelig har vært dokumentbasert og at denne nå endres til å bli mer databasert. I webbens dokumenter ligger det mye […]

Categories
data

Analysing the Bible

The computer is a good tool in many areas but within its defining field, computations, it is great. With over a million computations per second even a big, large and heavy book (in its physical manifestation) can be sorted in just a blink of an eye. A while ago I tried to sort the King […]