read.live: Reads the .swo-file

Description Usage Details

View source: R/read_live.r

Description

The .swo file contains the live viewing for a given day.

Usage

1

Details

The live viewing is stored in ".swo" files. For each day there is a separate file. The files are of fixed-with type, with the following structure

field name label start end widths type 1 household hh 1 7 7 integer 2 individuum ind 8 9 2 integer 3 station sta 10 13 4 integer 4 start start 14 19 6 integer 5 end end 20 25 6 integer 6 set set 26 26 1 character 7 activity act 27 27 1 character 8 platform plt 28 28 1 integer

The first two fields can be read as one single field, the hh number is rarely used but can easely be recreated as.integer(pin / 100L). The fields with hexadecimal coding have to be read as character.

# filter activity The currency includes: 'live','tsv' excludes: 'teletext','recordedview' 'recordedview' is the same viewing as 'tsv', so the viewing is duplicated 'tsv' is referenced to the program broadcasting time, 'recordedview' to the time of consumption by the viewer.


rluech/tv-clone documentation built on Jan. 7, 2022, 12:27 a.m.