Skip to main content

Learning plan

Datagrok provides programming exercises to help developers get proficient with the platform. This page offers a recommended learning plan for completing these exercises in one week.

Day 1

After Day 1, you will learn how to:

  • Import data into the platform
  • Create, edit, and transform a grid
  • Create and work with viewers
  • Create, publish, and share dashboards

The goal for today is to gain hands-on experience with the platform and familiarize yourself with it from a user's perspective.

  1. Register on public.datagrok.ai and dev.datagrok.ai
  2. Now let's import data into the platform:
    1. Local files. Download a dataset and import it into the platform using different approaches: drag-and-drop, double-click the "Data" icon on the sidebar, select "Data > Open local file", press Ctrl+O, and so on.
    2. File shares. Add the dataset to your Home directory.
    3. Databases.
      1. Watch a DB exploration video.
      2. Follow the Data connectors tutorial to connect to a Postgres DB and run a query.
    4. Webservices. Browse the Webservices Manager (Data > Webservices).
  3. Grid:
    1. Read documentation:
      1. Grid
      2. Table view
    2. Watch a Viewers and views video
    3. Complete the Grid tutorial
  4. Viewers:
    1. Learn how to work with visualizations on the platform by completing these tutorials:
      1. Scatter plot
      2. Viewers
      3. Filters
      4. Embedded viewers
    2. Watch an Interactive data visualization video
    3. Read documentation
    4. Add different viewers using the previously imported dataset
  5. Dashboards:
    1. Complete the Dashboards tutorial
    2. Create a dashboard and share it with your mentor

Day 2

After Day 2, you will:

  • Learn about functions and scripting
  • Write a script and test it

The goal for today is to gain experience with the platform by learning about its more advanced features.

  1. Functions:
    1. Watch a First-class functions video
    2. Read documentation:
      1. Functions
      2. Parameter annotation
      3. See the list of supported constants and operators. Explore the groups of functions in the table of contents (statistical, math, text, conversion, etc.).
    3. Browse the Functions view and filter functions by tags (#stats, #math, #text, #conversion, etc.). Run simple functions, e.g., Abs, Add or And, from the context panel and the console.
  2. Scripting:
    1. Complete the Scripting tutorial
    2. Read documentation:
      1. Scripting for non-developers
      2. Scripting
    3. Create a JavaScript script and share it with your mentor:
      1. Cylinder Volume Calculator takes parameters radius and height and returns volume rounded to 2 decimal places.
      2. Follow the instructions to add tests to the script (use function RoundFloat and constant PI in your tests)

Day 3

After Day 3, you will:

  • Set up development environment
  • Create your first project

The goal for today is to set up the environment and learn how to create simple projects.

  1. Check out these links:

    1. Wiki: https://datagrok.ai/help
    2. JS API reference: https://datagrok.ai/js-api/
    3. API samples: https://public.datagrok.ai/js

    Developers use these resources on a regular basis, so consider adding them to your bookmarks.

  2. Read our Contributor's guide and Git policy

  3. Clone our public repository:

    git clone https://github.com/datagrok-ai/public.git
  4. Create a branch for exercises:

    git branch <first letter of your name><your surname>/exercises

    Example: jdoe/exercises

  5. Follow instructions from Setting up development environment

  6. Create your first project following instructions given in Exercises

  7. Add package unit tests:

    1. Read about package tests
    2. Follow the instructions to add sample tests
    3. Publish your package to the platform and run tests using different approaches described in the above instructions

At the end of the day share the package you created with your mentor and push your branch to GitHub.

Day 4

After Day 4, you will learn:

  • How to transform dataframes (aggregate, join, link, add calculated columns)
  • How to add functions to your package and test them
  • How to detect semantic types and show widgets in info panels
  1. Tabular transformations:
    1. Watch videos:
      1. Aggregation
      2. Using formulas in calculated columns
      3. Joining tables
    2. Read documentation:
      1. Aggregate rows
      2. Join tables
      3. Link tables
    3. Complete the Data Aggregation tutorial
  2. Create a function that aggregates demographics data in your package:
    1. A function called diseaseAvgAge takes parameters df and site, aggregates data, and returns a dataframe with average age for each disease. Average age should be represented separately for female and male patients.
    2. Test your function on the demographics dataset
    3. Refer to the data aggregation example
  3. Calculated columns:
    1. Complete the Calculated Columns tutorial
    2. Create a function that adds a calculated column to the demographics dataset:
      1. A function called addBmiColumn takes parameters df, column names weight, and height, adds a column with BMI to the original dataframe.
      2. Test your function on the demographics dataset
      3. Refer to the example for calculated columns
  4. Complete Exercise #1. Add a detector test.

At the end of the day push your changes to GitHub and deploy your package to the platform.

Day 5

After Day 5, you will learn how to:

  • Create scripts and run them on client/server side
  • Modify dataframes with scripts
  • Access DB, create and run queries
  • Create scripting viewers
  • Manipulate dataframes (union, join, access columns etc.)
  1. Scripting:
    1. Complete Exercise #2
    2. Complete Exercise #3
  2. Scripting viewers:
    1. Watch a Scripting viewers video
    2. Read documentation
    3. Complete Exercise #6
  3. Data access:
    1. Complete Exercise #4
    2. Read documentation
  4. Complete Exercise #7

At the end of the day push your changes to GitHub and deploy your package to the platform.

Day 6

After Day 6, you will learn how to:

  • Create a custom cell renderer
  • Connect to a webservice and display received data in an info panel
  • Create a function that builds a dialog
  1. Cell renderers:
    1. Read documentation
    2. Complete Exercise #8
  2. Connecting to a webservice:
    1. Read documentation
    2. Complete Exercise #9
  3. Building a user interface:
    1. Complete Exercise #10
    2. Refer to UI components article

At the end of the day push your changes to GitHub and deploy your package to the platform.

Day 7

After Day 7, you will learn how to:

  • Create simple applications
  • Create and manage views
  1. Create a simple application from the template:
    1. Read about function roles
    2. See instructions for building applications
    3. Add a template application via grok add
    4. Publish your package and launch your app on the platform
  2. Modify the application:
    1. It should open a summary view based on the demographics dataset (show age and sex distributions, add filters)
    2. It should allow browsing adverse events in a separate view (add timelines)
  3. Check out a real-life example:
    1. Watch Clinical Case: Interactive clinical data exploration
    2. Examine the Clinical Case plugin in the public repository

At the end of the day push your changes to GitHub and deploy your package to the platform.