-
1. Re: How do I show 2 pairs of measures with different marks on a custom map?
Shawn Wallwork Mar 1, 2012 12:53 PM (in response to Catherine Petry)Catherine, can you provide a screen shot of the two different maps you're trying to meld together? If I could see the preferred mark types and how they lay-out I might have a solution.
--Shawn
-
2. Re: How do I show 2 pairs of measures with different marks on a custom map?
Catherine Petry Mar 1, 2012 2:37 PM (in response to Shawn Wallwork)Sure - Mark1.png is the "base plot" and I want to add the quantities and marks from Mark2.png.
Cathy
-
3. Re: How do I show 2 pairs of measures with different marks on a custom map?
Shawn Wallwork Mar 1, 2012 2:54 PM (in response to Catherine Petry)Catherine, this is almost certainly 'do-able'. There are different approaches 1) Dual axis (what didn't display properly?) 2) Reshape your data, since the coordinates are the same you should be able to consolidate the data into a single table in the data source.
If this isn't sensitive data post a packaged workbook, or mock up a bit of data, post it, and I'll see what I can do.
--Shawn
-
4. Re: How do I show 2 pairs of measures with different marks on a custom map?
Catherine Petry Mar 1, 2012 3:31 PM (in response to Shawn Wallwork)Okay - that's good news - I can't send you the whole workbook but I'll explain further. 1) Data - all the fields you see in "Measures" are from the same table. I have "paged" by night to select a subset of the lines in the table (output_opsim3_51). You are viewing Night 77. Mark1.png shows the targets visited on Night 77 as indicated by the colored diamonds in x,y coordinates specified by project_ra, project_dec pairs (in columns and rows). And then I simply added a background image and registered it to the axes for comparison. In the same line as the target field (project_ra, project_dec) is the position of the moon (moon_project_ra, moon_project_dec). Because of an approximation that is made, this coordinate does not change during a night - so if there are 100 fields visited (diamonds) there are 100 moon points as well, but they will all be superimposed. 2) If I create a dual axis (as shown in Mark3.png) the moon points show up as horizontal line of marks plus a vertical line of marks. When I change the Mark type for moon_project_ra, the vertical line of marks respond and the horizontal marks stay the same. Lastly, if I select and view the details for the large green moon mark, it lists values for moon_project_ra, project_dec, not moon_project_ra, moon_project_dec as I would expect. The details on the diamond marks on the horizontal line show project_ra, moon_project dec. So it looks like the pairs aren't coordinated properly.
If need be - I can try to extract a portion of the data for you to work with if this doesn't help.
Cathy
-
Mark3.png 276.6 KB
-
-
5. Re: How do I show 2 pairs of measures with different marks on a custom map?
Shawn Wallwork Mar 1, 2012 4:18 PM (in response to Catherine Petry)Catherine, first what happens when you take the moon_project_ra pill off the columns shelf? Dual axis normally just require one of the axes to be doubled. Does that clean things up any? If not, yes it would be very helpful if you could extract a bit of data, just a few nights, and posted a packaged workbook. Tableau lets you delete any measures that are not showing in the view, so that could greatly simplify the data. Interesting viz by the way.
--Shawn
-
6. Re: How do I show 2 pairs of measures with different marks on a custom map?
Catherine Petry Mar 1, 2012 7:29 PM (in response to Shawn Wallwork)Hi - that doesn't work - just makes the vertical line go away. I think what I am struggling with is the translation between how I interact with a traditional plotting package (making x,y plots and over plotting other x,y data sets on a set coordinate system) and how Tableau handles the data. I've attached a skeleton packaged workbook, let me know what you think.
Cathy
-
PetryBook.twbx.zip 3.4 MB
-
-
7. Re: How do I show 2 pairs of measures with different marks on a custom map?
Richard Leeke Mar 2, 2012 2:18 AM (in response to Catherine Petry)I don't think you can do this with your data structured as you have it (but that's always a sure way to inspire Joe or someone else to rise to the challenge!).
I'm pretty sure that what you're trying to do would require what I've heard the Tableau folk refer to as a "dual-dual" axis plot, which isn't supported (yet). I know it was being thought about a while back.
But all may not be lost. It looks to me as if you should be able to restructure your data, as per Shawn's option 2 above.
-
8. Re: How do I show 2 pairs of measures with different marks on a custom map?
Catherine Petry Mar 2, 2012 9:55 AM (in response to Richard Leeke)Hi Richard -
I'd be happy to try to restructure the data, but I'm not sure how to set it up to make it plot the way I want. Did you have a suggestion?
Cathy
-
9. Re: How do I show 2 pairs of measures with different marks on a custom map?
Richard Leeke Mar 2, 2012 1:36 PM (in response to Catherine Petry)Essentially you would need to add a type column which distinguished between rows of the two types of data that you want to display,
Then you need to duplicate all your rows (or perhaps just add one row per day for the moon data - I think you said the moon marks for the day were all on top of each other - so you probably only need one of them?).
Then the easiest thing is probably just to keep all the fields that you currently have, but for records of type moon leave the fields that are not moon related null and vice versa.
Finally create calculated fields for your x and y coordinates like this:
[ra] = IIF([type] == "moon", [moon_project_ra], [project_ra])
Then you just need those fields on Rows and Columns, with one of them duplicated (to get a dual axis map so you can set up your mark types differently).
Hmmm - I'm sure I've done this successfully in the past, but right now I can't see how this is going to work without getting both types of marks drawn at both locations. If I remember I'll have a play later and post a sample if I remember the trick. I'm sure I helped Shawn with one like this for showing demographics around retail outlets - but maybe the trick there was that one axis was a filled map...
-
10. Re: How do I show 2 pairs of measures with different marks on a custom map?
Joe Mako Mar 2, 2012 5:05 PM (in response to Catherine Petry)How about the attached?
I used the same principlas as used in this double-dual axis example:
http://joemako.tumblr.com/post/3174038705/tableau-points-and-polygons-tutorial-video
Duplicated the data with custom SQL, and modified your formulas to either return a value or Null based on which copy of data the record is.
Version 7 also makes handling Null values easier, just turn off the indicator.
-
filter night.twbx.zip 5.8 MB
-
-
12. Re: How do I show 2 pairs of measures with different marks on a custom map?
Catherine Petry Apr 5, 2012 4:22 PM (in response to Joe Mako)Hi Joe -
Your video helped me get the last few pieces I needed to accomplish my goal - I've uploaded the resulting packaged workbook. The first sheet "First Position - Movie" is the end result. I wanted one point (the diamond) to show the first field visited in the night, and another to show the location and phase of the moon (gray circle - black is full, white is new).
Many thanks! (again...)
Cathy