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 and Base IMPACTS pass as open under ademe-base-empreinte-terms, ADEME's own published terms; 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 ademe-base-empreinte-terms Source ADEME, Base Carbone v23.11 Pour les jeux de données issus de Base Carbone® et de Base IMPACTS®, aucune restriction n'est formulée mis à part le fait de céder ou de transférer partiellement ou totalement la propriété des jeux de données à un tiers. … L'utilisateur peut : … Mettre ces jeux de données à disposition dans un outil pour un usage par un tiers. L'utilisateur NE peut PAS : Vendre ou accorder des droits de licence à un tiers ; Céder ou transférer la propriété des jeux de données. 3019
ademe open ademe-base-empreinte-terms Source ADEME, Base IMPACTS v3.0 Pour les jeux de données issus de Base Carbone® et de Base IMPACTS®, aucune restriction n'est formulée mis à part le fait de céder ou de transférer partiellement ou totalement la propriété des jeux de données à un tiers. … L'utilisateur peut : … Mettre ces jeux de données à disposition dans un outil pour un usage par un tiers. L'utilisateur NE peut PAS : Vendre ou accorder des droits de licence à un tiers ; Céder ou transférer la propriété des jeux de données. 129
aib open aib-attribution Source: Association of Issuing Bodies (AIB), European Residual Mixes 2022-2025. NULL 34
exiobase copyleft cc-by-sa-4.0 EXIOBASE 3 (Stadler et al.), CC BY-SA 4.0 NULL 14805

ADEME takes two lines because its two databases each name themselves in the credit line, under one set of terms: keep attribution_text per row rather than one credit per library.

AIB prints the generation stage only, with no grid losses and no fuel chain, so all 34 of its rows here are delivered totals that open-climate.ai sums from AIB's value and estimated loss and fuel-chain legs, Iceland's included. An estimated row sits in AIB's release and carries AIB's licence tier, licence code and credit line, which is why all 34 share one line of the table: the filter keeps an estimate exactly where it keeps the value it is built on.

That credit line names AIB only. The statistics an estimated row is computed from ask for their own credit, and it is not in attribution_text. Keep is_estimated in your export, and where it is true add the credits listed for electricity legs and fuel legs. This holds in every library that has estimated rows, not only AIB: among the libraries below, U.S. EPA's and MITECO's fuel totals are estimated too. A library download writes these credits for you, one per statistic, on its References sheet, and an XLSX export from factor search does the same on its notes sheet. A SQL query does not.

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. ADEME states its terms in prose rather than by a named licence, so its rows carry them in license_notice, in French as ADEME publishes them.

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

The tier is the short answer, and the five answers a licence gives are the full one. For ADEME, AIB and ÖKOBAUDAT, sharing the file with customers and embedding the factors in a product you sell are unclear in the publisher's terms: ask the publisher before you do either. Five questions per licence lists the answers library by library.

Every library these docs use for examples is open or copyleft today: EXIOBASE and Open CEDA are copyleft, the others open. The third column is the check on that sentence. It counts every row of those 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 string_agg(DISTINCT library, ',' ORDER BY library) FILTER (WHERE license_tier = 'open') AS open_libraries,
       string_agg(DISTINCT library, ',' ORDER BY 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
ademe,agribalyse,aib,desnz,epa,miterd,okobaudat,useeio exiobase,openceda 0

The two lists cover every library 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 it would then appear in both lists rather than as a contradiction. These 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 publisher's terms. A row whose is_estimated is true also owes credit to the statistics it was computed from, which no column of the row carries (above).

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.