Skip to content

refactor: publish score geojson to public GCS web bucket - #6

Closed
ndaen wants to merge 3 commits into
mainfrom
feat/webapp-export
Closed

refactor: publish score geojson to public GCS web bucket#6
ndaen wants to merge 3 commits into
mainfrom
feat/webapp-export

Conversation

@ndaen

@ndaen ndaen commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Objectif

Le script d'export du gold score_territoire publie désormais le GeoJSON sur le bucket public homepedia-web (gs://homepedia-web/v1/score.geojson) au lieu de l'écrire dans le repo webapp. Le front le récupère en direct par HTTP (public + CORS), comme un appel d'API.

Contenu

  • webapp_export/export_score_geojson.py : télécharge le gold + communes_geom depuis homepedia-data (privé), construit le GeoJSON combiné (géométrie simplifiée + score + gap + 12 dimensions + prix/nb_transactions/dpe), puis gzip + upload vers homepedia-web avec les bons en-têtes (application/geo+json, Content-Encoding: gzip, Cache-Control: max-age=300).
  • --local <chemin> pour écrire un fichier au lieu de publier (debug).

Usage

cd webapp_export && uv run --with duckdb python export_score_geojson.py

Pré-requis : gcloud authentifié (lecture homepedia-data, écriture homepedia-web).

Associé

PR webapp #9 : le front lit https://storage.googleapis.com/homepedia-web/v1/score.geojson.

@ndaen ndaen changed the title feat: add score geojson export for webapp refactor: publish score geojson to public GCS web bucket Jul 3, 2026
@ndaen

ndaen commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Fermée : redondante avec le producteur web existant du bucket homepedia-web (choropleth/classements/communes/search + meta.json qui suit déjà nb_communes_scorees). Le score doit sortir de ce producteur plutôt que d'un script parallèle. Le fichier score.geojson est déjà publié sur gs://homepedia-web/v1/score.geojson.

@ndaen ndaen closed this Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant