This section includes information for the Dumbarton Oaks fellows about updating JSTOR's Knowledge Graph programmatically using a Google sheet interface.
Please note that if referencing an entity, the thing must exist before it can be referenced. If the thing exists in the knowledge graph, refer to it as a QID rather than as an entity label.
To add an item, or series of items into the Knowledge Graph, follow the steps below. Please note that a user must be in the PH - Master spreadsheet. Please note, if you need access to this spreadsheet reach out to the JSTOR Labs team via email or slack:
- Search for an item on Wikidata. If this item does not exist on Wikidata, skip to step two.
- If it does exist, copy the Wikidata QID from the webpage header. For example, a search for Cactaceae reveals a QID of Q14560.
- In the PH - Master spreadsheet, paste the QID into 'wikidata id' column.
- If the 'wikidata id' column is populated, the remaining fields will be auto-populated based on Wikidata's fields. Based on what information is desired.
- Follow these steps to create an item from scratch. At the minimum, the following fields are required: 'label,' 'description,' 'aliases.' Where apt, populate remaining fields with Wikidata QID information. If QID information is not available or fitting, use the "name string" fields to enter in text.
- For example, the Wikidata QID for Latin is Q397. This can be used to populate the 'language of work or name' field. However, "Christoffel Plantyn" does not exist in Wikidata and should be entered into the 'author name string' field.
- As a reminder, the if the 'wikidata id' contains this information, there is no need to reprint it in the spreadsheet. Our script will auto-populate these fields based on available information.
- Once all desired fields are populated, write TRUE in the 'Ingest Data' column and click the 'Ingest Data' button.
- NB: A green pop-up will appear on Google Sheets, informing the user that a script is running and that a script has finished, however, the data fields will still remain empty. This is a known data lag, please be patient as the database updates.
- Upon completion of the script, a 'local id' will be produced (In the case of Cactaceae, QID Q994 will be produced).
Books and Herbals
Adding herbals to the knowledge graph follows much the same format as adding items:
- First look up the item in Wikidata. If it exists fill in supplemental material as desired. These facets could include author or printer information, or full work information.
- If Wikidata QID is provided, please note that existing fields do not need to be repeated on spreadsheet.
- If populating a field that requires a QID, ensure that the item exists in either Wikidata or the JSTOR Knowledge Graph.
- Once satisfied with the information given, populate the 'Ingest Data' cell with a TRUE value, and click the 'Ingest Data' button. This will run the script and generate a local knowledge graph id upon completion. There is a known lag, please give it a minute.
Please find below information about editing or creating an individual Knowledge Graph page.
Individual Knowledge graph entries can be updated or created manually once a username has been created. Please contact JSTOR Labs via email to create a username.
To add individual items
- Click on the Add New Item tag on the left tool bar of this page.
- Enter a label, description, and alias (if applicable). Please note that aliases are separated either by a new line (preferred) or the pipe symbol ( | ). Click create.
- Once the base document has been created, feel free to enter any additional properties through the 'add statement' button.
- Due to the experimental nature of this early-stage product, known data caveats are as follows: