Closed ikashnitsky closed 6 years ago
I believe get_dataset("hdl:10622/DN9QDM")
should work for you. Does it not?
No, for some reason that does not work
Error in get_dataset("hdl:10622/DN9QDM") : Not Found (HTTP 404).
Seems like a bug. Let me investigate.
Bug confirmed. Some more detail:
code1 <- get_file("chapter03.R", "doi:10.7910/DVN/ARKOTI")
# succeeds
code2 <- get_file("1995-1999 Levels of Source _ Target.tab", "hdl:1902.1/FYXLAWZRIA")
Error in get_file("1995-1999 Levels of Source _ Target.tab", "hdl:1902.1/FYXLAWZRIA") :
Service Unavailable (HTTP 503).
Also fails for http://hdl.handle.net/1902.1/FYXLAWZRIA
which will resolve in a browser.
But
> code3 <- get_file_metadata(109356, "http://hdl.handle.net/1902.1/FYXLAWZRIA")
> code3
[1] "<?xml version='1.0' encoding='UTF-8'?><codeBook xmlns=\"http://www.icpsr.umich.edu/DDI\" version=\"2.0\"><stdyDscr><citation><titlStmt><titl>10 Million International Dyadic Events</titl><IDNo agency=\"hdl\">1902.1/FYXLAWZRIA</IDNo></titlStmt><rspStmt><AuthEnty>King, Gary; Lowe, Will</AuthEnty></rspStmt><biblCit>King, Gary; Lowe, Will, 2008, \"10 Million International Dyadic Events\", hdl:1902.1/FYXLAWZRIA, Harvard Dataverse, V5, UNF:3:dSE0bsQK2o6xXlxeaDEhcg==</biblCit></citation></stdyDscr><fileDscr ID=\"f109356\"><
[snip]
and this works with hdl:1902.1/FYXLAWZRIA
too. So a DV-side error perhaps?
I'd like to offer an equivalent working curl command, but nothing about the DV Data access API here works for queries involving this repo, via curl or elsewhere. However, the documentation seems like a work in progress, so I may simply have not hit on the right combination of endpoint and parameters.
the documentation seems like a work in progress
@conjugateprior uh oh. You're talking about the API Guide, aren't you? Can you please open an issue at https://github.com/IQSS/dataverse/issues about what's confusing. We do sprint planning and estimates based on that issue tracker rather than this one. We can try to improve the documentation.
@pdurbin Right-o, I posted two tickets over there. One for the download problem and a separate one for the documentation.
@conjugateprior yes, thanks for opening https://github.com/IQSS/dataverse/issues/4373 and https://github.com/IQSS/dataverse/issues/4374
Sorry about delay in getting to this. There were two issues, one is that you need to specify the server
(it defaults to Harvard). The other is there was a bug, which is now fixed. You should see:
> get_dataset("hdl:10622/DN9QDM", key = "", server = "datasets.socialhistory.org")
Dataset (453):
Version: 1.0, RELEASED
Release Date: 2017-05-29T14:01:26Z
9 Files:
label version id contentType
1 Shapefile_RussianEmpire_1897.rar 1 1831 application/x-rar
There is no DOI for the dataset that I want to grab http://hdl.handle.net/10622/DN9QDM Is it possible to get it somehow? If not, is it possible to add the feature of specifying the dataset by the hdl code?