Eyes in the Sky II > GIT Web Course > Module 2 > Week 5 > Getting to Know Querying in GIS > Getting to Know Querying in AEJEE

Week 5: Monitoring Invasive Species

Getting to Know Querying in AEJEE

Learn to create and execute GIS database queries to investigate the spread of zebra mussels.

top of page

Launch AEJEE, Open the Invasive Species Project File, and Add a New Layer

AEJEE_logo
  • Launch AEJEE by double-clicking its icon on your desktop or by clicking its icon in the dock (Mac) or Launch Bar (Win).
  • Choose File > Open, navigate to ESRI/AEJEE/Data/Invasive_SpeciesAE and select the file inv_spc.axl. Then click Open.
  • Add a new layer to show the sightings of the invasive Zebra Mussels. Click the Add Data add layer button button. Navigate to the invasive_speciesAE folder. Click once on zebra_mussel.shp to select it. Then click OK.
  • zebra_mussel should now be the top layer on your map. Notice that the layer is automatically turned on when it is added.
    In this view, the zebra mussel layer has been added. It is colored dark green, your color may be different. For now, don't worry about color!
    map with Zebra mussel on
Movie Icon
Adding layer Video
loading the player

top of page
Zebra mussels; Dreissenna Polymorpha

Zebra mussels are small shellfish named for the striped color of their shells. They typically attach to objects by threads on their shells. The zebra mussel is native to the Black, Caspian, and Azoz Seas. They were first described in Europe, by Pallas, in 1769.

small zebra mussel image Zebra Mussel

Zebra mussels were first discovered in the Great Lakes of North America in 1988. It is likely that their introduction was due to a ballast exchange from a cargo ship. By 1990 they had spread rapidly to all of the Great Lakes. Soon thereafter they escaped to the Illinois and Hudson Rivers, eventually moving into the Mississippi River system. By 2008, Zebra Mussels had spread across the United States, all the way to California.

Zebra mussels are a significant invader because they can spread both in and out of the water. In their freshwater habitat they can disperse in all life stages. They are prolific biofouling agents and therefore have profound effects on water supply pipes, including nuclear power plant cooling intake pipes. Not only do they damage man made structures, they are disruptive to entire food webs. Zebra mussels primarily consume phytoplankton. Additionally, they consume other suspended materials in the water column. Consequently, areas with dense invasions of zebra mussels have unusually transparent water. In fact, during the invasion of zebra mussels in Saginaw Bay, Michigan the sampling areas experienced a 60-70% reduction in Chlorophyll –a concentrations.

top of page

Adjust the Layers and Zoom in to the Zebra Mussel layer

  • Turn on the US States and US Rivers layers.
    The US States and US Rivers layers are on.
    US States and Rivers Now on
  • Make US Rivers the active layer buy clicking once on its name in the Table of Contents. Then zoom to the extent of the US Rivers layer by clicking the Zoom to Active Layer Zoom to Full Extent button.

    1. Make US Rivers the active layer by clicking once on its name in the Table of Contents.
    2. Click on the Zoom to Active Layer Zoom to Full Extent button.
      Zoom to active US rivers tight
    3. This map is the result.
      ZOOM to USRivers with ZM
  • Next, make zebra_mussel the active layer by clicking once on its name in the Table of Contents.
  • Click the Zoom to Active Layer Zoom to Full Extent button to zoom to the current extent of the zebra mussel invasion.
    The map shows the extent of the zebra mussel invasion in the United States as of 2008.

    zoomed to mussel
top of page

Find A Feature By Its Attributes

The Find tool find button is a quick way to locate a feature. However, this type of search works best if you know how to spell, and capitalize, what you are looking for.

top of page

Find the zebra mussels in Ohio.

  • Make zebra_mussel the active layer by clicking once on its name in the Table of Contents.
  • Right-click on the PC or control-click on the Mac the zebra mussel label in the Table of Contents. Then select Attribute Table. Spend some time looking through the fields and data records that are in the table. Use the scroll bars to move up and down and across the table. Look carefully at the State abbreviations.

    Here is the attribute table of the zebra mussel layer before scrolling.
    Attribute table of Zebra Mussel 1

    Here is the attribute table scrolled across.
    Attribute table of Zebra Mussel

  • Close the Attribute Table.
  • Click on the Find find button tool. When the Find window opens, move it so you can see the both map and the window.

  • The Find window is positioned over the Western United States.
    find windows when it opens2
  • In the Find window, under Value type in the name of the abbreviation for the State of Ohio, OH. Then select zebra_mussel from the list of Layers to Search. Click Find to search for the features in the layer that have "Ohio" as an attribute.
    In the Find window, under Value type in the name of the abbreviation for the State of Ohio, OH. Then select zebra_mussel from the list of Layers to Search. Click Find to search for the features in the layer that have "Ohio" as an attribute.
    Find OH in zebra mussel layer

  • In the results section of the Find window, 98 records have been located. The first result is highlighted. Click Select to show the zebra mussel record in yellow on the map.
    1. In the results section of the Find window, 98 records have been located.
      Find OH in zebra mussel layer - results
    2. The first zebra mussel record is highlighted. Click the Select button
      click select
    3. One zebra mussel record is selected on the map, highlighted in yellow. Click on the image for a larger view.
      Find Select one record in Ohio
  • Click on other records in the list of results and watch the yellow dot move around on the map.
  • To select a group of records, hold the shift key down while clicking on results in the Find window.
    Nine records are selected in the Find window and are also highlighted yellow dots on the map.

    Group of Zebra Mussels selected on map
  • When you are done, click the Clear All Results button (looks like an eraser) Clear Selections to clear all selections from the map.
top of page

Find the US State of Ohio.

  • In the Find window, select US States in the list of Layers to Search. Click Find to search for the features in the layer that have "Ohio" as an attribute. Click Select to highlight the OH record.
    1. In the Find window, select US States in the list of Layers to Search. Click Find to search for the features in the layer that have "Ohio" as an attribute.
      Find Window US States
    2. One result is found. Note that Ohio is now highlighted in yellow on the map. Click on the image for a larger view.
      Ohio selected


  • Click the Pan To in order to center the map on the State of Ohio.
  • Experiment with using the Find find button tool to locate other States or other information listed in the attribute tables for Zebra Mussels, US Rivers or US States. When you are done, click the Clear All Results button (the eraser) Clear Selections to reset the map.
  • Close the Find window.
Movie Icon
Find Tool Video
loading the player

top of page

Question a Database with the Query Builder

Another way to find features, especially for larger or more complex searches is to Query the Attribute Table.
top of page

Find all the zebra mussels sighted in the year 1988.

  • Make Zebra_mussel the active layer by clicking once on its name in the Table of Contents.
  • Click the Query Builder... Query builder button tool or select Tools > Query Builder. A new window opens. Move it to where you can see both the Query Builder and the map.
    1. Select Tools > Query Builder.
      Tools query builder over map
    2. When the Query Builder opens, move it to where you can see both it and the map.
      Query Bulider window and map
  • In the Query Builder select the field YEAR by clicking once on it. Then click the "equals" sign. Last choose the Value 1988 by clicking once on it. You can also type in this equation (YEAR = 1988) into the box in the middle of the window. Click Execute. Five records are selected on the map.
    1. The Query Builder shows five records selected after querying the zebra mussels layer for the year 1988.
      query builder Y=1988 circld
    2. The Query Builder results are also highlighted on the map. Click the image to see a larger version.
      Year = 1988 3
  • Click Clear to reset the Query Builder.
  • Repeat this process with several other years.
  • Click Clear to clear results from the Query Builder.
top of page

Find all the zebra mussel records from New York, NY.

  • In the Query Builder window, click once on the field STATE, then the "equals" sign, and then click once on the Value NY. You can also type in this equation (STATE = 'NY') into the box in the middle of the window. Click Execute. 427 records have been selected and are highlighted in yellow on the map. Click the image to view a larger version.
    State = NY results3
  • Click Clear to reset the Query Builder.
  • Repeat this process with several other States.
  • Explore the Highlight, Pan, and Zoom buttons at the bottom of the Query Builder window.
  • Click Clear to clear results from the Query Builder.
top of page

Put these two queries together to find all the zebra mussel records in the state of New York in the year 2005.

  • Click once on the field STATE, then the "equals" sign, and then click once on NY. Type the word "and". Click the parenthesis button. Then start the second equation with YEAR equals 2005. Click Execute.
  • You should have 1 record from 2005. How did you do?
    The equation is (STATE = 'NY') and (YEAR = 2005).
    Note: the "and" is outside of the parenthesis. Querying is like setting up math equations or writing sentences. If you are confused, try reading your query out loud and see if it makes sense. This one reads "Show me the records whose State is New York and whose Year is 2005."
    QB State =NY and 2005
    This image shows the query results and the map. There is one dot in NY. Click on the image for a larger view.
    NY and 2005 3

top of page

Set up a query to find a set of zebra mussels within the date range between 1997 and 2000.

  • The logic of the query is, "Show me the zebra mussel records from after 1996 but before 2001."
    The equation is (Year > 1996) and (Year < 2001) This image shows the query results and the map. 808 records match the query and are highlighted in yellow on the map. Click the image for a larger view.
    Greater than 96b and less than 2001
top of page

See how the zebra mussel invasion progressed over time

In the Query Builder, select groups of YEARS with the less than operator.
  • Execute the first query, with the equation (YEAR < 1989). Then change the equation to (YEAR < 1990). Continue moving through the years to follow the invasion.
    The equation (Year < 1989) produces 5 results highlighted in yellow on the map.
    Year less than 1989
  • How many zebra mussels had been documented by the end of 1988? 1990? 1999?
    The equation (YEAR < 1989) shows that 5 zebra mussels were documented by the end of 1988.
    The equation (YEAR < 1990) shows that 20 zebra mussels were documented by the end of 1989.
    The equation (YEAR < 2000) shows that 2354 zebra mussels were documented by the end of 1999.
Movie Icon
Query Builder Video
loading the player

top of page

Create and Explore More Database Queries

Practice querying using combinations of set and Boolean operators, such as <, >, =, And, Or, Not, etc.

Try the following:

  1. Use the zebra mussel layer to answer the question:
    Where are the zebra mussels that are in Ashtabula County AND Ohio?
    The equation is: (COUNTY = 'Ashtabula') and (STATE = 'OH')
    The result of this query is 3.
  2. Substitute OR in the equation above with the zebra mussel layer:
    (COUNTY = 'Ashtabula') or (STATE = 'OH')
    This query yields 95 records because it gives you BOTH records that are either in the county of Ashtabula or that are in the State of Ohio. The expression "OR" is more inclusive than the operator "AND".
  3. In the US Rivers layer, try this equation that combines both set and Boolean algebra.
    (SYSTEM = 'Mississippi') and (LENGTHCOMP >= 1361.4323989)
    What question does this query answer?
    What rivers in the Mississippi River system have a length greater than or equal to 1361.4323989?
    Six rivers are selected.
  4. The US States layer has interesting data to practice with.
    What happens when you enter this expression?
    not (STATENAME = 'Texas')
    The query shows all the US States other than Texas. The result is listed as 50 States because the District of Columbia is included as a state.
  5. Try this equation with the US States layer:
    (POPULATION >= 1211537) and (MEDIANAGE <= 35.0)
    What question does this query answer?
    What states have a population greater than 1211537 and a median age less than or equal to 35?
    Twelve states are selected.
  6. The wildcard symbol % combined with the expression LIKE allows you to set up a query that is a bit more open ended. Enter this equation in the Query Builder In the US States layer:
    (STATENAME like '%A%')
    What result do you get and why?
    This query returns four states: AZ, AL, AR and AK. They are all the States that start with the letter A.
top of page

Build Your Own Database Query and Take a Screenshot

Design and execute a query of interest to you or that you might use in your teaching. Here are a few suggestions.
  • Try selecting the US Rivers, by Name, Length or System.
  • Select a Lake or River in your State.
  • Select your own State.
  • Select and combine attributes from the US States layer such as population, number of farms, crop acreage or other demographic data.

Once you have built and executed a query, take a screenshot of the map and the Query Builder window. In your discussion group, post the question you asked, the equation you used, and the result of your query along with the screenshot. This is the screenshot that is needed for your required weekly activity.

Follow the instructions below to make a screen shot:

  • On a Windows computer, press Alt and Printscreen at the same time. This will save an image of the screen to the computer's clipboard. Launch Paint and choose Edit > Paste.Save the image as a jpeg, giving it a name that describes it, such as River_query.jpg.

  • On a Mac computer, press Command-Shift-4 (Command key = Apple key) all at the same time and drag a box over the area of the screen that you want to capture. This will produce a file named Picture1.png on your desktop. Move Picture1.png to your Week 5 folder or to a place where you can easily find it. Double click on the file to open it in Preview. Rename the image and save it as a jpeg, giving it a name that describes it, such as River_query.jpg.
top of page

Explore More If You Have Time

  • Explore the Attribute Tables of other layers in the map to see the rich assortment of data that can be found in a GIS.
  • Set up database queries that might interest you or your students.
  • Use Add Layer add layer button button to add other data layers that are built into AEJEE and investigate these layers.
top of page

Resources


top of page

Movies on this Page

top of page

How to download movies

  • Click the link to go to the SERC media library listing for the movie. The record will open in a new window.
  • On the SERC media library page, right-click (Win) or control-click (Mac) the link (below the movie on the Flash version pages) to download the movie file to your hard drive.
  • Look below the movie window for the file download link.

    Save Movie from CMS listing

top of page

Flash Video Versions

Download these versions to play on your computer. You'll need an appropriate movie player to view the file, such as Flash Player, Real Player (Mac / Win), or Adobe Media Player.

Movie Icon Adding Layers AEJEE

Movie Icon Find Tool AEJEE

Movie Icon Query Builder AEJEE

top of page

iPod Versions

Download these version to play on your iPod or iPhone.

Movie Icon Adding Layers AEJEE

Movie Icon Find Tool AEJEE

Movie Icon Query Builder AEJEE