Ironholds / WikidataR

An R package for the Wikidata API
Other
53 stars 14 forks source link

option to coerce find_item to data.frame #12

Closed pssguy closed 8 years ago

pssguy commented 8 years ago

This would be useful Or explanation of how to do it. Specifically interested in id and label

Ironholds commented 8 years ago

Good idea. I'll look into it.

Ironholds commented 8 years ago

So it looks like this would be pretty difficult to do in a scaleable way since there are parameters that simply aren't returned if an article lacks them. See, for example, t <- find_item("foo", language = "en", limit = 10). Elements 2 and 3 have 9 entries; the rest 8. Turning these into a data frame would be preeetty manual and mungy. A list is probably a better representation precisely because it has variable numbers of entries.