# In-app analysis

Use In-app analysis to explore Raw Data assets without downloading them. You can filter records, calculate summary statistics, compare groups, and export your work directly in Data Midsouth.

## Using the "Query" Feature

{% hint style="info" %}
Start with the **Data** tab to preview fields before running a query. In-app analysis is available for **Data** **assets only**.
{% endhint %}

**You've chosen a raw data asset from the DMS Catalog. Now what?**&#x20;

Data Midsouth allows you to make calculations and analyze data sets for quick trends within the platform. These options are available in the **"Explore by Query"** menu. You can adjust which records are included in your calculations using the [Filter Pane](https://help.datamidsouth.org/data-midsouth-portal/features/search-and-filter) in the far-left panel.&#x20;

<figure><img src="https://1095412806-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1ApIrdBTGqD08Mi8Gpp%2Fuploads%2FIxDvu0OEWF9E2hdfeNqb%2FData%20asset%20page%20-%20explore%20data%20-%20query%20-%20all%20options.jpg?alt=media&#x26;token=475f8839-a3cb-4089-8367-0958542c2426" alt=""><figcaption></figcaption></figure>

### Go to "Explore by Query"

{% stepper %}
{% step %}

#### Click "Explore Data" button

This black button is located in the top right corner of the data asset page.&#x20;

<figure><img src="https://1095412806-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1ApIrdBTGqD08Mi8Gpp%2Fuploads%2FQtbfwm0P33INkcZlxKO3%2FData%20asset%20page%20-%20explore%20data.jpg?alt=media&#x26;token=bbaadc5c-97d4-41b3-b1b3-eb09d71d9b52" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Locate and click "Explore by query" tab&#x20;

The "Explore Data" page offers several ways to interact with raw data assets in the portal:&#x20;

<figure><img src="https://1095412806-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1ApIrdBTGqD08Mi8Gpp%2Fuploads%2FC2iW94wPYHzCed1pSEJN%2Fdata%20asset%20page%20-%20explore%20data%20-%20data.jpg?alt=media&#x26;token=4bfa4c59-0756-416b-a1bd-39d7811c04bb" alt=""><figcaption></figcaption></figure>

* **Data tab**: table view
  * Search or filter for specific records or categories within a single dataset.&#x20;
* **Map** **tab:** map vie&#x77;**\***
  * Limit records within a single dataset to view on a map&#x20;
  * *\*The map feature is limited to datasets that contain geospatial variables like points or boundaries.*
* **Schema** **tab:** data dictionary view
  * Review the definition of each column in selected dataset
* **Explore by Query tab:** calculations view
  * Calculate basic stats, apply filters, and aggregate data
    {% endstep %}
    {% endstepper %}

## Calculate One Overall Stat

\[Need quick intro here]

{% stepper %}
{% step %}

### Select a Function

Start by selecting a math function you want to analyze - like **count**, **average**, or **sum** - from the drop down.

<figure><img src="https://1095412806-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1ApIrdBTGqD08Mi8Gpp%2Fuploads%2FU01D6gqXjmXhzIQHuVvg%2FData%20asset%20page%20-%20explore%20data%20-%20query%20-%20function.jpg?alt=media&#x26;token=d62a5b24-b791-4aca-abba-2859308fc77c" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Select a Field

Choose the **Field** (or column name) you want to analyze from the dropdown.

<figure><img src="https://1095412806-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1ApIrdBTGqD08Mi8Gpp%2Fuploads%2F6rGLDhnRwJ7jURrZUi2k%2FData%20asset%20page%20-%20explore%20data%20-%20query%20-%20field.jpg?alt=media&#x26;token=538a36dd-3607-4825-a987-8b8d8f40be39" alt=""><figcaption></figcaption></figure>

For example: "Building Permit Cost"
{% endstep %}

{% step %}

### Click confirm

Selecting confirm will calculate the statistic you're interested in, such as "The average building permit cost in Shelby County."
{% endstep %}

{% step %}

### (Optional) Filter Pane&#x20;

Making selections on the Filter Pane (lefthand side) will further narrow which records to include in the calculation.&#x20;

For example, the average building permit cost in the 38103 zip code.&#x20;

You will see your selections under "Refine."

<figure><img src="https://1095412806-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1ApIrdBTGqD08Mi8Gpp%2Fuploads%2FYalH2d9ZA4W5T6XI7ezW%2FData%20asset%20page%20-%20explore%20data%20-%20query%20-%20field%20-%20refine.jpg?alt=media&#x26;token=7af607f2-4ca1-4376-904a-9922444f2e24" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### Calculate stat for categories or groups

{% stepper %}
{% step %}

### Follow the steps for calculating an overall step

Listed above.&#x20;
{% endstep %}

{% step %}

### Scroll down to Group By section

<figure><img src="https://1095412806-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1ApIrdBTGqD08Mi8Gpp%2Fuploads%2FTpRLws9GM6zxIocWbaDh%2FData%20asset%20page%20-%20explore%20data%20-%20query%20-%20group%20by.jpg?alt=media&#x26;token=6a20b101-1013-4df5-854a-70ca3da05e07" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Choose a category to Group by&#x20;

Categories could include:&#x20;

* **Geographic areas**, like Zipcodes or City Council districts
  * Allows you to compare a statistic across areas. For example, the average building permit cost by zip code
* **Different kinds** of something, like land uses or permit types
  {% endstep %}

{% step %}

### Select Confirm button

{% endstep %}
{% endstepper %}

### Advanced Filtering with WHERE

To narrow down your dataset by a text string like "Contains" or filter to values greater or less than a specific number, you need to use the **WHERE** function.&#x20;

{% stepper %}
{% step %}

### Scroll to WHERE section

<figure><img src="https://1095412806-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1ApIrdBTGqD08Mi8Gpp%2Fuploads%2FGl4Nq6gx1jiLc8IVKXq9%2FData%20asset%20page%20-%20explore%20data%20-%20query%20-%20where.jpg?alt=media&#x26;token=ba77e49d-aada-4e1e-acc9-0d503e883718" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Select a field

Choose the **Field** (or column name) you want to analyze from the dropdown.
{% endstep %}

{% step %}

### Select an operator

Operators act as filters that limit the results. Some are more sensitive and some are more broad. It's important to keep this in mind depending on the type of results you're expecting.

**ANY FILTER**

* **contains / does not contain**: Finds records where a field includes (or excludes) specific keywords or characters—even if they're part of a larger word or phrase.
  * *Example: Permit description **contains** "shed"* → returns "shed," "watershed," "storage shed addition"
  * *Example: Permit description **does not contain** "pool"* → excludes any record mentioning "pool"
* **equal to / not equal to:** Finds records where a field exactly matches (or doesn't match) a specific value. This is stricter than "contains" because the entire field must match.
  * *Example: Status **equal to** "Approved" → returns only records where the status is exactly "Approved"*
  * *Example: City **not equal to** "Memphis" → excludes records where the city is exactly "Memphis"*
* **is empty / is not empty:** Finds records where a field has no value (is blank) or has any value at all.
  * *Example: Date **is empty** → returns records missing a date*
  * *Example: Email **is not empty** → returns only records that have an email address*

**DATE FILTER**

* **strictly prior to / strictly post:** Finds records before or after a specific date, *not including* that date.
  * *Example: Issue date **strictly prior to** 01/01/2024 → returns records from December 31, 2023 and earlier*
  * *Example: Issue date **strictly post** 01/01/2024 → returns records from January 2, 2024 and later*
* **prior or equal to / post or equal to:** Finds records before/after a specific date, *including* that date.
  * *Example: Issue date **prior or equal to** 01/01/2024 → returns records from January 1, 2024 and earlier*
  * *Example: Issue date **post or equal to** 01/01/2024 → returns records from January 1, 2024 and later*

**NUMBER FILTER**

* **strictly superior to / strictly inferior to:** Finds records where a number is greater than or less than a specific value, *not including* that value.
  * *Example: Square footage **strictly superior to** 1000 → returns 1001 and up (not 1000)*
  * *Example: Permit fee **strictly inferior to** 500 → returns 499 and below (not 500)*
* **superior or equal to / inferior or equal to:** Finds records where a number is greater/less than *or exactly equal to* a specific value.
  * *Example: Square footage **superior or equal to** 1000 → returns 1000 and up*
  * *Example: Permit fee **inferior or equal to** 500 → returns 500 and below*
    {% endstep %}
    {% endstepper %}

#### Quick Reference: Which Operator Should I Use?

<mark style="background-color:blue;">\[add in decision tree or other support]</mark>

{% hint style="info" %}
**Tip:** Not sure whether to include the boundary value (the exact date or number you're filtering by)? Use the "strictly" versions to exclude it, or the "or equal to" versions to include it.
{% endhint %}

### Export results

{% stepper %}
{% step %}

### Scroll down to Export section

It should be located beneath the **WHERE** section.
{% endstep %}

{% step %}

<figure><img src="https://1095412806-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1ApIrdBTGqD08Mi8Gpp%2Fuploads%2Fy88jj92Kqa6AQGmABHby%2FDMS%20-%20query%20-%20export.jpg?alt=media&#x26;token=0c4e03e1-022d-480a-a757-f1b60e27bc93" alt="" width="563"><figcaption></figcaption></figure>

### Click a format

The results are available in several formats, including CSV, JSON, or Excel.&#x20;

See [downloads-and-formats](https://help.datamidsouth.org/data-midsouth-portal/features/downloads-and-formats "mention")for more information about each type.&#x20;
{% endstep %}
{% endstepper %}
