Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

best,

share|improve this question
    
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 '12 at 7:20
    
"The only worse design than a pie chart is several of them." Edward Tufte –  radek Sep 19 '12 at 9:34
    
Thanks Jen -I need the sum for the 7 ARI categories individually. –  GeorgeC Sep 19 '12 at 13:15
add comment

2 Answers

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.

share|improve this answer
    
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 '12 at 13:13
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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