Skip to content

Instantly share code, notes, and snippets.

@ThomasG77
Created July 18, 2025 10:33
Show Gist options
  • Save ThomasG77/5b6e5ad0e38cd2504d7360008be3d250 to your computer and use it in GitHub Desktop.
Save ThomasG77/5b6e5ad0e38cd2504d7360008be3d250 to your computer and use it in GitHub Desktop.
Récupération geolocalisation EHPAD 57

Récupération geolocalisation EHPAD 57

Depuis le site https://www.pour-les-personnes-agees.gouv.fr/annuaire-ehpad-et-comparateur-de-prix-et-restes-a-charge/moselle-57, on a retrouvé la référence à l'API pour récupérer la donnée pour ce cas particulier

wget -O ehpad-57.json https://www.pour-les-personnes-agees.gouv.fr/api/v1/annuaire/heb?dept_numero=57

jq '.[].item | {"type": "Feature","properties": {"title": .title, "noFinesset": .noFinesset, "legal_staus": .legal_status, "postcode": .coordinates.postcode, "street": .coordinates.street, "codeinsee": .coordinates.codeinsee, "city": .coordinates.city}, "geometry": {"coordinates": [(.coordinates.longitude|tonumber), (.coordinates.latitude|tonumber)], "type": "Point"}}' ehpad-57.json | jq --slurp '{"type": "FeatureCollection", "features": .}' >| ehpad-57.geojson
``
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment