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.
-
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– Jens2012年09月19日 07:20:02 +00:00Commented Sep 19, 2012 at 7:20
-
1"The only worse design than a pie chart is several of them." Edward Tufteuser173– user1732012年09月19日 09:34:24 +00:00Commented Sep 19, 2012 at 9:34
-
Thanks Jen -I need the sum for the 7 ARI categories individually.GeorgeC– GeorgeC2012年09月19日 13:15:16 +00:00Commented 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– Fezter2015年08月10日 00:46:20 +00:00Commented Aug 10, 2015 at 0:46
2 Answers 2
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.
-
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– GeorgeC2012年09月19日 13:13:21 +00:00Commented Sep 19, 2012 at 13:13
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.