refactor: publish score geojson to public GCS web bucket - #6
Closed
ndaen wants to merge 3 commits into
Closed
Conversation
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objectif
Le script d'export du gold
score_territoirepublie désormais le GeoJSON sur le bucket publichomepedia-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_geomdepuishomepedia-data(privé), construit le GeoJSON combiné (géométrie simplifiée + score + gap + 12 dimensions + prix/nb_transactions/dpe), puis gzip + upload vershomepedia-webavec 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
Pré-requis :
gcloudauthentifié (lecturehomepedia-data, écriturehomepedia-web).Associé
PR webapp #9 : le front lit
https://storage.googleapis.com/homepedia-web/v1/score.geojson.