SDGdetector {SDGdetector} | R Documentation |
Identify SDGs in text
Description
Identify 17 Sustainable Development Goals and associated 169 targets in text.
Usage
SDGdetector(x, col, quiet = FALSE)
Arguments
x |
Data frame or a string |
col |
Column name for text to be assessed |
quiet |
Logical. Suppress info message |
Details
In 2015, leaders worldwide adopted 17 Sustainable Development Goals (SDGs) with 169
targets to be achieved by 2030 (https://sdgs.un.org). The framework of SDGs serves
as a blueprint for shared prosperity for both people and the earth. SDGdetector
identifies both direct and indirect expressions of SDGs and associated targets in
chunks of text. It takes a data frame with a specified column of text to process as
inputs and outputs a data frame with original columns plus matched SDGs and targets.
Value
Data frame with the same columns as the df
plus one extra column named "sdgs", which
list the occurrence (or hits) of SDG goals or targets detected from each sentence in rows.
Users can further use our function summarize_sdg()
to clean the result for visulization.
Examples
my_col <- c("our goal is to end poverty globally", "this product
contributes to slowing down climate change")
my_text <- data.frame(my_col)
SDGdetector(my_text, my_col)