frictionlessdata / datapackage-r

An R package for working with Data Package.
https://frictionlessdata.github.io/datapackage-r/
Other
43 stars 7 forks source link

No way of reading ZIP files produced by Python package #24

Open as2875 opened 4 years ago

as2875 commented 4 years ago

Consider the example given in the documentation of datapackage-py, which I reproduce below.

  1. Create two CSV files, data/cities.csv, and data/population.csv.
  2. Make a new data package.
    package = Package()
  3. Infer the descriptor.
    package.infer('**/*.csv')
  4. Export the package.
    package.save('datapackage.zip')
  5. Load the package.
    package = Package('datapackage.zip')

It would be convenient if datapackage-r's Package$load method had equivalent functionality. At the moment, it only accepts JSON descriptors, so cannot read data packages produced by datapackage-py (or by the R package itself), in other words

dataPackage <- Package.load('datapackage.zip')

gives an error. This makes handling data packages difficult.

I mention @sje30 for reference.


Please preserve this line to notify @kleanthisk10 (lead of this repository)

lwinfree commented 4 years ago

thanks @as2875 for opening this. We are starting to work on improving this code, so this is a really helpful and timely issue.