holman / spark

▁▂▃▅▂▇ in your shell.

Home Page:http://zachholman.com/spark/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Earthquake data sample no longer works

fletch opened this issue · comments

Tried the sample and got a "Hey this has moved" HTML page instead of data. I think this should be an equivalent incantation using their new API.

curl --silent "http://earthquake.usgs.gov/fdsnws/event/1/query?format=text&starttime=$(date "+%Y-%m-%d")" | \
    sed 1d | awk -F\| '{if( $11 >= 1.0){print $11}}' | spark

Link to their API docs: http://earthquake.usgs.gov/fdsnws/event/1/

Huh- maybe it was just a temporary thing? Looks like the code in the README is correct when I checked it just now.

Aah my bad; I think we're looking at different things since I wasn't clear which sample I was talking about.

The sample incantation in the README fetching at 2.5_day.csv works (which I missed before, but just checked myself as well and it's working for me as well), it's the URL in the sample shown on the page http://zachholman.com/spark/ referencing an eqs1day-M1.txt which is what gives the HTML "that's moved" output.

screen shot 2016-09-07 at 4 55 35 pm

Probably you could just replace that example there with the working one from the README.

Ah, good call! Serves me right for putting something in the page that might change from time to time. I've fixed it (for the time being, ha).