Skip to content

GeoDa Test Cases

Xun Li edited this page May 8, 2019 · 28 revisions
Table of Contents

1. Custom Breaks
2. Histogram
3. Conditional Map
4. Conditional Histogram
5. Conditional Scatter plot
6. Correlogram
7. Time
8. Weights
9. Map
10. Table
11. MDS
12. PCA
13. KMeans/KMedians/KMedoids
14. Precision Setup
15. Spatial Join
16. I/O
Special Test Dataset

16. I/O

1 □ DBF encodings in GeoDa see:https://github.com/GeoDaCenter/geoda/wiki/DBF-encodings-in-GeoDa

15. Spatial Join

Test different cases of "spatial join" and "spatial assign" with different datasets.

1 □ Working layer is a polygon-layer, and join layer is a point-layer; Join variable (Spatial Count)
2 □ Working layer is a polygon-layer, and join layer is a point-layer; Join variable, Join Operation(Mean/Median/Standard deviation/Sum)

If spatial joining a polygon-layer to another polygon-layer, it is possible that a polygon intersects with more than one polygon. In this case, a warning message should be raised that spatial objects being counted more than once.

3 □ Working layer is a polygon-layer, and join layer is a polygon-layer; Join variable (Spatial Count)
4 □ Working layer is a polygon-layer, and join layer is a polygon-layer; Join variable, Join Operation(Mean/Median/Standard deviation/Sum)

Spatial assign case:

5 □ Working layer is a point-layer, and join layer is a polygon-layer; Select ID variable (optional) sequential ids will be used. -- the id of the polygon will be assigned to the point if point intersects with this polygon

14. Precion Setup

By default, "false precision" will be ignored when display numbers in GeoDa. However, users should be able to set display precision of numbers manually.

Try to (1) set display precision and (2) set display precision on axes on following maps and plots Check and uncheck "Always using fixed-point notation" will apply on integer numbers (e.g. 14 -> 14.00)

1 □ Scatter plot
2 □ Box plot
In Histogram, check if "#obs" are displayed as integers and "Display Precision setup" have NO impact on it. 3 □ Histogram plot
4 □ Scatter plot matrix
5 □ Bubble chart
6 □ PCP chart
7 □ Conditional Map
8 □ Conditional Histogram
9 □ Conditional scatter plot
10 □ Correlogram

13. KMeans/KMedians/KMedoids

1 □ Use geometric centroids (should be disabled table-only dataset)
2 □ Number of Clusters: (should be less than the # of obs.)
3 □ Distance Function (Euclidean/Manhattan)
4 □ Minimum Bound: After check the box, user should be able to select a variable (e.g. population), and using slider bar to set value as a minimum bound of a cluster
5 □ Transformation: (Raw/Demean/Standardize Z/Standardize MAD)
6 □ Initialization Method: KMeans++/Random (should expect different clustering results if iteration is low e.g. 1)

7 □ Initialization Re-runs:
8 □ Use specified seed (use can replicate results using specified seed)
9 □ Maximum iterations:
10 □ Save Cluster in Field
11 □ Summary

12. PCA

Please also try time-grouped variable and variable with NULL values

1 □ Method: SVD / Eigen
2 □ Transformation: (Raw/Demean/Standardize Z/Standardize MAD)
3 □ Components (after "run" button, user should be able to select number of component.
4 □ Save (PC# information dialog should be poped up)

11. MDS

1 □ Use Power Iteration (checkbox)
2 □ # Max Iteration
3 □ Distance Function (Euclidean/Manhattan)
4 □ Transformamtion: (Raw/Demean/Standardize Z/Standardize MAD)
5 □ MDS Save Results
6 □ MDS Plot -> Create Weights

10. Table

1 □ Aggregate
2 □ Merge
2.1 □ merge a CSV file with a field name that is duplicated in original CSV file
3 □ Selection Tool
4 □ Invert Selection
5 □ Clear Selection
6 □ Save Selection
7 □ Move Selection to Top
8 □ Calculator
9 □ Add Variable
10 □ Delete Variable
11 □ Edit Variable Properties
12 □ Encode

13 □ make sure field name can be changed to upper/lower case, e.g. ID->id or id->ID
14 □ make sure no duplicate field name (case insensitive e.g. ID and id) can be added in a table

15 □ make sure change field positions will be updated in variable selection dialog as well

Special test cases

16 □ a CSV file with duplicated field names

9. Map

Thematic Map

Thematic map can be created using "Map" menu, or using right click menu "Change Current Map Type"

1 □ Quantile
2 □ Percentile
3 □ Box map (hinge=1.5)
4 □ Box map (hinge=3.0)
5 □ Standard deviation
6 □ Standard deviation
7 □ Unique values
8 □ Colocation map (Note: right click menu in colocation map doesn't hava "Change Current Map Type" option)
9 □ Natural breaks
10 □ Equal intervals
11 □ Custom breaks (see Custom Breaks test-cases)
12 □ Save Categories

13 □ Rates->Raw Rates
14 □ Rates->Excess Risk<
15 □ Rates->Empirical Bayes
16 □ Rates->Spatial Rates
17 □ Rates->Spatial Empirical Bayes
18 □ Save Rates

19 □ Themeless

20 □ Connectivity (If no weights available, "No Weights Found" dialog should be shown.)

21 □ Shape Centers->Add mean centers to Table
22 □ Shape Centers->Add Centroids to Table
23 □ Shape Centers->Display mean centers
24 □ Shape Centers->Display centroids
25 □ Shape Centers->Save mean centers
26 □ Shape Centers->Save centroids

Thiessen polygons should only work on points data. Test Data:

https://github.com/GeoDaCenter/geoda/issues/1747

27 □ Thiessen Polygons->Display Thiessen Polygons
28 □ Thiessen Polygons->Save Thiessen Polygons
29 □ Thiessen Polygons->Save Duplicated Thiessen Polygons To Table

When saving duplicated Thiessen polygons to table, e.g. row 2,4,8,9 are duplicated, then row 4,8,9 will be marked with value 2 in a newly created column (e.g. DUP_IDS). So that user can simply select empty values in DUP_IDS column to export a dataset without duplications.

Legend

30 □ Right Click on title->Set Display Precision (of text in legend)
31 □ Right Click on title->Use Scientific Notation(of text in legend)
32 □ Right Click on title->Legend Background Color
33 □ Right Click on title->Copy Legend to Clipboard
34 □ Right Click on Color block ->Fill Color for ... (change fill color of a category)
35 □ Right Click on Color block ->Outline Color for ... (change outline color of a category)
36 □ Double Click on Color block should highlight related observations in map/plot

When creating a Hierarchical Map, there is an internal (in-memory) weight being created for visualizing connections between header-quarter(root) and members. Please check if this internal weights not being listed in weights manager or other dialogs (e.g. variable selection dialog (LISA etc.), regression dialog).

37 □ Map->Hierarchical Map

8. Weights

8.1 Weights Manager

1 □ Create Button
2 □ Load Button
3 □ Remove Button
4 □ Weights Interaction Button
5 □ Weights Union Button
6 □ Histogram Button
7 □ Connectivity Map Button
8 □ Connectivity Graph Button

8.2 Weights Creation Dialog

When creating a weights file, check if its meta-data in Weights Manager dialog, as well as its Histogram, Connectivity Map, and Connectivity Graph. When create a GeoDa project (.gda) file, the meta-data of weights files should be saved in .gda project file.

Contiguity Weight

9 □ Select ID Variable: dropdown list (check if duplicated values detected)
10 □ Add ID Variable... button (check table for newly created ID variable)
11 □ Queen contiguity/Rook contiguity (choose one option), save a weights file
12 □ Order of contiguity 1 - 2 - 3 - 4, save a weights file
13 □ Include lower orders (check to work), save a weights file
14 □ Precision threshold (using NYC data in Sample Data), save a weights file

Distance Weight

Use lab Distance-Based Spatial Weights to verify the correctnes of weights creation.

15 □ X-coordinate variable and Y-coordinate variable (Centroids/Mean centers/variables e.g. x/y or lat/lng)
16 □ Distance metric (Euclidean/Arc mile/Arc km)
17 □ Distance Band: bandwidth input, and bandwidth sliding bar, save a weights file
18 □ check "use inverse distance" and "power" value, save a weights file

19 □ K-Nearest neighbors: change "Number of neighbors", save a weights file
20 □ K-Nearest neighbors: check "Use inverse distance?", save a weights file
21 □ K-Nearest neighbors: set Power value for inverse distance, save a weights file

22 □ Adaptive Kernel: select kernel function (Uniform/Triangular/Epanechnikov/Quartic/Gaussian), save a weights file
23 □ Adaptive Kernel: check "Diagonal weights=1" or "Apply kernel to diagonal weights", save a weights file
24 □ Adaptive Kernel: check "Specify bandwidth", change sliding value , save a weights file
25 □ Adaptive Kernel: check "Adaptive bandwidth", change "number of neighbors", save a weights file
26 □ Adaptive Kernel: check "Use max knn distance as bandwidth", share the same value of "number of neighbors", save a weights file

8.3 Social Weight

Use "Distance Weight" tab, and choose "Variables" instead of "Geometric centroids"

27 □ When switch between "Geometric centroids" and "Variables", the bandwidth "values" and related sliding bar should be updated. Re-open "Weights File Creation" dialog, should keep previous inputs.
28 □ Select one or more-than-one variables
29 □ Select "Transformation" option (Raw/Demean/Standardize Z/Standardize MAD)
30 □ Replicate the above cases 16-26

Use Weights in Map

31 □ Map->Rate Calculated Map->Spatial Rate
32 □ Map->Rate Calculated Map->Spatial Empirical Bayes
32 □ In map window(right click menu)->Connectivity->Show Selection and neighbors: mouse over on map, the hover object and its neighbors should be highlighted.
33 □ In map window(right click menu)->Connectivity->Show Graph: mouse click on map, the hover object and its neighbors should be highlighted with connection edges.

34 □ Space->Univariate Moran's I 35 □ Space->Bivariate Moran's I 36 □ Space->Differential Moran's I 37 □ Space->Moran's I with EB Rate

38 □ Space->Univariate Local Moran's I 39 □ Space->Bivariate Local Moran's I 40 □ Space->Differential Local Moran's I 41 □ Space->Local Moran's I with EB Rate

42 □ Space->Local G 43 □ Space->Local G*

44 □ Space->Univariate Local Join Count 45 □ Space->Bivariate Local Join Count 46 □ Space->Multivariate Local Join Count

47 □ Space->Univariate Local Geary 48 □ Space->Multivariate Local Geary

Use Weights in Clusters

GeoDa can save "Spanning Tree" as a weights file. When running following test cases, the "Spanning Tree" weights should be successfully loaded in Weights Manager.

49 □ Clusters->Skater (run Skater, and "Save Spanning Tree" as a weights file) 50 □ Clusters->Redcap (run Redcap, and "Save Spanning Tree" as a weights file) 51 □ Clusters->Maxp (run Maxp)

Use Weights in Regression

52 □ Regression Dialog: after specify Y and X, check Weights File. The regression report should contains DIAGNOSTICS FOR SPATIAL DEPENDENCE 52 □ Regression Dialog: after specify Y and X, check Weights File. The regression report should contains DIAGNOSTICS FOR SPATIAL DEPENDENCE 53 □ Regression Dialog: after specify Y, X and weights. Check "Spatial Lag" option. Run results should contains a SPATAIL LAG MODEL 54 □ Regression Dialog: after specify Y, X and weights. Check "Spatial Error" option. Run results should contains a SPATAIL ERROR MODEL

Special test dataset for weights creation

55 □ Points data with invalid geometry entry https://github.com/GeoDaCenter/geoda/files/2574648/Archive.zip

7. Time

Time Editor

1 □ Double click to select "Ungrouped Variables" to "Variables to include" List
2 □ Click > button to move selected "Ungrouped Variables" to "Variables to include" List
3 □ Click < button to move selected "Variables to include" back to "Ungrouped Variables" List
4 □ "Variables to include" List: Double Click->Edit Time
5 □ "Variables to include" List: Right Click->Add Time
6 □ "Variables to include" List: Right Click->Remove Time
9 □ Click "Move Up" button to change the order of "variables to include"
10 □ Click "Move Down" button to change the order of "variables to include"
11 □ Click > button to create "Grouped Variables"
12 □ Click < button to remove a created "Grouped Variables"
13 □ Manually Edit Group "Name"
14 □ Save Space-Time Table/Weights button

''' E.g. using NYC dataset, create grouped variable rent: rent2002, rent2005, rent2008 yrhom: yrhom2002, yrhom2005, yrhom2008 '''

15 □ GeoDa Menu: File->Save Project to save time variable definitions in .gda file
16 □ Load Space-Time Definition button from .gda Project file

Maps using Time variable

17 □ Check all thematic maps using time-variable
18 □ Using "Time Player" to update the time-variable in map window

Pay attention to the map using more than one time-variables (e.g. Cartogram): when change "current time" in "Time Player", the time-variables should keep time "difference". For example, Cartogram using circle size "rent-2002" and circle color "yrh-2005". When "current time" changes from 2002 to 2005, the Cartogram should update its variable: cirle size "rent-2005" and circle color "yrh-2008"

Plots using Time variable

19 □ Check all plots using time-variable
20 □ Using "Time Player" to update the time-variable in plot window

Table with Time Variable

21 □ Change cell value in Time variable
22 □ Delete Time variable in Table
23 □ Selection Tool with Time variable
24 □ Calculator with Time variable

Clusters with Time Variable

25 □ Check Time variable works in all Cluster methods

Space with Time Variable

26 □ Global Moran with Time variable
27 □ Local Moran with Time variable
28 □ Local G with Time variable
29 □ Local Join Count with Time variable
30 □ Local Geary with Time variable
31 □ Correlogram with Time variable
32 □ Average Chart with Time variable

33 □ Regression with Time variable

6. Correlogram

Correlogram Parameters Dialog

1 □ Variable
2 □ Distance (Eudlidean/Arc mile/Arc km)
3 □ Number Bins: (1-100)
4 □ Max Distance: (1-100)
5 □ Max Distance Sliding bar
6 □ All Pairs
7 □ Random Sample
8 □ Sample Size
9 □ Use specified seed
10 □ Change seed button
11 □ Help button

12 □ Create a time-grouped variable and select "Time" period

Correlogram Plot Menu

13 □ Change Parameter
14 □ Edit LOWESS Parameter
15 □ View->Set Display Precision (applies on Statistics)
16 □ View->Set Display Precision on Axes
17 □ View->Display Statistics
18 □ View->Save Results

Correlogram Plot

19 □ Select and Click on point(s) (update text on status bar)
20 □ Select on Histogram (no linking to other plots/maps is expected)

5. Conditional Scatter plot

□ check: Horizontal Cells (empty) Vertical Cells (one selection) Map Theme (one selection)
□ check Horizontal Cells (one selection) Vertical Cells (empty) Map Theme (one selection)

4. Conditional Histogram

□ check: Horizontal Cells (empty) Vertical Cells (one selection) Histogram Variable (one selection)
□ check Horizontal Cells (one selection) Vertical Cells (empty) Histogram Variable (one selection)

3. Conditional Map

□ check: Horizontal Cells (empty) Vertical Cells (one selection) Map Theme (one selection)
□ check Horizontal Cells (one selection) Vertical Cells (empty) Map Theme (one selection)

2. Histogram

Histogram Classification

Check if any "Custom Breaks" rendered correctly on canvas

E.g. Histogram: Crm_prp and "Custom Breaks": Crm_prs

Intervals

□ Choose Intervals # of Intervals should be >= 1 and <= # of obs.

View

□ Display Statistics
□ Set Display Precision (after check "Display Statistics")
□ Set Display Precision on Axes

1. Custom Breaks

1.1 New Custom Breaks

Category Editor

1 □ New
2 □ Edit Title
3 □ Delete
4 □ Assoc. Var.
5 □ Breaks
6 □ Color Scheme
7 □ Categories
8 □ Save Categories to Table
9 □ Automatic Labels
10 □ Manually editing "breaks 1/2/3/.."
11 □ Manually sliding break
12 □ Brushing&Linking Histogram

Maps

13 Map->Change Current MapType ->Custom Breaks -> Create New Custom

□ for a themeless map, Variable Settings dialog will be prompted to select variable, then category editor will be created using selected variable, "quantile" breaks, "sequential" color scheme, and "5" categories
□ for a thematic map, make sure the default category editor is created from current map
□ make sure the changes in category editor (new custom breaks) is applied to current map

14 Cartogram->Classification Themes ->Custom Breaks -> Create New Custom

□ make sure the default category editor is created from current map
□ make sure the changes in category editor (new custom breaks) is applied to current map

15 Bubble Chart ->Classification Themes ->Custom Breaks -> Create New Custom

□ make sure the default category editor is created from current map
□ make sure the changes in category editor (new custom breaks) is applied to current map

16 Conditional Map ->Map Color Classification->Custom Breaks -> Create New Custom

□ make sure the default category editor is created from current map
□ make sure the changes in category editor (new custom breaks) is applied to current map

17 Conditional Map ->Verticle Bins Classification->Custom Breaks -> Create New Custom

□ make sure the default category editor is created from current map
□ make sure the changes in category editor (new custom breaks) is applied to current map

18 Conditional Map ->Horizontal Bins Classification->Custom Breaks -> Create New Custom

□ make sure the default category editor is created from current map
□ make sure the changes in category editor (new custom breaks) is applied to current map

19 Conditional Histogram ->Verticle Bins Classification->Custom Breaks -> Create New Custom

□ make sure the default category editor is created from current map
□ make sure the changes in category editor (new custom breaks) is applied to current map

20 Conditional Histogram ->Horizontal Bins Classification->Custom Breaks -> Create New Custom

□ make sure the default category editor is created from current map
□ make sure the changes in category editor (new custom breaks) is applied to current map

21 Conditional Scatter Plot ->Verticle Bins Classification->Custom Breaks -> Create New Custom

□ make sure the default category editor is created from current map
□ make sure the changes in category editor (new custom breaks) is applied to current map

22 Conditional Scatter Plot ->Horizontal Bins Classification->Custom Breaks -> Create New Custom

□ make sure the default category editor is created from current map
□ make sure the changes in category editor (new custom breaks) is applied to current map

Plots

23 Histogram ->Histogram Classification ->Create New Custom

□ make sure the default category editor is created from current plot
□ make sure the changes in category editor (new custom breaks) is applied to current plot

24 Parallel Coordinate Plot ->Classification Themes ->Create New Custom

□ make sure the default category editor is created from current plot
□ make sure the changes in category editor (new custom breaks) is applied to current plot

1.2 Use existing "Custom Breaks"

Suppose we have a custom breaks named "Custom_breaks_1"

maps

25 GeoDa Menu->Map->Custom Breaks->Custom_breaks_1

□ should pop-up variable selection dialog, and default variable is defined in Category Editor and category "Custom_breaks_1" will be loaded automatically

26 Map window -> thematic map (e.g. box map) ->Change Map Type->Custom Breaks->Custom_breaks_1

□ check if Custom_breaks_1 breaks will replace breaks in existing thematic map

27 Cartogram->Classification Themes ->Custom Breaks -> "Custom_breaks_1"

□ check if Custom_breaks_1 breaks will replace breaks in current Cartogram

28 Bubble Chart ->Classification Themes ->Custom Breaks -> "Custom_breaks_1"

□ check if Custom_breaks_1 breaks will replace breaks in the current bubble chart

29 Conditional Map ->Map Color Classification->Custom Breaks -> "Custom_breaks_1"

□ check if Custom_breaks_1 breaks will replace breaks in the current conditional map

30 Conditional Map ->Verticle Bins Classification->Custom Breaks -> "Custom_breaks_1"

□ check if Custom_breaks_1 breaks will replace breaks in the current conditional map

31 Conditional Map ->Horizontal Bins Classification->Custom Breaks -> "Custom_breaks_1"

□ check if Custom_breaks_1 breaks will replace breaks in the current conditional map

32 Conditional Histogram ->Verticle Bins Classification->Custom Breaks -> "Custom_breaks_1"

□ check if Custom_breaks_1 breaks will replace breaks in the current conditional Histogram

33 Conditional Histogram ->Horizontal Bins Classification->Custom Breaks -> "Custom_breaks_1"

□ check if Custom_breaks_1 breaks will replace breaks in the current conditional Histogram

34 Conditional Scatter Plot ->Verticle Bins Classification->Custom Breaks -> "Custom_breaks_1"

□ check if Custom_breaks_1 breaks will replace breaks in the current conditional Scatter Plot

35 Conditional Scatter Plot ->Horizontal Bins Classification->Custom Breaks -> "Custom_breaks_1"

□ check if Custom_breaks_1 breaks will replace breaks in the current conditional Scatter Plot

Project file (.gda)

36 □ GeoDa Menu->File->Save Project should save "Custom_breaks_1" meta-data in the .gda project file
37 □ GeoDa Menu->File->Open Project (or Drag-n-drop .gda file) should load "Custom_breaks_1" in Category Editor dialog; and also can be used in maps and plots

plots

Histogram ->Histogram Classification ->Create New Custom

38 □ make sure the "Custom_breaks_1" category can be used in current plot

Parallel Coordinate Plot ->Classification Themes ->Create New Custom

39 □ make sure the "Custom_breaks_1" category can be used in current plot

Special Test Dataset

1 □ Points data with invalid geometry entry https://github.com/GeoDaCenter/geoda/files/2574648/Archive.zip