Skip to content

Instantly share code, notes, and snippets.

@trevormunoz trevormunoz/README.md
Last active Aug 29, 2015

Embed
What would you like to do?
Wikidata Suggest Example
import csvkit
from wikidata_suggest import suggest
reader = csvkit.py2.reader(
open('../data/tate-collection/collection-1.2/artist_data.csv'))
writer = csvkit.py2.writer(
open('../data/tate-collection/collection-1.2/artist_data_recon.csv', 'wb'))
for row in reader:
artist = row[1]
wikidata = suggest(artist)
if wikidata:
row.append(wikidata["url"])
else:
row.append(None)
writer.writerow(row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.