Open
Description
Hello,
The following example:
using TableSchema
import TableSchema: read, validate
using DataPackage
fname = joinpath(dirname(pathof(DataPackage)), "..", "data/cities/datapackage.json")
println(fname)
p = Package(fname)
println("Loaded a Data Package, resources: ", length(p.resources))
r = DataPackage.get_resource(p, "cities")
data = DataPackage.read(r)
println( "The number of cells is ", length(data[:,1]) )
println( "Sum of column 1 is ", sum([ row for row in data[1] ]) )
table = DataPackage.get_table(r)
if validate(table); println("The table is valid according to the Schema"); end
raises
ERROR: LoadError: ArgumentError: Cannot open 'cities.csv': not a file
DataPackage.jl should look at cities.csv
in the same directory as datapackage.json
Kind regards