Meet Fused
Fused Workbench is an end-to-end cloud platform for data analytics.
The core feature behind Fused are Python functions that can be run via HTTP requests, called User Defined Functions (UDFs). You can run these UDFs and retrieve data from it from anywhere you can call a HTTP endpoint.
First look
We're going to create a simple UDF and return it's results in a Google Sheet. Feel free to follow along by first making sure you can login.
As an example, we're going to load New York City metro station, taken from a GeoJSON directly hosted on Github from the folium-example-data
public repo.
We are going to simply open this GeoJSON as a GeoDataFrame
object using geopandas
, a geospatial Python library similar to pandas
, with the handy addition of a geometry
column that holds spatial information (in our case the latitude / longitude of all our stations):
@fused.udf
def udf():
import geopandas as gpd
return gpd.read_file(
'https://raw.githubusercontent.com/python-visualization/folium-example-data/main/subway_stations.geojson'
)
All you need to make a Python function a Fused UDF is to add the @fused.udf()
decorator to it.
You'll also note that we do our imports inside the UDF. We'll touch on that in a later section.
Running your first User Defined Function
The simplest place to edit a UDF is on the Fused workbench, a browser based IDE. Check out the Login page to get access.
Fused Workbench runs your UDF in real-time. You don't need to execute your code, it's always running!
Here's are the main elements of Workbench:
- Our UDF script in the UDF Builder
- The NYC subway stations from the geodataframe in the Map View
- We don't have any errors in the Results Page
You can also write & run any UDF in your preferred Python environment - the Fused Workbench IDE isn't strictly required.
We'll show how to run your UDF in workbench for now, as that's the simplest way to get started
Share your User Defined Function
One of the most powerful aspects of Fused is that each UDF can be shared, as a HTTP endpoint.
Here's how to return our GeoDataFrame
from the UDF defined in Workbench to Google Sheets:
Next Steps
This should give you a first taste of what Fused is. For more, check out:
- Our quick start example that walks you through a full end-to-end data science example
- Get to know what UDF, User Defined Functions, are in more depth
- Become more familiar with the UDF Builder, the browser based IDE (no install required!)
- Deep dive into
fused-py
, how to use it locally and everything you can do with it
Connect with the community
Find inspiration for your next project, ask questions, or share your work with the Fused community.