Skip to content

Releases: Stanislas-Poisson/French-Postal-Code

French-postal-code-4.0.0

Choose a tag to compare

@Stanislas-Poisson Stanislas-Poisson released this 02 Oct 15:09
4.0.0
ba140bb

First release of the rebuilt dataset. The 2018 builder (manual INSEE files, regular expressions, HTML scraping, Google Maps) is replaced by a pipeline built on the official open data, so the files can be refreshed in about 15 minutes instead of by hand.

Highlights

  • One GPS point per postal code. Each commune and postal code pair has its own point, the median of the addresses of the Base Adresse Nationale: 99.4 % of the points come from the BAN, 184 from Nominatim and 36 fall back to the centre of the commune. The coordinate_source column always tells which.
  • History of the changes. An old INSEE code is followed to the commune and postal codes that replace it, with the date and the kind of change: merger, split, code reuse, deletion. Saint-Florent-des-Bois, merged into Rives de l'Yon in 2016, resolves to the new commune.
  • Stable identifiers. A row is never deleted: its validity is closed (valid_from, valid_to) and a closed city points to its replacement, so an application can reference cities by a foreign key.
  • A pipeline that checks itself. The official files are downloaded, versioned and imported, the points are computed in parallel, and a reconciliation step marks the data complete only when nothing is missing.

Breaking changes

This version is not compatible with 3.0.0.

  • New schema: one row per commune and postal code, with valid_from and valid_to columns.
  • New file layout: one CSV and one JSON file per table, plus the history files.
  • Commands are in the dataset: namespace (dataset:update, dataset:status, dataset:resolve, dataset:export).
  • Requires PHP 8.4 and Laravel 13.

The dataset in numbers

Regions 18
Departments and overseas collectivities 110
Communes 35,015
Cities (commune + postal code) 35,510
Code successions 8,480
Sources INSEE COG 2026, La Poste 2026-10

Files

  • french-postal-code-4.0.0-csv.zip: one CSV file per table.
  • french-postal-code-4.0.0-json.zip: one JSON file per table.
  • french-postal-code-4.0.0-sql.zip: a MySQL dump of the same tables.
  • statistics.json: the figures above and the versions of the sources.
  • SHA256SUMS: checksums of the files.

Migrating your data

commune_successions and replaced_by_city_id in cities map every old code to its successors. To check one code, run make resolve CODE=85043 POSTAL_CODE=85310. See "Migrating old codes" in the README.

Known limits

  • The INSEE publishes no event for postal codes: their history starts at the first import kept, and is less reliable than the one of the communes.
  • Paris, Lyon and Marseille have no city of their own, their arrondissements carry the postal codes; 9 communes are in that case, with a few territories without a postal code.
  • The overseas collectivities have no history before this import.

Sources and licences

INSEE, La Poste, geo.api.gouv.fr and the BAN are under the Licence Ouverte; Nominatim (OpenStreetMap) is under the ODbL. The code is under the MIT licence.

French-postal-code-3.0.0

Choose a tag to compare

@Stanislas-Poisson Stanislas-Poisson released this 05 Jul 12:17
ae489b2

Correctif important : regex de récupération des villes, la Corse ayant été sauter.
Nouvelle génération des fichiers, les villes de corse s'insert dans la liste et décale les enregistrements.

French-postal-code-2.0.0

Choose a tag to compare

@Stanislas-Poisson Stanislas-Poisson released this 19 Jun 09:27
ca9c8d5

⚠️⚠️⚠️

Ne pas utiliser cette version, les villes de Corse (2A & 2B) sont absente.


Changement intégrale des données d'origine, de la méthodologie de récupération ainsi que de la structure des données. Consultez le README.md pour plus d'informations.

⚠️ Compatibilité avec les versions inférieures non assuré.

French-postal-code-1.3.1

Choose a tag to compare

@Stanislas-Poisson Stanislas-Poisson released this 29 May 06:44
b0fef11

Fixing the typographic name of the department Haute-Savoie the e of Haute was missing

French-postal-code-1.3.0

Choose a tag to compare

@Stanislas-Poisson Stanislas-Poisson released this 21 Apr 08:30
31b331f

The following cities has their postal_codes corrected

Cities id Cities name Previous postal_code Replacement postal_code
18091 Montrevault-sur-Èvre 49600 49270
32002 Amiens 80000 80090

Upgrade form <=1.20

⚠️ The following cities_id has to been replace by their replacement in your database foreign_keys

Cities name Previous id Replacement id
Port-la-Nouvelle 3931 3900
Isles-sur-Suippe 18996 18749
Hénin-sur-Cojeul 24683 24682

French-postal-code-1.2.0

Choose a tag to compare

@Stanislas-Poisson Stanislas-Poisson released this 14 Mar 08:03
fe71df8

Fix the following errors :

  • Ü was absent in slug and pattern.
  • Newline at end of file.
  • CSV: erroneous separators for the last lines

Thanks @fiannuzzi for the issue #14

French-postal-code-1.1.0

Choose a tag to compare

@Stanislas-Poisson Stanislas-Poisson released this 06 Jan 07:29
3adf2ac

Fix the following errors :

  • Cities postal codes havent many errors comma, multiple postal codes and */
  • Formating cities name with single quote
  • Formating regions name with single quote

French-postal-code-1.0.1

Choose a tag to compare

@Stanislas-Poisson Stanislas-Poisson released this 08 Dec 18:35
fa73dfa

Fixing the cities database sql export

French-postal-code-1.0

Choose a tag to compare

@Stanislas-Poisson Stanislas-Poisson released this 04 Dec 15:10
3e5b4f6
Merge pull request #6 from Stanislas-Poisson/develop

[DEV] - Release v1.0.0