From 737f8016e22bf488d90d7e7f3b7c03457eaceb39 Mon Sep 17 00:00:00 2001 From: Jules Neny Date: Thu, 12 Nov 2026 09:14:31 +0100 Subject: [PATCH] =?UTF-8?q?feat(taxonomie):=20B4b-M3,=20type=20et=20postur?= =?UTF-8?q?es=20port=C3=A9s=20par=20les=20120=20structures?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit scripts/porter-taxonomie-reseaux.mjs (rejouable, --verifier) recopie tels quels type_organisation, postures et taxonomie_source (= source) depuis data/taxonomie/organisations.json. classement(id, fiche, mapping) lit le champ de la fiche d'abord, le mapping en repli ; toMini passe la structure (les Org restent sur le mapping jusqu'à B4b-2). Le mapping reste comme trace (README). test-taxonomie : égalité 120 sur 120, classement identique fiche/mapping, repli, vocabulaire (44/44). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01PWGVn2kurLPzxVc5F3mQJ5 --- DESIGN-SYSTEM.md | 2 + composables/useFicheAdapter.ts | 15 +- data/taxonomie/README.md | 11 +- public/data/reseaux-bifurcation.json | 1490 ++++++++++++++++++++++++-- scripts/porter-taxonomie-reseaux.mjs | 63 ++ scripts/test-taxonomie.mjs | 31 +- utils/taxonomie.ts | 55 +- 7 files changed, 1579 insertions(+), 88 deletions(-) create mode 100644 scripts/porter-taxonomie-reseaux.mjs diff --git a/DESIGN-SYSTEM.md b/DESIGN-SYSTEM.md index e454628..a25761d 100644 --- a/DESIGN-SYSTEM.md +++ b/DESIGN-SYSTEM.md @@ -103,6 +103,8 @@ Contenus de détail en place : `/` → `FicheDetail` (`compact`, `etiquettes-cli **Carte unifiée (B4a).** `/` porte les deux bases : `?mode=entraide` (défaut, absent de l'URL ; Org NocoDB) et `?mode=pratiques` (StructureV2, l'ancienne `/agences`, en 301 vers `/?mode=pratiques` requête gardée). En tête, `components/carte/CommutateurMode.vue` : deux onglets (`tablist`, `aria-selected`, 44 px, ← →) et le lien « Bibliothèque » vers `/media` ; changer de mode garde `vue` et `q`, vide les filtres et ferme la fiche ; rien n'anime. Chaque mode garde ses dimensions, son détail, son chatbot et sa pop-up ; les deux ont la dimension `type` (contour bleu, variante `echelle`), le mode Pratiques la dimension `postures` (variante `posture`, contour safran) : `utils/taxonomie.ts` lit `data/taxonomie/organisations.json` et `toMini(source, classement)` pose les étiquettes. Une seule carte, `components/carte/CarteUnifiee.vue` (épingles génériques de `utils/carte.ts`, bornes France ou Europe), et en mode Entraide les DOM-TOM en encarts sur la même vue (`EncartsOutremer.vue` : à droite au bureau, un tiers au plus, sous la carte au téléphone ; un encart seulement pour un territoire qui a une épingle dans le résultat). Leaflet arrive par `composables/useLeaflet.ts` (une fois, `{ cluster }` pour la carte principale). +**B4b.** Une structure des réseaux porte son `type_organisation`, ses `postures` et `taxonomie_source` (lus avant le mapping, `classement(id, fiche)`), son point au centre de la commune du siège avec `geocodage` (source, confiance, ou `raison` si elle reste au centroïde), et `territoire` si elle est d'outre-mer : `epingleStructure` le pose sur l'épingle, et les encarts valent alors pour les deux modes. + **Troisième page en place : `/outils?tab=partir-de-soi` (B6-M2)** — sept fiches, une par mot de la slide 17 (`components/OutilsPartirDeSoi.vue`, adaptateur `toMiniMot`). Trois extensions optionnelles du composant, sans effet sur `/` et `/agences` : tri `ordre` (ordre du tableau d'entrée) avec `config.triDefaut` (tri sans filtre ; la pertinence reste prioritaire dès qu'un filtre est actif) et `config.libellesTri` ; prop `libelles-vue` (`{ carte: 'Graphe' }` : le bouton, et « Voir dans le graphe » au lieu de « Voir sur la carte » ; l'URL garde `vue=carte`). Le slot `#carte` y est `GrapheMots.vue`, un SVG statique (nœud central, mots en couronne, ressources en feuilles) dans le vocabulaire du motif maillage. La page vit dans un onglet : `tab=` est un paramètre que la vue ne gère pas, donc recopié à chaque écriture. **Quatrième page : `/connaissances` (B19, retouches B19b 29/10/2026)** — la couche de connaissances partagées (`data/connaissances/`, domaine pur dans `utils/connaissances/` : `valider`, `vocabulaire`, `lire`, `graphe` ; adaptateur `toMiniConnaissance`). Deux extensions optionnelles de plus, sans effet sur les autres pages : option `etatDefaut` en troisième argument de `useVueFiches(fiches, config, { etatDefaut: 'carte' })` (l'état rendu quand l'URL ne porte pas `vue=` ; l'URL prime toujours) ; prop `navigation-lineaire` de `VueFiches` (défaut `true` ; à `false`, Précédente / Suivante, le rang et la ligne d'aide des flèches disparaissent, les flèches clavier restent). Le slot `#carte` y est `GrapheConnaissances.vue` (SVG serveur, graine fixe, légende visible : rond = concept, carré = source, trait plein = énoncé par la source, pointillé = posé par AEP). La fiche se lit en trois étages : titre et en-tête de propriétés (`dl.cf__props`), texte (`cf__texte`), crédit et licence repliés (`details.cf__fond`). diff --git a/composables/useFicheAdapter.ts b/composables/useFicheAdapter.ts index 07cafc4..c2d1468 100644 --- a/composables/useFicheAdapter.ts +++ b/composables/useFicheAdapter.ts @@ -98,13 +98,18 @@ function famillesDe(s: StructureV2): string[] { return [...new Set(ids.map(String))] } -/** Classement d'une fiche par son identifiant de mapping (`org:108`, `structure:f1-rotor`) : `classement` de utils/taxonomie.ts. */ -export type ClasseurFiche = (id: string) => { type: string; postures: string[] } +/** + * Classement d'une fiche : `classement` de utils/taxonomie.ts. `id` = identifiant de mapping + * (`org:108`, `structure:f1-rotor`) ; `porte` = la fiche elle-même, lue d'abord (B4b : une + * structure porte `type_organisation`, `postures`, `taxonomie_source`). Les Org ne passent pas + * encore leur fiche : NocoDB n'a pas ces colonnes avant B4b-2. + */ +export type ClasseurFiche = (id: string, porte?: StructureV2) => { type: string; postures: string[] } /** `type` et `postures` en étiquettes (B4a). `classer` peut arriver en index de `map` : seule une fonction compte. */ -function etiquettesTaxonomie(id: string, classer?: unknown): Record { +function etiquettesTaxonomie(id: string, classer?: unknown, porte?: StructureV2): Record { if (typeof classer !== 'function') return {} - const c = (classer as ClasseurFiche)(id) + const c = (classer as ClasseurFiche)(id, porte) return { type: [c.type], postures: [...c.postures] } } @@ -123,7 +128,7 @@ export function toMini(source: Org | StructureV2, classer?: ClasseurFiche): Mini tags: hashtags.map(sansDiese), famille: famillesDe(source), pays: source.pays ? [source.pays] : [], - ...etiquettesTaxonomie(`structure:${source.id}`, classer), + ...etiquettesTaxonomie(`structure:${source.id}`, classer, source), }, coords: coordsDe(source.latitude, source.longitude), ville: source.ville, diff --git a/data/taxonomie/README.md b/data/taxonomie/README.md index 45991aa..a2b0af6 100644 --- a/data/taxonomie/README.md +++ b/data/taxonomie/README.md @@ -2,7 +2,9 @@ `organisations.json` dit, pour chaque fiche de la carte, **quel type d'organisation** elle est et **quelles postures** elle porte. Une entrée par fiche, 211 au 3 novembre 2026 : les 91 structures d'entraide (`org:`, mode Entraide) et les 120 réseaux et agences (`structure:`, mode Pratiques inspirantes, `public/data/reseaux-bifurcation.json`). -Le site lit ce fichier (`utils/taxonomie.ts`) : chips « Type » dans les deux modes, chips « Posture » (contour safran) en mode Pratiques. +Le site s'en sert (`utils/taxonomie.ts`) pour les chips « Type » dans les deux modes et les chips « Posture » (contour safran) en mode Pratiques. + +> **Depuis B4b (12/11/2026), ce fichier est la trace de la migration, plus la source pour les 120 structures.** Chaque structure de `reseaux-bifurcation.json` porte elle-même `type_organisation`, `postures` et `taxonomie_source` (recopiés d'ici tels quels par `scripts/porter-taxonomie-reseaux.mjs`) ; le site lit d'abord ces champs, puis ce fichier en repli. Les 91 `org:` restent lus ici jusqu'à B4b-2 (colonnes NocoDB, `scripts/migrer-taxonomie-nocodb.mjs`). Corriger une structure : dans `reseaux-bifurcation.json` (le site lit ce champ), puis ici pour garder la trace égale (le test vérifie l'égalité 120 sur 120) ; ou ici, puis `node scripts/porter-taxonomie-reseaux.mjs`. ## Une entrée @@ -58,6 +60,9 @@ Le site lit ce fichier (`utils/taxonomie.ts`) : chips « Type » dans les deux m Une fiche absente du fichier (ajoutée après) s'affiche en `autre`, sans posture, jusqu'à ce qu'on l'ajoute. -## Après : B4b +## B4b : la migration -Le lot B4b portera ces deux champs dans NocoDB (colonnes `type_organisation` et `postures`, migration depuis ce fichier) et dans le JSON des réseaux. Les clés (`org:`, `structure:`) sont les identifiants stables des deux bases : la migration les lit telles quelles. Ce fichier deviendra alors la trace de la migration, plus la source. +- **B4b-1 (fait, 12/11/2026)** : les 120 `structure:` sont portées dans `public/data/reseaux-bifurcation.json` (`type_organisation`, `postures`, `taxonomie_source` = le `source` d'ici). `node scripts/porter-taxonomie-reseaux.mjs --verifier` dit si le JSON est à jour. +- **B4b-2 (à faire, par la session de secteur, après sauvegarde)** : les 91 `org:` vers NocoDB, colonnes `type_organisation` et `postures`. `node scripts/migrer-taxonomie-nocodb.mjs` sort le plan (`taxonomie-nocodb-plan.json`) sans rien écrire ; `--ecrire` écrit, avec `NOCODB_URL` et `NOCODB_TOKEN` en variables d'environnement. + +Les clés (`org:`, `structure:`) sont les identifiants stables des deux bases : la migration les lit telles quelles. Une fois les deux faits, ce fichier est la trace de la migration, plus la source. diff --git a/public/data/reseaux-bifurcation.json b/public/data/reseaux-bifurcation.json index 63e1425..0dd4ac3 100644 --- a/public/data/reseaux-bifurcation.json +++ b/public/data/reseaux-bifurcation.json @@ -129,7 +129,19 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 50.8503, - "longitude": 4.3517 + "longitude": 4.3517, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "cooperative" + ], + "taxonomie_source": { + "type_organisation": "type_principal Cooperative", + "postures": { + "bas-carbone": "hashtag #reemploi-structurel", + "cooperative": "type_principal Cooperative" + } + } }, { "id": "f2-frugalite-heureuse", @@ -197,7 +209,21 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 48.8566, - "longitude": 2.3522 + "longitude": 2.3522, + "type_organisation": "association", + "postures": [ + "bas-carbone", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Mouvement", + "postures": { + "bas-carbone": "hashtag #sobriete-energetique", + "ecoconstruction": "description : « biosourcées »", + "low-tech": "hashtag #low-tech-experimentation" + } + } }, { "id": "f3-yes-we-camp", @@ -268,7 +294,13 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 43.2965, - "longitude": 5.3698 + "longitude": 5.3698, + "type_organisation": "association", + "postures": [], + "taxonomie_source": { + "type_organisation": "type_principal Collectif", + "postures": {} + } }, { "id": "f4-hab-fab", @@ -337,7 +369,19 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 43.6108, - "longitude": 3.8767 + "longitude": 3.8767, + "type_organisation": "agence", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Cooperative", + "postures": { + "cooperative": "hashtag #accompagnement-cooperatif", + "participatif": "hashtag #habitat-participatif" + } + } }, { "id": "f5-cler", @@ -405,7 +449,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 48.8566, - "longitude": 2.3522 + "longitude": 2.3522, + "type_organisation": "association", + "postures": [ + "cooperative" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "cooperative": "description : « coopératives »" + } + } }, { "id": "f1-encore-heureux", @@ -457,7 +511,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 48.8566, - "longitude": 2.3522 + "longitude": 2.3522, + "type_organisation": "agence", + "postures": [ + "bas-carbone" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #reemploi-second-oeuvre" + } + } }, { "id": "f1-opalis", @@ -508,7 +572,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 50.8503, - "longitude": 4.3517 + "longitude": 4.3517, + "type_organisation": "agence", + "postures": [ + "bas-carbone" + ], + "taxonomie_source": { + "type_organisation": "type_principal Plateforme", + "postures": { + "bas-carbone": "hashtag #plateforme-materiaux" + } + } }, { "id": "f3-bellastock", @@ -569,6 +643,18 @@ "confiance": "lu sur le site", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Cooperative", + "postures": { + "cooperative": "type_principal Cooperative", + "participatif": "hashtag #participation-usagers" + } } }, { @@ -621,7 +707,19 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 47.5581077, - "longitude": 7.5878261 + "longitude": 7.5878261, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "patrimoine" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #reemploi-structurel", + "patrimoine": "hashtag #retrofit-strates" + } + } }, { "id": "f1-material-cultures", @@ -675,7 +773,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 51.5074456, - "longitude": -0.1277653 + "longitude": -0.1277653, + "type_organisation": "association", + "postures": [ + "ecoconstruction" + ], + "taxonomie_source": { + "type_organisation": "type_principal Association", + "postures": { + "ecoconstruction": "hashtag #materiaux-biosources" + } + } }, { "id": "f1-superuse", @@ -727,7 +835,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 51.9244, - "longitude": 4.4777 + "longitude": 4.4777, + "type_organisation": "agence", + "postures": [ + "bas-carbone" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #reemploi-structurel" + } + } }, { "id": "f1-arteria", @@ -779,7 +897,21 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 38.7169, - "longitude": -9.1399 + "longitude": -9.1399, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "patrimoine", + "ecoconstruction" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #reemploi-second-oeuvre", + "patrimoine": "hashtag #retrofit-strates", + "ecoconstruction": "hashtag #materiaux-geosources" + } + } }, { "id": "f1-oitoo", @@ -830,7 +962,19 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 41.1579, - "longitude": -8.6291 + "longitude": -8.6291, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "patrimoine" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #reemploi-second-oeuvre", + "patrimoine": "hashtag #retrofit-strates" + } + } }, { "id": "f1-agwa", @@ -882,7 +1026,19 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 50.8503, - "longitude": 4.3517 + "longitude": 4.3517, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "patrimoine" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #reemploi-second-oeuvre", + "patrimoine": "hashtag #retrofit-strates" + } + } }, { "id": "f1-carton123", @@ -933,7 +1089,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 50.8503, - "longitude": 4.3517 + "longitude": 4.3517, + "type_organisation": "agence", + "postures": [ + "bas-carbone" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #reemploi-second-oeuvre" + } + } }, { "id": "f1-budcud", @@ -984,7 +1150,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 50.0469432, - "longitude": 19.9971534 + "longitude": 19.9971534, + "type_organisation": "agence", + "postures": [ + "bas-carbone" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #reemploi-second-oeuvre" + } + } }, { "id": "f1-6a", @@ -1035,7 +1211,19 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 51.5074456, - "longitude": -0.1277653 + "longitude": -0.1277653, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "patrimoine" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #reemploi-second-oeuvre", + "patrimoine": "hashtag #retrofit-strates" + } + } }, { "id": "f1-cycle-up", @@ -1087,7 +1275,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 48.8566, - "longitude": 2.3522 + "longitude": 2.3522, + "type_organisation": "agence", + "postures": [ + "bas-carbone" + ], + "taxonomie_source": { + "type_organisation": "type_principal Plateforme", + "postures": { + "bas-carbone": "hashtag #plateforme-materiaux" + } + } }, { "id": "f1-backacia", @@ -1138,7 +1336,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 48.8566, - "longitude": 2.3522 + "longitude": 2.3522, + "type_organisation": "agence", + "postures": [ + "bas-carbone" + ], + "taxonomie_source": { + "type_organisation": "type_principal Plateforme", + "postures": { + "bas-carbone": "hashtag #deconstruction-selective" + } + } }, { "id": "f1-mobius", @@ -1190,7 +1398,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 48.8566, - "longitude": 2.3522 + "longitude": 2.3522, + "type_organisation": "agence", + "postures": [ + "bas-carbone" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #deconstruction-selective" + } + } }, { "id": "f1-ad-vitam-material", @@ -1242,7 +1460,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 50.8503, - "longitude": 4.3517 + "longitude": 4.3517, + "type_organisation": "association", + "postures": [ + "bas-carbone" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "bas-carbone": "hashtag #plateforme-materiaux" + } + } }, { "id": "f1-cirkla", @@ -1293,7 +1521,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 47.5581077, - "longitude": 7.5878261 + "longitude": 7.5878261, + "type_organisation": "association", + "postures": [ + "bas-carbone" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "bas-carbone": "hashtag #plateforme-materiaux" + } + } }, { "id": "f1-cancan", @@ -1345,7 +1583,19 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 44.8378, - "longitude": -0.5792 + "longitude": -0.5792, + "type_organisation": "association", + "postures": [ + "bas-carbone", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Collectif", + "postures": { + "bas-carbone": "hashtag #deconstruction-selective", + "participatif": "description : « participative »" + } + } }, { "id": "f1-harquitectes", @@ -1399,7 +1649,19 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 41.5460801, - "longitude": 2.1083214 + "longitude": 2.1083214, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "ecoconstruction" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #reemploi-structurel", + "ecoconstruction": "hashtag #materiaux-geosources" + } + } }, { "id": "f1-isla", @@ -1451,7 +1713,19 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 39.5695818, - "longitude": 2.6500745 + "longitude": 2.6500745, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "ecoconstruction" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #reemploi-second-oeuvre", + "ecoconstruction": "hashtag #materiaux-geosources" + } + } }, { "id": "f1-jdviv", @@ -1503,7 +1777,19 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 51.0543, - "longitude": 3.7174 + "longitude": 3.7174, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "patrimoine" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #reemploi-second-oeuvre", + "patrimoine": "hashtag #retrofit-strates" + } + } }, { "id": "f1-salvoweb", @@ -1554,7 +1840,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 51.2800275, - "longitude": 1.0802533 + "longitude": 1.0802533, + "type_organisation": "association", + "postures": [ + "bas-carbone" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "bas-carbone": "hashtag #plateforme-materiaux" + } + } }, { "id": "f1-bl-architectes", @@ -1608,7 +1904,19 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 42.959487, - "longitude": -0.3305711 + "longitude": -0.3305711, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "ecoconstruction" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #reemploi-second-oeuvre", + "ecoconstruction": "hashtag #materiaux-biosources" + } + } }, { "id": "f1-refair-bdr", @@ -1660,7 +1968,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 44.842168, - "longitude": -0.6469022 + "longitude": -0.6469022, + "type_organisation": "agence", + "postures": [ + "bas-carbone" + ], + "taxonomie_source": { + "type_organisation": "type_principal Plateforme", + "postures": { + "bas-carbone": "hashtag #plateforme-materiaux" + } + } }, { "id": "f2-lacaton-vassal", @@ -1735,6 +2053,20 @@ "confiance": "lu sur le site", "code_commune": "93048", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "patrimoine", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #sobriete-energetique", + "patrimoine": "hashtag #vernaculaire-rural", + "low-tech": "hashtag #low-tech-experimentation" + } } }, { @@ -1803,7 +2135,21 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 51.1657, - "longitude": 10.4515 + "longitude": 10.4515, + "type_organisation": "agence", + "postures": [ + "patrimoine", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "patrimoine": "hashtag #vernaculaire-rural", + "ecoconstruction": "hashtag #terre-crue", + "low-tech": "famille 2 (Frugalité & low-tech)" + } + } }, { "id": "f2-anna-heringer", @@ -1870,7 +2216,23 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 51.1657, - "longitude": 10.4515 + "longitude": 10.4515, + "type_organisation": "agence", + "postures": [ + "patrimoine", + "ecoconstruction", + "low-tech", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "patrimoine": "hashtag #vernaculaire-rural", + "ecoconstruction": "hashtag #terre-crue", + "low-tech": "pensée Low-tech", + "participatif": "description : « participative »" + } + } }, { "id": "f2-craterre", @@ -1946,6 +2308,20 @@ "confiance": "lu sur le site", "code_commune": "38553", "date": "2026-11-12" + }, + "type_organisation": "formation", + "postures": [ + "patrimoine", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Recherche", + "postures": { + "patrimoine": "hashtag #vernaculaire-rural", + "ecoconstruction": "hashtag #terre-crue", + "low-tech": "hashtag #low-tech-experimentation" + } } }, { @@ -2022,6 +2398,18 @@ "confiance": "lu sur le site", "code_commune": "38553", "date": "2026-11-12" + }, + "type_organisation": "autre", + "postures": [ + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Autre, aucun autre champ ne tranche", + "postures": { + "ecoconstruction": "hashtag #terre-crue", + "low-tech": "pensée Low-tech" + } } }, { @@ -2098,6 +2486,20 @@ "confiance": "lu sur le site", "code_commune": "38553", "date": "2026-11-12" + }, + "type_organisation": "autre", + "postures": [ + "patrimoine", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Autre, aucun autre champ ne tranche", + "postures": { + "patrimoine": "description : « réhabilitation »", + "ecoconstruction": "hashtag #terre-crue", + "low-tech": "pensée Low-tech" + } } }, { @@ -2165,7 +2567,23 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 47.5162, - "longitude": 14.5501 + "longitude": 14.5501, + "type_organisation": "agence", + "postures": [ + "patrimoine", + "ecoconstruction", + "low-tech", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "patrimoine": "hashtag #vernaculaire-rural", + "ecoconstruction": "hashtag #terre-crue", + "low-tech": "hashtag #low-tech-experimentation", + "participatif": "description : « participative »" + } + } }, { "id": "f2-bc-architects", @@ -2233,7 +2651,21 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 50.5039, - "longitude": 4.4699 + "longitude": 4.4699, + "type_organisation": "agence", + "postures": [ + "patrimoine", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "patrimoine": "hashtag #vernaculaire-rural", + "ecoconstruction": "hashtag #terre-crue", + "low-tech": "famille 2 (Frugalité & low-tech)" + } + } }, { "id": "f2-agence-atm", @@ -2307,6 +2739,22 @@ "confiance": "introuvable", "source": "https://www.agence-atm.com/contact", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "patrimoine", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #sobriete-energetique", + "patrimoine": "hashtag #vernaculaire-rural", + "ecoconstruction": "hashtag #terre-crue", + "low-tech": "pensée Low-tech" + } } }, { @@ -2382,6 +2830,20 @@ "confiance": "source tierce", "code_commune": "35238", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #sobriete-energetique", + "ecoconstruction": "hashtag #paille", + "low-tech": "pensée Low-tech" + } } }, { @@ -2458,6 +2920,20 @@ "confiance": "lu sur le site", "code_commune": "44113", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "patrimoine", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "patrimoine": "hashtag #vernaculaire-rural", + "ecoconstruction": "hashtag #terre-crue", + "low-tech": "pensée Low-tech" + } } }, { @@ -2525,7 +3001,21 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 51.1657, - "longitude": 10.4515 + "longitude": 10.4515, + "type_organisation": "formation", + "postures": [ + "patrimoine", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Recherche", + "postures": { + "patrimoine": "hashtag #vernaculaire-rural", + "ecoconstruction": "hashtag #bois-local", + "low-tech": "hashtag #low-tech-experimentation" + } + } }, { "id": "f2-asterre", @@ -2598,6 +3088,18 @@ "confiance": "lu sur le site", "code_commune": "76497", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "ecoconstruction": "hashtag #terre-crue", + "low-tech": "famille 2 (Frugalité & low-tech)" + } } }, { @@ -2671,6 +3173,18 @@ "confiance": "lu sur le site", "code_commune": "34032", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "ecoconstruction": "hashtag #paille", + "low-tech": "famille 2 (Frugalité & low-tech)" + } } }, { @@ -2738,7 +3252,25 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 56.2639, - "longitude": 9.5018 + "longitude": 9.5018, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "cooperative", + "patrimoine", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Cooperative", + "postures": { + "bas-carbone": "hashtag #sobriete-energetique", + "cooperative": "type_principal Cooperative", + "patrimoine": "hashtag #vernaculaire-rural", + "ecoconstruction": "hashtag #bois-local", + "low-tech": "famille 2 (Frugalité & low-tech)" + } + } }, { "id": "f1-lokal", @@ -2804,7 +3336,19 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 56.2639, - "longitude": 9.5018 + "longitude": 9.5018, + "type_organisation": "agence", + "postures": [ + "patrimoine", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "patrimoine": "hashtag #retrofit-strates", + "low-tech": "pensée Low-tech" + } + } }, { "id": "f2-zrs-architekten", @@ -2871,7 +3415,21 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 51.1657, - "longitude": 10.4515 + "longitude": 10.4515, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #sobriete-energetique", + "ecoconstruction": "hashtag #paille", + "low-tech": "pensée Low-tech" + } + } }, { "id": "f2-natural-building-lab", @@ -2938,7 +3496,19 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 51.1657, - "longitude": 10.4515 + "longitude": 10.4515, + "type_organisation": "formation", + "postures": [ + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Recherche", + "postures": { + "ecoconstruction": "hashtag #terre-crue", + "low-tech": "hashtag #low-tech-experimentation" + } + } }, { "id": "f2-dgj-architektur", @@ -3005,7 +3575,21 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 51.1657, - "longitude": 10.4515 + "longitude": 10.4515, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #sobriete-energetique", + "ecoconstruction": "hashtag #paille", + "low-tech": "pensée Low-tech" + } + } }, { "id": "f2-tecla-mca", @@ -3071,7 +3655,19 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 41.8719, - "longitude": 12.5674 + "longitude": 12.5674, + "type_organisation": "agence", + "postures": [ + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "ecoconstruction": "hashtag #terre-crue", + "low-tech": "hashtag #low-tech-experimentation" + } + } }, { "id": "f2-boidot-robin", @@ -3146,6 +3742,22 @@ "confiance": "lu sur le site", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "patrimoine", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #sobriete-energetique", + "patrimoine": "hashtag #vernaculaire-rural", + "ecoconstruction": "hashtag #bois-local", + "low-tech": "famille 2 (Frugalité & low-tech)" + } } }, { @@ -3213,7 +3825,23 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 41.8719, - "longitude": 12.5674 + "longitude": 12.5674, + "type_organisation": "autre", + "postures": [ + "cooperative", + "patrimoine", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Autre, aucun autre champ ne tranche", + "postures": { + "cooperative": "description : « coopératives »", + "patrimoine": "description : « réhabilitations »", + "ecoconstruction": "hashtag #paille", + "low-tech": "hashtag #low-tech-experimentation" + } + } }, { "id": "f2-envirobatbdm", @@ -3287,6 +3915,18 @@ "confiance": "lu sur le site", "code_commune": "13055", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "bas-carbone", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "bas-carbone": "hashtag #sobriete-energetique", + "low-tech": "famille 2 (Frugalité & low-tech)" + } } }, { @@ -3337,7 +3977,21 @@ "code_commune": "97213", "date": "2026-11-12" }, - "territoire": "Martinique" + "territoire": "Martinique", + "type_organisation": "agence", + "postures": [ + "patrimoine", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "patrimoine": "hashtag #vernaculaire-rural", + "ecoconstruction": "hashtag #bois-local", + "low-tech": "famille 2 (Frugalité & low-tech)" + } + } }, { "id": "f2-aquaa", @@ -3387,7 +4041,21 @@ "code_commune": "97302", "date": "2026-11-12" }, - "territoire": "Guyane" + "territoire": "Guyane", + "type_organisation": "association", + "postures": [ + "patrimoine", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Association", + "postures": { + "patrimoine": "description : « patrimoine »", + "ecoconstruction": "hashtag #chanvre-hempcrete", + "low-tech": "famille 2 (Frugalité & low-tech)" + } + } }, { "id": "f2-karibati", @@ -3436,6 +4104,20 @@ "confiance": "lu sur le site", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "patrimoine", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "patrimoine": "hashtag #vernaculaire-rural", + "ecoconstruction": "hashtag #bois-local", + "low-tech": "famille 2 (Frugalité & low-tech)" + } } }, { @@ -3486,7 +4168,21 @@ "code_commune": "97103", "date": "2026-11-12" }, - "territoire": "Guadeloupe" + "territoire": "Guadeloupe", + "type_organisation": "agence", + "postures": [ + "patrimoine", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "patrimoine": "hashtag #vernaculaire-rural", + "ecoconstruction": "hashtag #bois-local", + "low-tech": "famille 2 (Frugalité & low-tech)" + } + } }, { "id": "f2-caribois", @@ -3535,7 +4231,19 @@ "code_commune": "97103", "date": "2026-11-12" }, - "territoire": "Guadeloupe" + "territoire": "Guadeloupe", + "type_organisation": "agence", + "postures": [ + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "ecoconstruction": "hashtag #bois-local", + "low-tech": "famille 2 (Frugalité & low-tech)" + } + } }, { "id": "f2-vegetal-e", @@ -3584,6 +4292,20 @@ "confiance": "lu sur le site", "code_commune": "89264", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "patrimoine", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "patrimoine": "hashtag #vernaculaire-rural", + "ecoconstruction": "hashtag #bois-local", + "low-tech": "famille 2 (Frugalité & low-tech)" + } } }, { @@ -3631,6 +4353,20 @@ "confiance": "introuvable", "source": "https://www.envirobat.re", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "bas-carbone", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Association", + "postures": { + "bas-carbone": "hashtag #sobriete-energetique", + "ecoconstruction": "description : « biosources »", + "low-tech": "famille 2 (Frugalité & low-tech)" + } } }, { @@ -3676,7 +4412,21 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 60.1282, - "longitude": 18.6435 + "longitude": 18.6435, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #sobriete-energetique", + "ecoconstruction": "hashtag #bois-local", + "low-tech": "famille 2 (Frugalité & low-tech)" + } + } }, { "id": "f2-nunc-architectes", @@ -3730,6 +4480,20 @@ "confiance": "source tierce", "code_commune": "22278", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "patrimoine", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "patrimoine": "hashtag #vernaculaire-rural", + "ecoconstruction": "hashtag #terre-crue", + "low-tech": "famille 2 (Frugalité & low-tech)" + } } }, { @@ -3783,6 +4547,20 @@ "confiance": "lu sur le site", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #sobriete-energetique", + "ecoconstruction": "hashtag #terre-crue", + "low-tech": "famille 2 (Frugalité & low-tech)" + } } }, { @@ -3832,6 +4610,20 @@ "confiance": "lu sur le site", "code_commune": "40257", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "patrimoine", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "patrimoine": "hashtag #vernaculaire-rural", + "ecoconstruction": "hashtag #terre-crue", + "low-tech": "famille 2 (Frugalité & low-tech)" + } } }, { @@ -3880,6 +4672,20 @@ "confiance": "lu sur le site", "code_commune": "69123", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "bas-carbone", + "ecoconstruction", + "low-tech" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "bas-carbone": "hashtag #sobriete-energetique", + "ecoconstruction": "hashtag #terre-crue", + "low-tech": "famille 2 (Frugalité & low-tech)" + } } }, { @@ -3934,6 +4740,16 @@ "confiance": "introuvable", "source": "https://architecture-precarites.fr", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "participatif": "hashtag #participation-usagers" + } } }, { @@ -3988,6 +4804,16 @@ "confiance": "lu sur le site", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Association", + "postures": { + "participatif": "hashtag #participation-usagers" + } } }, { @@ -4034,7 +4860,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 39.3999, - "longitude": -8.2245 + "longitude": -8.2245, + "type_organisation": "association", + "postures": [ + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Collectif", + "postures": { + "participatif": "hashtag #participation-usagers" + } + } }, { "id": "f3-tamassociati", @@ -4079,7 +4915,13 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 41.8719, - "longitude": 12.5674 + "longitude": 12.5674, + "type_organisation": "agence", + "postures": [], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": {} + } }, { "id": "f3-we-made-that", @@ -4124,7 +4966,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 55.3781, - "longitude": -3.436 + "longitude": -3.436, + "type_organisation": "agence", + "postures": [ + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "participatif": "hashtag #participation-usagers" + } + } }, { "id": "f3-public-practice", @@ -4169,7 +5021,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 55.3781, - "longitude": -3.436 + "longitude": -3.436, + "type_organisation": "association", + "postures": [ + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Association", + "postures": { + "participatif": "hashtag #participation-usagers" + } + } }, { "id": "f3-construire-bouchain", @@ -4223,6 +5085,16 @@ "confiance": "source tierce", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "participatif": "hashtag #participation-usagers" + } } }, { @@ -4270,7 +5142,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 40.4637, - "longitude": -3.7492 + "longitude": -3.7492, + "type_organisation": "association", + "postures": [ + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Collectif", + "postures": { + "participatif": "hashtag #participation-usagers" + } + } }, { "id": "f3-assemble", @@ -4316,7 +5198,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 55.3781, - "longitude": -3.436 + "longitude": -3.436, + "type_organisation": "association", + "postures": [ + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Collectif", + "postures": { + "participatif": "hashtag #participation-usagers" + } + } }, { "id": "f3-baupiloten", @@ -4360,7 +5252,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 51.1657, - "longitude": 10.4515 + "longitude": 10.4515, + "type_organisation": "association", + "postures": [ + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Collectif", + "postures": { + "participatif": "hashtag #participation-usagers" + } + } }, { "id": "f3-perou", @@ -4420,6 +5322,12 @@ "confiance": "source tierce", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [], + "taxonomie_source": { + "type_organisation": "type_principal Association", + "postures": {} } }, { @@ -4479,6 +5387,16 @@ "confiance": "lu sur le site", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "cooperative" + ], + "taxonomie_source": { + "type_organisation": "type_principal Cooperative", + "postures": { + "cooperative": "type_principal Cooperative" + } } }, { @@ -4538,6 +5456,16 @@ "confiance": "lu sur le site", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "participatif": "hashtag #participation-usagers" + } } }, { @@ -4590,7 +5518,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": null, - "longitude": null + "longitude": null, + "type_organisation": "formation", + "postures": [ + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Recherche", + "postures": { + "participatif": "hashtag #participation-usagers" + } + } }, { "id": "f3-forensic-architecture", @@ -4640,7 +5578,13 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 55.3781, - "longitude": -3.436 + "longitude": -3.436, + "type_organisation": "formation", + "postures": [], + "taxonomie_source": { + "type_organisation": "type_principal Recherche", + "postures": {} + } }, { "id": "f3-collectif-parenthese", @@ -4701,6 +5645,16 @@ "confiance": "lu sur le site", "code_commune": "93001", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Collectif", + "postures": { + "participatif": "hashtag #participation-usagers" + } } }, { @@ -4761,6 +5715,16 @@ "confiance": "lu sur le site", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Association", + "postures": { + "participatif": "hashtag #participation-usagers" + } } }, { @@ -4820,6 +5784,18 @@ "confiance": "lu sur le site", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "cooperative": "description : « scic »", + "participatif": "hashtag #participation-usagers" + } } }, { @@ -4870,7 +5846,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": null, - "longitude": null + "longitude": null, + "type_organisation": "association", + "postures": [ + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "participatif": "hashtag #participation-usagers" + } + } }, { "id": "f4-rahp", @@ -4930,6 +5916,18 @@ "confiance": "lu sur le site", "code_commune": "34172", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "cooperative": "hashtag #accompagnement-cooperatif", + "participatif": "hashtag #habitat-participatif" + } } }, { @@ -4990,6 +5988,18 @@ "confiance": "lu sur le site", "code_commune": "04088", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Cooperative", + "postures": { + "cooperative": "hashtag #accompagnement-cooperatif", + "participatif": "hashtag #habitat-participatif" + } } }, { @@ -5050,6 +6060,18 @@ "confiance": "lu sur le site", "code_commune": "67482", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Association", + "postures": { + "cooperative": "hashtag #accompagnement-cooperatif", + "participatif": "hashtag #habitat-participatif" + } } }, { @@ -5110,6 +6132,16 @@ "confiance": "lu sur le site", "code_commune": "69123", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "cooperative" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "cooperative": "hashtag #habitat-cooperatif" + } } }, { @@ -5170,6 +6202,18 @@ "confiance": "lu sur le site", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "cooperative": "hashtag #accompagnement-cooperatif", + "participatif": "hashtag #habitat-participatif" + } } }, { @@ -5222,7 +6266,19 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 51.1657, - "longitude": 10.4515 + "longitude": 10.4515, + "type_organisation": "association", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "cooperative": "hashtag #habitat-cooperatif", + "participatif": "hashtag #baugruppe-cohousing" + } + } }, { "id": "f4-les-habiles", @@ -5281,6 +6337,18 @@ "confiance": "lu sur le site", "code_commune": "38185", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Association", + "postures": { + "cooperative": "hashtag #accompagnement-cooperatif", + "participatif": "hashtag #habitat-participatif" + } } }, { @@ -5341,6 +6409,18 @@ "confiance": "lu sur le site", "code_commune": "69123", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Cooperative", + "postures": { + "cooperative": "hashtag #habitat-cooperatif", + "participatif": "hashtag #habitat-participatif" + } } }, { @@ -5401,6 +6481,18 @@ "confiance": "lu sur le site", "code_commune": "33039", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Association", + "postures": { + "cooperative": "hashtag #habitat-cooperatif", + "participatif": "description : « participatif »" + } } }, { @@ -5461,6 +6553,18 @@ "confiance": "lu sur le site", "code_commune": "65009", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "cooperative": "hashtag #accompagnement-cooperatif", + "participatif": "hashtag #habitat-participatif" + } } }, { @@ -5523,6 +6627,18 @@ "confiance": "lu sur le site", "code_commune": "94041", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Cooperative", + "postures": { + "cooperative": "hashtag #scop-scic", + "participatif": "hashtag #habitat-participatif" + } } }, { @@ -5572,6 +6688,18 @@ "confiance": "lu sur le site", "code_commune": "59009", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Association", + "postures": { + "cooperative": "hashtag #accompagnement-cooperatif", + "participatif": "hashtag #habitat-participatif" + } } }, { @@ -5616,6 +6744,18 @@ "confiance": "source tierce", "code_commune": "17300", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Association", + "postures": { + "cooperative": "hashtag #accompagnement-cooperatif", + "participatif": "hashtag #habitat-participatif" + } } }, { @@ -5660,6 +6800,18 @@ "confiance": "lu sur le site", "code_commune": "63113", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Association", + "postures": { + "cooperative": "hashtag #accompagnement-cooperatif", + "participatif": "hashtag #habitat-participatif" + } } }, { @@ -5709,6 +6861,18 @@ "confiance": "lu sur le site", "code_commune": "35238", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "cooperative": "hashtag #accompagnement-cooperatif", + "participatif": "hashtag #habitat-participatif" + } } }, { @@ -5764,6 +6928,18 @@ "confiance": "lu sur le site", "code_commune": "13055", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "cooperative": "hashtag #accompagnement-cooperatif", + "participatif": "hashtag #habitat-participatif" + } } }, { @@ -5805,6 +6981,16 @@ "raison": "fiche sans url ; aucune source publique ne nomme une structure « Habitat Participatif Metz » ni son siège (la recherche ne renvoie que Natura4, chargée en 2013 d'une expérimentation municipale) ; le nom désigne Metz mais rien ne le confirme", "confiance": "introuvable", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Association", + "postures": { + "participatif": "hashtag #habitat-participatif" + } } }, { @@ -5849,6 +7035,18 @@ "raison": "fiche sans url ; aucune source publique trouvée pour cette architecte accompagnatrice, donc aucune commune d'exercice", "confiance": "introuvable", "date": "2026-11-12" + }, + "type_organisation": "autre", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Autre, aucun autre champ ne tranche", + "postures": { + "cooperative": "hashtag #accompagnement-cooperatif", + "participatif": "hashtag #habitat-participatif" + } } }, { @@ -5889,7 +7087,19 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 44.8378, - "longitude": -0.5792 + "longitude": -0.5792, + "type_organisation": "agence", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Cooperative", + "postures": { + "cooperative": "hashtag #scop-scic", + "participatif": "hashtag #participation-usagers" + } + } }, { "id": "f4-lacol-v1", @@ -5931,7 +7141,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 41.3825802, - "longitude": 2.177073 + "longitude": 2.177073, + "type_organisation": "agence", + "postures": [ + "cooperative" + ], + "taxonomie_source": { + "type_organisation": "type_principal Cooperative", + "postures": { + "cooperative": "hashtag #scop-scic" + } + } }, { "id": "f4-einszueins-v1", @@ -5970,7 +7190,19 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 48.2083537, - "longitude": 16.3725042 + "longitude": 16.3725042, + "type_organisation": "agence", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "cooperative": "description : « coopératif »", + "participatif": "hashtag #baugruppe-cohousing" + } + } }, { "id": "f4-diverserighe-v1", @@ -6006,7 +7238,19 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 44.4938203, - "longitude": 11.3426327 + "longitude": 11.3426327, + "type_organisation": "agence", + "postures": [ + "cooperative", + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "cooperative": "description : « coopérative »", + "participatif": "hashtag #habitat-participatif" + } + } }, { "id": "f5-atelier-georges", @@ -6050,6 +7294,16 @@ "confiance": "introuvable", "source": "https://ateliergeorges.fr", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "patrimoine" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "patrimoine": "hashtag #friches-reactivation" + } } }, { @@ -6098,6 +7352,16 @@ "confiance": "lu sur le site", "code_commune": "69123", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "participatif" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "participatif": "description : « participatif »" + } } }, { @@ -6149,6 +7413,12 @@ "confiance": "lu sur le site", "code_commune": "93066", "date": "2026-11-12" + }, + "type_organisation": "formation", + "postures": [], + "taxonomie_source": { + "type_organisation": "type_principal Recherche", + "postures": {} } }, { @@ -6199,6 +7469,12 @@ "confiance": "lu sur le site", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": {} } }, { @@ -6248,6 +7524,12 @@ "confiance": "lu sur le site", "code_commune": "25056", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": {} } }, { @@ -6300,6 +7582,16 @@ "confiance": "lu sur le site", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "agence", + "postures": [ + "patrimoine" + ], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": { + "patrimoine": "hashtag #friches-reactivation" + } } }, { @@ -6349,6 +7641,16 @@ "confiance": "lu sur le site", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "patrimoine" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "patrimoine": "hashtag #friches-reactivation" + } } }, { @@ -6384,7 +7686,13 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 50.5039, - "longitude": 4.4699 + "longitude": 4.4699, + "type_organisation": "agence", + "postures": [], + "taxonomie_source": { + "type_organisation": "type_principal Agence", + "postures": {} + } }, { "id": "f5-loos-en-gohelle", @@ -6434,6 +7742,16 @@ "confiance": "lu sur le site", "code_commune": "62528", "date": "2026-11-12" + }, + "type_organisation": "institution", + "postures": [ + "patrimoine" + ], + "taxonomie_source": { + "type_organisation": "nom : collectivité (Ville de)", + "postures": { + "patrimoine": "hashtag #friches-reactivation" + } } }, { @@ -6483,6 +7801,16 @@ "confiance": "lu sur le site", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "cooperative" + ], + "taxonomie_source": { + "type_organisation": "type_principal Association", + "postures": { + "cooperative": "description : « coopératives »" + } } }, { @@ -6528,6 +7856,12 @@ "confiance": "lu sur le site", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "formation", + "postures": [], + "taxonomie_source": { + "type_organisation": "type_principal Recherche", + "postures": {} } }, { @@ -6577,6 +7911,12 @@ "confiance": "lu sur le site", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": {} } }, { @@ -6614,7 +7954,17 @@ "doublon_tardif": false, "doublon_avec": null, "latitude": 51.9194, - "longitude": 19.1451 + "longitude": 19.1451, + "type_organisation": "formation", + "postures": [ + "patrimoine" + ], + "taxonomie_source": { + "type_organisation": "type_principal Recherche", + "postures": { + "patrimoine": "description : « patrimoine »" + } + } }, { "id": "f5-fnau", @@ -6665,6 +8015,16 @@ "confiance": "lu sur le site", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [ + "bas-carbone" + ], + "taxonomie_source": { + "type_organisation": "type_principal Reseau", + "postures": { + "bas-carbone": "description : « décarbonation »" + } } }, { @@ -6714,6 +8074,12 @@ "confiance": "lu sur le site", "code_commune": "75056", "date": "2026-11-12" + }, + "type_organisation": "association", + "postures": [], + "taxonomie_source": { + "type_organisation": "type_principal Mouvement", + "postures": {} } } ], diff --git a/scripts/porter-taxonomie-reseaux.mjs b/scripts/porter-taxonomie-reseaux.mjs new file mode 100644 index 0000000..b8c8c67 --- /dev/null +++ b/scripts/porter-taxonomie-reseaux.mjs @@ -0,0 +1,63 @@ +#!/usr/bin/env node +/** + * B4b-M3 : porte le type d'organisation et les postures de chaque structure dans + * `public/data/reseaux-bifurcation.json`, recopiés tels quels depuis + * `data/taxonomie/organisations.json` (clé `structure:`) : + * type_organisation ← entree.type_organisation + * postures ← entree.postures + * taxonomie_source ← entree.source + * Rejouable : relancé, il réécrit les mêmes valeurs (aucun diff). Aucune valeur ne + * change, c'est un déplacement ; `scripts/test-taxonomie.mjs` le prouve (120 sur 120). + * Une structure sans entrée fait échouer le script (rien n'est écrit). + * + * Usage : node scripts/porter-taxonomie-reseaux.mjs (écrit) + * node scripts/porter-taxonomie-reseaux.mjs --verifier (n'écrit rien, code 1 si un écart) + */ + +import { readFileSync, writeFileSync } from 'node:fs' +import { fileURLToPath } from 'node:url' +import { dirname, join } from 'node:path' + +const racine = join(dirname(fileURLToPath(import.meta.url)), '..') +const cheminReseaux = join(racine, 'public', 'data', 'reseaux-bifurcation.json') +const cheminMapping = join(racine, 'data', 'taxonomie', 'organisations.json') +const verifier = process.argv.includes('--verifier') + +const brut = readFileSync(cheminReseaux, 'utf8') +const reseaux = JSON.parse(brut) +const mapping = JSON.parse(readFileSync(cheminMapping, 'utf8')) + +const sansEntree = [] +const ecarts = [] +for (const s of reseaux.structures) { + const e = mapping.entrees[`structure:${s.id}`] + if (!e) { + sansEntree.push(s.id) + continue + } + const voulu = { type_organisation: e.type_organisation, postures: e.postures, taxonomie_source: e.source } + for (const [k, v] of Object.entries(voulu)) { + if (JSON.stringify(s[k]) !== JSON.stringify(v)) { + ecarts.push(`${s.id}.${k}`) + s[k] = structuredClone(v) + } + } +} + +if (sansEntree.length) { + console.error(`Structures sans entrée dans le mapping (rien n'est écrit) : ${sansEntree.join(', ')}`) + process.exit(1) +} + +if (verifier) { + console.log(ecarts.length ? `${ecarts.length} champs à porter : ${ecarts.slice(0, 10).join(', ')}${ecarts.length > 10 ? '…' : ''}` : `À jour : ${reseaux.structures.length} structures portent leur taxonomie.`) + process.exit(ecarts.length ? 1 : 0) +} + +if (!ecarts.length) { + console.log(`Rien à écrire : ${reseaux.structures.length} structures déjà à jour.`) +} else { + const eol = brut.includes('\r\n') ? '\r\n' : '\n' + writeFileSync(cheminReseaux, JSON.stringify(reseaux, null, 2).replace(/\n/g, eol), 'utf8') + console.log(`${ecarts.length} champs portés sur ${reseaux.structures.length} structures.`) +} diff --git a/scripts/test-taxonomie.mjs b/scripts/test-taxonomie.mjs index 0df83a2..69e1ba7 100644 --- a/scripts/test-taxonomie.mjs +++ b/scripts/test-taxonomie.mjs @@ -79,9 +79,9 @@ ok(e.some((x) => x.startsWith('Org 5') && x.includes('hors forme')), 'contrôle // ── Lecture : classement et repli ── ok(eq(T.classement('org:999999'), { type: 'autre', postures: [] }), 'identifiant absent → autre, sans posture') ok(eq(T.classement('structure:inconnue'), { type: 'autre', postures: [] }), 'structure absente → autre') -ok(eq(T.classement('org:1', faux), { type: 'autre', postures: [] }), 'type hors vocabulaire → autre') -ok(eq(T.classement('org:2', faux).postures, []), 'posture sans source → pas affichée') -ok(eq(T.classement('org:3', faux).postures, []), 'posture hors vocabulaire → ignorée') +ok(eq(T.classement('org:1', null, faux), { type: 'autre', postures: [] }), 'type hors vocabulaire → autre') +ok(eq(T.classement('org:2', null, faux).postures, []), 'posture sans source → pas affichée') +ok(eq(T.classement('org:3', null, faux).postures, []), 'posture hors vocabulaire → ignorée') const rotor = T.classement('structure:f1-rotor') ok(T.TYPES_ORGANISATION.includes(rotor.type) && rotor.postures.every((p) => T.POSTURES.includes(p)), `structure:f1-rotor lue (${rotor.type} · ${rotor.postures.join(', ')})`) ok(T.classement('org:106').type === 'institution', 'org:106 (CNOA) → institution (nom : Ordre)') @@ -99,5 +99,30 @@ ok(eq(mO.etiquettes.type, ['institution']) && eq(mO.etiquettes.fonctions, ['Juri ok(eq(A.toMini({ ...org, Id: 424242 }, T.classement).etiquettes.type, ['autre']), 'toMini : fiche absente du mapping → type autre') ok(!('type' in A.toMini(org).etiquettes) && !('type' in [org].map(A.toMini)[0].etiquettes), 'toMini sans classeur (ou avec l’index de map) : rien d’ajouté') +// ── B4b-M3 : la taxonomie portée par les structures, un déplacement sans changement ── +const S = reseaux.structures +const egales = S.filter((x) => { + const ent = T.MAPPING.entrees[T.idStructure(x.id)] + return ent && x.type_organisation === ent.type_organisation && eq(x.postures, ent.postures) && eq(x.taxonomie_source, ent.source) +}) +ok(S.length === 120 && egales.length === 120, `égalité mapping ↔ JSON des réseaux : type, postures et source recopiés tels quels (${egales.length} sur ${S.length})`, + S.filter((x) => !egales.includes(x)).slice(0, 5).map((x) => x.id).join(', ')) +const memes = S.filter((x) => eq(T.classement(T.idStructure(x.id), x), T.classement(T.idStructure(x.id)))) +ok(memes.length === 120, `classement lu sur la fiche = classement lu dans le mapping (${memes.length} sur 120)`) +ok(S.every((x) => T.TYPES_ORGANISATION.includes(x.type_organisation) && x.postures.every((p) => T.POSTURES.includes(p) && x.taxonomie_source.postures[p])), 'champs portés : type et postures dans le vocabulaire, une source par posture') +// Le champ de la fiche passe avant le mapping ; sans champ, repli sur le mapping ; ni l'un ni l'autre → autre +const porte = { type_organisation: 'media', postures: ['low-tech', 'verte', 'participatif'], taxonomie_source: { type_organisation: 'test', postures: { 'low-tech': 'test', verte: 'test' } } } +ok(eq(T.classement('structure:f1-rotor', porte), { type: 'media', postures: ['low-tech'] }), 'champ de la fiche d’abord : type lu, posture hors vocabulaire ou sans source ignorée') +ok(eq(T.classement('structure:f1-rotor', { nom: 'Rotor' }), rotor), 'fiche sans champ → repli sur le mapping') +ok(eq(T.classement('structure:ajoutee-apres', { nom: 'Nouvelle' }), { type: 'autre', postures: [] }), 'fiche ajoutée plus tard, sans champ ni entrée → autre') +ok(eq(T.classement('structure:f1-rotor', { type_organisation: 'ong', postures: [] }), { type: 'autre', postures: [] }), 'champ de la fiche hors vocabulaire → autre (pas de repli silencieux vers le mapping)') +const sansChamp = { ...s } +delete sansChamp.type_organisation +delete sansChamp.postures +delete sansChamp.taxonomie_source +ok(eq(A.toMini(sansChamp, T.classement).etiquettes.type, [rotor.type]), 'toMini : structure sans champ → étiquette du mapping') +ok(eq(A.toMini({ ...s, type_organisation: 'media' }, T.classement).etiquettes.type, ['media']), 'toMini : structure avec champ → étiquette du champ') +ok(eq(A.toMini({ ...org, type_organisation: 'media' }, T.classement).etiquettes.type, ['institution']), 'toMini(org) : toujours le mapping (NocoDB sans colonne avant B4b-2)') + console.log(`\n${n - fail}/${n}`) if (fail) process.exit(1) diff --git a/utils/taxonomie.ts b/utils/taxonomie.ts index fd27eff..125b3c1 100644 --- a/utils/taxonomie.ts +++ b/utils/taxonomie.ts @@ -1,14 +1,15 @@ /** - * taxonomie — B4a-M3. Le type d'organisation et les postures de chaque fiche de la carte, - * lus dans `data/taxonomie/organisations.json` (une entrée par identifiant : `org:`, - * `structure:`). Vocabulaire : la taxonomie N (`Cadrage/N-prompt-session-taxonomie-carte-unifiee.md`). + * taxonomie — B4a-M3, B4b-M3. Le type d'organisation et les postures de chaque fiche de la + * carte. Une structure des réseaux les porte elle-même (`type_organisation`, `postures`, + * `taxonomie_source` dans `reseaux-bifurcation.json`, B4b) ; sinon, et pour les Org + * d'entraide tant que NocoDB n'a pas ses colonnes (B4b-2), ils sont lus dans + * `data/taxonomie/organisations.json` (une entrée par identifiant : `org:`, + * `structure:`), devenu la trace de la migration. Vocabulaire : la taxonomie N + * (`Cadrage/N-prompt-session-taxonomie-carte-unifiee.md`). * * Pur (aucune dépendance à Vue ni au routeur) : `scripts/test-taxonomie.mjs` le teste, - * `pages/index.vue` le passe à `toMini` (useFicheAdapter) qui en fait les étiquettes `type` - * et `postures` de chaque fiche. - * - * B4b portera ces deux champs dans NocoDB (`type_organisation`, `postures`) : les clés du - * fichier sont les identifiants stables des deux bases, rien d'autre ne change de forme. + * `pages/index.vue` le passe à `toMini` (useFicheAdapter), qui lui donne l'identifiant et, + * pour une structure, la fiche elle-même, et en fait les étiquettes `type` et `postures`. */ import mapping from '../data/taxonomie/organisations.json' @@ -67,16 +68,40 @@ const estType = (v: unknown): v is TypeOrganisation => (TYPES_ORGANISATION as re const estPosture = (v: unknown): v is Posture => (POSTURES as readonly string[]).includes(v as string) /** - * Classement d'un identifiant. Repli : un identifiant absent (fiche ajoutée après le - * mapping) ou un type hors vocabulaire vaut `autre` ; une posture hors vocabulaire ou - * sans source est ignorée (une posture ne s'affiche que si sa source est écrite). + * Ce qu'une fiche porte elle-même (B4b) : les champs `type_organisation`, `postures` et + * `taxonomie_source` d'une structure de `reseaux-bifurcation.json` (recopiés du mapping par + * `scripts/porter-taxonomie-reseaux.mjs`). Tout est optionnel : une fiche sans ces champs + * est lue dans le mapping. */ -export function classement(id: string, m: MappingTaxonomie = MAPPING): Classement { +export interface PorteTaxonomie { + type_organisation?: unknown + postures?: unknown + taxonomie_source?: { type_organisation?: string; postures?: Record } | null +} + +/** Une entrée (du mapping, ou portée par la fiche) → classement, selon la même règle. */ +function lireEntree(type: unknown, postures: unknown, sources: Record | undefined): Classement { + const ps = Array.isArray(postures) ? postures : [] + return { + type: estType(type) ? type : 'autre', + postures: POSTURES.filter((p) => ps.includes(p) && !!sources?.[p]), + } +} + +/** + * Classement d'une fiche. Le champ de la fiche d'abord (`porte`, quand elle a un + * `type_organisation`), le fichier de mapping en repli (`id`). Repli : un identifiant + * absent (fiche ajoutée après, sans champ) ou un type hors vocabulaire vaut `autre` ; une + * posture hors vocabulaire ou sans source est ignorée (une posture ne s'affiche que si sa + * source est écrite), qu'elle vienne de la fiche ou du mapping. + */ +export function classement(id: string, porte?: PorteTaxonomie | null, m: MappingTaxonomie = MAPPING): Classement { + if (porte && typeof porte.type_organisation === 'string' && porte.type_organisation) { + return lireEntree(porte.type_organisation, porte.postures, porte.taxonomie_source?.postures) + } const e = m.entrees[id] if (!e) return { type: 'autre', postures: [] } - const sources = e.source?.postures ?? {} - const postures = POSTURES.filter((p) => (e.postures ?? []).includes(p) && !!sources[p]) - return { type: estType(e.type_organisation) ? e.type_organisation : 'autre', postures } + return lireEntree(e.type_organisation, e.postures, e.source?.postures) } /**