Created
December 29, 2014 23:36
-
-
Save giohappy/ce030deecfedba23afcc to your computer and use it in GitHub Desktop.
This file contains 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
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