How to Use the Query Data Tool

Use the Query Data Tool to identify geographic areas that meet, exceed, or fall below data thresholds of your choosing. In addition, the Query Data Tool serves as a means of converting Map Room data into tabular form, downloadable as a .CSV file. This tool is available to all SparkMap users.

Select a Layer to Query

Run Your Query

Explore and Export Your Queried Data

Step 1 – Select a Layer to Query

The Query Data Tool is only accessible once you add a map layer to the Map Room.

Once you’ve added your layer and zoomed into your location of interest, access the Query Data Tool by clicking the “Tools” tab and selecting the “Query Data” tool at the top (Figure 1). 

Tool menu opened in Map Room with red arrow pointing to the Query Data tool
Figure 1 – Query Data Tool selected in Map Room

Step 2 – Run Your Query

The first drop down menu will let you choose the field you’d like to query (Figure 2). When you click the drop down, a list of your map layer’s data attributes will populate.  

For example, the “Public Charter Schools” map layer contains data on each school’s name, school district, grade levels, school type, operational status, number of students, and more.  

You cannot query every attribute of a map layer simultaneously – this would produce an overwhelming amount of information!  

Instead, click to select one field in which you are interested, such as the total number of students. 

Field drop down menu for Public Charter schools, currently the "School" field is checked
Figure 2 – Field Options for “Public Charter Schools, NCES CCD 2021-2022” layer

Once you select your field, the operator drop down options may change depending on your selection. They might read “contains” or “equals,” or they might provide a set of symbols (=, >, <).  

Select the appropriate word or symbol from the “Select Operator” dropdown and enter your value of choice (Figure 3).

As the questions you ask change, the field and operator you choose to query will change. See the two examples below.

Example 1: If I am looking for elementary schools in my area, I would select “Grade levels” as my field, press the “contains” button, and then type “elementary” in the following space.  

Example 2: If I am looking for schools in my area with less than 200 students, I would select “Total students” as my field, press the < button, and then type “200” in the following space (Figure 3).

Press the “Run Query” button to run your query.

Select operator box showing I want to query public charter schools with less than 200 students
Figure 3 – Query Data tool set to identify public charter schools with less than 200 students

Step 3 – Explore and Export Your Queried Data

The locations within view of your map that meet the requirements set in your query will now be identified (Figure 4).

Map where some dots have a purple border indicating they meet the criteria of having less than 200 students
Figure 4 – Map displaying queried data. All dots with a purple border mark a public charter school with less than 200 students.

To view the queried data visible on your map in tabular form, select the “View data” button (Figure 5).  

Figure 5 – “View data” button

The attribute table will appear on the right side of your map. To export your attribute table as .CSV file, select the “Export CSV” button (Figure 6).  

Attribute table showing information about the first charter school such as name, school district, and school type
Figure 6 – Queried data table