Skip to content

Instantly share code, notes, and snippets.

View ThomasThelen's full-sized avatar
❤️

Thomas Thelen ThomasThelen

❤️
  • Carmel, Ca
View GitHub Profile
# gnis-ld.org
- **Author**: Blake Regalia, Thomas Thelen
- **License**: [Apache 2](http://opensource.org/licenses/Apache-2.0)
- [Package source code on Github](https://github.com/DataONEorg/gnis-ld.org)
- [**Submit Bugs and feature requests**](https://github.com/DataONEorg/gnis-ld.org/issues)
- Contact us: support@dataone.org
This repository contains the webapp that acts as the front to [GNIS-LD](https://gnis-ld.org/).
SELECT DISTINCT ?mudslide_id ?mudslide_description ?mudslide_date ?mudslide_geometry ?natural_disaster ?natural_disaster_description ?natural_disaster_start_date ?natural_disaster_end_date ?natural_disaster_geometry (group_concat(DISTINCT ?natural_disaster_date;separator=",") as ?natural_disaster_year)
WHERE {
?mudslide_id rdf:type kwg-ont:NOAADebrisFlow .
?mudslide_id kwg-ont:sfWithin ?mudslide_area .
?mudslide_id kwg-ont:hasTemporalScope ?mudslide_temporal_scope .
?mudslide_id kwg-ont:hasNarrative ?mudslide_description .
?mudslide_id geosparql:hasGeometry ?mudslide_geometry_node .
?mudslide_geometry_node geosparql:asWKT ?mudslide_geometry .
?mudslide_temporal_scope rdf:type time:Instant .
<?xml version="1.0"?>
<rdf:RDF
xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
xmlns:swrl="http://www.w3.org/2003/11/swrl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:swrlx="http://swrl.stanford.edu/ontologies/built-ins/3.3/swrlx.owl#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns="http://www.owl-ontologies.com/Ontology1172270693.owl#"
@prefix DataCite: <http://datacite.org/schema/kernel-4/> .
@prefix bundle: <http://purl.org/wf4ever/bundle#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix ore: <http://www.openarchives.org/ore/terms/> .
@prefix pav: <http://purl.org/pav/> .
@prefix ro: <http://purl.org/wf4ever/ro#> .
@prefix schema: <http://schema.org/> .
@prefix wt: <https://vocabularies.wholetale.org/wt/0.1/wt#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix DataCite: <http://datacite.org/schema/kernel-4/> .
@prefix bundle: <http://purl.org/wf4ever/bundle#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix ore: <http://www.openarchives.org/ore/terms/> .
@prefix pav: <http://purl.org/pav/> .
@prefix ro: <http://purl.org/wf4ever/ro#> .
@prefix schema: <http://schema.org/> .
@prefix wt: <https://vocabularies.wholetale.org/wt/0.1/wt#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix DataCite: <http://datacite.org/schema/kernel-4/> .
@prefix bundle: <http://purl.org/wf4ever/bundle#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix ore: <http://www.openarchives.org/ore/terms/> .
@prefix pav: <http://purl.org/pav/> .
@prefix ro: <http://purl.org/wf4ever/ro#> .
@prefix schema: <http://schema.org/> .
@prefix wt: <https://vocabularies.wholetale.org/wt/0.1/wt#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@ThomasThelen
ThomasThelen / queries.py
Created February 10, 2021 19:20
Convert manifest to ttl
import rdflib
def load_manifest(manifest_path: str) -> rdflib.Graph:
"""
Loads a Tale's manifest into an rdf graph
:param manifest_path:
:return: A graph object loaded with the manifest
"""
package org.example;
import org.dataone.speedbagit.SpeedBagIt;
import java.io.*;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.security.MessageDigest;
{
"id": "program-118",
"sourceFileName": "",
"sourceLanguage": "r",
"scriptMD5": "dd4516b18ff89fed1b945d8c8a7368c8",
"scriptSHA1": "72ed0b42184b7d823c65e93aa3588068dcbb5907",
"sourceFileLastUpdate": "2020-06-21T17:42:33+00:00",
"sourceFileSize": 486,
"lineCount": 15,
"commandCount": 9,
library(R6)
library(tidyverse)
library(ggplot2)
library(cowplot)
library(sn)
library(profvis)
# A class that represents Village properties at an instance in time
VillageData <- R6Class("VillageData", cloneable = TRUE,