Feature #924

Add option to draw lines between polygons to visualize some relationship.

Added by Andy Dufilie about 5 years ago. Updated over 3 years ago.

Status:ResolvedStart date:04/06/2012
Priority:HighDue date:
Assignee:YenFu Luo% Done:

100%

Category:Visualization InterfaceEstimated time: (Total: 40.00 h)
Target version:-
Complexity: OIC Priority:No
Required by:MARC, Kansas City, MO

Description

Note that the current workaround is to just create a shapefile containing the lines you want and use feature #925 once it's implemented.

Draw lines connecting the centroids of all polygons to the selected centroid, then vary the width and color of those lines. So, imagine a US county to county net migration data set. I select my home county. Lines are drawn to all other counties for which there is a non-zero net migration between them and my home. The width of the line shows the amount of net migration. The color of the line shows the direction – e.g., blue lines for net IN-migration to my county and red for net OUT-migration from my county.

----------------------------
Developer notes:
Implement a plotter that will draw lines between centroids of polygons with color and thickness based on the data.

The plotter will have the following DynamicColumn objects, with their type mappings in parentheses:
  • sourceGeom(GeomKeyType1->Geometry)
  • destinationGeom(GeomKeyType2->Geometry)
  • sourceKey(DataKeyType->GeomKeyType1)
  • destinationKey(DataKeyType->GeomKeyType2)
  • color(DataKeyType->Number)
  • thickness(DataKeyType->Number)

Sample data (generate new key when importing, key type will be DataKeyType):

sourceKey,destinationKey,dataValue
02,04,100
02,05,200
02,06,300
02,07,400
03,04,10
03,05,20
03,06,30
03,07,40


Subtasks


Related issues

Related to Weave - Feature #919: Mapping feature: Visualize lines and their attributes Rejected
Related to Weave - Feature #925: Add an option to control the thickness of a line based on some data value (on the map) Resolved 04/06/2012
Related to Weave - Feature #54: Add support for key mappings in Weave. Resolved 07/20/2011

History

#1 Updated by Andy Dufilie about 5 years ago

  • Parent task deleted (#919)

#2 Updated by Andy Dufilie almost 5 years ago

The current workaround is to just create a shapefile containing the lines.

#3 Updated by Andy Dufilie almost 5 years ago

  • Description updated (diff)
  • Category set to Visualization Interface

#4 Updated by Andy Dufilie almost 5 years ago

  • Description updated (diff)

#5 Updated by Andy Dufilie over 4 years ago

  • Assignee set to YenFu Luo

#6 Updated by Andy Dufilie over 4 years ago

  • OIC Priority set to No

#7 Updated by Andy Dufilie over 4 years ago

  • Description updated (diff)

#8 Updated by Andy Dufilie over 4 years ago

  • Description updated (diff)

#9 Updated by Andy Dufilie over 4 years ago

  • Description updated (diff)

#10 Updated by Andy Dufilie over 4 years ago

  • Description updated (diff)

#11 Updated by YenFu Luo over 4 years ago

  • Status changed from Open to Awaiting Feedback

Please refer to the following example.
There exists both IN and OUT migration between two counties.
sourceKey,destinationKey,dataValue
02, 04, 50
04, 02, 60
This causes the overlapping of two connections between these two counties.

What kind of connection should be drawn in this case?
First idea: visualize both connections by semi-transparent lines, curve lines and etc. (Need Feedback)
Second idea: only draw the net value after summing up two records
sourceKey,destinationKey,dataValue
04, 02, 10

#12 Updated by Andy Dufilie over 4 years ago

You don't have to worry about that for now because this layer will be used to probe on a single source record, so if you probe on 02, the 02-to-04 data will be shown while the 04-to-02 data will not.

#13 Updated by Andy Dufilie over 4 years ago

Actually, the behavior is described in the feature request description above:

The width of the line shows the amount of net migration. The color of the line shows the direction – e.g., blue lines for net IN-migration to my county and red for net OUT-migration from my county.

#14 Updated by YenFu Luo over 4 years ago

Question 1
sourceKey,destinationKey,dataValue
02, 04, 50
04, 02, 60
From this table, if 02 is probed, we only draw a red line from 02 to 04 with value "50" (out migration)??

Question 2
sourceKey,destinationKey,dataValue
02, 04, 50
02, 04, -60
The above example is exactly the same as previous example. (reverse the second row)
Since we only draw the net value, the result will be 02, 04, "-10" (Blue line for In-Migration)??
Thank you.

#15 Updated by Manny Trillo over 4 years ago

Data value is net migration.

sourceKey,destinationKey,dataValue
02, 04, -10
04, 02, +10

If 02 is probed, draw a red line from 02 to 04 with value of 10.
If 04 is probed, draw a blue line from 04 to 02 with a value of 10

#16 Updated by YenFu Luo over 4 years ago

  • Status changed from Awaiting Feedback to Needs Merge

Push to branch feature_924
Use relation_test_data data table for test

#17 Updated by YenFu Luo about 4 years ago

  • Status changed from Needs Merge to In Progress

#18 Updated by Andy Dufilie about 4 years ago

Should I merge this or are you still working on the branch?

#19 Updated by YenFu Luo about 4 years ago

I have completed the requirement of this feature request.
You can merge this.
However, I will add some features such as curve line, arrow, and etc. as discussed in the last weekly meeting.

#20 Updated by Andy Dufilie about 4 years ago

If you're working on the branch then I'll wait.

#21 Updated by YenFu Luo about 4 years ago

Work from April 4 to 12

#22 Updated by YenFu Luo about 4 years ago

  • Status changed from In Progress to Needs Merge

Push to branch feature_924
Add an option to display the value in the middle of the line

#23 Updated by Andy Dufilie about 4 years ago

  • Status changed from Needs Merge to Resolved

Also available in: Atom PDF