-
Notifications
You must be signed in to change notification settings - Fork 19
IndonesianNODC Generate JSON LD Steps
Jeff McKenna edited this page Oct 12, 2022
·
16 revisions
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).
- 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
- use Python script named ina-nodc-harvest.py (make sure to use the one in the
schema-dev-jmbranch)- git clone https://github.com/iodepo/odis-arch.git odis-arch-git
- cd odis-arch-git
- git checkout schema-dev-jm
- cd code/notebooks/Exploration
- make sure you create a new folder named
data-ina-nodcin 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-nodccontains several.jsonfiles
- use the schema.org validator and paste the contents of one of the generated
.jsonfiles into the validator (click on 'Code Snippet` and paste there)
- possibly place the data folder (containing the
.jsonfiles) at the root of https://geonode.nodc.id - make sure that your sitemap (https://geonode.nodc.id/sitemap.xml) points to each of those
.jsonfiles- see Google's sitemap guidelines
- optionally use the
generate-sitemap.phpscript
- https://catalogue.odis.org
- if there is no entry yet, login and click "Add"
- in the
Basic Descriptionsection, paste the url to your sitemap in the field namedStartpoint URL for ODIS-Arch, and forType of the ODIS-Arch URLselectSitemap
