Skip to content

Instantly share code, notes, and snippets.

@pachevalier
Last active January 23, 2020 14:45
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 pachevalier/123839e54090a06cedc6f74c26cdce48 to your computer and use it in GitHub Desktop.
Save pachevalier/123839e54090a06cedc6f74c26cdce48 to your computer and use it in GitHub Desktop.

Rapide exploration des données decp

Téléchargement des données

$ mkdir decp
$ cd decp
$ wget https://static.data.gouv.fr/resources/fichiers-consolides-des-donnees-essentielles-de-la-commande-publique/20200123-053915/decp.json

Nombre de marchés

$ jq '.marches | length' decp.json

Nombre d'éléments de nature marché

$ jq '[.marches[] | select(.nature == "Marché")] | length' decp.json 

Exemple de marché

$ jq '.marches[1]' decp.json
$ jq '.marches[1] | .["titulaires"][]["id"] ' decp.json 

Marchés attribués à un SIRET

Exemple de requêtes

$ jq '[.marches[] | select(.nature == "Marché") | select(.titulaires[0].id == "43388867400184") ] | length' decp.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment