Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_dataset by hdl code #17

Closed
ikashnitsky opened this issue Jul 24, 2017 · 8 comments
Closed

get_dataset by hdl code #17

ikashnitsky opened this issue Jul 24, 2017 · 8 comments

Comments

@ikashnitsky
Copy link

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?

@leeper
Copy link
Member

leeper commented Jul 24, 2017

I believe get_dataset("hdl:10622/DN9QDM") should work for you. Does it not?

@ikashnitsky
Copy link
Author

No, for some reason that does not work

Error in get_dataset("hdl:10622/DN9QDM") : Not Found (HTTP 404).

@leeper leeper added the bug label Jul 24, 2017
@leeper
Copy link
Member

leeper commented Jul 24, 2017

Seems like a bug. Let me investigate.

@conjugateprior
Copy link

conjugateprior commented Dec 9, 2017

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.

@pdurbin
Copy link
Member

pdurbin commented Dec 9, 2017

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.

@conjugateprior
Copy link

@pdurbin Right-o, I posted two tickets over there. One for the download problem and a separate one for the documentation.

@pdurbin
Copy link
Member

pdurbin commented Dec 11, 2017

@conjugateprior yes, thanks for opening IQSS/dataverse#4373 and IQSS/dataverse#4374

@leeper leeper closed this as completed in 68ce8dc Mar 5, 2018
@leeper
Copy link
Member

leeper commented Mar 5, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants