Skip to content

kaust-library/lens_api_dataset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

APIs and Datasets for Scholarly Publications

Using Lens.org APIs and datasets.

Accessing Data and API

sequenceDiagram
    Actor User
    User ->>+Lens.org: Request access via form
    loop Form
        Lens.org->>Lens.org: Process form
    end
    Lens.org->>+User: email with access details
  1. Sign in using your KAUST email.
  2. Select the type of API or bulk data you are interested in and click Request Access to access the online application form.
  3. Apply by completing the online application. Make sure to provide accurate information about your use case, affiliation and organization.
  4. Upon submission you will receive a confirmation email that your application is now being processed.
  5. Your application is received by the Lens team and will be evaluated based on the use-case, commercial or non-commercial use, affiliation or organization size/type. We may contact you for additional information to help in the evaluation.
  6. If your application is approved, you will receive another confirmation email that will include instructions on how to access your API token to obtain the data.

Access Token

The first step to use the Lens.org API is to request token. See the below.

Lens.org access token

Once you have your token, you can start using the API.

API Documentation

On the Lens.org support, there are two very important documents: Requests, and Reponse.

We will explore simple requests, and how to process the response.

Using the Notebook

The notebook can be used on Visual Studio Code or JupiterLab.

Prerequisites

  1. Clone the GitHub repository: https://github.com/kaust-library/using_lens_org
  2. Create your virtual environment: python -m venv venv.
  3. Activate your environment: . .\venv\Scripts\activate. (Windows platform) or . venv/bin/activate (Linux)
  4. Install the required packages: pip install -r requirements.txt.

VS Code

VScode has support for Jupyter notebook out-of-box. Just open the repository.

File -> open folder -> Folder where you cloned the repository

Starting JupyterLab

After following the prerequisites above, you should be able to start jupyter-lab:

(venv) PS C:\Users\garcm0b\Work\lens_org> jupyter-lab

Jupyter-lab will try to open a new tab/window of the browser, and for me, always failes. The solution is to click on the link below:

(venv) PS C:\Users\garcm0b\Work\lens_org> jupyter-lab
(...)
    To access the server, open this file in a browser:
        file:///C:/Users/garcm0b/AppData/Roaming/jupyter/runtime/jpserver-26340-open.html <----  Always fails
    Or copy and paste one of these URLs:
        http://localhost:8888/lab?token=258f8e8f9823683004ee32ce3d33e44673b92e714e6e3615 <---- Always works

About

Using the lens.org API for scholarly data search

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published