Basic code to create FAIR convergence matrix from nanodash nanopublications
- Basic knowledge on how to run r/python code
- Filtering data using pandas (python) or tidyverse (r)
Change the input and output paths to your liking. The source for the new_matrix.csv in this repository is: https://github.com/peta-pico/dsw-nanopub-api/blob/main/tables/new_matrix.csv
The Python code is available in the python
folder.
There are two ways to run the code.
- Run
main.py
- Run
create_FAIR_convergence_matrix.ipynb
In both cases you will have to change the selection of the data manually, to fit your needs. You can do this in many ways using python and pandas. Some of the methods are described here: https://pandas.pydata.org/docs/user_guide/indexing.html
The lines to change are indicated in both files respectively.
The current implementation selects all communities with an A
in their name.
The R code is available in the r
folder.
You can run the code in the Quarto document fcm.qmd
You will have to change the selection of the data manually, to fit your needs. Currently this is done using the tidyverse, selecting data from all FICs that have "ENVRI" as supercommunity. More information on filtering using the information in the excellent "R for Data Science" book: https://r4ds.had.co.nz/transform.html?q=filter#filter-rows-with-filter.
Please use this GitHub repository's Issue tracker to report any issues or ask for requests.