Keep only rows you may redistribute

Numbers checked against the live data on

This page shows queries.

Filter on license_tier IN ('open', 'copyleft') and export license_code and attribution_text beside every value. ADEME's Base Carbone passes as open under etalab-2.0; EXIOBASE passes as copyleft under cc-by-sa-4.0, which means anything you publish from it goes out on the same licence.

The query#

The licence columns are on every row of factors_flat, so the filter needs no join. This query groups the default top-level factors of ADEME, AIB and EXIOBASE by licence.

Show the SQL
SELECT library,
       license_tier,
       license_code,
       attribution_text,
       license_notice,
       count(*) AS factors
FROM open_ef.factors_flat
WHERE library IN ('ademe', 'aib', 'exiobase')
  AND license_tier IN ('open', 'copyleft')
  AND is_default_indicator
  AND is_latest_activity_year
  AND is_top_parent
GROUP BY 1, 2, 3, 4, 5
ORDER BY license_tier DESC, library;
library license_tier license_code attribution_text license_notice factors
ademe open etalab-2.0 Source ADEME, Base Carbone v23.6 NULL 2767
aib open aib-attribution Source: Association of Issuing Bodies (AIB), European Residual Mixes 2025. NULL 34
exiobase copyleft cc-by-sa-4.0 EXIOBASE 3 (Stadler et al.), CC BY-SA 4.0 NULL 8064

In your own export, drop count(*) and the GROUP BY so every row keeps its own license_tier, license_code, attribution_text and license_notice. Add license_url, which links the licence text.

What each tier lets you do#

license_tier you may you must
open republish the number print attribution_text
copyleft republish the number print attribution_text and share what you build from the rows on the same licence
restricted cite that the factor exists not republish the number: the public API withholds its values
prohibited nothing the row is not served publicly at all

All ten of the libraries these docs use for examples are open or copyleft today: eight open, two copyleft. The third column is the check on that sentence. It counts every row of those ten libraries sitting on any other tier, over the whole library and not only its default top-level rows, so a later release published as restricted makes the count non-zero instead of passing unnoticed beside the other two.

Show the SQL
SELECT count(DISTINCT library) FILTER (WHERE license_tier = 'open') AS open_libraries,
       count(DISTINCT library) FILTER (WHERE license_tier = 'copyleft') AS copyleft_libraries,
       count(*) FILTER (WHERE license_tier NOT IN ('open', 'copyleft')) AS rows_on_other_tiers
FROM open_ef.factors_flat
WHERE library IN ('ademe', 'agribalyse', 'aib', 'desnz', 'epa',
                  'exiobase', 'miterd', 'okobaudat', 'openceda', 'useeio');
open_libraries copyleft_libraries rows_on_other_tiers
8 2 0

Eight plus two is ten only because the third column is zero: a tier belongs to a release, so one library code can hold rows on two tiers at once, and counting libraries per tier would show that as an extra line rather than as a contradiction. Those ten are the libraries these docs write their examples against, not the whole of factor search, which also serves libraries on other tiers. Read the tier off the row you are exporting.

Watch out#

Watch out. Filter on license_tier, never on the library name. The licence belongs to a release, not to a library: a later edition, or another file from the same publisher, can carry a different licence. A filter on the tier keeps working when that happens.

Watch out. Copy attribution_text whole. It is the publisher's required credit line and nothing else, so do not shorten it or merge it with your own notes. When a publisher states its terms in prose rather than by a named licence, they are in license_notice; NULL means the named licence at license_url is the whole of the terms.

Why. The tier is set on the release, and the view copies it onto every row, so a value and its licence always travel together. An unknown tier is refused by the database rather than read as open.