Attribute Table in GIS: 5 Essential Skills

Attribute Table in GIS: 5 Essential Skills

An attribute table in GIS is a structured table that stores descriptive information about the geographic features in a GIS layer. Each row represents a feature, while each column stores an attribute or property describing that feature.

If the map is the “where,” the attribute table is the “what.” A road layer, for example, can show where roads are located on the map, while its attribute table can tell you the road name, road type, surface material, length, speed limit, or administrative area.

This is why tabular data is often described as half of GIS. Spatial data tells you where something is; attribute data tells you what that thing is and provides the information needed to analyze, classify, filter, label, and compare it.

Whether you are using QGIS, ArcGIS Pro, or another GIS platform, learning to work confidently with attribute tables is one of the most important skills for a GIS student or entry-level spatial analyst.

 

A comprehensive infographic detailing 5 essential skills for managing an attribute table in GIS, including sections on anatomy, queries, calculations, data quality, and spatial analysis.


1.Understanding the Core Anatomy of an Attribute Table in GIS

An attribute table looks similar to a spreadsheet, but it is directly connected to geographic features.

Suppose you have a polygon layer representing counties:

OBJECTID COUNTY POPULATION AREA_KM2 REGION
1 Nairobi 4,397,073 696 Central
2 Kiambu 2,417,735 2,449 Central
3 Nakuru 2,162,202 7,496 Rift Valley

Each row and column has a specific role.

Rows = Features

A row normally represents one geographic feature.

For example:

  • One row = one county
  • One row = one road
  • One row = one school
  • One row = one river
  • One row = one building

If your layer contains 500 schools, its attribute table will generally contain 500 corresponding feature records.

When you select a row in the table, the corresponding geographic feature can also be highlighted on the map. This connection between the table and the map is one of the fundamental ideas behind tabular spatial data.

Columns = Attributes or Fields

A column, usually called a field in GIS, stores one particular characteristic of the features.

For a school layer, you might have:

  • school_name
  • school_type
  • students
  • county
  • established
  • longitude
  • latitude

The field name describes what the column contains, while the values underneath describe individual features.

Common GIS Field Types

Choosing the correct field type matters because GIS software treats numbers, text, and dates differently.

Text/String

Used for names, categories, codes, and descriptions.

Examples:

"Nairobi"
"Primary"
"Public"
"Road A"

Do not store numerical measurements such as population or area as text unless there is a specific reason. A text value such as "50000" is not the same as the numeric value 50000 when performing calculations.

Integer

Used for whole numbers without decimal places.

Examples:

25
500
120000

Typical uses include population counts, number of students, number of buildings, or an administrative code.

Float/Real/Double

Used for numbers containing decimal values.

Examples:

12.5
48.73
1056.284

Typical uses include area, distance, elevation, temperature, or population density.

Date

Used to store dates and, depending on the data format, potentially time-related information.

Examples:

2026-01-15
2025-06-30

Dates are particularly useful for temporal analysis, such as examining when buildings were constructed or when environmental observations were recorded.

QGIS‘s Field Calculator supports output fields such as integer, real, date, and string fields. (docs.qgis.org)

What Are FID, OBJECTID, and Primary Keys?

You will frequently encounter fields such as:

  • FID
  • OBJECTID
  • ID
  • feature_id

These fields are used to identify records.

An ObjectID in ArcGIS, for example, is an automatically managed identifier for features. In database terminology, an identifier that uniquely distinguishes records is often called a primary key.

However, do not assume that every field called ID is a reliable permanent primary key. Some IDs are automatically generated by the software and may change after certain data-processing operations.

A good practice is to understand where an identifier came from before using it as a permanent identifier in analysis.


2. Selecting Data Using Attribute Queries

One of the most useful things you can do with an attribute table is select features based on their attributes .Querying an attribute table in GIS allows you to quickly filter large datasets based on specific criteria.

Imagine a population field called:

POPULATION

You want to find all counties with more than 50,000 people.

Conceptually, the SQL condition is:

POPULATION > 50000

A full SQL statement might look like:

SELECT *
FROM counties
WHERE POPULATION > 50000;

However, an important beginner distinction is that GIS software often asks you for the WHERE condition, rather than the complete SELECT ... FROM ... WHERE ... statement.

In other words, in a GIS Select by Attribute or query interface, you may enter:

POPULATION > 50000

rather than the entire SQL statement.

Basic SQL Query Operators

Here are several useful conditions:

Goal Example
Greater than POPULATION > 50000
Less than POPULATION < 10000
Equal to TYPE = 'Hospital'
Not equal to TYPE <> 'Hospital'
Greater than or equal POPULATION >= 50000
Combine conditions POPULATION > 50000 AND REGION = 'Central'
Either condition TYPE = 'Hospital' OR TYPE = 'Clinic'

Text values are normally enclosed in quotation marks.

Query Example: Population

Suppose your table contains:

COUNTY
POPULATION

To select counties with more than 50,000 residents:

POPULATION > 50000

The GIS software will select the records satisfying that condition.

Query Example: Combining Conditions

Suppose you only want counties with populations above 50,000 in the Central region:

POPULATION > 50000 AND REGION = 'Central'

The AND operator means both conditions must be true.

Alternatively:

REGION = 'Central' OR REGION = 'Rift Valley'

means that either condition can be true.

QGIS Querying

QGIS provides attribute-table selection and expression tools for selecting features. Its Query Builder can also construct SQL-like, provider-specific filter expressions using fields, values, and operators. (docs.qgis.org)

For a beginner, the easiest workflow is usually:

  1. Open the layer’s Attribute Table.
  2. Choose the option for selecting features by expression or attribute.
  3. Select the field.
  4. Choose an operator such as > or =.
  5. Enter the value.
  6. Run the expression.
  7. Inspect the selected features on the map.

The important concept is that an attribute query lets you turn a large dataset into a meaningful subset.

For example, instead of manually looking through 10,000 buildings, you can ask GIS to select:

BUILDING_TYPE = 'School'

or:

FLOORS >= 5

That is the beginning of database-style thinking in GIS.


3. Using the Field Calculator in QGIS and ArcGIS Pro

Queries help you find records. The Field Calculator helps you create or update values.

It is one of the most powerful tools inside an attribute table.

You can use it to:

  • Calculate area or length
  • Perform mathematical calculations
  • Combine text fields
  • Convert units
  • Create categories
  • Update existing values
  • Create new calculated fields

QGIS’s Field Calculator can calculate geometry properties such as length and area and can either update an existing field or create a new one. (docs.qgis.org)

Example 1: Calculate Area in QGIS

Suppose you have a polygon layer and want to calculate its area.

Open the attribute table and:

  1. Turn on editing if required.
  2. Open Field Calculator.
  3. Choose Create a new field.
  4. Give it a name such as area_km2.
  5. Choose a suitable numeric field type.
  6. Enter:
$area / 1000000

This converts square metres into square kilometres if the layer’s geometry units are metres.

The important GIS lesson here is that you should always consider the layer’s coordinate reference system and units before calculating area or distance.

QGIS documents $length as a geometry expression and demonstrates dividing it by 1,000 to create a length-in-kilometres field. (docs.qgis.org)

Example 2: Calculate Population Density in QGIS

Suppose your table contains:

population
area_km2

You can create:

"population" / "area_km2"

This produces population per square kilometre.

QGIS expressions use field names inside double quotation marks. QGIS documentation provides the same basic pattern for calculating population density from population and area fields. (docs.qgis.org)

Example 3: Concatenate Text in QGIS

Suppose you have:

first_name
last_name

You can create a full-name field with:

"first_name" || ' ' || "last_name"

The || operator combines the values into one text string.

For example:

John + Smith

becomes:

John Smith

This is useful when preparing labels, reports, or standardized identifiers.


Field Calculator in ArcGIS Pro

ArcGIS Pro’s Calculate Field tool can use several expression languages, including Python, Arcade, and SQL, depending on the data and workflow. (ArcGIS Pro)

For beginners, Python is particularly useful because it connects GIS attribute work with broader data-analysis and programming skills.

Example: Mathematical Calculation

Suppose you have:

POPULATION
AREA_KM2

In ArcGIS Pro using Python, the expression can be:

!POPULATION! / !AREA_KM2!

ArcGIS Pro uses exclamation marks around field names for Python field calculations. (ArcGIS Pro)

Example: Concatenate Text in ArcGIS Pro

If you have:

FIRST_NAME
LAST_NAME

you can use:

!FIRST_NAME! + " " + !LAST_NAME!

This creates a combined name.

Example: Calculate Area

ArcGIS Pro can calculate geometry properties such as area, length, and perimeter in attribute fields. (ArcGIS Pro)

For example, depending on the dataset and calculation method, you can use a geometry expression such as:

!shape.area!

or use the appropriate geometry calculation options provided by the Calculate Geometry Attributes or Calculate Field workflow.

The exact area value depends on the dataset’s coordinate system and the units selected, so do not blindly assume that the resulting number is square metres or square kilometres.

A Useful QGIS vs. ArcGIS Comparison

Task QGIS ArcGIS Pro Python
Population calculation "POP" / "AREA" !POP! / !AREA!
Combine names "FIRST" || ' ' || "LAST" !FIRST! + " " + !LAST!
Geometry length $length !shape.length!
Geometry area $area !shape.area!
Conditional values CASE WHEN ... END Python if/else

The syntax differs, but the underlying GIS concept is exactly the same: take existing attributes or geometry properties, apply an expression, and write the result to a field.


4. Common Attribute Table Mistakes to Avoid

Attribute tables are powerful, but beginners can easily introduce errors.

Mistake 1: Mixing Text and Numbers

Consider this field:

POPULATION

If population was accidentally stored as text, an expression such as:

POPULATION / 1000

may fail or require conversion.

Fix: Use appropriate numeric field types for quantities that you intend to calculate.


Mistake 2: Editing the Original Data Without a Backup

Field calculations can overwrite existing values.

ArcGIS specifically warns that Calculate Field modifies input data and recommends making a copy when you need to preserve the original values. (ArcGIS Pro)

Before performing a large update:

  1. Make a backup or copy.
  2. Test your expression on a few selected features.
  3. Check the results.
  4. Apply the calculation to the full dataset.

This simple habit can save hours of work.


Mistake 3: Forgetting Field Name Restrictions

Field-name rules depend on the data format.

For example, shapefiles have a 10-character field-name limit. A field such as:

population_total

may therefore need to be shortened when working with a shapefile. (ArcGIS Pro)

Better alternatives might include:

POP_TOTAL

or:

POP2026

Modern geodatabase formats generally provide more flexibility than shapefiles, so the format you choose matters.


Mistake 4: Calculating Area or Distance Without Checking Units

A calculation such as:

$area

does not automatically mean “square kilometres.”

The result depends on the geometry and coordinate reference system.

If your layer uses a projected CRS with metre-based units, converting square metres to square kilometres can be done with:

$area / 1000000

But you should verify the CRS and units before interpreting the result.

Rule: Never report a calculated GIS measurement until you know what its units represent.


5. The Bigger Picture: Why Attribute Tables Matter

Once you understand attribute tables, you can start combining spatial thinking with data analysis.

Consider a dataset of hospitals.

The map can answer:

Where are the hospitals?

The attribute table can answer:

What type of hospital is each one?

A query can answer:

Which hospitals have more than 100 beds?

The Field Calculator can answer:

What is the beds-per-population ratio?

Spatial analysis can then answer:

Which areas have poor access to hospitals?

This progression is important:

Map → Attribute Table → Query → Calculation → Spatial Analysis

That is the foundation of practical GIS.

An attribute table is therefore much more than a spreadsheet attached to a map. It is the database component that allows GIS users to describe, filter, classify, calculate, and analyze geographic features.


Conclusion: Master the Table, Master the Data

The attribute table in GIS is where geographic features gain their descriptive meaning. Rows represent features, columns represent attributes, field types determine how values are stored and calculated, and identifiers help distinguish individual records.Mastering an attribute table in GIS is essential for completing any tabular analysis or lab project efficiently.

Three skills are especially important for beginners:

  1. Understand the structure — know the difference between features, fields, values, and identifiers.
  2. Query the data — use attribute conditions such as POPULATION > 50000 to select relevant features.
  3. Calculate new information — use the Field Calculator in QGIS or Calculate Field in ArcGIS Pro to transform existing data into useful measurements and categories.

The fastest way to learn is to practice. Download a small sample dataset containing roads, schools, buildings, counties, or other geographic features. Open its attribute table and try to answer five questions using queries and calculations.

For example:

  • Which features have the highest population?
  • Which records belong to a particular category?
  • Can you calculate area or length?
  • Can you create a new classification field?
  • Can you combine two text fields into one?

Once you can confidently answer those questions, you are no longer just reading a GIS map—you are working with spatial data.