Skip to content

Instantly share code, notes, and snippets.

@baskaufs
baskaufs / items_with_dois.csv
Created March 11, 2021 19:46
Wikidata items that are works with DOIs
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
qid
Q55410842
Q56337275
Q58363110
Q58601421
Q58763061
Q59347161
Q64107659
Q90378138
Q103836679
@baskaufs
baskaufs / faculty.csv
Created March 8, 2021 03:44
example source data file after data have been written to the Wikidata API and have the identifiers added to them
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 21 columns, instead of 6 in line 2.
qid,label_en,description_en,instance_of_uuid,instance_of,sex_gender_uuid,sex_gender,employer_uuid,employer,employer_ref1_hash,employer_ref1_referenceUrl,employer_ref1_retrieved_nodeId,employer_ref1_retrieved_val,employer_ref1_retrieved_prec,field_uuid,field,field_ref1_hash,field_ref1_referenceUrl,field_ref1_retrieved_nodeId,field_ref1_retrieved_val,field_ref1_retrieved_prec
Q105817558,Jonathan Andreas,economics professor,C44EAE19-16F8-4F56-8302-9FD35AEBCFD2,Q5,0BEFA3FA-4629-4AA5-A42B-F2D31B94E25C,Q6581097,74447CF7-F3D0-42AA-85AB-CD342980BF06,Q886141,9a9014952f8eb00fcc3aaad0267da7de9ff4d9a8,https://www.bluffton.edu/catalog/officers/faculty.aspx,b0eb80d1-171e-4c7c-8000-71dc6e01b480,2021-03-07T00:00:00Z,11,E90BB187-ACE4-4B0E-8ABD-F7D08967FE4A,Q8134,9a9014952f8eb00fcc3aaad0267da7de9ff4d9a8,https://www.bluffton.edu/catalog/officers/faculty.aspx,f14a173c-74c0-4a55-9f8e-17407ee7093c,2021-03-07T00:00:00Z,11
Q105817559,Cynthia L. Bandish,English professor,E21676F0-EB4F-4A40-93EF-B5789034F6B2,Q5,4EF6A3FA-6FAF-4227-8105
@baskaufs
baskaufs / facult.csv
Created March 8, 2021 03:17
example source data file for new faculty records
qid label_en description_en instance_of_uuid instance_of sex_gender_uuid sex_gender employer_uuid employer employer_ref1_hash employer_ref1_referenceUrl employer_ref1_retrieved_nodeId employer_ref1_retrieved_val employer_ref1_retrieved_prec field_uuid field field_ref1_hash field_ref1_referenceUrl field_ref1_retrieved_nodeId field_ref1_retrieved_val field_ref1_retrieved_prec
Jonathan Andreas economics professor Q5 Q6581097 Q886141 https://www.bluffton.edu/catalog/officers/faculty.aspx 2021-03-07 Q8134 https://www.bluffton.edu/catalog/officers/faculty.aspx 2021-03-07
Cynthia L. Bandish English professor Q5 Q6581072 Q886141 https://www.bluffton.edu/catalog/officers/faculty.aspx 2021-03-07 Q1860 https://www.bluffton.edu/catalog/officers/faculty.aspx 2021-03-07
@baskaufs
baskaufs / config.json
Last active March 13, 2021 20:16
Simple configuration file for university faculty
{
"data_path": "",
"item_source_csv": "",
"item_pattern_file": "",
"outfiles": [
{
"manage_descriptions": true,
"label_description_language_list": [
"en"
],
@baskaufs
baskaufs / artworks.csv
Last active March 7, 2021 19:30
Spreadsheet with test data to write to Wikidata sandbox items
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 35 columns, instead of 12 in line 2.
qid,label_en,label_es,description_en,description_es,instance_of_uuid,instance_of,inventory_number_uuid,inventory_number,inventory_number_collection,inventory_number_ref1_hash,inventory_number_ref1_referenceUrl,inventory_number_ref1_retrieved_nodeId,inventory_number_ref1_retrieved_val,inventory_number_ref1_retrieved_prec,title_uuid,title,title_ref1_hash,title_ref1_statedIn,height_uuid,height_nodeId,height_val,height_unit,inception_uuid,inception_nodeId,inception_val,inception_prec,inception_earliest_date_nodeId,inception_earliest_date_val,inception_earliest_date_prec,inception_latest_date_nodeId,inception_latest_date_val,inception_latest_date_prec,inception_ref1_hash,inception_ref1_statedIn
Q13406268,Wikidata Sandbox 2,,,,,Q3305213,,12345a,Q19675,,https://www.youtube.com/watch?v=B5rXK8HCL1Y,,2021-02-28,,,Mickey Mouse house,,Q2565203,,,24.2,Q174728,,,1936,,,1935,,,1940,,,Q2565203
Q15397819,Wikidata Sandbox 3,,,,,Q860861,,z98764,Q18563658,,https://wpln.org/post/middle-and-west-tennessee-now-under-a-tornado-watch
@baskaufs
baskaufs / config.json
Last active March 13, 2021 20:16
JSON configuration file for generating a metadata description file for two practice Wikidata CSV files
{
"data_path": "data/",
"item_source_csv": "sandbox_items.csv",
"item_pattern_file": "",
"outfiles": [
{
"manage_descriptions": true,
"label_description_language_list": [
"en",
"es"
@baskaufs
baskaufs / test_wikidata.csv
Created February 28, 2021 23:43
Final state of the CSV file for the Wikidata test upload
qid labelEn descriptionEn country_uuid country country_startDate_nodeId country_startDate_val country_startDate_prec birthDate_uuid birthDate_nodeId birthDate_val birthDate_prec birthDate_ref1_hash birthDate_ref1_refUrl
Q214621 Marie Gareau genetics researcher E90424CE-37BC-4DB4-BC79-0C45B0AA43FB Q346 35318423-DF45-46B1-90DF-A9839A85DDC8 981229ab-0f77-4983-a46a-e3f872d2adae 1971-11-23T00:00:00Z 11 5501ad86d88fc6979b39f8ff00e0e66ec7411dcf https://abc.com/shows/dancing-with-the-stars
Q214622 Juan Jose Garza television personality 54498B67-30C6-48BB-8745-65B67AD28182 Q53079 2c1db1db-0e00-4a81-ae97-ef04f342470a 1986-02-00T00:00:00Z 10 19F13296-27B8-4A8A-819F-BA7FECCFEBA9 b47fe386-4a8e-49be-a2ed-53a83973c60f 1986-02-03T00:00:00Z 11 9773972b8098b03825265d9e78b5e9488b7fc2f5 https://www.telemundo.com/
@baskaufs
baskaufs / test_wikidata.csv
Created February 28, 2021 22:49
Test wikidata CSV file with additions
qid labelEn descriptionEn country_uuid country country_startDate_nodeId country_startDate_val country_startDate_prec birthDate_uuid birthDate_nodeId birthDate_val birthDate_prec birthDate_ref1_hash birthDate_ref1_refUrl
Q214621 Marie Gareau genetics researcher Q346 35318423-DF45-46B1-90DF-A9839A85DDC8 981229ab-0f77-4983-a46a-e3f872d2adae 1971-11-23T00:00:00Z 11 5501ad86d88fc6979b39f8ff00e0e66ec7411dcf https://abc.com/shows/dancing-with-the-stars
Q214622 Juan Jose Garza television personality 54498B67-30C6-48BB-8745-65B67AD28182 Q53079 2c1db1db-0e00-4a81-ae97-ef04f342470a 1986-02-00T00:00:00Z 10 19F13296-27B8-4A8A-819F-BA7FECCFEBA9 b47fe386-4a8e-49be-a2ed-53a83973c60f 1986-02-03T00:00:00Z 11 https://www.telemundo.com/
@baskaufs
baskaufs / test_wikidata.csv
Created February 28, 2021 22:16
Test wikidata data after successfully writing to the API
qid labelEn descriptionEn country_uuid country country_startDate_nodeId country_startDate_val country_startDate_prec birthDate_uuid birthDate_nodeId birthDate_val birthDate_prec birthDate_ref1_hash birthDate_ref1_refUrl
Q214621 Marie Gareau genetics researcher 35318423-DF45-46B1-90DF-A9839A85DDC8 981229ab-0f77-4983-a46a-e3f872d2adae 1971-11-23T00:00:00Z 11 5501ad86d88fc6979b39f8ff00e0e66ec7411dcf https://abc.com/shows/dancing-with-the-stars
Q214622 Juan Jose Garza television personality 54498B67-30C6-48BB-8745-65B67AD28182 Q53079 2c1db1db-0e00-4a81-ae97-ef04f342470a 1986-02-00T00:00:00Z 10 19F13296-27B8-4A8A-819F-BA7FECCFEBA9 b47fe386-4a8e-49be-a2ed-53a83973c60f 1986-02-03T00:00:00Z 11
@baskaufs
baskaufs / test_wikidata.csv
Created February 28, 2021 16:09
Example CSV file for writing to the test.wikidata.org instance
qid labelEn descriptionEn country_uuid country country_startDate_nodeId country_startDate_val country_startDate_prec birthDate_uuid birthDate_nodeId birthDate_val birthDate_prec birthDate_ref1_hash birthDate_ref1_refUrl
Marie Gareau genetics researcher 1971-11-23 https://abc.com/shows/dancing-with-the-stars
Juan Jose Garza television personality Q53079 1986-02 1986-02-03