---
title: "Introduction to working with and visualizing data in Twinfinity"
canonical: "https://help.twinfinity.com/space/HCFD/146210818/Introduction%20to%20working%20with%20and%20visualizing%20data%20in%20Twinfinity"
format: markdown
---
Models in Twinfinity carry far more than geometry. This section focuses on how to extract and
use the data attached to those models, with an emphasis on visualizing it back in a model context.

### Data extraction: a key to insight

Getting at the data is mostly a matter of iterating over objects and collecting the subsets you care
about. You explore the property sets of an object, pull out individual properties and their values,
and organize them in a structured way. Property sets often hold a lot of metadata — quantities,
manufacturing specifications, documentation links, and more.

First load the property sets, then read them off each IFC object via its `propertySets` record. Each
property is a `T8Property` with `value`, `type` and `unit` fields; when the same property has
conflicting values from multiple sources the entry is an array of `T8Property`:

```ts
// Load the property sets that hold the data.
await api.ifc.loadPropertySets();

// They are now accessible on the IFC object they belong to via the propertySets record.
api.ifc.spaces.forEach((space) => {
  for (const [propertySetName, propertySet] of Object.entries(space.propertySets)) {
    console.log(propertySetName);
    for (const [propertyName, property] of Object.entries(propertySet.properties)) {
      const values = Array.isArray(property) ? property : [property];
      for (const { value, unit } of values) {
        console.log('\t' + propertyName, value, unit?.name ?? '');
      }
    }
  }
});
```

See it in the playground: [Read property sets](https://playground.twinfinity.dev/?pgId=data/property-sets).

### Colouring models based on property set data

A practical application is setting object colours from the value of a property in a specific property
set. You filter the objects you want out of the model, then apply a shared colour to objects that have
similar property values — an instant visual grouping.

See it in the playground: [Colour rooms by name](https://playground.twinfinity.dev/?pgId=colour/rooms-by-name).

### Visualizing data based on location and property set values

This example uses the physical overlap between LOA spaces (areas in a building that can be rented out)
and room spaces, together with the properties of the LOA spaces. The data is presented in labels on a
2D canvas that track 3D positions within the model.

See it in the playground: [LOA and room labels](https://playground.twinfinity.dev/?pgId=labels-and-icons/tracked-labels).

### Managing floor data

A common requirement in digital twin applications is displaying specific floors of a model. Here we
look at how to show a selected floor and how to retrieve the names of all floors in a building.

See it in the playground: [Floor names](https://playground.twinfinity.dev/?pgId=data/floor-names).

Together these examples should give you a solid footing for managing and visualizing model data in
Twinfinity, whether you're building a digital twin app or just exploring what a model carries.