Skip to main content

Workbench best practices

Tips & Tricks for making Fused Workbench work for you

Workbench Overview

Workbench is a web-IDE built to make working with Fused UDFs even faster!

Experimenting with UDFs, fast​

In UDF Builder you have access to a Code Editor that runs your UDFs and outputs results directly on the Map View for you. As soon as you make changes they show up in Map View!

πŸ’‘ Leverage all the UDF Best Practices​

While this page is for Workbench, it builds on top of all the Best Practices that make your UDF fast & efficient. So if you haven't yet, take a look at our dedicated UDF Best Practices.

Use return to quickly explore data​

Your UDF will stop at the first return it sees, which you can use to your advantage to return an intermediate result and explore it directly on the map:

Example: Exploring bounds mid-UDF

In this example, we're using the Overture Maps Example UDF but not sure exactly what our bounds object looks like.

The easiest way to check is simply to return it inside our UDF before any other logic:

Format your code for more visibility​

You can hit Opt + Shift + F (or Alt + Shift + F on Windows/Linux) to format your code with a smaller line-length. This comes in handy if you don't want to scroll left and right to read your code, at the expense of having a bit more up and down scrolling to do.

πŸ—ΊοΈ Visualizing results​

Visual Debugging Techniques​

  • Elevation as a debugging tool: Use 3D elevation (extruded: true) to add an extra dimension to your analysis
  • Multi-dimensional visualization: Combine opacity, color, and height to encode different aspects of your data
  • Color by data attributes: Map colors to categorical attributes and height to quantitative metrics

Optimizing Color Use for Analysis​

  • Color categories for types: Use distinct color schemes like TealRose to clearly distinguish between categories
  • Sequential colors for metrics: Use color gradients for representing continuous values like ratios or densities
  • Diverging color schemes: Highlight values above and below an interesting mid-point in quantitative data - the middle color is assigned to the critical value with contrasting colors on either end
  • Visibility first: Choose colors that maintain visibility over your basemap (darker colors for light basemaps, lighter colors for dark basemaps)

For a complete reference of available color schemes, check out CARTO color schemes which are implemented in DeckGL and available in Fused. These include categorical schemes like Bold and Pastel, sequential schemes like BluYl and Sunset, and diverging schemes like TealRose and Tropic.

Using Keyboard Shortcuts: Command Palette​

Workbench has built-in keyboard shortcuts & quick navigation features: Hit Cmd + K (or Ctrl + K on Windows / Linux) to bring up Command Palette or use the search bar in the header for quick access:

Command Palette

Without lifting your hands from the keyboard you can:

  • Open a New UDF
  • Search the Docs, directly in Workbench!
  • See some of the most helpful Keyboard Shortcuts

You'll find a more extended list of Keyboard Shortcuts in the command palette.

Preferences - Keyboard Shortcuts

Quickly jump from UDF Builder to File Explorer​

UDF Builder & File Explorer work well together, so we've made easy to jump from one to the other

  • In UDF Builder, Cmd + Click on a s3://... path will open it directly in File Explorer
  • In File Explorer double clicking on a file will prompt Fused to do its best at guessing which Catalog UDF to use to load this file in Code Editor

Organising your work​

Renaming UDFs​

You can easily rename UDFs by clicking on the UDF name in the header and hitting Enter

Your team can load your own UDFs by calling it with a team udf name so be sure to give it an explicit name!

Using tags​

You can add tags to your UDF in the Share page. This gives yet another way to find & search your UDFs. We recommend giving tags according to:

  • Type of data the UDF works with (e.g. satellite image, elevation model, population)
  • Type of analysis the UDF does (e.g. zonal stats, building footprint extraction, flood mapping)
  • Type of file the UDF loads (e.g. vector, raster, point cloud)

Using Collections​

You can use Collections to organise your UDFs into different projects. This allows you to:

  • Have multiple unrelated projects in Workbench
  • Be able to share a set of UDFs at once with your team (by downloading a Collection & sending it to your team mates)

Troubleshooting​

If things feel a bit off, for example your UDF output looks suspicious here are a few things you can do:

  • Manually rerun the UDF with Shift + Enter
  • Check how much RAM your tab is using (in Chrome can easily do so by hovering the tab). Sometimes too much data is brought in to your browser and while we do our best to manage it properly it can get out of hand. A good old tab refresh goes a long way