detect_sdg_systems | R Documentation |
detect_sdg_systems
identifies SDGs in text using multiple SDG query systems.
detect_sdg_systems(
text,
systems = c("Aurora", "Elsevier", "Auckland", "SIRIS"),
sdgs = 1:17,
output = c("features", "documents"),
verbose = TRUE
)
text |
|
systems |
|
sdgs |
|
output |
|
verbose |
|
detect_sdg_systems
implements six SDG query systems. Four systems developed by the Aurora Universities Network (see aurora_queries
), Elsevier (see elsevier_queries
), Auckland University (see elsevier_queries
), and SIRIS Academic (see siris_queries
) rely on Lucene-style Boolean queries, whereas two systems, namely SDGO (see sdgo_queries
) and SDSN (see sdsn_queries
) rely on basic keyword matching. 'detect_sdg_systems' calls dedicated detect_*
for each of the five system. Search of the queries is implemented using the search_features
function from the corpustools
package.
By default, detect_sdg_systems
runs only the Aurora, Elsevier, Auckland, and Siris query systems, as they are considerably less liberal than the SDSN and SDGO systems and therefore likely produce more valid SDG classifications. Users should be aware that systematic validations and comparison between the systems are largely lacking and that results should be interpreted with caution.
The function returns a tibble
containing the SDG hits found in the vector of documents. The columns of the tibble
depend on the value of output
. Possible columns are:
Index of the element in text
where match was found. Formatted as a factor with the number of levels matching the original number of documents.
Label of the SDG found in document.
The name of the query system that produced the match.
Index of the query within the query system that produced the match.
Concatenated list of words that caused the query to match.
Index of hit for a given system.
Number of queries that produced a hit for a given system, sdg, and document.
# run sdg detection
hits <- detect_sdg_systems(projects)
# run sdg detection with Aurora only
hits <- detect_sdg_systems(projects, systems = "Aurora")
# run sdg detection for sdg 3 only
hits <- detect_sdg_systems(projects, sdgs = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.