# State grants to communes at their thresholds: sources and transformations

Assembled 2026-10-16. Every value in this folder comes from a file retrieved
on that date from the URL given below. The downloads are not committed (their
CSV form is not covered by the `.gitignore` rules for `raw/`, and the largest
is 34 MB); each is listed with its size and the first 16 hex digits of its
SHA-256 as retrieved. The extracts are rebuilt from them by the programs in
`build/`, which give byte-identical files on a second run:

```
dune exec data/grants/build/criteria.exe -- RAW data/grants/criteria.csv
dune exec data/grants/build/projects.exe -- RAW data/grants/projects.csv
dune exec data/grants/build/accounts.exe -- RAW data/grants/criteria.csv data/grants/accounts.csv
dune exec analysis/grants.exe -- data/grants
```

`RAW` holds `criteria/`, `projects/` and `accounts/` with the file names
below.

| File | Rows | Content |
|---|---|---|
| `criteria.csv` | 141,112 | DGCL allocation criteria, metropolitan communes, 2016-2019 (section 1) |
| `projects.csv` | 138,639 | DGCL investment-grant projects summed by year, commune and grant, 2018-2025 (section 2) |
| `accounts.csv` | 257,981 | DGFiP accounts of the 20,086 communes in a design, 2013-2025 (section 3) |
| `results.csv` | 408 | results of `analysis/grants.ml` (section 4) |
| `evaluations.md` | - | what was measured, against what, and what it says |

## 1. `criteria.csv`: the DGCL allocation criteria

Dataset « Critères de répartition des dotations versées par l'Etat aux
collectivités territoriales », Direction générale des collectivités locales,
https://www.data.gouv.fr/fr/datasets/5e174be4634f414cd8a244f1/ (last modified
2020-01-13). Files under
`https://static.data.gouv.fr/resources/criteres-de-repartition-des-dotations-versees-par-letat-aux-collectivites-territoriales/`:

| File | Path suffix | Bytes | SHA-256 | Rows | Metropolitan |
|---|---|---|---|---|---|
| `2016-communes-criteres-repartition.csv` | `20200109-165412/` | 3,409,838 | 0b3bccc04f99da91 | 35,971 | 35,756 |
| `2017-communes-criteres-repartition.csv` | `20200109-165353/` | 3,422,774 | b8e82e603fc8befa | 35,502 | 35,287 |
| `2018-communes-criteres-repartition.csv` | `20200109-165404/` | 34,252,901 | bf6130f290201765 | 35,443 | 35,228 |
| `2019-communes-criteres-repartition.csv` | `20200109-165413/` | 34,455,772 | 683864434cf59213 | 35,056 | 34,841 |
| `lexique-communes.pdf` | `20200110-171151/` | 362,166 | ca901e221ba460d0 | 16 pages | - |

The 2016 and 2017 files have 15 columns separated by `;` with decimal commas;
the 2018 and 2019 files have 182 and 180 columns separated by `,`, named
« section - label ». The wide files are read by position, and the extractor
fails unless every column it reads carries the expected label. The criteria
for 2020 and later are not available on the portal: data.gouv.fr holds 2016
to 2019 only, and data.ofgl.fr, which publishes the later DGF by commune,
refused the connection from this machine. Overseas communes (codes 97 and 98)
are left out: their DETR and DSU rules differ.

| Column | Definition |
|---|---|
| `year`, `insee_code` | allocation year (« Exercice », checked on every row) and Insee code |
| `pop_insee` | « Population INSEE », the population totale authenticated by decree (lexicon p. 1: for 2019, décret n° 2018-1328, census 2016). This is the Insee population every per-inhabitant figure of the analysis uses. |
| `pop_dgf` | « Population DGF »: Insee population plus one inhabitant per second home and per caravan place (lexicon p. 1) |
| `pf_per_inhabitant` | « Potentiel financier par habitant », potentiel financier over DGF population (lexicon p. 8) |
| `dsr_cible_index`, `dsr_cible_rank` | « Indice synthétique DSR cible » and « Rang DSR cible »; the 2018 file has no index. A rank of 0 is written empty. |
| `dsr_cible_eligible` | 2018-2019: the four parts of the fraction cible (« Part Pfi », « Part VOIRIE », « Part ENFANTS », « Part Pfi/hectare ») sum to more than zero, the spontaneous attribution before exit guarantees; empty where unranked |
| `dsr_cible` | 2018-2019: « Montant global réparti » of the fraction cible, guarantees included, in euros |
| `dsu_index`, `dsu_rank` | 2018-2019: « Valeur de l'indice synthétique de classement de la commune à la DSU » and the rank among metropolitan communes of 10,000 inhabitants or more. The 2016 and 2017 files rank only the communes the DSU pays (751 and 676), so these columns are empty there. |
| `dsu_eligible` | 2018-2019: « Montant attribution spontanée DSU » above zero |
| `dsu` | 2018-2019: « Montant total réparti » of the DSU, guarantees included, in euros |

Checks:

- The fraction cible sums to EUR 323,780,451 in 2019, the « masse des crédits
  mis en répartition » of the DGCL note on the DSR (14 June 2019, pp. 2 and 11), and
  to EUR 285.5m in 2018; the DSU to EUR 2,164.6m in 2019 and EUR 2,079.3m in
  2018.
- 10,000 communes have a positive spontaneous fraction cible in 2018 and in
  2019, all of them ranked 1 to 10,000.
- 686 of the 1,028 ranked cities have a spontaneous DSU in 2018 and 688 of
  1,032 in 2019, the first two thirds rounded up, all ranked first.

### The rules, as published

- **DETR**, CGCT art. L2334-33, as the préfecture de la Savoie reproduces it
  in « DETR-DSIL 2024, annexe 1, collectivités éligibles » (created 27 October
  2023),
  https://www.savoie.gouv.fr/contenu/telechargement/43621/356441/file/DETR-DSIL%202024%20-%20annexe%201-collectivit%C3%A9s%20%C3%A9ligibles.pdf
  (84,164 bytes, e541c8c260a3b625), p. 1: « B - les communes : a) dont la
  population n'excède pas 2 000 habitants ; b) dont la population est
  supérieure à 2 000 habitants et n'excède pas 20 000 habitants, et dont le
  potentiel financier moyen par habitant est inférieur à 1,3 fois le
  potentiel financier moyen par habitant de l'ensemble des communes dont la
  population est supérieure à 2 000 habitants et n'excède pas 20 000
  habitants ; c) les communes nouvelles [...] sont réputées remplir, pendant
  les trois premiers exercices à compter de leur création, les conditions de
  population mentionnées aux a et b. » and « La liste officielle des
  collectivités éligibles est arrêtée par le ministère, DGCL, en début
  d'année. » The cap is one mean for all communes of 2,001 to 20,000
  inhabitants, not the mean of a commune's stratum. Légifrance refused the
  connection; the amendment II-CF1398 to the PLF for 2025 (Assemblée
  nationale, 24 October 2024, withdrawn),
  https://www.assemblee-nationale.fr/dyn/17/amendements/0324C/CION_FIN/CF1398.pdf
  (9,303 bytes, c2b0a4f790a7fc2b), states the same rule in its exposé and
  counts « 33 939 communes [...] éligibles à la DETR » in 2021.
- **DSR, fraction cible**, DGCL « Note d'information du 14 juin 2019 relative
  à la dotation de solidarité rurale pour l'exercice 2019 », copy on the
  préfecture de l'Allier site,
  https://www.allier.gouv.fr/contenu/telechargement/4376/44263/file/note_d_information_dsr_2019.pdf
  (768,078 bytes, db625f2f2407e8ba), p. 7: « La troisième fraction de la
  dotation de solidarité rurale est attribuée aux 10 000 premières communes
  de moins de 10 000 habitants parmi celles éligibles à au moins l'une des
  deux premières fractions de la dotation de solidarité rurale, classées en
  fonction décroissante de l'indice synthétique composé pour 70% du rapport
  entre le potentiel financier moyen par habitant des communes appartenant au
  même groupe démographique et le potentiel financier par habitant de la
  commune et pour 30% du rapport entre le revenu moyen par habitant des
  communes appartenant au même groupe démographique et le revenu par habitant
  de la commune. » On the exit guarantee created by the finance law for 2019
  (p. 8): « Les communes qui deviennent inéligibles en 2019 perçoivent, à
  titre de garantie non renouvelable, une attribution égale à la moitié de
  l'attribution perçue l'année précédente ».
- **DSU**, DGCL « Note d'information du 14 juin 2019 relative à la
  répartition de la dotation de solidarité urbaine et de cohésion sociale
  (DSU) pour l'exercice 2019 »,
  https://www.allier.gouv.fr/contenu/telechargement/4377/44268/file/note_d_information_dsu_2019.pdf
  (1,115,155 bytes, 9111eb1382a7504b), p. 2: « Sont désormais éligibles les
  deux premiers tiers des communes de plus de 10 000 habitants (au lieu des
  trois premiers quarts auparavant) » (finance law for 2017); p. 3: « sont
  donc éligibles les deux premiers tiers des communes de 10 000 habitants et
  plus classées par ordre décroissant de la valeur de l'indice synthétique,
  soit 688 communes en 2019 »; p. 6: « Lorsqu'une commune cesse d'être
  éligible en 2019 à la DSU, elle perçoit, à titre de garantie non
  renouvelable, une dotation égale à 50% du montant perçu en 2019 ». The
  lexicon (p. 15) gives the same 688.

## 2. `projects.csv`: the DGCL lists of funded projects

Dataset « Projets financés par les dotations de soutien à l'investissement
des collectivités territoriales », DGCL,
https://www.data.gouv.fr/fr/datasets/6176785207139a929a2776fe/ (last modified
2026-07-24). Files
`dgcl-liste-projets-dotations-investissement-local-<year>.csv` under
`https://static.data.gouv.fr/resources/projets-finances-par-les-dotations-de-soutien-a-linvestissement-des-collectivites-territoriales/`,
one row per project: dispositif, beneficiary type, SIREN, département, name
and Insee code, title, cost before tax (`cout_ht`), grant (`subvention`) and
rate.

| Year | Path | Bytes | SHA-256 | Projects | All grants | DETR projects | DETR | Kept by code | By name | Left out (grant) |
|---|---|---|---|---|---|---|---|---|---|---|
| 2018 | `20240625-091104/` | 3,699,870 | 71951833c834665e | 26,296 | EUR 1,626.5m | 21,475 | EUR 1,004.6m | 19,535 | 3,119 | 3,642 (EUR 424.5m) |
| 2019 | `20240625-090948/` | 3,868,356 | 245bd4ef9586a382 | 26,604 | EUR 1,864.9m | 21,196 | EUR 1,021.5m | 23,117 | 0 | 3,487 (EUR 522.6m) |
| 2020 | `20240625-091129/` | 4,216,480 | ef1948daa43f2d72 | 28,561 | EUR 2,424.2m | 20,464 | EUR 1,008.6m | 24,024 | 0 | 4,537 (EUR 842.9m) |
| 2021 | `20240625-091143/` | 5,572,564 | 0762936637ff0692 | 37,558 | EUR 3,115.9m | 24,195 | EUR 1,013.0m | 32,628 | 0 | 4,930 (EUR 902.7m) |
| 2022 | `20240625-091205/` | 4,282,106 | 4cb504172bb6370e | 28,605 | EUR 2,190.0m | 22,187 | EUR 1,009.5m | 25,139 | 0 | 3,466 (EUR 633.8m) |
| 2023 | `20240625-090908/` | 3,656,980 | b23d784b25e5d514 | 24,012 | EUR 1,892.3m | 19,536 | EUR 1,003.1m | 21,010 | 0 | 3,002 (EUR 568.9m) |
| 2024 | `20250721-173636/` | 3,602,294 | ebd8c37f33e38833 | 22,114 | EUR 1,868.3m | 18,153 | EUR 1,014.7m | 19,394 | 0 | 2,720 (EUR 557.3m) |
| 2025 | `20260724-142021/` | 3,254,664 | 79b4ca5c2a603881 | 20,281 | EUR 1,726.0m | 16,799 | EUR 999.8m | 17,614 | 0 | 2,667 (EUR 507.8m) |

A project is a commune's when its beneficiary carries an Insee code (four-digit
codes get their leading zero back). The 2018 list gives 3,521 DETR projects
neither a beneficiary type nor a code, only a name and a département; the
extractor matches every such 2018 project to the commune of the 2018 criteria
file whose name, folded to lower-case ASCII without accents, the text after a
colon, « debut tvx » or « travaux commenc », parentheses, and a leading
« commune de », « mairie de » or « ville de », names exactly one commune of
the département, first as written, then without a leading article (the
criteria file writes « CAPELLE » for La Capelle). 3,119 projects of all grants
are matched that way. The others, the projects of EPCIs, syndicates and other
owners, and the département 06 rows named only « commune », are left out.

| Column | Definition |
|---|---|
| `year`, `insee_code`, `dispositif` | list year, commune, grant as the list writes it (DETR, DSIL, DSIL Exceptionnelle, DSIL RT, DPV, DSID, DSID RT) |
| `projects` | number of projects |
| `grant`, `cost` | sums of `subvention` and `cout_ht`, euros, two decimals |

Checks: DETR projects of communes sum to EUR 773.0m in 2018, 806.7m in 2019,
763.5m in 2020, 803.9m in 2021, 815.7m in 2022, 790.4m in 2023, 812.9m in
2024 (16,354 projects in 13,175 communes) and 794.9m in 2025. The 2024 list
holds 18,153 DETR projects for EUR 1,014.7m, the figures of
`data/literature/candidates.csv`.

## 3. `accounts.csv`: the DGFiP accounts of the communes

Datasets « Comptes individuels des communes (fichier global) » on
data.economie.gouv.fr, exported through the catalogue API as
`https://data.economie.gouv.fr/api/explore/v2.1/catalog/datasets/comptes-individuels-des-communes-fichier-global-<id>/exports/csv?delimiter=%3B&select=an,dep,icom,inom,pop1,equip,fequip,charge,fcharge,perso,fperso,dette,fdette,emp,femp,subr,fsubr,dgf,fdgf,depinv,fdepinv,prod,fprod,caf,fcaf,impo1,fimpo1`
(for `2008`, the dataset of 2000-2008, with `&where=an%3D%222008%22`), saved
as `accounts-<id>.csv`. The API exports have no fixed row order, so a new
export may differ byte for byte; the extractor sorts.

| Id | Bytes | SHA-256 | Rows by year |
|---|---|---|---|
| `2008` | 6,299,380 | 72a3ab9258adacac | 2008: 36,674 |
| `20090` | 6,307,023 | 8cc986022b02a0f8 | 2009: 36,679 |
| `2010` | 6,310,284 | 366600d764fdae23 | 2010: 36,680 |
| `2011-2015` | 31,554,953 | 29303d3d1ee39744 | 2011: 36,783; 2012: 36,682; 2013: 36,639; 2014: 36,675; 2015: 36,653 |
| `2016` | 6,157,347 | f77c2e98af00ca69 | 35,857 |
| `2017` | 6,084,748 | 44ee357434d6e784 | 35,409 |
| `2018` | 6,075,114 | 40601ecf67aba755 | 35,355 |
| `2019-2020` | 12,017,087 | 12617f045d93a1a5 | 2019: 34,963; 2020: 34,968 |
| `2021` | 6,022,040 | 3804d0bb2b294db2 | 34,965 |
| `2022` | 6,041,130 | 2aa9b94f4e6e311b | 34,955 |
| `2023-2024` | 12,086,626 | 118771f7f4b65eaa | 2023: 34,945; 2024: 34,932 |
| `2025` | 6,042,526 | b10450886ffffe50 | 34,860 |

The variables are defined in the template attached to the datasets,
`Maquette_commune.ods`
(`.../comptes-individuels-des-communes-fichier-global-2019-2020/attachments/maquette_commune_ods`,
66,303 bytes, b373273eca9fa66b), in « milliers d'Euros » for the budget
principal. The Insee code is the département on two characters (the files
write 001, 02A) followed by `icom`; the overseas départements (101 to 106) are
left out. The extract keeps the years 2013 to 2025, from the first year a
pre-period reaches (2013, for the DSR of 2016), and the 20,086 metropolitan
communes that enter a design in at least one year of `criteria.csv`: those of
2,001 to 20,000 Insee inhabitants, those ranked 4,001 to 16,000 for the
fraction cible, and those ranked for the DSU. The years 2008 to 2012 were read
and counted, not extracted, since no window or pre-period reaches them. Rows
kept: 20,074 (2013) to 19,654 (2025), 257,981 in all, one per commune and
year (the extractor fails on a duplicate).

| Column | Template line | Definition |
|---|---|---|
| `equipment` | `equip` | « dont : Dépenses d'équipement » (investment spending) |
| `operating` | `charge` | « TOTAL DES CHARGES DE FONCTIONNEMENT » |
| `debt` | `dette` | « Encours total de la dette au 31 décembre N » |
| `borrowing` | `emp` | « dont : Emprunts bancaires et dettes assimilées » (new borrowing) |
| `subsidies` | `subr` | « Subventions reçues » (investment resources) |
| `dgf` | `dgf` | « Dotation globale de fonctionnement » |
| `self_financing` | `caf` | « Capacité d'autofinancement = CAF » |
| `local_taxes` | `impo1` | « dont : Impôts Locaux » |

## 4. `results.csv`: the regression discontinuities

Written by `analysis/grants.ml`; the method is in its header and in
`evaluations.md`. One row per estimate:

| Column | Definition |
|---|---|
| `estimand` | `rule_match` (share of communes whose published eligibility or payment the rule reproduces; `n_left` of `n_right`), `accounting_leverage` (cost over grant of the DETR projects of communes, by list year), `density` (McCrary log ratio), `first_stage`, `reduced_form`, `leverage` (reduced form over first stage), `leverage_half_bandwidth`, `leverage_double_bandwidth`, `placebo_left`, `placebo_right`, `pre_period` |
| `threshold` | `detr_cap`, `dsr_cible_rank`, `dsu_rank` |
| `outcome` | the series, in euros per inhabitant summed over the window; `_vs_pre` less the window's length times the commune's mean of the three years before; for a leverage, outcome over first stage |
| `window` | number of years from the first year t (1 to 3), `pre` for the three years before, a year for `accounting_leverage`, `-` otherwise |
| `estimate`, `se`, `ci_low`, `ci_high` | the jump, its standard error clustered by commune, and its 95% interval; for a leverage the delta-method standard error and the Anderson-Rubin interval (`-inf`, `inf` when the first stage is not significant) |
| `n_left`, `n_right` | observations within the bandwidth below and at or above the cutoff (ineligible, eligible) |
| `bandwidth` | log of the cap over the potentiel financier for the DETR; thousands of ranks for the DSR and DSU; index units for their density test |
| `mde` | minimum detectable effect at 80% power, 5% two-sided, from the bandwidth sample's variance; for a leverage, the reduced form's over the first stage |
| `note` | years pooled and sample |

## 5. The aim and the State's indicator

Rapport annuel de performances 2025, mission « Relations avec les
collectivités territoriales », Assemblée nationale copy
https://www.assemblee-nationale.fr/dyn/contenu/visualisation/1109928/file/x.pdf
(1,308,500 bytes, f29e099ddd95c413, 82 pages; budget.gouv.fr answers with a
block page), objective 1, p. 20, and indicator 1.3, p. 22. The same values are
in the dataset `performance-de-la-depense-rap-2025` on data.economie.gouv.fr
(rows P119-1-3, sub-indicators « Effet de levier de la DETR », « de la
DSIL », « de la DSID », « de la DPV »). The quotes are in `evaluations.md`.
