Globus Javascript SDK example with PyScript

This page demonstrates how to incorporate a JSON file hosted in a Globus Guest Collection with restricted access.

You will need to join the Serverless Data Users Globus Group to view the sample chart.

Sample Chart with Restricted Data

Data is being loaded via Javascript, once completed, the "Plot data" button will be enabled

Plotted using Pandas and Matplotlib via py-script

How this Works

  1. Research logs in to Globus and Globus Auth returns an OAuth access token which is stored in the browser.
  2. Once authenticated, a script in this page requests a JSON file from a Globus collection over HTTPS. Globus checks that the researcher is a member of the Serverless Data Users Globus Group. If they are, the collection returns the file.
  3. When the JSON file is loaded in the browser through the Globus api via Javascript, the resulting JSON string is passed to Python via Py-Script, turned into a `pandas.DataFrame` and plotted.