How To Get Data From Grasshopper Into Power BI
We take you step by step through transferring data from Grasshopper to Power BI and creating stunning visualisations.
Whether you're an architect, (computational) designer, or just a BIM data geek, this tutorial will empower you to structure, visualise, and analyse your data like never before.
What You’ll Learn
This tutorial is divided into four videos, each building on the previous one:
- Introduction and Setup: Learn the basics of Speckle and set up your environment for Grasshopper and Power BI.
- Creating and Extending Speckle Objects: Create a Speckle object, extend it with custom properties, and organise your data efficiently.
- Advanced Massing Study Example: Apply your skills to a complex urban context, extracting structured data and visualising it with the Speckle Viewer.
- Connecting to Power BI: Import Speckle data into Power BI and build an interactive dashboard with dynamic 3D visualisations.
First Thing’s First: Getting Started with Speckle
Step 1: Create a Speckle Account
Visit speckle.systems and click Register. If you already have an account, log in using your credentials or Google account.
Step 2: Install the Speckle Manager
Download the Speckle Manager for your operating system (Mac or Windows) and follow the installation steps.
- Log in to the Speckle Manager using your account.
- Ensure you're connected to Speckle's free server (app.speckle.systems) under the Accounts tab.
Step 3: Install Necessary Connectors
Under the Connectors tab, install the required connectors for Grasshopper, Rhino, and Power BI.
Step 4: Create a New Project
- Open the Speckle dashboard and create a new project.
- Make the project link-sharable for compatibility with Power BI.
- Add models to your project:
- Test model for experiments.
- Massing model for architectural studies.
- Context model for additional data layers.
Let’s Get Going: Creating and Extending Speckle Objects
Step 1: Verify Connectors Installation
- Open Rhino 3D and confirm the Speckle icons are visible.
- In Grasshopper, ensure the Speckle tab is accessible.
Step 2: Create and Send Simple Geometry
- In Grasshopper, create a simple 3D geometry—a box (10m x 10m x 3m)—representing a basic massing requirement.
- Use the Send component to send the geometry to your Speckle project.
- View the data in the Speckle web viewer. The box is now a Speckle object with default properties.
Step 3: Extend the Speckle Object with Custom Properties
- Use the Extend Speckle Object component to add custom parameters like Program Use, Height, and Floor Area.
- Send the updated object to Speckle.
- Verify in the Speckle viewer that your custom properties are attached to the geometry.
Step 4: Nest and Organise Data
- Use the Create Speckle Object component to organise complex data into nested objects (e.g., project name, start date).
- Extend the original object to include the nested data.
- Verify the nested structure in the Speckle viewer.
It’s Getting Exciting: Advanced Massing Study Example
Step 1: Organise Context Data
- Separate the context (e.g., site map and terrain) from the building massing.
- Send the Mesh and Map data to sub-models within your Context Model using the Speckle viewer.
Step 2: Structure Massing Data in Grasshopper
- Import geometry layers into Grasshopper using the Dynamic Geometry Pipeline.
- Organise programs (e.g., commercial, residential) by building using dispatch components.
- Extract key data:
- Land use, floor areas, building height, and footprints.
- Floor-specific details like names, heights, and areas.
Step 3: Create and Send Structured Speckle Objects
- Use the Extend Speckle Object component to attach extracted data to each building.
- Send the data to Speckle.
- Use the Speckle viewer to inspect and filter data by attributes (e.g., land use, floor height).
Finish Line: Visualising Data in Power BI
Step 1: Verify Power BI Connector Installation
- In the Speckle Manager, confirm the Power BI connector is installed.
- In Power BI, enable custom connectors under File > Options > Security.
Step 2: Import the 3D Viewer
- Import the 3D Viewer visual (.pbiviz file) into Power BI.
- Drag the visual onto your report canvas.
Step 3: Receive Data from Speckle
- Use Get Data > Speckle > Get Model by URL (Beta) to connect to your Speckle project.
- Copy the URL of your massing model from the Speckle web viewer and paste it into Power BI.
- Transform the data in Power Query:
- Duplicate the imported table (Base and Geometry Data).
- Extract parameters like Land Use and Floor Height into new columns.
- Convert text to numbers and round decimals to prevent inaccuracies.
Step 4: Create Relationships Between Tables
- Link the Base and Geometry Data tables via Object ID.
- Ensure the relationship is Many-to-Many with bi-directional filtering.
Step 5: Build the Dashboard
- Add a 3D Viewer and bind the Base table as its data source.
- Create charts and slicers:
- Bar Chart: Land Use vs. Land Use Area.
- Area Chart: Floor Name vs. Land Use Area.
- Donut Chart: Building Name vs. Land Use Area.
- Apply conditional formatting to match the colours of the 3D Viewer with your data.
Step 6: Test Interactivity
- Select data in the 3D viewer to see corresponding updates in your charts and slicers.
- Similarly, interact with charts to filter the 3D viewer dynamically.
Wrap-Up
Congratulations! You’ve successfully:
- Set up Speckle (yay!) and connected Grasshopper to Power BI.
- Created and extended structured Speckle objects.
- Visualised data in Speckle and Power BI with interactive 3D dashboards.
This workflow bridges design and data analysis, empowering you to communicate insights effectively. Explore Speckle’s flexibility to tailor it to your projects, and don’t hesitate to share your feedback or ask questions in the Speckle Community Forum.
Thank you for following along, and we can’t wait to see what you’ll build!
Subscribe to Speckle News
Stay updated on the amazing tools coming from the talented Speckle community.