Skip to main content

Get started with Fused! 🚀

Learn the fundamental concepts of working with Fused.

This guide is an introduction to Fused Workbench. It covers the concepts and terminology you will come across as you work with data using the web-based IDE. After reading this page you should have an understanding of the fundamentals to build Fused UDFs and apps.

If you get stuck, please ask for help in the Fused Discord. 😊

Introduction

A Fused User Defined Function (UDF) is a Python function that interacts with your data and can be called via HTTP requests. You can create UDFs from cloud storage files with the File Explorer or clone existing UDFs from the UDF Catalog. You edit UDFs in the UDF Builder and create & share apps that interact with your UDFs in the App Builder.

Create an account

Sign up for a Fused account at fused.io/workbench.

Create UDF to read your data

The File Explorer is where you browse and preview files in cloud storage.

Use the File Explorer to upload your data to the S3 bucket Fused provisioned for your organization, then browse and preview your files.

Take, for example, U.S. Census Block Groups with the path s3://fused-asset/infra/census_bg_us/. If you navigate to the directory you'll notice that, when the map is zoomed-out, the spatial extent of the geometries in the dataset is shown as bounding boxes. As you zoom in, the boxes give way to the polygons of Census Block Groups. Clicking on individual files renders the polygons they contain.

To automatically generate a new UDF that reads a file, double-click the file or select among UDF templates within its kebab menu.

Open a UDF from the Catalog

Fused's UDF Catalog contains dozens of public UDFs to help you kickstart your next project. Browse through UDFs, preview their metadata, and click 'Add to Workbench' to open a UDF in the UDF Builder.

Edit a UDF

The UDF Builder is the IDE to edit UDFs. Data can be loaded and transformed with Python libraries such as GeoPandas and xarray. As code changes, the visualization of the UDF output on the map updates realtime.

As an example, copy this UDF into the UDF Builder to render subway stations on a map:

@fused.udf
def udf():
import geopandas as gpd
import requests
DATASET = 'https://raw.githubusercontent.com/python-visualization/folium-example-data/main/subway_stations.geojson'
gdf = gpd.GeoDataFrame.from_features(requests.get(DATASET).json())
return gdf

You can customize the data, logs, and output columns.

  1. Change the DATASET to "https://raw.githubusercontent.com/python-visualization/folium-example-data/main/us_states.json" to read U.S. states
  2. Add print(gdf) before the return statement to preview the GeoDataFrame in the logs
  3. Filter the GeoDataFrame with gdf = gdf[gdf['name'].isin(['California', 'Texas'])] to keep only California and Texas

Create an app

Use Streamlit components to create an app in the App Builder. Click "Copy shareable link" to create a URL to easily share the app.

Next steps

Congratulations, you're off to a great start with Fused. 🎉

Welcome aboard! 🚢