This repository contains example code for data from the NPO Backstage API. In the python
folder we currently have the following examples (see also the datablogs describing the examples):
simple_search.py
: simple example of how to search the API using Pythonfacet.py
: shows how to apply facetting (datablog)filter.py
: shows how to apply filtering (datablog)download_filtered_subtitles.py
: filters on the metadata
index for the specified programs (default 'Nieuwsuur' and 'EenVandaag') and downloads their subtitles if available from the tt888
index (datablog)generate_wordcloud.py
: a fun example of what you can do with the subtitle texts; after you downloaded subtitles using download_filtered_subtitles.py
, use this progam to generate word clouds using Parsimonious Language Models, which will retrieve the words which are most distinctive for each program compared to the other program(s) (default 'Nieuwsuur' and 'EenVandaag'; datablog)Furthermore, in the political-stats
folder we show how you can count how many times Dutch politicians and political parties are referenced in programs (datablog).
Problems with the API and feature requests can also be reported here on the Issues page.
NPO Backstage is an initiative of NPO in collaboration with Open State Foundation.
This NPO Backstage API example code is licensed under CC0.
Please keep in mind that this license does not apply to the content of the API.