Where in the world is your audience? Open source geolocation for streaming media
Understanding audience territories is important for three main reasons:
- Advertisers need to know they are reaching the markets in which their products are sold
- Copyright licensing organisations are only empowered to collect media royalties for listeners in specific countries
- Station funders need evidence that educational and public service information is being delivered to target communities
Terrestrial radio (traditional AM, FM or DAB) and satellite broadcasting methods have a defined footprint because of antenna location and range, which makes it relatively easy to know where the audience is located. However, detailed statistics are harder to come by, requiring the use of surveys or hardware sampling devices to measure individual listening hours.
With streaming media we have the opposite problem; precise statistics for listening hours are available using web analytics, but the audience could be anywhere in the world. Fortunately, there are databases available which record the approximate geographical location of each Internet Protocol address.
Locating an audience member in a specific country is reasonably accurate because of the way that IP addresses are assigned, but the accuracy of locating the nearest city can vary widely, depending on the country in question. IP addresses are constantly being reassigned; geolocation database provider MaxMind estimates that a static database will go out of date by around 1.5% per month.
Mapping audiences with Airtime
The Airtime broadcast automation system logs details of exactly what is played and when, but for audience geolocation we have to look into the logs of the streaming media server, which accepts the connections from individual viewers and listeners. The Icecast open source streaming server logs the IP address and connection duration for each audience stream, but we need a way to turn that raw data into a convenient report.
Piwik is an open source analytics platform which added support for Icecast log format in its recent 2.0 release. Piwik packages for Debian and Ubuntu GNU/Linux are available from the Sourcefabric APT server for your convenience. Setup of Piwik for geolocation requires the creation of a MySQL database and the installation of gratis mapping data from MaxMind. You can then set up the Piwik import script to analyse the Icecast access log at an appropriate interval. Full instructions on how to do this are in the latest edition of the Airtime manual.
Another promising approach is to analyse the Icecast log file in real time, using Kibana, which is also open source. The Kibana dashboard enables zooming in to the city and street level for each geolocated IP address. This could be misleading, of course, because IP address location is not accurate to that level; particularly if the connected device is mobile. However, it is intriguing to see the potential distribution of audience IP addresses within a territory.
Speaking of territories, the Airtime team will be taking part in World Radio Day 2014 in three different cities. You can meet us on February 13th in:
-
London
Venue: SOAS, London WC1H 0XG
Time: 17:00-21:00
Panel discussion, trade fair, film and drinks (registration required)
-
Prague
Venue: Prague College, Polska 10, P2
Time: 18.30-20.00
Panel discussion and drinks
-
Toronto
Venue: Bar Radio, 615 College Street, Toronto
Time: 18:30-22:00
Free drinks and music
We look forward to meeting you there! If these cities are too far away from your geolocation, why not host your own World Radio Day event and share it with the Airtime community? Follow @WorldRadioDay and tweet with #WorldRadioDay.
- If you want to get started with Airtime Pro, try it free with streaming for one month with the promo code wrd2014.