tclements / scedc.jl Goto Github PK
View Code? Open in Web Editor NEWAPI for SCEDC data hosted on AWS
License: MIT License
API for SCEDC data hosted on AWS
License: MIT License
Hi Tim,
Is it possible to add CorrData as an option to ec2stream for CorrData transfer to ec2?
Thanks!
eventstream
fails when the day of year requested is greater than 31 due to Dates.format
not accepting day of years.
using SCEDC, Dates, AWSCore
aws = aws_config(region="us-west-2")
eventstream(aws,starttime=Date(2020,9,15)-Day(10),endtime=now(),minmagnitude=3.5)
ERROR: ArgumentError: Day: 250 out of range (1:31)
Stacktrace:
[1] Date(::Int64, ::Int64, ::Int64) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Dates/src/types.jl:223
[2] parse at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Dates/src/parse.jl:285 [inlined]
[3] Date at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Dates/src/io.jl:503 [inlined]
[4] _broadcast_getindex_evalf at ./broadcast.jl:648 [inlined]
[5] _broadcast_getindex at ./broadcast.jl:621 [inlined]
[6] getindex at ./broadcast.jl:575 [inlined]
[7] macro expansion at ./broadcast.jl:932 [inlined]
[8] macro expansion at ./simdloop.jl:77 [inlined]
[9] copyto! at ./broadcast.jl:931 [inlined]
[10] copyto! at ./broadcast.jl:886 [inlined]
[11] copy at ./broadcast.jl:862 [inlined]
[12] materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,Type{Date},Tuple{Array{String,1},Base.RefValue{DateFormat{:yyyy_ddd,Tuple{Dates.DatePart{'y'},Dates.Delim{Char,1},Dates.DatePart{'d'}}}}}}) at ./broadcast.jl:837
[13] eventstream(::Dict{Symbol,Any}; starttime::Date, endtime::DateTime, minlatitude::Int64, maxlatitude::Int64, minlongitude::Int64, maxlongitude::Int64, minmagnitude::Float64, maxmagnitude::Int64, mindepth::Int64, maxdepth::Int64, eventtype::String) at /Users/thc/.julia/dev/SCEDC/src/events.jl:101
[14] top-level scope at REPL[73]:1
[15] include_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1088
Fix is to write function to accept string in yyyy_ddd
format.
catalogquery
fails if the event time has 60 seconds, e.g. 1999/10/28 15:48:60.99
due to DateTime
not being able to handle > 59 seconds.
using SCEDC, Dates, AWSCore
aws = aws_config(region="us-west-2")
df = catalogquery(aws,starttime = Date(1999,10,16),endtime=Date(1999,10,17),minmagnitude=7.)
ERROR: ArgumentError: Second: 60 out of range (0:59)
Stacktrace:
[1] DateTime at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Dates/src/types.jl:192 [inlined]
[2] parse(::Type{DateTime}, ::String, ::DateFormat{Symbol("y/m/dTH:M:S.s"),Tuple{Dates.DatePart{'y'},Dates.Delim{Char,1},Dates.DatePart{'m'},Dates.Delim{Char,1},Dates.DatePart{'d'},Dates.Delim{Char,1},Dates.DatePart{'H'},Dates.Delim{Char,1},Dates.DatePart{'M'},Dates.Delim{Char,1},Dates.DatePart{'S'},Dates.Delim{Char,1},Dates.DatePart{'s'}}}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Dates/src/parse.jl:285
[3] DateTime at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Dates/src/io.jl:482 [inlined]
[4] _broadcast_getindex_evalf at ./broadcast.jl:648 [inlined]
[5] _broadcast_getindex at ./broadcast.jl:621 [inlined]
[6] getindex at ./broadcast.jl:575 [inlined]
[7] macro expansion at ./broadcast.jl:932 [inlined]
[8] macro expansion at ./simdloop.jl:77 [inlined]
[9] copyto! at ./broadcast.jl:931 [inlined]
[10] copyto! at ./broadcast.jl:886 [inlined]
[11] copy at ./broadcast.jl:862 [inlined]
[12] materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,Type{DateTime},Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(*),Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(*),Tuple{Array{String,1},Base.RefValue{String}}},Array{String,1}}},Base.RefValue{DateFormat{Symbol("y/m/dTH:M:S.s"),Tuple{Dates.DatePart{'y'},Dates.Delim{Char,1},Dates.DatePart{'m'},Dates.Delim{Char,1},Dates.DatePart{'d'},Dates.Delim{Char,1},Dates.DatePart{'H'},Dates.Delim{Char,1},Dates.DatePart{'M'},Dates.Delim{Char,1},Dates.DatePart{'S'},Dates.Delim{Char,1},Dates.DatePart{'s'}}}}}}) at ./broadcast.jl:837
[13] read_catalog(::Array{UInt8,1}) at /Users/thc/.julia/dev/SCEDC/src/catalog.jl:58
[14] catalogquery(::Dict{Symbol,Any}; starttime::Date, endtime::Date, minlatitude::Int64, maxlatitude::Int64, minlongitude::Int64, maxlongitude::Int64, minmagnitude::Float64, maxmagnitude::Int64, mindepth::Int64, maxdepth::Int64, eventtype::String) at /Users/thc/.julia/dev/SCEDC/src/catalog.jl:115
[15] top-level scope at REPL[32]:1
[16] include_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1088
Fix will require parsing event times in each DataFrame.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.