Getting Started
The intention of open-MaStR is to provide tools for receiving a complete as possible and accurate as possible list of power plant units based on the public registry Marktstammdatenregister (short: MaStR).
Installation
To install open-mastr, run
To get the latest bug fixes in your local version of open-mastr, run
Downloading the MaStR data
The MaStR dataset is updated on a daily basis. To download today's MaStR and save it in a sqlite database, you will use the Mastr class and its download method. This will get the bulk download from MaStR/Datendownload. You can either download the whole dataset (a few GB) or all units of a given technology (e.g. all wind turbines in Germany).
Bulk download
The following code block shows the basic download commands:
When a Mastr object is initialized, a sqlite database is created in $HOME/.open-MaStR/data/sqlite. With the function Mastr.download(), the whole MaStR is downloaded in the zipped xml file format. It is then read into the sqlite database and simple data cleansing functions are started.
If you are interested in a specific part of the dataset, you can specify this by using the data parameter:
More detailed information can be found in the section bulk download.
API download
API download has been removed
In versions > v0.16.0 the download(method="API") cannot be used anymore. The default behaviour changes method="API" to method="bulk". You can still use the basic SOAP API functionalities from the MaStRAPI class.
Accessing the database
For accessing and working with the MaStR database after you have downloaded it, you can use sqlite browsers such as DB Browser for SQLite or any python module which can process sqlite data. Pandas, for example, comes with the function read_sql.
Exporting data
The tables in the database can be exported as csv files. While technology-related data is joined for each unit,
additional tables are mirrored from database to csv as they are. To export the data you can use to method to_csv.