Quick Tutorial for the Census Program Data Viewer
Use the "Query" feature

"Query" feature overview

The Census Program Data Viewer allows users to execute two types of queries:

  1. The simple query tool allows the user to set parameters for a specific indicator. The application will then highlight the geographies that have met the conditions set.
  2. Complex queries allow users to set parameters from various indicators. The application will then colour the geographies based on the number of conditions that were met.

Simple queries

In this tutorial, we will go over the steps needed to create simple queries. For this tutorial, we will query federal electoral districts (FEDs) with a median employment income in 2020 greater than or equal to $35,000.

  1. Click the "Geographic level" button and select "Federal electoral district."

    This image shows the form generated by clicking "Geographic level".
  2. Select the "Median employment income in 2020 ($)" indicator available in the income topic as per the "Select an indicator" tutorial.

    This image shows the form generated by clicking "Indicator".
  3. In the "I want to" menu, select "Query." Alternatively, you can click the "Query" button located below the map.

    This image shows the two options to launch the "Query" feature.
  4. Click the "Simple query" radio button.

    This image shows the form generated by launching the "Query" feature.
  5. Add the desired condition as per the steps below. For this example, we will query areas with a median employment income in 2020 ($) greater than or equal to $35,000.

    1. Select the desired operator (>=).
    2. Enter the desired value (35000).
    3. Click "Add a condition."
    This image shows the form generated by choosing the "Simple query" query type.
  6. Repeat Step 5 for each condition that needs to be added. In this tutorial, none will be added since our query only includes one condition.

    Note that the "must match all conditions" button works as an "And" statement while the "Must match one or more condition" works as an "Or" statement.

  7. Click the "Query" button to have the application display the areas that meet the conditions that were set.

    This image shows the form generated after setting all the query conditions.

    The application will also generate a "Query result" data table that will list all areas that have met the conditions.

    This image shows the newly generated map which highlights the geographies that meet the query conditions.
  8. To edit your query, select "Query" in the "I want to menu" or click the button below the map.

    This image shows the two options to edit your query.

    You can exit by clicking the "Exit query" button on the map.

    This image shows the location of the button that exits the "Query" feature.

Complex queries

In this tutorial, we will go over the steps needed to create complex queries. For this tutorial, we will query federal electoral districts (FEDs) with at least 30% of their population with French as mother tongue (single responses), an average shelter cost for renter households of less than $1,000 and an average commuting duration of less than 20 minutes.

  1. Click the "Geographic level" button and select "Federal electoral district."

    This image shows the form generated by clicking "Geographic level".
  2. In the "I want to" menu, select "Query." Alternatively, you can click the "Query" button located below the map.

    This image shows the two options to launch the "Query" feature.
  3. Select the "Complex query" radio button.

    This image shows the form generated by launching the "Query" feature.
  4. There are two options when selecting "complex queries." You can either create your own by clicking "Select Indicator" or run a predefined one by clicking "Use predefined query." In this example, we will create a personalised query by clicking "Select Indicator."

    This image shows the form generated by choosing the "Complex query" query type.
  5. Add the desired condition by clicking "Select indicator." For this example, we will start by adding a condition that will query areas with at least 30% of the population with French as mother tongue (single responses). This indicator is found in the "Mother tongue" topic. Once the desired indicator is selected, follow these steps:

    1. Select the desired operator (>=).
    2. Enter the desired value (30).
    3. Click "Add a condition."
    This image shows the form generated after selecting the first condition to add to the complex query.
  6. We can add other indicators to our query by repeating Step 5. In this example, we will add a condition for areas with an average shelter cost for renter households less than $1,000 and a condition for areas with an average commuting duration of less than 20 minutes. Once all the desired conditions are set, click "Query."

    This image shows the form generated after selecting all conditions to add to the complex query.

    Note that the "Must match all conditions" button works as an "And" statement while the "Must match one or more condition works as an "Or" statement.

  7. The application will now colour areas on the map based on how many conditions are met.

    It will also generate a "Query result" data table that will list all areas that meet at least one of the set conditions.

    This image shows the newly generated map which colours the geographies based on the number of conditions that are met.
  8. You can view the query conditions by clicking the "Show Query Conditions" button located under the legend.

    This image shows the location of the button that shows the query conditions.

    To edit your query, select "Query" in the "I want to menu" or click the button below the map.

    This image shows the two options to edit your query.

    You can exit by clicking the "Exit query" button on the map.

    This image shows the location of the button that exits the "Query" feature.
Date modified: