Skip to content

Instantly share code, notes, and snippets.

@giohappy
Created December 29, 2014 23:36
Show Gist options
  • Save giohappy/ce030deecfedba23afcc to your computer and use it in GitHub Desktop.
Save giohappy/ce030deecfedba23afcc to your computer and use it in GitHub Desktop.
curl -s "http://webservices.rm.ingv.it/fdsnws/event/1/query?lat=43.587007&lon=11.316179&maxradiuskm=30&starttime=2014-12-19T00:00:00&endtime=2014-12-20T23:59:59&minmag=2&maxmag=5" | xml2json | jq "[.\"q$quakeml\".eventParameters.event[] | {latitude:.origin.latitude.value[],longitude:.origin.longitude.value[],magnitude:.magnitude.mag.value[]}]" | in2csv -f json | csvjson --lat latitude --lon longitude | jq . > output.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment