I would like to graph my data from a shapefile. The data I wish to display is the sum of the nominal data per each year that it occurred.

I have enclosed a screenshot to illustrate my idea. There is the field of data (string) I wish to graph. There are only A's and W's in the field (125 in total) and I want the W's totaled per year and the A's totaled per year as multiple bars like shown in the graph below. Then I can display those bars on a yearly basis with their respective totals. If that makes sense, please help me.

enter image description here

1 Answer 1


Try this:

1) Open the attribute table of your shapefile, right-click the field with the values you wish summarized as a graph, click "Summarize..." This will create a .dbf table which can be added to your table of contents.

2) Click View>Layout>Graphs>Create and create the graph using the *.dbf summary table as your Layer/Table. Fill out the other options in the graph to suit your needs.

That graph can then be manipulated and added to the layout view if necessary.

EDIT: Updated to perform the more specific task that the question is now asking.

To accomplish a result like you're looking for:

Before Summarizing your table:

1) Add two new fields (One for each potential value) of type Integer.

2) Click Selection>Select By Attributes where your value field equals one of the types (E.G. "WTypeOrAType" = 'W')

enter image description here

3) Right click the equivalent new field in the attribute table (in this case, 'W') and open Field Calculator

4) Enter your expression as 1, so all selected rows will equal 1.

enter image description here

5) Repeat steps 2-4 with the other type ('A')

6) Clear your selection. Now that you have a distinct numeral for each instance of a type, summarize your table as follows:

a) Right click "Year" or similar such field and click 'Summarize'

b) Option one in the dialog is set to "Year", set option two to include a Sum of both "W" and "A" columns.

7) Now you have a table summarizing total occurrences of A Types and W Types per year, create the graph as indicated above with a series for Type A and Type W (see graphic)

Note that you'll have to clean up the formatting and whatnot. I hope this is helpful.

enter image description here

  • Thanks. that got me started and more progress than before. I edited my question and included an image (finally got permission!) of something similar of what I want. I'm not sure how to create a graph like this of my data.
    – Kimball
    Jul 12, 2012 at 14:31
  • Updated my answer to hopefully address your specific issue and solve it with minimal to no scripting required.
    – AHigh
    Jul 12, 2012 at 17:45
  • Thanks for the updated answer. This is on the right track. But I am a little confused with steps 2-4. Could you please elaborate. I have added my two new fields. (I named them NEW_A and NEW W) And I don't know where to go from there.
    – Kimball
    Jul 12, 2012 at 18:21
  • Sure. I added a couple new graphics to illustrate. You can find the Select By Attributes in the Selection dropdown on the top menu bar. After that, re-opening the attribute table and right clicking the column with the data to be calculated (W) will allow you to select "Field Calculator..."
    – AHigh
    Jul 12, 2012 at 18:29
  • Yes! Thank you AHigh for details and specific comments and screen shots. This was exactly what I needed. I would include an image of my graph to show but I don't know how to add one to a comment, only to a post..
    – Kimball
    Jul 12, 2012 at 19:16

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.