Exercise 5 | Grounds Maintenance Project - Neighborhood Averages |
Data | City Parks (MapInfo TAB) |
Overall Goal | Calculate the size and average size of each park in the city, to use in Grounds Maintenance estimates for grass cutting, hedge trimming, etc. |
Demonstrates | Group-By Processing |
Start Workspace | C:\FMEData2019\Workspaces\DesktopBasic\DataTransformation-Ex5-Begin.fmw |
End Workspace | C:\FMEData2019\Workspaces\DesktopBasic\DataTransformation-Ex5-Complete.fmw |
Let's continue your work on the grounds maintenance project.
The parks team has decided that they do not want the average area of parks for the city as a whole. Instead, they want the average size of parks in each neighborhood; so let's do that for them.
1) Start FME Workbench
Start FME Workbench (if necessary) and open the workspace from Exercise 4. Alternatively you can open C:\FMEData2019\Workspaces\DesktopBasic\DataTransformation-Ex5-Begin.fmw
2) Set Group-By in the StatisticsCalculator
This is a straightforward task. View the parameters for the StatisticsCalculator transformer and click the 'browse' button next to the Group By parameter. Select the attribute called Neighborhood:
Click OK/Apply to apply the changes to the transformer.
3) Run the Workspace
Click on the StatisticsCalculator and then click on Run To This. Inspect the Summary output port in Visual Preview. The Summary output port creates a summarized table to any of the statistics you are calculating.
You should see that each neighborhood now has its own value for AverageParkArea:
CONGRATULATIONS |
By completing this exercise you have learned how to:
|