Field types are assigned to every field in a dataset in ArcGIS Insights based on the type of data in the field. Insights identifies field types using icons that indicate the default behavior of each field from your dataset in visualizations. The field type also determines the default statistic type applied to each field in a visualization.
While the table below lists the default visualization for each field type, you can change to a different visualization depending on the data selected in the card.
Tip:
There are times when you may want to specify a different type of field. You can change a field type in the data pane.
Role | Behavior | Default visualization | Default statistic type (for aggregations) |
---|---|---|---|
Allows you to plot data on a map as points, lines, and areas, and perform spatial analysis. Can be used as unique categories in charts and tables. |
| Count | |
Groups data as bars, slices, or lines in charts. Groups data as a category column in summary tables. Appears as unique symbols on maps. Can be calculated as a count along the statistics axis of charts, or statistics columns in summary tables. | Default chart: Bar chart *Default map: Unique values map | Count | |
Determines the height, length, or size of bars, columns, slices, and bubbles in charts. Determines the size of the graduated circles in graduated symbol maps. | Default chart:
*Default map: Graduated symbol map | Sum | |
Determines the height, length, or size of bars, columns, slices, and bubbles in charts. Grouped ranges of rate/ratios determine the level of shading for features shown in maps. | Default chart:
*Default map: Choropleth map | Sum in charts None in choropleth maps | |
Displays a series of data points graphed in chronological order. Insights automatically divides date/time fields into subfields that can be used as string fields in other visualizations. Date/time subfields include the following:
Note:The subfields created in Insights are dependent on the input data. If the input includes date only, the time subfields will not be provided. If the input includes time only, the date subfields will not be provided. | Default chart: Time series graph Default map: Not applicable | Count | |
Displays data from an assigned subtype. Subtype fields are treated as strings when used to create maps, charts, and tables. | Default chart: Bar chart *Default map: Unique values map | Count | |
Displays descriptions from an assigned coded value domain. Coded value domain fields are treated as strings when used to create maps, charts, and tables. | Default chart: Bar chart *Default map: Unique values map Note:Multidomain fields are not supported in all map and chart visualizations. For more information, see Domains and subtypes. | Count |
*To create a map using a string, number, or rate/ratio, your dataset must contain one location field. See Enable location for your dataset.
Change a field type
The types of visualizations that can be created using data from a given field are dependent on the field type. In some situations, the type assigned to the field is not the optimal type for the analysis you want to perform or the visualizations you want to create. The following examples are situations where a field type may need to be changed:
- A field containing discrete numbers (for example, district codes, ZIP codes, years, or ages) is added as a number field type. These discrete numbers are more accurately represented as categories in some situations. Therefore, the field type can be changed from Number to String.
Note:
Whether a field type should be changed is often dependent on the specific data and type of analysis you want to perform. In this example, age could realistically be analyzed as either a number or a string. For example, ages as a number could be used to create a histogram showing the distribution of ages in the data, whereas ages as a string could be used to create a bar chart showing the average amount of spending on entertainment for each age in the data.
- A field containing percentages, rate, ratios, or proportions (for example, population density, crime rate, or average grades) is added as a number field type. These numbers are more accurately represented as rate/ratios, particularly when creating a map of the field since numbers and rate/ratios have different default map types (graduated symbol maps for number fields and choropleth maps for rate/ratio fields). Therefore, the field type can be changed from Number to Rate/Ratio.
- A CSV file contains fields with date or time information. Since CSV files do not support date/time formatting, the fields are added as string fields. Some visualizations and functionality (for example, time series charts and subfields) are available only for date/time fields. Therefore, the field type can be changed from String to Date/Time.
Changing a field type in Insights does not change the underlying data and will only be reflected in the workbook where the field type was changed.
The following table describes the compatible field type changes available in Insights:
Original field type | Compatible field types |
---|---|
Number | A number field can be changed to the following field types:
|
Rate/Ratio | A rate/ratio field can be changed to the following field types:
|
String | A string field can be changed to a date/time field. The string field must be formatted in a recognized format that fits the following specifications:
The following list includes examples of some of the formats that are accepted:
The following values are accepted for each element of the formats:
A string field that was originally a number or rate/ratio field can be changed to a number or rate/ratio type. |
Date/Time | A date/time field cannot be changed. |
Location | A location field cannot be changed. |
Subtype | A subtype field cannot be changed. |
Coded value domain | A coded value domain field cannot be changed. |
Use the following steps to change a field type:
- From your dataset in the data pane, click the field type icon.
A menu lists the compatible field types.
- Choose the field type from the list.
New visualization will reflect the field's new type. However, existing visualizations using the field as its previous type will not update.
Location field
Location fields are a part of all spatial datasets, including points, lines, and areas. A dataset must have a location field to create a map. A location field can be added to a nonspatial dataset using Enable location.
Calculations for length or area and perimeter can be added as location subfields for line and area features, respectively. The subfields are added as number fields, so they can be used to create maps, charts, and tables. For more information, see Calculate geometry.
String field
String fields are assigned to fields that include text values. Data in string fields is often referred to as categorical values and is qualitative or descriptive in nature. In some circumstances numbers can be assigned a string field and treated as categorical values. Examples where numbers can be treated as strings include age or ZIP Code. To change a number to a string field, click the number field button next to the field and choose String from the menu.
String fields can be used to make unique values maps, tables, and several charts, such as bar charts, treemaps, and box plots. String fields can also be used as a Color by or Subgroup parameter in other charts, such as scatter plots and stacked bar charts.
Number field
Number fields are assigned to fields that include numerical values. Data in number fields will often show measurements and is quantitative in nature.
Number fields can be used to make proportional symbol and choropleth maps, tables, and charts such as scatter plots and histograms.
Note:
Certain visualizations, such as histograms and KPI cards, may be required to display rounded integers as their labels rather than decimals for some datasets. The rounded integers are for display only, and the decimal values are used for all calculations.
Rate/Ratio field
Rate/Ratio fields are assigned when a field is created using Calculate Ratio or Calculate % Change. If a dataset with a potential rate/ratio field is added to Insights, it will likely be added as a number field. You can change a number field to a rate/ratio field by clicking the number field button next to the field and choosing Rate/Ratio from the menu.
Date/Time field
A date/time field is assigned to datasets with date or time fields. Date/Time fields can also be calculated using the date functions in the data table or by changing a field from a string type to a date/time type.
Insights uses Coordinated Universal Time (UTC) and does not currently read time zones directly from data fields. Insights will always return date/time fields in feature layers as UTC, which may cause the fields to appear converted to UTC in Insights. In all other instances, date/time fields are assumed to be in UTC. Therefore, the date/time values returned in Insights will be identical to the input values.
Note:
For Insights in ArcGIS Enterprise, date/time fields are only available in Insights if standardized SQL queries are enabled on the ArcGIS Server. For Insights in ArcGIS Online, date/time fields are only available in Insights if standardized SQL queries are enabled in your ArcGIS Online organization.
Date/Time fields are not available for datasets stored outside of the hosted data store, such as ArcGIS Living Atlas of the World datasets and map image layers.
Date/Time fields in Insights are given subfields, such as Year and Month. The subfields are all added as string fields, so they can be used to create maps (if there is a location field in the dataset), charts, and tables.
Note:
Subfields are not created for date/time fields in map services or remote feature layers, such as ArcGIS Living Atlas datasets.
Date/Time fields can be used to create time series graphs and tables, but they cannot be used to style a map.
Excel files
When a Microsoft Excel table with a date field is loaded into Insights, the field should automatically be assigned as a date/time field. If the date field is added with a different type, try some of these troubleshooting techniques:
- If using a CSV file, try saving the file as an Excel workbook. Excel workbooks have more formatting options than CSV files. Alternatively, you can convert a string field to a date/time field after the data is loaded in Insights.
- Check that the field is formatted as a date in Excel.
- Check that the data is in a table format.