SDGdetector

SDGdetector: an R-based text mining tool for quantifying efforts toward Sustainable Development Goals - Published in JOSS (2023)

https://github.com/yingjie4science/sdgdetector

Science Score: 93.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

cran r r-package sdg sdgs sustainability sustainable-development-goals text-mining
Last synced: 6 months ago · JSON representation

Repository

A novel R package that can identify and visualize 17 Sustainable Development Goals and associated 169 Targets in text

Basic Info
  • Host: GitHub
  • Owner: Yingjie4Science
  • License: gpl-3.0
  • Language: R
  • Default Branch: main
  • Homepage:
  • Size: 8.17 MB
Statistics
  • Stars: 17
  • Watchers: 2
  • Forks: 1
  • Open Issues: 0
  • Releases: 4
Topics
cran r r-package sdg sdgs sustainability sustainable-development-goals text-mining
Created about 4 years ago · Last pushed 9 months ago
Metadata Files
Readme Changelog License

README.md

DOI CRAN\_Status\_Badge License: GPL v3 CRAN downloadcount CRAN downloadcount Visitor Badge

SDG Detector

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.

For Python package, check seesus.

Installation

There are two ways to install the SDGdetector R package.

1. CRAN

SDGdetector is now available on CRAN, so you can install it with:

r install.packages("SDGdetector")

2. GitHub

You can alternatively install the development version of SDGdetector from GitHub as follows:

``` r if (!require("remotes")) { install.packages("remotes") }

remotes::install_github("Yingjie4Science/SDGdetector") ```

Example Usage

To detect SDGs from text ``` r library(SDGdetector)

string as input data

text <- 'our goal is to mitigate climate change, end poverty, and reduce inequality globally' SDGdetector(x = text)

dataframe as input data

df <- data.frame(col = c( 'our goal is to end poverty globally', 'this product contributes to slowing down climate change')) SDGdetector(x = df, col = col) ```

To detect regions/countries in text r x = 'China and USA devoted the largest efforts on solar energy' detect_region(x)

To use specific SDG colors r sdg_color(1) sdg_color(x = 1:17)

To use specific SDG icons r sdg_icon(x = 7, res = 300)

To visualize SDG on a bar plot ``` r data("sdgstat") df <- sdgstat

plot SDG on a bar plot

plotsdgbar(data = df, sdg = SDG, value = Value) ```

To visualize SDG on a map ```r

plot SDG by country on a map

plotsdgmap(data = df, sdg = SDG, value = Value, country = Country, bysdg = F) ```

<img src="./docs/images/exampleplots/plotsdgmap_example.png" height="300"/>

Accuracy Evaluation

This package has achieved high accuracy in detecting SDG-related statements within textual data (> 75%, measured by the alignment between the R package results and four experts' manually-coded results; see this supplementary document for more information. The data and code for reproducing the performance metrics can be found in this repo under ./docs/accuracy_evaluation/.

The overall accuracy (left) and the accuracy for each round of inspection (right). The red squared dot in the left plot indicates the mean value and the hollow round dots represent the accuracy values reported by each expert.

License

The SDGdetector R package is distributed under the GNU General Public License v3.0.

How to Cite

Get citation information for SDGdetector in R doing citation(package = 'SDGdetector')

To cite SDGdetector in publications, please use:

Li, Y., Frans, V.F., Song, Y., Cai, M., Zhang, Y., Liu, J. (2023). SDGdetector: an R-based text mining tool for quantifying efforts toward Sustainable Development Goals. Journal of Open Source Software 8(84), 5124. https://doi.org/10.21105/joss.05124.

A BibTeX entry for LaTeX users is

@Article{, title = {SDGdetector: an R-based text mining tool for quantifying efforts toward Sustainable Development Goals}, author = {Yingjie Li and Veronica F. Frans and Yongze Song and Meng Cai and Yuqian Zhang and Jianguo Liu}, journal = {Journal of Open Source Software}, year = {2023}, volume = {8}, number = {84}, pages = {5124}, doi = {10.21105/joss.05124}, url = {https://github.com/Yingjie4Science/SDGdetector} }

Reporting Bugs

SDGdetector is distributed as is and without warranty of suitability for application. If you encounter flaws with the software (i.e. bugs) please report the issue. Providing a detailed description of the conditions under which the bug occurred will help to identify the bug. Use the Issues tracker on GitHub to report issues with the software and to request feature enhancements.

Owner

  • Name: Yingjie Li
  • Login: Yingjie4Science
  • Kind: user
  • Location: Stanford, CA, USA
  • Company: Stanford University

JOSS Publication

SDGdetector: an R-based text mining tool for quantifying efforts toward Sustainable Development Goals
Published
April 12, 2023
Volume 8, Issue 84, Page 5124
Authors
Yingjie Li ORCID
Center for Systems Integration and Sustainability, Department of Fisheries and Wildlife, Michigan State University, East Lansing, MI 48823, United States, Environmental Science and Policy Program, Michigan State University, East Lansing, MI 48823, United States, Natural Capital Project, Woods Institute for the Environment, Stanford University, Stanford, CA, 94305, United States
Veronica F. Frans ORCID
Center for Systems Integration and Sustainability, Department of Fisheries and Wildlife, Michigan State University, East Lansing, MI 48823, United States, Ecology, Evolution, and Behavior Program, Michigan State University, East Lansing, MI 48824, United States, W.K. Kellogg Biological Station, Michigan State University, Hickory Corners, MI 49060, United States
Yongze Song ORCID
School of Design and the Built Environment, Curtin University, Perth, WA, 6102, Australia
Meng Cai ORCID
School of Planning, Design and Construction, Michigan State University, East Lansing, MI, 48824, United States, Department of Civil and Environmental Engineering, Technical University of Darmstadt, Darmstadt 64287, Germany
Yuqian Zhang ORCID
Center for Systems Integration and Sustainability, Department of Fisheries and Wildlife, Michigan State University, East Lansing, MI 48823, United States, Environmental Science and Policy Program, Michigan State University, East Lansing, MI 48823, United States
Jianguo Liu ORCID
Center for Systems Integration and Sustainability, Department of Fisheries and Wildlife, Michigan State University, East Lansing, MI 48823, United States, Environmental Science and Policy Program, Michigan State University, East Lansing, MI 48823, United States
Editor
Frederick Boehm ORCID
Tags
Sustainability Sustainable Development Goals (SDGs) Text mining Text analysis

GitHub Events

Total
  • Watch event: 4
  • Push event: 1
Last Year
  • Watch event: 4
  • Push event: 1

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 320
  • Total Committers: 3
  • Avg Commits per committer: 106.667
  • Development Distribution Score (DDS): 0.091
Past Year
  • Commits: 4
  • Committers: 1
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
YingjieLiScience y****u@g****m 291
Cai, Meng m****1@g****m 26
Veronica F. Frans 4****s 3

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 5
  • Total pull requests: 1
  • Average time to close issues: about 2 months
  • Average time to close pull requests: about 1 hour
  • Total issue authors: 5
  • Total pull request authors: 1
  • Average comments per issue: 6.4
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Yingjie4Science (1)
  • csaybar (1)
  • caimeng2 (1)
  • caleblucas (1)
  • v-gestern (1)
Pull Request Authors
  • caimeng2 (2)
Top Labels
Issue Labels
documentation (1)
Pull Request Labels

Packages

  • Total packages: 3
  • Total downloads:
    • cran 217 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 12
  • Total maintainers: 1
proxy.golang.org: github.com/yingjie4science/sdgdetector
  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
proxy.golang.org: github.com/Yingjie4Science/SDGdetector
  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
cran.r-project.org: SDGdetector

Detect SDGs and Targets in Text

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 217 Last month
Rankings
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Average: 38.8%
Downloads: 51.2%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.5.0 depends
  • dplyr * imports
  • magrittr * imports
  • stringr * imports
  • testthat * suggests
.github/workflows/draft-pdf.yml actions
  • actions/checkout v2 composite
  • actions/upload-artifact v1 composite
  • openjournals/openjournals-draft-action master composite
  • stefanzweifel/git-auto-commit-action v4 composite