How To Import OCDS Data
The Open Contracting Data Standard (OCDS) is an open standard for public contracting, implemented by many governments around the world. This guide describes how to import OCDS data into Aleph.
Support for OCDS was developed in particular to import data from the DIGIWHIST OpenTender.eu site and may not work with other implementations of OCDS.
-
This guide uses the ftm CLI and the alephclient CLI. If you don’t have these two CLIs installed, please refer to How to install the ftm CLI and How to install the alephclient CLI for installation instructions.
-
In order to convert OCDS data, you also need to install the OCDS plugin for the ftm CLI:
pip3 install followthemoney-ocds
-
You can download OCDS data for many countries from the OpenTender.eu downloads page. Choose the NDJSON format. In the following steps, we’ll use Cyprus tenders data from 2023 as an example.
-
Unzip the OCDS data you downloaded from OpenTender.eu:
unzip data-cy-ndjson.zip
-
Convert OCDS data to FollowTheMoney entities:
ftm import-ocds --infile data-cy-ndjson/data-cy-ocds-2023.json | ftm aggregate > entities.json
-
You can now import the dataset in FollowTheMoney format using alephclient:
alephclient write-entities --infile entities.json --foreign-id cy-tenders
This will import the data into the Aleph collection with the foreign ID
cy-tenders
. If no collection with this foreign ID exists, a new collection is created.If you’d like to import data into an existing collection and do not know its foreign ID, you can find the foreign ID in the Aleph UI. Navigate to the dataset or investigation homepage. The foreign ID is listed in the sidebar on the right.