# Data Transformation

As discussed earlier, the first step in creating a visualization is **data selection**. This refers to choosing from the data the attributes needed for the visualization.

Once we select the attributes, the next step is usually to perform **aggregation** or other **transformations** in order to be able to create appropriate visualizations, that communicate the required information effectively.

Common aggregation functions include SUM, MAX, MIN, AVERAGE, MEDIAN and STDDEV.

## Transformations Related to Temporal Attributes

These involve transformations at different levels/resolutions: seconds, minutes, hours; days, weeks, months, years etc.

## Transformations Related to Spatial Attributes

These involve transformations at different levels/resolutions: zip code, county, city, state, country etc.

**Geo coding/decoding** refers to going from the name of a place to its geo coordinates and vice versa.

## Binning

It is the process of transforming a **quantitative** attribute to an **ordinal** attribute. Ex. restaurant inspection scores from numbers to letters.

## Rescaling/Re-Expression

There are few ways to accomplish this:

### - Normalization

This refers to bringing all the values to a scale of say \[-1, 1].

### - Percentages

This refers to converting quantitative values to percentages, which makes it easier to make comparisons.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vikram-bajaj.gitbook.io/cs-gy-6313-information-visualization/data-transformation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
