You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

TODO:

  • walkthrough with pictures - done
  • the examples page - what is this?
  • walkthrough of trying each of the code snippets (lots of pictures!) - Shannon does not have the tech to do this

Introduction

Like other "fiddle" type environments such as JSfiddle, ScalaFiddle and Python Fiddle, BDFiddle provides an easy way for non-programmers to generate and play around with metadata and code "snippets" needed to generate metadata or convert/extract data from files they submit to Brown Dog.

Navigation

Navigate to the Brown Dog website at https://browndog.ncsa.illinois.edu/ and sign up.

Click on the BDFiddle button on the left.

or you can navigate directly using the URL https://browndog.ncsa.illinois.edu/bdfiddle/.

Login with your Brown Dog username and password.

You will be taken to the BDFiddle page itself.
This is what you will see. The whole page is setup to assist the user in:

  1. Selecting a file
  2. Selecting a transformation
  3. Receiving the output
  4. Getting access to the code snippets

1) Select a file

You can choose from a file on your computer via the Browse button or select URL to go to the location where the data is stored.
Press Get Transformations

2) Select Transformation

Based on the file type that was input a specific list of possible Conversions and Extractions are shown as available for that file.

Select the type of transformation needed from either of the scroll lists.

Press Submit to execute the transformation.

If the output needs to be emailed select the checkbox and input the desired email address.

 

3) Output

If a conversion was selected - the Output box will provide a location where the saved file of the desired format is located.

If an extraction was selected - the Output box will provide the desired extracted information. 

The below example displays metadata in the Output box generated from a .jpg.

 

 

3) Code snippets

BDFiddle also generates code snippets which can be used to recreate the same Transformation in a local environment if the user needs to repeat the process from within code.
For each language, there are four templates: convert a file from a URL, convert a local file upload, extract from a file from a URL, and extract from a local file upload.
The values for the server, security token, input file, and output format are populated in appropriate template. 

Current snippets generated include:

  • Terminal - code needed to run from the command line

  • Python - rerun the transformation via bd.py - Brown Dog python code

 

  • Native Python - rerun the transformation via native python language

  • JavaScript - Instructions on how to re-run the process using Java Script

  • Matlab - code to utilize in a Matlab program to re-run the transformation

  • R - code necessary to re-run the transformation in "R"

 

Jupyter

In response to the popularity of Jupyter notebooks and the ease of combining run-able code and documentation in one interface that Jupyter provides, Jupyter functionalities have been added to BDFiddle.  In addition to copying the code snippet, a user can download a Jupyter notebook that contains the run-able code that is ready to implement locally (jupyter must be installed) or the user can simply open the notebook as an anonymous user on an NCSA multi-user service that utilizes Tmpnb.

Jupyter templates are JSON files that contain both the raw code (runnable) and mark down (documentation). 

Where Jupyter is available two additional buttons appear below the code snippet.

.

The buttons enable a user to

  • Download the Jupyter file - to use in a local installation of Jupyter - The downloaded file can be immediately opened in a Jupyter notebook by typing “jupyter notebook” in the directory where the file is located.
  • Open Jupyter Notebook - the input file and the Jupyter notebook file are posted to the remote NCSA server. 

The server uses Tmpnb (Temporary Notebook) and employs docker containers.   There are two control docker containers and as many notebook containers as needed. 

When the files are posted to the server, a notebook container is allotted to the new user in which they can edit and run the Jupyter notebook.

See Jupyter documentation for specific usage of Jupyter notebooks.

https://jupyter.readthedocs.io/en/latest/

 

Report Problem

Log in and click "Report Problem" in the Navigation bar then you will see the form below:

Then fill in the form with your name and detail of the problem. Screenshot or any file can be uploaded in the attachment. 

If the report is sent successfully, you will see the message as follows:

 

  • No labels