Mapping selected data items from SCOPUS API output to RDF
In order to install and execute the pipeline, git and docker must be installed on the computer.
Clone this repository
git clone https://github.com/fossr-project/scopus-to-rdf.git scopus-to-rdfCopy the source JSON Lines files inside a data/source folder inside scopus-to-rdf. They need to be split in subfolders by mapping type (currently paper, paper-references, author, and affiliation are supported).
Below a sample structure is shown.
│ ...
├── data
│ └── source
│ ├── affiliation
│ │ └── affiliation.jsonl
│ ├── author
│ │ └── author.jsonl
│ ├── paper
│ │ ├── paper_2023.jsonl
│ │ └── paper_2024.jsonl
│ └── paper-references
│ └── author.jsonl
│ ...
Build the docker image and run the container with docker compose.
cd scopus-to-rdf
docker compose up -dThe mapping is run in parallel with a default of 32 (potentially) parallel jobs.
This number can be changed using the NUM_JOBS environment variable in map-all-parallel.sh.
The resulting RDF triples are saved in the data/rdf folder as N-Triples files, both all together in the all.nt.gz file and separated by each input file.
The triples are also available split by the jobs that computed them in the files all_1.nt, all_2.nt, ...
These files can be useful if the complete file is too big to upload to the triple store.
Below the new structure correponding to the example above is shown.
│ ...
├── data
│ ├── source
│ │ ├── affiliation
│ │ │ └── affiliation.jsonl
│ │ ├── author
│ │ │ └── author.jsonl
│ │ ├── paper
│ │ │ ├── paper_2023.jsonl
│ │ │ └── paper_2024.jsonl
│ │ └── paper-references
│ │ └── author.jsonl
│ └── rdf
│ ├── affiliation
│ │ └── affiliation.nt
│ ├── author
│ │ └── author.nt
│ ├── paper
│ │ ├── paper_2023.nt
│ │ └── paper_2024.nt
│ ├── paper-references
│ │ └── author.nt
│ ├── all.nt.gz
│ ├── all_1.nt
│ ├── all_2.nt
│ ├── ...
│ ...