This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dataone) | |
# Download a CSV-formatted data file from the KNB | |
# repository, and convert it to a data.frame | |
get_dataframe <- function(pid) { | |
d1c <- D1Client("PROD", "urn:node:KNB") | |
data_raw <- getObject(d1c@mn, pid) | |
data_char <- rawToChar(data_raw) | |
csv_text <- textConnection(data_char) | |
df <- read.csv(csv_text, stringsAsFactors = FALSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "abstracts" | |
author: "Matt Jones" | |
date: "10/11/2021" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
library(vroom) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "geopackage" | |
author: "Matt Jones" | |
date: "7/23/2021" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@context": "https://doi.org/10.5063/schema/codemeta-2.0", | |
"@type": "SoftwareSourceCode", | |
"license": "https://spdx.org/licenses/Apache-2.0", | |
"codeRepository": "https://github.com/codemeta/codemeta", | |
"dateCreated": "2020-02-04", | |
"datePublished": "2020-02-05", | |
"downloadUrl": "https://codemeta.github.io/", | |
"name": "CodeMeta", | |
"description": "CodeMeta is a metadata language for code.", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "FAIR Metrics" | |
author: "Matt Jones" | |
date: "5/8/2019" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
library(dplyr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WORKDIR=${PWD} | |
create_repos () { | |
rm -rf repo-split-example repo-split-recent repo-split-history | |
# Create the repo to be split | |
example_repo | |
# Create the repo to contain the historical commits | |
HISTREPO="file://${WORKDIR}/repo-split-history" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@prefix prov: <http://www.w3.org/ns/prov#> . | |
@prefix ns0: <http://www.openarchives.org/ore/terms/> . | |
@prefix dc: <http://purl.org/dc/terms/> . | |
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | |
@prefix ns1: <http://purl.org/spar/cito/> . | |
@prefix dc11: <http://purl.org/dc/elements/1.1/> . | |
<https://cn-stage-2.test.dataone.org/cn/v2/resolve/urn%3Auuid%3A936436eb-2676-44b2-920c-acc5e28384f9> | |
prov:wasGeneratedBy <urn:uuid:aabccb0e-ccc8-4db8-a61d-53eb314906be> ; | |
a <http://purl.dataone.org/provone/2015/01/15/ontology#Data> ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# For an OO language, this is distinctly procedural. Should probably fix that. | |
require 'json' | |
details = Hash.new({}) | |
capture_params = [ | |
{ :name => "title", :message => "Enter project name." }, | |
{ :name => "url", :message => "Enter the URL of the project repository." }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<gfc:FC_FeatureCatalogue | |
id="_1" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:gco="http://www.isotc211.org/2005/gco" | |
xmlns:gmd="http://www.isotc211.org/2005/gmd" | |
xmlns:gfc="http://www.isotc211.org/2005/gfc" | |
xmlns:gml="http://www.opengis.net/gml/3.2" | |
xmlns:gmx="http://www.isotc211.org/2005/gmx" | |
xsi:schemaLocation="http://www.isotc211.org/2005/gfc Q:\users\mize.jacqueline\ISO\gfc\gfc.xsd"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example R code to filter data using criteria passed in via lists, using lapply | |
# Matt Jones 2015-10-19 | |
library(dplyr) | |
# create a sample fake data frame | |
df <- cbind(expand.grid(sciName=list("A", "B", "C", "D"), family=list("X", "Y"), stage=list("S1", "S2", "S3", "S4")), count=1) | |
df | |
# set up our filter conditions | |
condition1 <- list(sciName="A", stageVector=c("S2", "S3")) |
NewerOlder