paulrougieux / FAOSTATpackage

The full FAOSTAT package including build
1 stars 1 forks source link

Vignette examples are not working. Example code 1 returning $ atomic vector error #4

Closed KrishnaTO closed 4 years ago

KrishnaTO commented 4 years ago

Hi, Upon running the 1st example from the vignette,

## ----FAO-search, eval=FALSE---------------------------------------------------
#  ## Use the interective function to search the codes.
#  FAOsearch()
#  
#  ## Use the result of the search to download the data.
#  test = getFAO(query = .LastSearch)

Returned: Error: $ operator is invalid for atomic vectors

paulrougieux commented 4 years ago

Thanks yes for sure the FAOSTAT API on which this package was based has changed in 2017 and this package hasn't been working since then. I will fix more in this summer 2020.

The main interest of this package lies in the updated functions to download data from the bulk download:

download_faostat_bulk
read_faostat_bulk

And in the mapping tables:

FAOcountryProfile
FAOmetaTable
FAOregionProfile

Look at the help of those functions and data sets for more information.

Otherwise there is also @muuankarski 's take on the FAOSTAT bulk download here: https://github.com/muuankarski/faobulk He created functions to parse the FAOSTAT xml files, I might include them at some point here.

paulrougieux commented 4 years ago

@KrishnaTO thanks anyway for reporting and please report more issues concerning the bulk download functions and other parts of the package. Also you are welcomed to suggest updates to the vignettes.

KrishnaTO commented 4 years ago

@KrishnaTO thanks anyway for reporting and please report more issues concerning the bulk download functions and other parts of the package. Also you are welcomed to suggest updates to the vignettes.

Thanks for updating the readme to reflect this.

paulrougieux commented 4 years ago

This was reported by another user. Re-open and change title.

paulrougieux commented 4 years ago

In this commit I documented the new bulk download method. Further work on the vignette needed, but at least the data download should be working now.

https://github.com/paulrougieux/FAOSTATpackage/commit/48806cab413e9dd55f407dd8e3316ec1827c052c

paulrougieux commented 4 years ago

Dear Kirschna, Could you kindly share a working example of your current use of the FAOSTAT download functions, I'd like to collect working examples here to update the demo:

https://gitlab.com/paulrougieux/faostatpackage/-/issues/2

Regards, Paul

On Fri, 14 Feb 2020 at 16:36, Krishna Udaiwal notifications@github.com wrote:

@KrishnaTO https://github.com/KrishnaTO thanks anyway for reporting and please report more issues concerning the bulk download functions and other parts of the package. Also you are welcomed to suggest updates to the vignettes.

Thanks for updating the readme to reflect this.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/paulrougieux/FAOSTATpackage/issues/4?email_source=notifications&email_token=ABLCYJKQ2JKHBZ5PM4TOYY3RC23BFA5CNFSM4KU2OV32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELZNNQY#issuecomment-586340035, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLCYJMTBMUAWTO4IJHRK6DRC23BFANCNFSM4KU2OV3Q .

KrishnaTO commented 4 years ago

Hi Paul,

Added demo of the method I used was through the reworked FAOSearch function (now in new pull request #6 )

Cheers, Krishna