Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add documents of other administrative entities + json schema #147

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions data/documents-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$ref": "#/definitions/KlimawatchDocuments",
"definitions": {
"KlimawatchDocuments": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"entity": {
"$ref": "#/definitions/Entity"
},
"documents": {
"type": "array",
"items": {
"$ref": "#/definitions/Document"
}
}
},
"additionalProperties": false,
"required": ["entity", "documents"]
}
}
},
"required": ["data"]
},
"Entity": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ist "Entity" hier nicht etwas sehr generisch? Wie wäre es mit "ReportingEntity" oder "RegionalAuthority" oder "ReportingRegionalAuthority"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ja, weitere Alternativen wäre AdminUnit, AdministrativeUnit, Region oder Area... Such dir einfach das aus was dir am besten gefällt :-)

"title": "Gebietskörperschaft: Landkreis, Gemeinde, etc",
"type": "object",
"properties": {
"id": {
"description": "NUTS Code gemäß der Systematik der Gebietseinheiten für die Statistik in der Europäischen Union, https://www.wikidata.org/wiki/Property:P605",
"type": "string"
},
"name": {
"type": "string"
},
"adminLevel": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was bezeichnet adminLevel hier? Einen NUTS3 oder LAU Code? Ich denke, wir sollten hier eine Beschreibung des Properties als description oder title hinzufügen.

Copy link
Contributor Author

@saerdnaer saerdnaer Oct 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Die Idee war das man den Daten direkt ansieht ob sie sich auf einen Landkreis, Stadt(-teil/bezirtk), Gemeine usw. beziehen. Ich hatte ihr einfach den Wert aus OSM übernommen, vgl. https://wiki.openstreetmap.org/wiki/Key:admin_level bzw. https://wiki.openstreetmap.org/wiki/DE:Grenze#Innerstaatliche_Grenzen

Suggested change
"adminLevel": {
"adminLevel": {
"description": "Landkreis: 6, Gemeinde: 7 etc. – vgl. https://wiki.openstreetmap.org/wiki/DE:Grenze#Innerstaatliche_Grenzen ",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oder wir machen nen Enum draus...

"description": "Landkreis: 6, Gemeinde: 7 etc. – vgl. https://wiki.openstreetmap.org/wiki/DE:Grenze#Innerstaatliche_Grenzen ",
"type": "integer"
},
"ars": {
"title": "Amtlicher Regionalschlüssel",
"description": "https://de.wikipedia.org/wiki/Amtlicher_Gemeindeschlüssel#Regionalschlüssel",
"examples": ["031030000000"],
"type": "string",
"pattern": "^[0-9]{12}$"
},
"wikidata": {
saerdnaer marked this conversation as resolved.
Show resolved Hide resolved
"description": "Querverlinkung auf den Wikidata-Eintrag der Gebietskörperschaft",
"examples": ["https://www.wikidata.org/wiki/Q3014"],
"type": "string",
"format": "uri",
"pattern": "^https://www.wikidata.org/wiki/Q[0-9]+$"
},
"osm": {
saerdnaer marked this conversation as resolved.
Show resolved Hide resolved
"description": "Querverlinkung auf OpenStreetMap Relation, dort kann z.B. die Geometrie abgerufen werden",
"examples": ["https://www.openstreetmap.org/relation/163046"],
"type": "string",
"format": "uri",
"pattern": "^https://www.openstreetmap.org/relation/[0-9]+$"
}
},
"required": ["name"]
},
"Document": {
"title": "Dokument",
"description": "PDF Dokument oder Webseite, die den Klimaplan der Einheit beschreibt, Maßnamen auflistet und den Umsetzungsfortschritt evaluiert.",
"type": "object",
"additionalProperties": false,
"properties": {
"title": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri"
},
"type": {
"type": "string",
"enum": ["PLAN", "REPORT", "ACTIONLIST", "WEBSITE"]
},
"comment": {
"type": "string"
}
},
"required": ["url"]
}
}
}
Loading