Skip to content

Instantly share code, notes, and snippets.

@rhanka
Created January 9, 2020 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhanka/c9df3fa9966eb312a59ab54879ba156b to your computer and use it in GitHub Desktop.
Save rhanka/c9df3fa9966eb312a59ab54879ba156b to your computer and use it in GitHub Desktop.
#!/bin/bash
# ce fichier permet le téléchargement de l'intégralité des données insee et de les compresser
# il necessite l'installation de jq pour parser les json de l'api data.gouv.fr
curl -s https://www.data.gouv.fr/api/1/datasets/fichier-des-personnes-decedees/ | \
jq '.resources[].url' | sed 's/^/curl -s /;s:/\(deces-.*\)":/\1" | gzip > \1.gz:' | sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment