Skip to main content

Scripting

Scripting is an extremely powerful concept that allows you to improve your data analysis experience with Datagrok drastically. Scripting integrates the full suite of Datagrok's functionalities with thousands of statistical packages and visualizations available in R, Python, Octave, Julia, or JavaScript.

How does the Datagrok scripting work?

Briefly, you only need to do the following:

  • Create a new script file in the Datagrok script editor
  • Write the code in any supported language.
  • Add header: the set of annotation comments specifying the script language, tags, input and output variables.

That's all. These simple actions turn your script into a Datagrok function. Without any additional effort, you have received a wide range of Datagrok compute possibilities:

  • Autogenerated UI
  • Seamless data transfer between Datagrok and your script. You can take a Datagrok dataframe, process it by your script, and visualize it with any of the Datagrok viewers.
  • Data access. For example, you can retrieve data from an SQL database and make calculations in Python. Datagrok will care about all data transfers for you.
  • Reproducible computations Datagrok saves all runs in history, so you can easily recall every script run.
  • Sharing your scripts with your colleagues, specify access groups, and share the link to the specific script run.
  • Integrating your script in the Datagrok platform. For example, you can create a script plotting some graph for a molecule. Using semantic types, Datagrok recognizes the meaning of the data and automatically applies the script when you browse molecule details.

Where to find how it works

Videos

Dev Meeting 1: Getting Started — Cross-Language Support

See also