-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
87 lines (59 loc) · 2.61 KB
/
Copy pathREADME.Rmd
File metadata and controls
87 lines (59 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures",
out.width = "100%"
)
```
# aquadata.data.mapping
<!-- badges: start -->
[](https://zenodo.org/badge/latestdoi/584795495)
<!-- badges: end -->
{width="200"}
The goal of **aquadata.data.mapping** is to collect metadata within the context aquatic food systems in order to identify data gaps and generate new data in key geographic region: Bangladesh, Cambodia, Ghana, India, Myanmar, Nigeria, Solomon Islands, Timor-Leste and Zambia.
{width="800"}
**aquadata.data.mapping** uses metadata information to download data and use a Shiny interface to elaborate data summaries, evidence-based stories and scientific reports' summaries using AI tools, as OpenAI engines GPT-4 and GPT-3.5. It also provides an interface to upload text files to be processed by AI tools
{width="800"}
This repository is part of work package 1 "***AquaData***" of the initiative "***Resilient Aquatic Food Systems for Healthy People and Planet***" (<https://cgspace.cgiar.org/handle/10568/121141> ).
Further info:
<https://www.cgiar.org/initiative/15-resilient-aquatic-foods-for-healthy-people-and-planet/>
## To get started
Install and load the R package from the most recent version using the following commands on the R console:
```{r}
# install.packages("devtools")
# devtools::install_github("WorldFishCenter/aquadata.data.mapping")
library(aquadata.data.mapping)
```
## Explore the data
Once installed, you can access and explore the data directly from the package. `dataverse_metadata` include metadata information on the data of several CGIAR organizations.
```{r}
# Summary of dataverse_metadata
dplyr::glimpse(dataverse_metadata)
# CGIAR organizations
unique(dataverse_metadata$organization)
```
You can filter the data using the `filterby_word` function and show the first 10 rows:
```{r}
filtered_metadata <- filterby_word(word = "Bangladesh")
head(filtered_metadata)
```
## Download Data
Use `get_dataset` and `get_dataset_file` to download data.
## Generate stories using AI
Use AI tools (ChatGPT) to generate stories from downloaded data.
```{r}
# output <-
# chatgpt_wrapper(
# document_path = "inst/docs_dataverse/5636634.txt",
# openaikey = OPENAI_TOKEN,
# engine = "gpt-3.5-turbo",
# temperature = 0.7,
# refine_text = REFINE_TEXT
# )
# cat(output$output_text)
```