KOF Account
In order to access KOF data, you need a KOF account. On request, KOF will create an account for you with a given username and a temporary password.
On your first login, you will be asked to set a password and to complete your profile. Please provide your email address and your first and last name. The email address can be used to log in to your account (besides the username). Optionally, you can add email addresses to which notification emails will be sent. For example, you will receive a notification email when new files are exported to your S3 bucket (see Object Storage) or if revisions in the exported time series are to be expected.
KOF Object Storage
KOF is hosting its own S3-compatible object storage. We will create an S3 bucket for you if you receive
- data other than time series
- large amounts of data
The name of your S3 bucket will be your username.
Accessing your S3 bucket
Go to the KOF minio console. Click on the KOF Login button. Log in with your KOF account credentials. You should now see your S3 bucket. Click on the bucket to view its contents.
Download files manually
In the KOF minio console, click on the file you want to download (you can also select multiple files). A context menu will appear on the right. Click on Download. If you want to share the download with others, you can create a temporary download link by clicking on Share.
Download files from notification email
If you receive a notification email from KOF Data as soon as a file has been uploaded to your S3 bucket, the email will include an unprotected link to the file. Click on the link to download the file. The link is valid for 7 days only. For a later download, go to the KOF minio console and download the file manually.
Download files programmatically
First, you need to create an access key in the KOF minio console. In the navigation bar to the left, click on Access Keys. Then, click on the button Create access key to the right. You are now presented with a form to fill out. The Access Key and Secret Key fields are automatically generated. You can keep the default values or fill in your own. All the other fields are optional and can safely be ignored. Click on Create and make sure to write down the Secret Key.
R
Install the aws.s3 package with
install.packages("aws.s3")You can download a file in your S3 bucket with
aws.s3::get_object(
base_url = "minio-api.kof.ethz.ch",
bucket = USERNAME,
file = FILENAME,
object = FILENAME,
key = ACCESS_KEY,
secret = SECRET_KEY,
region ="",
show_progress = T)Where USERNAME is your KOF account username, ACCESS_KEY is the access key you created in the minio console and SECRET KEY is the corresponding secret key. Instead of providing the arguments key and secret with every aws.s3::get_object function call, you can also set the following environment variables
Sys.setenv(
"AWS_ACCESS_KEY_ID" = ACCESS_KEY,
"AWS_SECRET_ACCESS_KEY" = SECRET_KEY,
"AWS_S3_ENDPOINT" = "minio-api.kof.ethz.ch")Python
Install the minio package with
pip3 install minioYou can download a file in your bucket with
from minio import Minio
client = Minio(
endpoint = "minio-api.kof.ethz.ch",
access_key = ACCESS_KEY,
secret_key = SECRET_KEY
)
client.fget_object(
bucket_name = USERNAME,
object_name = FILENAME,
file_path = FILENAME
)Where USERNAME is your KOF account username, ACCESS_KEY is the access key you created in the minio console and SECRET KEY is the corresponding secret key.
MinIO Client
Install the MinIO Client on Linux with
curl https://dl.min.io/client/mc/release/linux-amd64/mc \
--create-dirs \
-o $HOME/minio-binaries/mc
chmod +x $HOME/minio-binaries/mc
export PATH=$PATH:$HOME/minio-binaries/Create an alias for the KOF minio service with
mc alias set kof-minio https://minio-api.kof.ethz.ch $ACCESS_KEY $SECRET_KEYThen download a file with
mc get kof-minio/$USERNAME/$FILENAME .KOF Time Series API
You can download time series values and metadata in CSV, XLSX or JSON format through the KOF Time Series API. For users of the R programming language, KOF provides the kofdata R package to conveniently download KOF time series in your R session.
The documentation of the KOF Time Series API v1 (version 1) can be found here. v1 is expected to be deprecated and superseded by v2 in October 2025. Similarly, the kofdata package will the deprecated in October 2025 and superseded by a new R package. Important: The functions kofdata::download_cached_files and kofdata::list_cached_files will not be available in the new package. Instead, use the aws.s3 package for the file download as described here.
KOF Time Series Explorer
In order to find a specific time series you need, or to get an overview over the time series available as a data service subscriber, you can use the KOF Time Series Explorer. For the non-publicly available time series, the Time Series Explorer will only show a preview with the latest 2 years of data missing. Log in with your KOF account to view and download the full time series through the Time Series Explorer.