Skip to content

Commit

Permalink
Prepare citationb
Browse files Browse the repository at this point in the history
  • Loading branch information
larnsce committed Sep 19, 2023
1 parent 1dfe6b2 commit 95ef3f0
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 31 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ R/publish_openwashdata.R
.Rdata
.httr-oauth
.DS_Store

*.bk*
51 changes: 25 additions & 26 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,43 @@ cff-version: 1.2.0
message: 'To cite package "cbssuitabilityhaiti" in publications use:'
type: software
license: CC-BY-4.0
title: 'cbssuitabilityhaiti: The Package contains data from the Soil projects in Haiti'
version: 0.0.0.9000
title: 'cbssuitabilityhaiti: This package contains data for a sanitation zoning assessment
done for the city of Cap Haitien, Haiti. It combines two datasets used for an analysis
of the suitability of container-based sanitation (CBS).'
version: 0.0.1
abstract: What the package does (one paragraph).
authors:
- family-names: Loos
given-names: Sebastian Camilo
email: [email protected]
orcid: https://orcid.org/0000-0003-2196-5015
- family-names: Lubeck-Schricker
given-names: Maya
email: [email protected]
- family-names: Kramer
given-names: Sasha
email: [email protected]
preferred-citation:
type: generic
title: 'cbssuitabilityhaiti: The Package contains data from the Soil projects in
Haiti'
authors:
- family-names: Loos
given-names: Sebastian Camilo
email: [email protected]
orcid: https://orcid.org/0000-0003-2196-5015
- family-names: Lubeck-Schricker
given-names: Maya
email: [email protected]
- family-names: Kramer
given-names: Sasha
email: [email protected]
year: '2023'
abstract: What the package does (one paragraph).
version: 0.0.0.9000
date-released: '2023-09-19'
contact:
- family-names: Loos
given-names: Sebastian Camilo
email: [email protected]
references:
- type: software
title: 'R: A Language and Environment for Statistical Computing'
notes: Depends
url: https://www.R-project.org/
authors:
- name: R Core Team
location:
name: Vienna, Austria
year: '2023'
institution:
name: R Foundation for Statistical Computing
version: '>= 2.10'
- type: software
title: tmap
abstract: 'tmap: Thematic Maps'
notes: Suggests
url: https://github.com/r-tmap/tmap
repository: https://CRAN.R-project.org/package=tmap
authors:
- family-names: Tennekes
given-names: Martijn
email: [email protected]
year: '2023'
orcid: https://orcid.org/0000-0003-2196-5015
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Package: cbssuitabilityhaiti
Title: The Package contains data from the Soil projects in Haiti
Title: This package contains data for a sanitation zoning assessment done for
the city of Cap Haitien, Haiti. It combines two datasets used for an analysis
of the suitability of container-based sanitation (CBS).
Version: 0.0.1
Authors@R: c(
person("Sebastian Camilo", "Loos", , "[email protected]", role = c("aut","cre"),
Expand Down
8 changes: 4 additions & 4 deletions R/mwater.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#' Location of different sanitation systems in Haiti
#' Location of different water points in Cap Haitien, Haiti
#'
#' This data includes data from a ........ done for the city
#' of Cap Haitien, Haiti in 2022. The data collection and characterization was
#' done between 2016 and 2022.
#' This data includes water point data from the mWater platform. Water points
#' are for the city Cap Haitien, Haiti in 2022. The data collection and
#' characterization was done between 2016 and 2022.
#'
#' @format A tibble with 1849 rows and 7 variables:
#' \describe{
Expand Down
29 changes: 29 additions & 0 deletions data-raw/data_processing.R
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,32 @@ dictionary <- get_variable_info(data = list(okap, mwater),

# dictionary |>
# openxlsx::write.xlsx("data-raw/dictionary.xlsx")

# install.packages("cffr")
library(cffr)

packageVersion("cffr")

# Hard code doi
# doi <- "10.5281/zenodo.6470427"

# creates CFF with all author roles
mod_cff <- cff_create("DESCRIPTION",
dependencies = FALSE,
keys = list(#"doi" = doi,
"date-released" = Sys.Date()))

# writes the CFF file
cff_write(mod_cff)

# Now write a CITATION file from the CITATION.cff file
# Use inst/CITATION instead (the default if not provided)
path_cit <- file.path("inst/CITATION")

write_citation("CITATION.cff", file = path_cit)

# By last, read the citation
cat(readLines(path_cit), sep = "\n")

# Start of inst/CITATION
utils::readCitationFile("inst/CITATION")
13 changes: 13 additions & 0 deletions inst/CITATION
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

bibentry(bibtype = "Misc",
key = "looslubeckschricker:2023",
title = "cbssuitabilityhaiti: The Package contains data from the Soil projects in Haiti",
author = c(person(given = "Sebastian Camilo",
family = "Loos"),
person(given = "Maya",
family = "Lubeck-Schricker"),
person(given = "Sasha",
family = "Kramer")),
year = "2023",
abstract = "What the package does (one paragraph).",
version = "0.0.0.9000")

0 comments on commit 95ef3f0

Please sign in to comment.