3

I'm using ArcGIS 10.1 for Desktop.

I have generated a table which has road segments which get inundated during different flood events. I want to be able to add a pie chart to the map which shows that during each flood ARI (1y, 2y, 5y, 10y, 20y, 50y and 100y) x% of the road network in the AOI gets inundated.

I tried the following:

enter image description here

and get

enter image description here

The table looks like

enter image description here

Is it possible for me to add python code for the chart to add all the 1y lengths and display that number only, 2y total lengths etc only so that you get a pie chart with just the 7 categories. I need to automate this as it needs to be run in several areas and some of the input data changes.

4
  • I hope I understand your requirements correctly. You want one chart for all roads? Use [Sumarize] (help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//…) to calculate the sum of the length for the field ARI. Use the new table to create your chart.
    – Jens
    Sep 19, 2012 at 7:20
  • 1
    "The only worse design than a pie chart is several of them." Edward Tufte
    – radek
    Sep 19, 2012 at 9:34
  • Thanks Jen -I need the sum for the 7 ARI categories individually.
    – GeorgeC
    Sep 19, 2012 at 13:15
  • 1
    @radek, I love that quote. I can't stand pie charts and the constant misuse of them.
    – Fezter
    Aug 10, 2015 at 0:46

2 Answers 2

3

If you perform a Dissolve command on your road data layer using the ARI field as the dissolve field it will create a new layer with one row for each unique value in the ARI field. You can the recalculate the length of each dissolved line and make the pie chart using the new layer.

1
  • Yes but the question was can it be done in the same dataset without having to create a new one. In excel you can use a function to sum a column where another column full fills a criteria -can the same be done in python?
    – GeorgeC
    Sep 19, 2012 at 13:13
1

Use Summary Statistics to select each field (1y, 2y etc) and sum them individually. Do not select a Case field. Unfortunately this will create a new output feature class.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.