Skip to content

Commit 681bf05

Browse files
authored
playground updates for credit class (#46)
1 parent 848cfd3 commit 681bf05

29 files changed

+943
-1302
lines changed

schema/.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# gen-doc output
2-
generated/
2+
generated/
3+
4+
data/playground/**/*.jsonld
5+
data/playground/**/*.ttl

schema/README.md

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
[LinkML](https://linkml.io/) semantic schemas for Regen Network framework.
44

5+
These schemas define the structure and semantics for credit class and project metadata in the Regen Network ecosystem. They provide a standardized way to describe:
6+
7+
- **Credit Class Information**: Metadata for carbon and biodiversity credit classes, including protocols, methodologies, eligible activities, and environment types
8+
- **Project Information**: Geospatial and descriptive data for projects enrolled in a given credit class
9+
- **Impact Tracking**: Primary impacts and co-benefits associated with projects
10+
- **Taxonomies**: Controlled vocabularies for activities, environment types, and impact types
11+
12+
The schemas are designed to be converted to RDF/JSON-LD formats for semantic web integration and SPARQL querying.
13+
14+
> **Note**: Current on-chain datasets may not fully reflect this schema. The schemas in this repository (and the playground folder) represent the latest up-to-date versions of all Regen Network datasets in a format consistent with current Regen Data Standards.
15+
516
## Requirements
617

718
[Install LinkML](https://linkml.io/linkml/intro/install.html) to use the helper and generator commands for interacting with LinkML schemas and data.
@@ -11,23 +22,29 @@
1122
- LinkML schemas are created in `schema/src`.
1223
- Create separate schema files for each logical schema class and `import` into the root `schemas.yaml` file.
1324
- Generated markdown from schemas:
14-
```shell
15-
make gen-doc
16-
```
25+
```shell
26+
make gen-doc
27+
```
1728
- Generate linkml enums for taxonomy terms:
18-
```shell
19-
make gen-taxonomy
20-
```
29+
```shell
30+
make gen-taxonomy
31+
```
2132

2233
## Playground
2334

24-
- Datasets are provided inside `schema/data/playground/{Credit-Class}/{LinkML-Class}/*.yaml` files
25-
- Validate and generate RDF data. This creates `.ttl` and `.jsonld` files for each dataset.
26-
```shell
27-
make gen-rdf
28-
```
29-
- Add data to graph. This adds all `.ttl` files to the graph. Override the `GRAPH_STORE_URL` env var:
30-
```shell
31-
export GRAPH_STORE_URL=http://localhost:7878/store
32-
make update-graph
33-
```
35+
Datasets are provided inside `schema/data/playground/{Credit-Class}/{LinkML-Class}-*.yaml` files. All datasets are managed in github as YAML files as this is more lightweight and easier to manage (as the standardized source for LinkML datasets) than storing JSON-LD or TTL files in version control.
36+
37+
There is a designated make task (`gen-rdf`) for validating and generating RDF data in formats besides YAML. This creates `.ttl` and `.jsonld` files for each dataset. To run the script, use the following command:
38+
39+
```shell
40+
make gen-rdf
41+
```
42+
43+
## SPARQL Integration
44+
45+
If you are running a SPARQL endpoint, you can use the following command to push datasets via a GRAPH_STORE API to update datasets to a live SPARQL store. This adds all `.ttl` files to the graph. Override the `GRAPH_STORE_URL` env var:
46+
47+
```shell
48+
export GRAPH_STORE_URL=http://localhost:7878/store
49+
make update-graph
50+
```

schema/data/anchored/create_csv_known_fields.py

Lines changed: 0 additions & 54 deletions
This file was deleted.

schema/data/anchored/create_csv_unknown_fields.py

Lines changed: 0 additions & 54 deletions
This file was deleted.

schema/data/anchored/known_fields.csv

Lines changed: 0 additions & 21 deletions
This file was deleted.

schema/data/anchored/v0/classes/BT01.jsonld

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)