This is a tutorial about importing data from a public data portal into Stae. This tutorial builds on the visual importer tutorial and is specific to step 3 on the visual importer process. Be sure to read that article before using the tools presented in this tutorial.
At the end of this tutorial, you’ll be able to
- Leverage various transform utilities in the visual importer to import and deal with a variety of data inputs
View of the Importer for Norfolk Mural Data
1. Navigating the transform page
The transform page is the third step on the import wizard. This page is intended for you to take raw data and transform into one of Stae's standardize data types. The left panel is where you select each row of data you'd like to transform. The right panel is a preview of the output for the transformed data. You can toggle between the raw data input and the transformed output by mousing over the right panel and selecting either input or output. This is helpful when you want to refer to the data source's fields while you're importing data.
2. Field Types: Text, Number, Date, Location, and Measurements
Each data input field gets mapped to an output field type. These types range from different ways that make up your data source: text, numbers, dates, locations, and measurements. On the preview, text fields will be in double quotes and appear as green text. Fields with numbers in them will appear as orange text. Locations will appear formatted as GeoJSON when transformed.
The transform tools in the visual importer allow you to take data in messy formats and transform them into usable types. To ensure quality data, each field has its own set of validations. For example, the ID field requires a text input, but you can use the transform tools to take a field with a number and transform that into text. Below are a list of transform tools available for you to use when importing data into Stae.
3. Transform tools
Fields such as the ID or the Notes field require a text field. If you're attempting to map a number to a text-only field, it will not appear in the drop down list of available input data. To use a number in these fields, you'll need to use the create text transform tool. To do this, click on the drop down in the for value selection, and scroll through the list until you reach a section called transforms. Select Create Text from this list and then select the value you'd like to use. Clicking the OR text underneath the value will create a condition where either fields will be used. Using the OR logic is useful in situations where the desired field is not available throughout the entire dataset.
For the ID field, this field requires that the data be unique and specific only to that row. If you choose a field for an ID that repeats throughout your dataset, you will overwrite data for that row each time that field repeats. For example, if you want to import demographic data and are using the zip code as the unique ID, you will only be able import data for as many unique zip codes exist in that dataset. If your dataset lacks a unique ID, you can use the unique ID transform tool to turn any field into an ID.
The normalize transform will take text fields with inconsistent capitalization and normalize them to be all lowercase.
The phone number transform will take a number and attempt to convert it into a standardized phone number. The transform will return null values if the number being used is missing key information like an area code.
The capitalize transform will take a text field and capitalize the first letter of the first word in that field. The rest will appear lowercase.
The capitalize words transform will take a text field and capitalize the first letter of all the words.
Capitalize Words Transform
The Unique ID transform will take any field and turn it into a unique ID. This is useful if your dataset lacks a unique ID field.
Unique ID Transform using the artwork name field
The Slug transform will take a combination of fields and combine them using hyphenation. This is useful if you need to combine multiple fields or types together to construct a data field. In the example below, the type of artwork field is constructed by combining the media and category fields when transforming Norfolk artwork data.
The Join transform will join two number fields together and combine them into a text object. The example below provides the address using an artwork's latitude and longitude values.
*“The essential characteristic of the city ... is that it demands participation.”*
Lawrence Halprin, Cities
Have any questions or running into issues with this feature?
Reach us at: firstname.lastname@example.org