Skip to main content

I have features that I'd like to create one row per Precinct and the create an attribute for each Contest values assigning the Votes value to each of those new attributes. I have looked at the Attribute Exploder, the Aggregator, the List Exploder, etc. I'm a bit stumped. Any suggestion on how to accomplish this?

features

 

Something like this:

 

newFeatures

Thanks for any help!

Something like this.

newFeatures


@billybob​  If you're familiar with Excel, then you can set-up the pivot table in Excel and then use that as a template file. Using a Template File when Writing Excel Data. The trick is to have FME write to a named range and then drive your pivot from that named range.

If you're not familiar with Excel, then you can try the AttributeTransposer custom transformer that is on FME HUB. Or transpose using the AttributeExposer and Aggregator as you suggest, see the second example in: Transpose a Table Using FME


Mark,

Thanks so much for the response. I apologize. Now, I see from my image that you can't tell there a 288 precinct with the same pattern of values, so the contest values are repeated for each precinct. The example below shows just the first two precincts of the 288. All the data comes from the same source. "And therein, as the Bard would tell us, lies the rub."

 

features

 

 

 


Mark,

Thanks so much for the response. I apologize. Now, I see from my image that you can't tell there a 288 precinct with the same pattern of values, so the contest values are repeated for each precinct. The example below shows just the first two precincts of the 288. All the data comes from the same source. "And therein, as the Bard would tell us, lies the rub."

 

features

 

 

 

@billybob​ I had inferred that there would be multiple precincts - each precinct getting a separate row. I thinks that's OK. The approaches I mentioned above should be able to handle that


@Mark Stoakes​ Thanks so much Mark! I really appreciate the help and support.


@Mark Stoakes​ ,

Thanks again for pointing me in right direction. Once I wrapped my head around the process, I was able to accomplish getting the correct attributes and row values. Having a workspace to help me step through the process was invaluable. Super!

 

Before: beforeVotes

After:

afterVotes


Reply