GeoVISTA Studio Tutorial What is GeoVISTA Studio? Why is it part of the map making and visualization workshop? GeoVISTA Studio is a Java-based environment for visually assembling JavaBeans software components into programs. Types of components currently available in Studio include geographic visualization components, standard Java graphic user interface (GUI) components, statistical components, and three-dimensional visualization beans, among others. GeoVISTA Studio was developed by faculty and graduate students at the GeoVISTA Center, which resides in the geography department at Penn State. Thus, Studio is used as a vehicle for exploring research questions on geographic visualization. For example, what methods are effective for visualizing spatial data with a high dimensionality, that is, data that have many attributes associated with them? Census data are a good example of such data. We have implemented some such methods, and hope that you can help us discover which methods are more effective, and which are less so. Note that the components (and the environment itself) are still under development, so if the software crashes or freezes it is probably the fault of the programmers, not the users. Task one: Building a simple application. You should see three windows opening. These are the Control Panel, the Design Box, and the GUI Box. First, click on the slider control in the Control Panel window, as shown below: Next click anywhere on the Design Box. You should see a slider icon appear in the Design Box, with small red, blue, and green arrows attached to it. (The blue arrow stands for input, the red for Prepared by Frank Hardisty, 7/24/2002
output, and the green refers to the component itself). Now click on the JTextField (J stands for Java) component, which is two components over from the slider, and click on the Design Box again. If you are not sure which components is which, just put the mouse pointer over the component for a few seconds, and a ToolTip should appear which tells you what the name of the component is. Now take a look at the GUI Box. There should be a slider and a white box in it. If the white box is too small, resize it by clicking and dragging the component. Try moving the slider. Nothing happens in the text box! This is because we have not connected them yet. To connect them, click on the blue arrow on the JSlider component, and holding the mouse down, drag towards the red arrow on the TextField component. You should see a red line connecting the two as shown below: When you release the mouse on the red arrow, you should see a window pop up, labeled adapter wizard. Click on the text (int) getvalue() in the getter methods section. Then, click on the Finish button. csiss: map making and visualization 2002 page 2
In the Design Box, you should now see the two components connected by a yellow line. If you move the arrow on the slider, you should now see the text in the text box change, as shown below. Congratulations! You are now a Java programmer. Task two: Saving and Loading Studio Designs Now, we want to learn how to save and retrieve combinations of components. The connections between and position of the components are saved in what we call designs. Before we save our design, we want to set the default file location in order to make accessing files a little easier. To set the default file location, start by clicking on Preference -> User Preference in the Control Panel, as shown below. csiss: map making and visualization 2002 page 3
The User Preference dialog should appear. Next, double click on the >> button next to the Working dir box, and the Choose Working Directory dialog should appear, as shown below. Select your local working directory, and click Save. Then click Ok on the User preference dialog. To save your slider and text field design, click on File -> Save File on the Control Panel. A Save Design dialog should appear. Next, type in a file name, like test and click Save. At this point, a window may pop up, called Java Console, as shown below. This window contains messages that might be helpful to component authors, but are probably not helpful to you. So, uncheck the Auto Popup checkbox, and then click Close. csiss: map making and visualization 2002 page 4
Now, to test that the design was saved successfully, click File -> Clear in the Control Panel, and then File -> Load Design, and click on your just saved design. It ought to come back up in the same state that you saved it. Task three: Load and use a design containing a matrix of components Next, we will take a look at some previous saved designs consisting of geovisualization components. We will examine U.S. Census data, like the data you prepared yesterday. We will first look at a matrix of maps and scatterplots that allow you to look at relationships between multiple variables. As a preparatory step, copy all the folders from L:CSISS\handouts\Wednesday to your local directory. First, click on File -> Load Design. This should bring up the Load Design dialog box. Then, navigate to your designs directory, and select the mixed_matrix.gvd file. You should see seven components in the Design Box, and two boxes in the GUI Box. Next, click on the button marked Select in the GUI Box. Then select the file west_coast.shp in the data directory. You should see some change in the black box next to the Select button. Next, maximize the GUI Box, by clicking on the maximize window button, as shown below. Now the GUI Box should fill the screen, and you should see this: This is a matrix consisting of scatterplots and maps. The scatterplots are just like normal scatterplots, with the x or horizontal variable being determined by which variable appears in the same column as that scatterplot, and the y or vertical variable being determined by the variable which appears in the row as that scatterplot. For example, the scatterplot in the upper right corner of the figure above shows medianrent on the vertical, y axis, and per_80_90 on the x, or csiss: map making and visualization 2002 page 5
horizontal axis. The maps are colored by the combination of the two variables. In fact, the map support bivariate classification, which will be explained in a later exercise. The goal of this tool is to enable relationships between particular observations (in this case, counties) and multiple variables. From within the matrix, you can interactively change the order of the variables, which variables are being shown, select subsets of data both by value and by geography, and see detailed views of the components. To change the order of the variables being shown, first click on the double ended arrow, as shown below: Next, without releasing the mouse, drag the mouse over another double ended arrow, and release it. The position of the variables should be reversed. To change which variables are being shown, click on the M button in the upper left corner of the matrix component. The variable selector should pop up, as shown below: csiss: map making and visualization 2002 page 6
Select variables you want to look at, and click Select. The matrix should show the selected variables. After you are finish selecting variables, click Close. Selection of particular observations is indicated with a color, the default in this case being blue. If you want to select observations according to a variable, click and drag inside a scatterplot. You should see a dashed box from your cursor, as shown in the figure below. If the box encloses some observations, those observations should be highlighted in each scatterplot and map. The same procedure works in the map components: If you want to add to a selection that you have previously made, then hold down the shift key while you make a selection. The selection you make while holding down the shift key should be added to the current selection. You can control the variable s extent in scatterplots, and the spatial extent shown in maps by right clicking or by double clicking on components. If you right click on a scatterplot, you should see a little menu. If you then left click on the words Set Range, a dialog should appear that will allow csiss: map making and visualization 2002 page 7
you to change what the maximum and minimum values are. These values will then change for all instances of that variable in the matrix. To change the spatial extent shown on a map in the matrix of components, double click on a map, and you should see a Detail Map. The toolbar closest to the map image itself allow you to control the spatial extent shown. Try clicking on them, and then drag a box on the map. The house image will take you to the home extent. Task four: Perform Bivariate Classification Next, we are going to change the classification in the maps shown in the matrix to reflect the variables in the matrix more accurately. In the Studio Control Panel, load the design called mixed_matrix_bivar_cond_slider.gvd. Then, reload the westcoast.shp from the data directory using the file chooser in the GUI Box. Below the matrix, you should now see some additional components. These are two Visual Classifiers and a bivariate color scheme visualizer. Double click on the rightmost color patch in the top Visual Classifier, as shown below: csiss: map making and visualization 2002 page 8
This should cause a color chooser to pop up. Choose the blue-green color as shown below: Then click OK to dismiss the dialog. Your Visual Classifier should now look like this: Now take a look at the maps in the matrix. You can read the colors as follows: the degree of blueness is reflected in the x or horizontal variable, and the degree of redness is reflected in the y or vertical axis. Observations that are low in both are white, and observations that are high in both are gray. You can also use the corresponding scatterplot as a legend for the map, for example: csiss: map making and visualization 2002 page 9
The counties that are low both percentage change in males and percentage change in whites are colored white (not many of these). The counties that are high in percentage of males and low in percentage of whites are blue. Conversely, the counties that are high in percentage of whites and low in percentage of males are red. Those that are high in both are gray. This gives us an easy way to read bivariate maps overall: those with white and gray show coincident variables, and those with lots of color show diverging variables. Bonus exercise: explore other data sets. If you have time remaining, try using the designs provided to explore the data you prepared yesterday, or to other data you are interested in exploring. Bonus activity: email the software devleoper Please email me at hardisty@geog.psu.edu with any comments, complaints, compliments, or requests. Thank you! To install Studio on your own computer: Step 1: Install Java 1.4 SDK (or whatever the current version is) from java.sun.com. Step 2: Open a web browser and go to the following web site: http://www.geovistastudio.psu.edu/jsp/tryit_ea.jsp Then click on the button marked launch under Step one. Troubleshooting: If the problem is that you can t click on anything and the computer just beeps at you, try touching alt and then tab on your keyboard. If you see a little coffee cup symbol, keep holding down alt and pressing tab until the coffee cup symbol is highlighted. Then release tab and alt, close that window, and you should have control of all windows again. What to do if you are a new user of GeoVISTA Studio and the software is acting in strange ways (can t see anything in a component, seems frozen, etc.): csiss: map making and visualization 2002 page 10
1. Try to jiggle the component a bit resize it, move it. If this doesn t help, 2. Re-load the design and data. If this doesn t help, 3. Restart Studio. If this doesn t help, 4. Restart your computer. If the problem is that you can t click on anything and the computer just beeps at you, try touching alt and then tab on your keyboard. If you see a little coffee cup symbol, keep holding down alt and pressing tab until the coffee cup symbol is highlighted. Then release tab and alt, close that window, and you should have control of all windows again. csiss: map making and visualization 2002 page 11