Basic usage
-The primary use case for paperbark
is to create metadata statements for sharing biodiversity data. You can create a blank file by calling use_metadata()
. When you open the resulting file, it will show a markdown file with some pre-chosen headings, like this:
-#> [1] "<h1 xmlns:d=\"eml://ecoinformatics.org/dataset-2.1.0\" xmlns:eml=\"eml://ecoinformatics.org/eml-2.1.1\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:dc=\"http://purl.org/dc/terms/\" xsi:schemaLocation=\"eml://ecoinformatics.org/eml-2.1.1 http://rs.gbif.org/schema/eml-gbif-profile/1.3/eml-gbif-profile.xsd\" system=\"R-elm-package\" scope=\"system\" xml:lang=\"en\">eml:eml</h1>"
-#> [2] ""
-#> [3] ""
-#> [4] ""
-#> [5] "## Dataset"
-#> [6] ""
-#> [7] "### Title"
-#> [8] ""
-#> [9] "A Sentence Giving Your Dataset Title In Title Case"
-#> [10] ""
-You can then populate your metadata statement with whatever information is needed to support effective re-use. You can add further headings as you wish, presuming that they follow the EML standard. The header ‘level’ (i.e. number of #
) is used to designate the degree of nesting.
-Once you are done, import it to R using read_md()
. It will be stored as a tibble
:
+The primary use case for paperbark
is to manipulate the format of metadata statements for sharing biodiversity data. The first step is to create a markdown file, and add any headings that you like that conform to the EML standard. The header ‘level’ (i.e. number of #
) is used to designate the degree of nesting. If you don’t want to start from scratch, you can use the example dataset metadata_example
:
+
+library(dplyr)
+metadata_example |>
+ slice_head(n = 5)
+#> # A tibble: 5 × 4
+#> level label text attributes
+#> <dbl> <chr> <chr> <list>
+#> 1 1 eml:eml <NA> <named list>
+#> 2 2 Dataset <NA> <lgl [1]>
+#> 3 3 Title A Sentence Giving Your Dataset Title In Title Case <lgl [1]>
+#> 4 3 Abstract A paragraph outlining the content of the dataset <lgl [1]>
+#> 5 3 Creator <NA> <lgl [1]>
+It is straightforward to export this to your working directory using write_md()
:
+write_md(metadata_example, "metadata.md")
+Once you are done, import it to R using read_md()
. It will be stored as a tibble
:
+
-#> # A tibble: 29 × 4
-#> level label text attributes
-#> <dbl> <chr> <chr> <list>
-#> 1 1 eml:eml "" <named list>
-#> 2 2 dataset <NA> <lgl [1]>
-#> 3 3 title <NA> <lgl [1]>
-#> 4 4 <NA> "An awesome dataset" <NULL>
-#> 5 2 description <NA> <lgl [1]>
-#> 6 3 <NA> "This data is the best. You should… <NULL>
-#> 7 3 publicShortDescription <NA> <lgl [1]>
-#> 8 3 publicDescription <NA> <lgl [1]>
-#> 9 3 technicalDescription <NA> <lgl [1]>
-#> 10 3 dataQualityDescription <NA> <lgl [1]>
-#> # ℹ 19 more rows
+#> # A tibble: 29 × 4
+#> level label text attributes
+#> <dbl> <chr> <chr> <list>
+#> 1 1 eml:eml <NA> <named list>
+#> 2 2 dataset <NA> <lgl [1]>
+#> 3 3 title <NA> <lgl [1]>
+#> 4 4 <NA> An awesome dataset <NULL>
+#> 5 2 description <NA> <lgl [1]>
+#> 6 3 <NA> This data is the best. You should … <NULL>
+#> 7 3 publicShortDescription <NA> <lgl [1]>
+#> 8 3 publicDescription <NA> <lgl [1]>
+#> 9 3 technicalDescription <NA> <lgl [1]>
+#> 10 3 dataQualityDescription <NA> <lgl [1]>
+#> # ℹ 19 more rows
You can then export it as an xml file without any intermediate steps:
-
+
For a more detailed description of paperbark’s capabilities and methods, see the ‘Quick start guide’ vignette.
@@ -117,7 +121,7 @@ Citing paperbark
To generate a citation for the package version you are using, you can run:
-
+
The current recommended citation is:
diff --git a/pkgdown.yml b/pkgdown.yml
index 7a89e9e..f37e260 100644
--- a/pkgdown.yml
+++ b/pkgdown.yml
@@ -3,7 +3,7 @@ pkgdown: 2.1.1
pkgdown_sha: ~
articles:
quick_start_guide: quick_start_guide.html
-last_built: 2024-12-05T01:18Z
+last_built: 2024-12-06T01:18Z
urls:
reference: https://paperbark.ala.org.au/reference
article: https://paperbark.ala.org.au/articles
diff --git a/reference/index.html b/reference/index.html
index 857f0cd..fe77548 100644
--- a/reference/index.html
+++ b/reference/index.html
@@ -41,12 +41,6 @@ Basic usageuse_metadata()
-
-
- Write an example metadata statement
- -
-
metadata_example
diff --git a/reference/paperbark-package.html b/reference/paperbark-package.html
index 032e30b..343d260 100644
--- a/reference/paperbark-package.html
+++ b/reference/paperbark-package.html
@@ -49,8 +49,7 @@ Functionsuse_metadata() - Create a blank metadata statement as a markdown file
-
read_eml()
/write_eml()
- Convert between EML and tibbles
+Basic usage
Type conversion
as_eml_chr()
- Convert metadata to class character
@@ -62,6 +61,11 @@
If you have any questions, comments or suggestions, please email
support@ala.org.au.
+
+
Author
diff --git a/search.json b/search.json
index 616a64b..4b13d55 100644
--- a/search.json
+++ b/search.json
@@ -1 +1 @@
-[{"path":"https://paperbark.ala.org.au/articles/quick_start_guide.html","id":"methodological-approach","dir":"Articles","previous_headings":"","what":"Methodological approach","title":"Quick start guide","text":"convert markdown EML, paperbark relies assumption header levels markdown reflect nested structure resulting xml. example, markdown file might contain text: parse xml: accomplish conversion, built set parsers convert data sequence: Rather export individual parsers, paperbark provides set transformers as_eml_ prefix, e.g.: Every permutation as_eml_ functions provided paperbark, meaning can simply choose outcome looking , let paperbark handle parsing chain needed return object class require.","code":"# EML ## Dataset ### Title My title
My title<\/title> <\/dataset> .md file -> character -> tibble -> list -> xml -> .xml file library(paperbark) c(\"# Heading 1\", \"## Heading 2\", \"text content\") |> as_eml_tibble() ## # A tibble: 3 × 4 ## level label text attributes ## ## 1 1 heading1 NA ## 2 2 heading2 NA ## 3 3 NA text content c(\"# Heading 1\", \"## Heading 2\", \"text content\") |> as_eml_xml() ## {xml_document} ## ## [1] text content<\/heading2>"},{"path":"https://paperbark.ala.org.au/articles/quick_start_guide.html","id":"reading-and-writing","dir":"Articles","previous_headings":"","what":"Reading and writing","title":"Quick start guide","text":"standard ALA R packages, read_ functions paperbark return tibble. two variants, one reading data markdown: second reading data EML: corresponding write functions write_md() write_eml(). functions accept objects classes supported paperbark, possible pipe read write functions together without intermediate stages: worth noting, though, quite simple wrapper functions existing import transformation functions. example, code block can rewritten using one paperbark function, follows:","code":"file <- system.file(\"example_data\", \"README_md_example.md\", package = \"paperbark\") read_md(file) ## # A tibble: 29 × 4 ## level label text attributes ## ## 1 1 eml:eml \"\" ## 2 2 dataset NA ## 3 3 title NA ## 4 4 NA \"An awesome dataset\" ## 5 2 description NA ## 6 3 NA \"This data is the best. You should… ## 7 3 publicShortDescription NA ## 8 3 publicDescription NA ## 9 3 technicalDescription NA ## 10 3 dataQualityDescription NA ## # ℹ 19 more rows read_eml(\"https://collections.ala.org.au/ws/eml/dr368\") ## # A tibble: 85 × 4 ## level label text attributes ## ## 1 1 Eml NA ## 2 2 Dataset NA ## 3 3 Alternate Identifier NA ## 4 4 NA 0101d74b-afc2-3b0f-817c-dc350d2a6fe4 ## 5 4 NA 10.15468/14jd9g ## 6 4 NA 0645ccdb-e001-4ab0-9729-51f1755e007e ## 7 4 NA https://collections.ala.org.au/publi… ## 8 3 Title NA ## 9 4 NA NSW BioNet Atlas ## 10 3 Creator NA ## # ℹ 75 more rows system.file(\"example_data\", \"README_md_example.md\", package = \"paperbark\") |> read_md() |> write_eml(\"output.xml\") library(xml2) system.file(\"example_data\", \"README_md_example.md\", package = \"paperbark\") |> base::readLines() |> paperbark::as_eml_xml() |> xml2::write_xml(\"output.xml\")"},{"path":"https://paperbark.ala.org.au/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Martin Westgate. Author, maintainer. Shandiya Balasubramaniam. Author. Dax Kellie. Author.","code":""},{"path":"https://paperbark.ala.org.au/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Westgate M, Balasubramaniam S, Kellie D (2024). paperbark: Convert markdown ecological meta language (EML) back. R package version 0.1.0, https://paperbark.ala.org.au.","code":"@Manual{, title = {paperbark: Convert markdown to ecological meta language (EML) and back}, author = {Martin Westgate and Shandiya Balasubramaniam and Dax Kellie}, year = {2024}, note = {R package version 0.1.0}, url = {https://paperbark.ala.org.au}, }"},{"path":[]},{"path":"https://paperbark.ala.org.au/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"Convert markdown to ecological meta language (EML) and back","text":"paperbark package import type conversion metadata statements. purpose enable users store metadata markdown files, convert EML. named peeling growth form displayed number Australian plant species. logo drawn Martin Westgate, shows flower swamp paperbark Melaleuca ericifolia. comments, questions suggestions, please contact us.","code":""},{"path":"https://paperbark.ala.org.au/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Convert markdown to ecological meta language (EML) and back","text":"package active development, yet available CRAN. can install latest development version GitHub : Load package:","code":"# install.packages(\"devtools\") devtools::install_github(\"AtlasOfLivingAustralia/paperbark\") library(paperbark)"},{"path":"https://paperbark.ala.org.au/index.html","id":"basic-usage","dir":"","previous_headings":"","what":"Basic usage","title":"Convert markdown to ecological meta language (EML) and back","text":"primary use case paperbark create metadata statements sharing biodiversity data. can create blank file calling use_metadata(). open resulting file, show markdown file pre-chosen headings, like : can populate metadata statement whatever information needed support effective re-use. can add headings wish, presuming follow EML standard. header ‘level’ (.e. number #) used designate degree nesting. done, import R using read_md(). stored tibble: can export xml file without intermediate steps: detailed description paperbark’s capabilities methods, see ‘Quick start guide’ vignette.","code":"#> [1] \"eml:eml<\/h1>\" #> [2] \"\" #> [3] \"\" #> [4] \"\" #> [5] \"## Dataset\" #> [6] \"\" #> [7] \"### Title\" #> [8] \"\" #> [9] \"A Sentence Giving Your Dataset Title In Title Case\" #> [10] \"\" x <- read_md(\"metadata.md\") x #> # A tibble: 29 × 4 #> level label text attributes #> #> 1 1 eml:eml \"\" #> 2 2 dataset #> 3 3 title #> 4 4 \"An awesome dataset\" #> 5 2 description #> 6 3 \"This data is the best. You should… #> 7 3 publicShortDescription #> 8 3 publicDescription #> 9 3 technicalDescription #> 10 3 dataQualityDescription #> # ℹ 19 more rows write_eml(x, \"metadata.xml\")"},{"path":"https://paperbark.ala.org.au/index.html","id":"citing-paperbark","dir":"","previous_headings":"","what":"Citing paperbark","title":"Convert markdown to ecological meta language (EML) and back","text":"generate citation package version using, can run: current recommended citation : Westgate MJ, Balasubramaniam S & Kellie D (2024) paperbark: Convert markdown files EML. R Package version 0.1.0.","code":"citation(package = \"paperbark\")"},{"path":"https://paperbark.ala.org.au/reference/as_eml_chr.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert metadata to a character vector — as_eml_chr","title":"Convert metadata to a character vector — as_eml_chr","text":"functions take objects class tbl_df (.e. tibbles), list xml_document (xml2 package), convert vector strings human- machine- readable markdown.","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_chr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert metadata to a character vector — as_eml_chr","text":"","code":"as_eml_chr(x, ...) # S3 method for class 'character' as_eml_chr(x, ...) # S3 method for class 'tbl_df' as_eml_chr(x, ...) # S3 method for class 'list' as_eml_chr(x, ...) # S3 method for class 'xml_document' as_eml_chr(x, ...)"},{"path":"https://paperbark.ala.org.au/reference/as_eml_chr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert metadata to a character vector — as_eml_chr","text":"x Object converted ... arguments, currently ignored","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_chr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert metadata to a character vector — as_eml_chr","text":"character vector formatted markdown.","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert metadata to a list — as_eml_list","title":"Convert metadata to a list — as_eml_list","text":"Takes object class character, xml_document tibble, converts list.","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert metadata to a list — as_eml_list","text":"","code":"as_eml_list(x, ...) # S3 method for class 'character' as_eml_list(x, ...) # S3 method for class 'tbl_df' as_eml_list(x, ...) # S3 method for class 'list' as_eml_list(x, ...) # S3 method for class 'xml_document' as_eml_list(x, ...)"},{"path":"https://paperbark.ala.org.au/reference/as_eml_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert metadata to a list — as_eml_list","text":"x Object converted ... arguments, currently ignored","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert metadata to a list — as_eml_list","text":"list, nested structure XML/md attributes XML nodes, preserved.","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_tibble.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert metadata to a tibble — as_eml_tibble","title":"Convert metadata to a tibble — as_eml_tibble","text":"Takes objects class character, list xml_document converts tibble particular structure, designed storing nested data. Tibbles required attributes stored list-columns, supported class data.frame.","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_tibble.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert metadata to a tibble — as_eml_tibble","text":"","code":"as_eml_tibble(x, ...) # S3 method for class 'character' as_eml_tibble(x, ...) # S3 method for class 'tbl_df' as_eml_tibble(x, ...) # S3 method for class 'list' as_eml_tibble(x, ...) # S3 method for class 'xml_document' as_eml_tibble(x, ...)"},{"path":"https://paperbark.ala.org.au/reference/as_eml_tibble.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert metadata to a tibble — as_eml_tibble","text":"x Object converted ... arguments, currently ignored","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_tibble.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert metadata to a tibble — as_eml_tibble","text":"object class tbl_df, tbl data.frame, containing following fields: level (int) gives nestedness level node/heading question label (chr) xml tag text (chr) text stored within tag attributes (list) attributes tag","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_xml.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert metadata to an xml_document — as_eml_xml","title":"Convert metadata to an xml_document — as_eml_xml","text":"Takes character vector, tibble, list converts xml_document, defined xml2 package.","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_xml.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert metadata to an xml_document — as_eml_xml","text":"","code":"as_eml_xml(x, ...) # S3 method for class 'character' as_eml_xml(x, ...) # S3 method for class 'tbl_df' as_eml_xml(x, ...) # S3 method for class 'list' as_eml_xml(x, ...) # S3 method for class 'xml_document' as_eml_xml(x, ...)"},{"path":"https://paperbark.ala.org.au/reference/as_eml_xml.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert metadata to an xml_document — as_eml_xml","text":"x Object converted ... arguments, currently ignored","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_xml.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert metadata to an xml_document — as_eml_xml","text":"xml_document specified nodes attributes.","code":""},{"path":"https://paperbark.ala.org.au/reference/check_eml.html","id":null,"dir":"Reference","previous_headings":"","what":"Check validity of a metadata statement — check_eml","title":"Check validity of a metadata statement — check_eml","text":"Darwin Core standard, metadata statements mandatory must provided Ecological Meta Language (EML) file called eml.xml. function applies series checks designed GBIF check structure specified xml document consistency standard. Note, however, function check content files, meaning file structurally sound still lacking critical information.","code":""},{"path":"https://paperbark.ala.org.au/reference/check_eml.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check validity of a metadata statement — check_eml","text":"","code":"check_eml(x, file)"},{"path":"https://paperbark.ala.org.au/reference/check_eml.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check validity of a metadata statement — check_eml","text":"x Object class handled paperbark; .e. character, tbl_df, list xml_document. file Alternatively EML file check. x file supplied, x chosen.","code":""},{"path":"https://paperbark.ala.org.au/reference/check_eml.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check validity of a metadata statement — check_eml","text":"Invisibly returns tibble showing parsed errors; empty tibble errors identified.","code":""},{"path":"https://paperbark.ala.org.au/reference/check_eml.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check validity of a metadata statement — check_eml","text":"function uses local versions dc.xsd, eml-gbif-profile.xsd eml.xsd downloaded http://rs.gbif.org/schema/eml-gbif-profile/1.3/ 2024-09-25.","code":""},{"path":"https://paperbark.ala.org.au/reference/check_eml.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check validity of a metadata statement — check_eml","text":"","code":"if (FALSE) { # \\dontrun{ # check a file check_eml(file = \"https://collections.ala.org.au/ws/eml/dr368\") } # }"},{"path":"https://paperbark.ala.org.au/reference/metadata_example.html","id":null,"dir":"Reference","previous_headings":"","what":"Example metadata statement — metadata_example","title":"Example metadata statement — metadata_example","text":"minimalist metadata statement, stored tibble, can adapt purposes.","code":""},{"path":"https://paperbark.ala.org.au/reference/metadata_example.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example metadata statement — metadata_example","text":"","code":"metadata_example"},{"path":[]},{"path":"https://paperbark.ala.org.au/reference/metadata_example.html","id":"metadata-example","dir":"Reference","previous_headings":"","what":"metadata_example","title":"Example metadata statement — metadata_example","text":"tibble X rows 4 columns, row xml heading: level nestedness level label xml tag text Text content attributes list-column containing xml attributes","code":""},{"path":"https://paperbark.ala.org.au/reference/metadata_example.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Example metadata statement — metadata_example","text":"ALA","code":""},{"path":"https://paperbark.ala.org.au/reference/paperbark-package.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert metadata between markdown and EML — paperbark-package","title":"Convert metadata between markdown and EML — paperbark-package","text":"Ecological Meta Language common framework describing ecological datasets can shared reused. paperbark supports users write metadata statements markdown greater transparency ease--use, convert EML efficient transfer.","code":""},{"path":"https://paperbark.ala.org.au/reference/paperbark-package.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Convert metadata between markdown and EML — paperbark-package","text":"Basic usage use_metadata() - Create blank metadata statement markdown file read_eml()/write_eml() - Convert EML tibbles read_md()/write_md() - Convert markdown files tibbles check_eml() - Check metadata statement relevant standards Type conversion as_eml_chr() - Convert metadata class character as_eml_tibble() - Convert metadata class tbl_df (.e. tibble) as_eml_list() - Convert metadata class list as_eml_xml() - Convert metadata class xml_document","code":""},{"path":"https://paperbark.ala.org.au/reference/paperbark-package.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert metadata between markdown and EML — paperbark-package","text":"questions, comments suggestions, please email support@ala.org.au.","code":""},{"path":"https://paperbark.ala.org.au/reference/paperbark-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert metadata between markdown and EML — paperbark-package","text":"Maintainer: Martin Westgate martin.westgate@csiro.au Authors: Shandiya Balasubramaniam shandiya.balasubramaniam@csiro.au Dax Kellie dax.kellie@csiro.au","code":""},{"path":"https://paperbark.ala.org.au/reference/read_eml.html","id":null,"dir":"Reference","previous_headings":"","what":"Read or write EML-formatted metadata — read_eml","title":"Read or write EML-formatted metadata — read_eml","text":"read_eml() imports metadata EML file workspace tibble. write_eml() write string, tibble, list xml_document EML file. Note EML files always file extension .xml.","code":""},{"path":"https://paperbark.ala.org.au/reference/read_eml.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read or write EML-formatted metadata — read_eml","text":"","code":"read_eml(file) write_eml(x, file)"},{"path":"https://paperbark.ala.org.au/reference/read_eml.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read or write EML-formatted metadata — read_eml","text":"file Filename read write . case read_eml(), can alternatively url valid EML document. x Object class handled paperbark; .e. character, tbl_df, list xml_document.","code":""},{"path":"https://paperbark.ala.org.au/reference/read_eml.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read or write EML-formatted metadata — read_eml","text":"read_eml() returns object class tbl_df, tbl data.frame (.e. tibble). write_eml() return anything, called side-effect writing specified EML file disk","code":""},{"path":"https://paperbark.ala.org.au/reference/read_eml.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read or write EML-formatted metadata — read_eml","text":"","code":"if (FALSE) { # \\dontrun{ # read from a url df <- read_eml(\"https://collections.ala.org.au/ws/eml/dr368\") # write to disk write_eml(df, \"example.xml\") } # }"},{"path":"https://paperbark.ala.org.au/reference/read_md.html","id":null,"dir":"Reference","previous_headings":"","what":"Read or write markdown-formatted metadata — read_md","title":"Read or write markdown-formatted metadata — read_md","text":"read_md() imports metadata markdown file workspace tibble. write_md() write string, tibble, list xml_document markdown file. paperbark yet import code blocks, file extension .md currently supported (.Rmd .qmd).","code":""},{"path":"https://paperbark.ala.org.au/reference/read_md.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read or write markdown-formatted metadata — read_md","text":"","code":"read_md(file) write_md(x, file)"},{"path":"https://paperbark.ala.org.au/reference/read_md.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read or write markdown-formatted metadata — read_md","text":"file Filename read write . Must .md file extension. x Object class handled paperbark; .e. character, tbl_df, list xml_document.","code":""},{"path":"https://paperbark.ala.org.au/reference/read_md.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read or write markdown-formatted metadata — read_md","text":"read_md() returns object class tbl_df, tbl data.frame (.e. tibble). write_md() return anything, called side-effect writing specified markdown file disk.","code":""},{"path":"https://paperbark.ala.org.au/reference/read_md.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read or write markdown-formatted metadata — read_md","text":"","code":"if (FALSE) { # \\dontrun{ # read from a url file <- system.file(\"example_data\", \"README_md_example.md\", package = \"paperbark\") df <- read_md(file) # write to disk write_md(df, \"example.md\") } # }"},{"path":"https://paperbark.ala.org.au/reference/use_metadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Write an example metadata statement — use_metadata","title":"Write an example metadata statement — use_metadata","text":"function takes metadata_example exports specified file. useful creating boilerplate metadata statement can edit .","code":""},{"path":"https://paperbark.ala.org.au/reference/use_metadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write an example metadata statement — use_metadata","text":"","code":"use_metadata(file, overwrite = FALSE)"},{"path":"https://paperbark.ala.org.au/reference/use_metadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write an example metadata statement — use_metadata","text":"file (string) filename save statement . Defaults \"metadata.md\". overwrite (logical) existing file name overwritten? Defaults FALSE.","code":""},{"path":"https://paperbark.ala.org.au/reference/use_metadata.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Write an example metadata statement — use_metadata","text":"return object workspace; called side-effect saving markdown file specified location.","code":""},{"path":"https://paperbark.ala.org.au/news/index.html","id":"paperbark-010","dir":"Changelog","previous_headings":"","what":"paperbark 0.1.0","title":"paperbark 0.1.0","text":"Welcome {paperbark}! ’re new . hope like .","code":""}]
+[{"path":"https://paperbark.ala.org.au/articles/quick_start_guide.html","id":"methodological-approach","dir":"Articles","previous_headings":"","what":"Methodological approach","title":"Quick start guide","text":"convert markdown EML, paperbark relies assumption header levels markdown reflect nested structure resulting xml. example, markdown file might contain text: parse xml: accomplish conversion, built set parsers convert data sequence: Rather export individual parsers, paperbark provides set transformers as_eml_ prefix, e.g.: Every permutation as_eml_ functions provided paperbark, meaning can simply choose outcome looking , let paperbark handle parsing chain needed return object class require.","code":"# EML ## Dataset ### Title My title My title<\/title> <\/dataset> .md file -> character -> tibble -> list -> xml -> .xml file library(paperbark) c(\"# Heading 1\", \"## Heading 2\", \"text content\") |> as_eml_tibble() ## # A tibble: 3 × 4 ## level label text attributes ## ## 1 1 heading1 NA ## 2 2 heading2 NA ## 3 3 NA text content c(\"# Heading 1\", \"## Heading 2\", \"text content\") |> as_eml_xml() ## {xml_document} ## ## [1] text content<\/heading2>"},{"path":"https://paperbark.ala.org.au/articles/quick_start_guide.html","id":"reading-and-writing","dir":"Articles","previous_headings":"","what":"Reading and writing","title":"Quick start guide","text":"standard ALA R packages, read_ functions paperbark return tibble. two variants, one reading data markdown: second reading data EML: corresponding write functions write_md() write_eml(). functions accept objects classes supported paperbark, possible pipe read write functions together without intermediate stages: worth noting, though, quite simple wrapper functions existing import transformation functions. example, code block can rewritten using one paperbark function, follows:","code":"file <- system.file(\"example_data\", \"README_md_example.md\", package = \"paperbark\") read_md(file) ## # A tibble: 29 × 4 ## level label text attributes ## ## 1 1 eml:eml NA ## 2 2 dataset NA ## 3 3 title NA ## 4 4 NA An awesome dataset ## 5 2 description NA ## 6 3 NA This data is the best. You should … ## 7 3 publicShortDescription NA ## 8 3 publicDescription NA ## 9 3 technicalDescription NA ## 10 3 dataQualityDescription NA ## # ℹ 19 more rows read_eml(\"https://collections.ala.org.au/ws/eml/dr368\") ## # A tibble: 85 × 4 ## level label text attributes ## ## 1 1 Eml NA ## 2 2 Dataset NA ## 3 3 Alternate Identifier NA ## 4 4 NA 0101d74b-afc2-3b0f-817c-dc350d2a6fe4 ## 5 4 NA 10.15468/14jd9g ## 6 4 NA 0645ccdb-e001-4ab0-9729-51f1755e007e ## 7 4 NA https://collections.ala.org.au/publi… ## 8 3 Title NA ## 9 4 NA NSW BioNet Atlas ## 10 3 Creator NA ## # ℹ 75 more rows system.file(\"example_data\", \"README_md_example.md\", package = \"paperbark\") |> read_md() |> write_eml(\"output.xml\") library(xml2) system.file(\"example_data\", \"README_md_example.md\", package = \"paperbark\") |> base::readLines() |> paperbark::as_eml_xml() |> xml2::write_xml(\"output.xml\")"},{"path":"https://paperbark.ala.org.au/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Martin Westgate. Author, maintainer. Shandiya Balasubramaniam. Author. Dax Kellie. Author.","code":""},{"path":"https://paperbark.ala.org.au/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Westgate M, Balasubramaniam S, Kellie D (2024). paperbark: Convert markdown ecological meta language (EML) back. R package version 0.1.0, https://paperbark.ala.org.au.","code":"@Manual{, title = {paperbark: Convert markdown to ecological meta language (EML) and back}, author = {Martin Westgate and Shandiya Balasubramaniam and Dax Kellie}, year = {2024}, note = {R package version 0.1.0}, url = {https://paperbark.ala.org.au}, }"},{"path":[]},{"path":"https://paperbark.ala.org.au/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"Convert markdown to ecological meta language (EML) and back","text":"paperbark package import type conversion metadata statements. purpose enable users store metadata markdown files, convert EML. named peeling growth form displayed number Australian plant species. logo drawn Martin Westgate, shows flower swamp paperbark Melaleuca ericifolia. comments, questions suggestions, please contact us.","code":""},{"path":"https://paperbark.ala.org.au/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Convert markdown to ecological meta language (EML) and back","text":"package active development, yet available CRAN. can install latest development version GitHub : Load package:","code":"install.packages(\"remotes\") remotes::install_github(\"AtlasOfLivingAustralia/paperbark\") library(paperbark)"},{"path":"https://paperbark.ala.org.au/index.html","id":"basic-usage","dir":"","previous_headings":"","what":"Basic usage","title":"Convert markdown to ecological meta language (EML) and back","text":"primary use case paperbark manipulate format metadata statements sharing biodiversity data. first step create markdown file, add headings like conform EML standard. header ‘level’ (.e. number #) used designate degree nesting. don’t want start scratch, can use example dataset metadata_example: straightforward export working directory using write_md(): done, import R using read_md(). stored tibble: can export xml file without intermediate steps: detailed description paperbark’s capabilities methods, see ‘Quick start guide’ vignette.","code":"library(dplyr) metadata_example |> slice_head(n = 5) #> # A tibble: 5 × 4 #> level label text attributes #> #> 1 1 eml:eml #> 2 2 Dataset #> 3 3 Title A Sentence Giving Your Dataset Title In Title Case #> 4 3 Abstract A paragraph outlining the content of the dataset #> 5 3 Creator write_md(metadata_example, \"metadata.md\") x <- read_md(\"metadata.md\") x #> # A tibble: 29 × 4 #> level label text attributes #> #> 1 1 eml:eml #> 2 2 dataset #> 3 3 title #> 4 4 An awesome dataset #> 5 2 description #> 6 3 This data is the best. You should … #> 7 3 publicShortDescription #> 8 3 publicDescription #> 9 3 technicalDescription #> 10 3 dataQualityDescription #> # ℹ 19 more rows write_eml(x, \"metadata.xml\")"},{"path":"https://paperbark.ala.org.au/index.html","id":"citing-paperbark","dir":"","previous_headings":"","what":"Citing paperbark","title":"Convert markdown to ecological meta language (EML) and back","text":"generate citation package version using, can run: current recommended citation : Westgate MJ, Balasubramaniam S & Kellie D (2024) paperbark: Convert markdown files EML. R Package version 0.1.0.","code":"citation(package = \"paperbark\")"},{"path":"https://paperbark.ala.org.au/reference/as_eml_chr.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert metadata to a character vector — as_eml_chr","title":"Convert metadata to a character vector — as_eml_chr","text":"functions take objects class tbl_df (.e. tibbles), list xml_document (xml2 package), convert vector strings human- machine- readable markdown.","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_chr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert metadata to a character vector — as_eml_chr","text":"","code":"as_eml_chr(x, ...) # S3 method for class 'character' as_eml_chr(x, ...) # S3 method for class 'tbl_df' as_eml_chr(x, ...) # S3 method for class 'list' as_eml_chr(x, ...) # S3 method for class 'xml_document' as_eml_chr(x, ...)"},{"path":"https://paperbark.ala.org.au/reference/as_eml_chr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert metadata to a character vector — as_eml_chr","text":"x Object converted ... arguments, currently ignored","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_chr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert metadata to a character vector — as_eml_chr","text":"character vector formatted markdown.","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert metadata to a list — as_eml_list","title":"Convert metadata to a list — as_eml_list","text":"Takes object class character, xml_document tibble, converts list.","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert metadata to a list — as_eml_list","text":"","code":"as_eml_list(x, ...) # S3 method for class 'character' as_eml_list(x, ...) # S3 method for class 'tbl_df' as_eml_list(x, ...) # S3 method for class 'list' as_eml_list(x, ...) # S3 method for class 'xml_document' as_eml_list(x, ...)"},{"path":"https://paperbark.ala.org.au/reference/as_eml_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert metadata to a list — as_eml_list","text":"x Object converted ... arguments, currently ignored","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert metadata to a list — as_eml_list","text":"list, nested structure XML/md attributes XML nodes, preserved.","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_tibble.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert metadata to a tibble — as_eml_tibble","title":"Convert metadata to a tibble — as_eml_tibble","text":"Takes objects class character, list xml_document converts tibble particular structure, designed storing nested data. Tibbles required attributes stored list-columns, supported class data.frame.","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_tibble.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert metadata to a tibble — as_eml_tibble","text":"","code":"as_eml_tibble(x, ...) # S3 method for class 'character' as_eml_tibble(x, ...) # S3 method for class 'tbl_df' as_eml_tibble(x, ...) # S3 method for class 'list' as_eml_tibble(x, ...) # S3 method for class 'xml_document' as_eml_tibble(x, ...)"},{"path":"https://paperbark.ala.org.au/reference/as_eml_tibble.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert metadata to a tibble — as_eml_tibble","text":"x Object converted ... arguments, currently ignored","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_tibble.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert metadata to a tibble — as_eml_tibble","text":"object class tbl_df, tbl data.frame, containing following fields: level (int) gives nestedness level node/heading question label (chr) xml tag text (chr) text stored within tag attributes (list) attributes tag","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_xml.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert metadata to an xml_document — as_eml_xml","title":"Convert metadata to an xml_document — as_eml_xml","text":"Takes character vector, tibble, list converts xml_document, defined xml2 package.","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_xml.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert metadata to an xml_document — as_eml_xml","text":"","code":"as_eml_xml(x, ...) # S3 method for class 'character' as_eml_xml(x, ...) # S3 method for class 'tbl_df' as_eml_xml(x, ...) # S3 method for class 'list' as_eml_xml(x, ...) # S3 method for class 'xml_document' as_eml_xml(x, ...)"},{"path":"https://paperbark.ala.org.au/reference/as_eml_xml.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert metadata to an xml_document — as_eml_xml","text":"x Object converted ... arguments, currently ignored","code":""},{"path":"https://paperbark.ala.org.au/reference/as_eml_xml.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert metadata to an xml_document — as_eml_xml","text":"xml_document specified nodes attributes.","code":""},{"path":"https://paperbark.ala.org.au/reference/check_eml.html","id":null,"dir":"Reference","previous_headings":"","what":"Check validity of a metadata statement — check_eml","title":"Check validity of a metadata statement — check_eml","text":"Darwin Core standard, metadata statements mandatory must provided Ecological Meta Language (EML) file called eml.xml. function applies series checks designed GBIF check structure specified xml document consistency standard. Note, however, function check content files, meaning file structurally sound still lacking critical information.","code":""},{"path":"https://paperbark.ala.org.au/reference/check_eml.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check validity of a metadata statement — check_eml","text":"","code":"check_eml(x, file)"},{"path":"https://paperbark.ala.org.au/reference/check_eml.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check validity of a metadata statement — check_eml","text":"x Object class handled paperbark; .e. character, tbl_df, list xml_document. file Alternatively EML file check. x file supplied, x chosen.","code":""},{"path":"https://paperbark.ala.org.au/reference/check_eml.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check validity of a metadata statement — check_eml","text":"Invisibly returns tibble showing parsed errors; empty tibble errors identified.","code":""},{"path":"https://paperbark.ala.org.au/reference/check_eml.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check validity of a metadata statement — check_eml","text":"function uses local versions dc.xsd, eml-gbif-profile.xsd eml.xsd downloaded http://rs.gbif.org/schema/eml-gbif-profile/1.3/ 2024-09-25.","code":""},{"path":"https://paperbark.ala.org.au/reference/check_eml.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check validity of a metadata statement — check_eml","text":"","code":"if (FALSE) { # \\dontrun{ # check a file check_eml(file = \"https://collections.ala.org.au/ws/eml/dr368\") } # }"},{"path":"https://paperbark.ala.org.au/reference/metadata_example.html","id":null,"dir":"Reference","previous_headings":"","what":"Example metadata statement — metadata_example","title":"Example metadata statement — metadata_example","text":"minimalist metadata statement, stored tibble, can adapt purposes.","code":""},{"path":"https://paperbark.ala.org.au/reference/metadata_example.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example metadata statement — metadata_example","text":"","code":"metadata_example"},{"path":[]},{"path":"https://paperbark.ala.org.au/reference/metadata_example.html","id":"metadata-example","dir":"Reference","previous_headings":"","what":"metadata_example","title":"Example metadata statement — metadata_example","text":"tibble X rows 4 columns, row xml heading: level nestedness level label xml tag text Text content attributes list-column containing xml attributes","code":""},{"path":"https://paperbark.ala.org.au/reference/metadata_example.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Example metadata statement — metadata_example","text":"ALA","code":""},{"path":"https://paperbark.ala.org.au/reference/paperbark-package.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert metadata between markdown and EML — paperbark-package","title":"Convert metadata between markdown and EML — paperbark-package","text":"Ecological Meta Language common framework describing ecological datasets can shared reused. paperbark supports users write metadata statements markdown greater transparency ease--use, convert EML efficient transfer.","code":""},{"path":"https://paperbark.ala.org.au/reference/paperbark-package.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Convert metadata between markdown and EML — paperbark-package","text":"Basic usage read_eml()/write_eml() - Convert EML tibbles read_md()/write_md() - Convert markdown files tibbles check_eml() - Check metadata statement relevant standards Type conversion as_eml_chr() - Convert metadata class character as_eml_tibble() - Convert metadata class tbl_df (.e. tibble) as_eml_list() - Convert metadata class list as_eml_xml() - Convert metadata class xml_document","code":""},{"path":"https://paperbark.ala.org.au/reference/paperbark-package.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Convert metadata between markdown and EML — paperbark-package","text":"questions, comments suggestions, please email support@ala.org.au.","code":""},{"path":[]},{"path":"https://paperbark.ala.org.au/reference/paperbark-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert metadata between markdown and EML — paperbark-package","text":"Maintainer: Martin Westgate martin.westgate@csiro.au Authors: Shandiya Balasubramaniam shandiya.balasubramaniam@csiro.au Dax Kellie dax.kellie@csiro.au","code":""},{"path":"https://paperbark.ala.org.au/reference/read_eml.html","id":null,"dir":"Reference","previous_headings":"","what":"Read or write EML-formatted metadata — read_eml","title":"Read or write EML-formatted metadata — read_eml","text":"read_eml() imports metadata EML file workspace tibble. write_eml() write string, tibble, list xml_document EML file. Note EML files always file extension .xml.","code":""},{"path":"https://paperbark.ala.org.au/reference/read_eml.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read or write EML-formatted metadata — read_eml","text":"","code":"read_eml(file) write_eml(x, file)"},{"path":"https://paperbark.ala.org.au/reference/read_eml.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read or write EML-formatted metadata — read_eml","text":"file Filename read write . case read_eml(), can alternatively url valid EML document. x Object class handled paperbark; .e. character, tbl_df, list xml_document.","code":""},{"path":"https://paperbark.ala.org.au/reference/read_eml.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read or write EML-formatted metadata — read_eml","text":"read_eml() returns object class tbl_df, tbl data.frame (.e. tibble). write_eml() return anything, called side-effect writing specified EML file disk","code":""},{"path":"https://paperbark.ala.org.au/reference/read_eml.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read or write EML-formatted metadata — read_eml","text":"","code":"if (FALSE) { # \\dontrun{ # read from a url df <- read_eml(\"https://collections.ala.org.au/ws/eml/dr368\") # write to disk write_eml(df, \"example.xml\") } # }"},{"path":"https://paperbark.ala.org.au/reference/read_md.html","id":null,"dir":"Reference","previous_headings":"","what":"Read or write markdown-formatted metadata — read_md","title":"Read or write markdown-formatted metadata — read_md","text":"read_md() imports metadata markdown file workspace tibble. write_md() write string, tibble, list xml_document markdown file. paperbark yet import code blocks, file extension .md currently supported (.Rmd .qmd).","code":""},{"path":"https://paperbark.ala.org.au/reference/read_md.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read or write markdown-formatted metadata — read_md","text":"","code":"read_md(file) write_md(x, file)"},{"path":"https://paperbark.ala.org.au/reference/read_md.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read or write markdown-formatted metadata — read_md","text":"file Filename read write . Must .md file extension. x Object class handled paperbark; .e. character, tbl_df, list xml_document.","code":""},{"path":"https://paperbark.ala.org.au/reference/read_md.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read or write markdown-formatted metadata — read_md","text":"read_md() returns object class tbl_df, tbl data.frame (.e. tibble). write_md() return anything, called side-effect writing specified markdown file disk.","code":""},{"path":"https://paperbark.ala.org.au/reference/read_md.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read or write markdown-formatted metadata — read_md","text":"","code":"if (FALSE) { # \\dontrun{ # read from a url file <- system.file(\"example_data\", \"README_md_example.md\", package = \"paperbark\") df <- read_md(file) # write to disk write_md(df, \"example.md\") } # }"},{"path":"https://paperbark.ala.org.au/news/index.html","id":"paperbark-010","dir":"Changelog","previous_headings":"","what":"paperbark 0.1.0","title":"paperbark 0.1.0","text":"Welcome {paperbark}! ’re new . hope like .","code":""}]
diff --git a/sitemap.xml b/sitemap.xml
index 250f653..442903c 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -15,6 +15,5 @@
https://paperbark.ala.org.au/reference/paperbark-package.html
https://paperbark.ala.org.au/reference/read_eml.html
https://paperbark.ala.org.au/reference/read_md.html
-https://paperbark.ala.org.au/reference/use_metadata.html