Do you know how to copy and fill in the information from other website information to Dataverses or Datasets using python?

33 views
Skip to first unread message

choiy...@gmail.com

unread,
Nov 8, 2017, 4:48:00 PM11/8/17
to Dataverse Users Community
I want to copy and fill in the information from other website information to Dataverses or Datasets using python?

I read native API in user guide. But there are two examples that are about uploading and replacing an attached files.

I understood how to upload and replace an attached files.

I want to fill in the basic information(author,  notes, contact etc) and additional metadata to Dataverses or Datasets using python???

Does anyone know how to do that?

danny...@g.harvard.edu

unread,
Nov 8, 2017, 5:15:33 PM11/8/17
to Dataverse Users Community
Hello!

If you're familiar with Python, there's the Python Client Library here:


Using that library, you should be able to express the Dataverse concepts/endpoints using Python. This is something that's a little out of date, but there is discussion about some development efforts to get it up to date in 2018.

There's also the R Client Library, which is more up to date:


Lastly, if you are set on using the APIs, I think the endpoints you're looking for are available using SWORD:


Please let us know if you have any questions, and I hope someone from the community can correct anything that I've expressed incorrectly above (I'm not a developer :)).

Cheers,

Danny

Philip Durbin

unread,
Nov 9, 2017, 7:11:28 AM11/9/17
to dataverse...@googlegroups.com
I just wanted to mention that there was a recent call for more Python example in the API Guide: https://github.com/IQSS/dataverse/issues/4255

I've written most of the examples in the API guide and I use curl because I feel like curl is more universal, that it's less controversial that picking any particular programming language.

That said, I recognize that Python is a very popular language.

The Dataverse API is more useful the better documented it is. Is there interest from the community helping add Python examples to the API Guide?

It's tricky to add lots of metadata to a dataset via the native API (and it isn't possible via SWORD). You have to create a fairly complex JSON document (I've heard that https://github.com/IQSS/dataverse-client-java supports this but I've never tested it myself). https://github.com/IQSS/dataverse/issues/3068 is about supporting a simplified JSON format but it's a lot of work.

I don't know if this helps or not. What do others think?

Phil

p.s. Sometime we talk about using Dataverse APIs at http://chat.dataverse.org

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsub...@googlegroups.com.
To post to this group, send email to dataverse-community@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/4c359d4c-e5db-4919-b493-246a035c1500%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages