Skip to content

IndonesianNODC Generate JSON LD Steps

Jeff McKenna edited this page Aug 8, 2022 · 16 revisions

Background

The following steps should be executed by the INA-NODC (BRIN) team. GeoNode currently does not generate JSON-LD for the catalogue layers, so these steps generate JSON-LD for each record the catalogue (https://geonode.nodc.id).

Requirements

  • Python 3.x
    • install Python (3.9.12 is recommended)
  • pip
  • install necessary Python modules
    • python -m pip install json, pyld, owslib, ssl, pandas, kglab, logging

Step 1: Generate the JSON-LD for each layer

  • use Python script named ina-nodc-harvest.py from here
  • make sure you create a new folder named data-ina-nodc in the same directory as where you have the script
  • execute the script: python ina-nodc-harvest.py
  • when complete, you should see a message such as:
      ************************
      Parsed 48 records
        33 exported to JSON-LD
        15 were invalid records
      ************************
    
  • verify that the folder data-ina-nodc contains several .json files

Step 2: Validate the generated JSON-LD

  • use the schema.org validator and paste the contents of one of the generated .json files into the validator (click on 'Code Snippet` and paste there)

Step 3: Generate a sitemap.xml file that points to each JSON-LD file

Step 4: Make sure that the INA-NODC catalogue is in ODISCat

  • https://catalogue.odis.org
  • if there is no entry yet, login and click "Add"
  • in the Basic Description section, paste the url to your sitemap in the field named Startpoint URL for ODIS-Arch, and for Type of the ODIS-Arch URL select Sitemap

Clone this wiki locally