| text2sdg | R Documentation |
The text2sdg package provides functions for detecting SDGs in text, as well as for analyzing and visualization the hits found in text. The following provides a brief overview of the contents of the package.
detect_sdg detects SDGs in text using up to five different
query systems: Aurora, Elsevier, SIRIS, SDSN, and OSDG
detect_any detects SDGs in text using self-specified queries
utilizing the lucene-style syntax of the
corpustools
package.
plot_sdg visualizes the relative frequency of SDG hits across
query systems.
crosstab_sdg calculates cross tables of correlations between
either the query systems or the different SDGs.
projects contain random selection of research project
descriptions from the P3 database of the Swiss National Science Foundation.
aurora_queries, elsevier_queries,
siris_queries, sdsn_queries, auckland_queries and
sdgo_queries contain a mapping of SDGs and search queries
as they are employed in the respective systems.
# detect SDGs using default systems
hits <- detect_sdg_systems(projects)
#' # detect SDGs using all five systems
hits <- detect_sdg_systems(projects,
system = c("Aurora", "Elsevier", "SIRIS", "SDSN", "SDGO")
)
# visualize SDG frequencies
plot_sdg(hits)
# correlations between systems
crosstab_sdg(hits)
# correlations between SDGs
crosstab_sdg(hits, compare = "sdgs")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.