usgs / rcomcat

R library for searching the ANSS ComCat comprehensive earthquake catalog.
Other
5 stars 12 forks source link

http://comcat.cr.usgs.gov/fdsnws/event/1/ not working #3

Open Hrishi1909 opened 2 years ago

Hrishi1909 commented 2 years ago

Hey just trying to implement it but found out this :- http://comcat.cr.usgs.gov/fdsnws/event/1/ is not working ? any idea why?

emartinez-usgs commented 2 years ago

Hi @Hrishi1909 -

Please try using this URL: https://earthquake.usgs.gov/fdsnws/event/1/

Hrishi1909 commented 2 years ago

this link works but the it gives this error . any idea why? Error in scan(datarequests[1], list(time = "", latitude = 0, longitude = 0,
scan() expected 'a real', got 'reviewed'

this is my code `source("searchcomcat.R")

comcatdata <- comcathypocsv()

comcatdata <- comcathypocsv(minmagnitude=3)`

emartinez-usgs commented 2 years ago

@mhearne-usgs any ideas?

aglogowski commented 1 year ago

I simply make alternate for scan function in line 198 `data <-read.csv(datarequests[1])

data <- scan(datarequests[1],list(time="",latitude=0,longitude=0,depth=0,mag=0,magtype="",nst=0,gap=0,dmin=0,rms=0,net="",id="",updated="",place="",type=""),sep=",",quote="\"",skip=1,quiet=TRUE)

and line 202 data2 <-read.csv(datarequests[i])

data2 <- scan(datarequests[i],list(time="",latitude=0,longitude=0,depth=0,mag=0,magtype="",nst=0,gap=0,dmin=0,rms=0,net="",id="",updated="",place="",type=""),sep=",",quote="\"",skip=1,quiet=TRUE)

` Now the file works well on a first look