I am going to start a project soon where, after the data has been processed in various ways, an output jpg showing a graph of the data should be produced. The workflow is as follows:
1. A feature class with several fields containing various values is created. 2. A radar/bar chart based on several fields within the feature class should be produced 3. Colour the chart according to whether the field value is within a certain threshold e.g. if the threshold for the field CHEM1 is 4, a feature with CHEM1 = 2 will be coloured red, while a feature with CHEM1 = 6 will be yellow. 4. Each unique feature within the feature class should have its own graph i.e. 10 features = 10 graphs 5. The graphs should be saved as jpgs 6. The jpgs should be added as attachments to the geodatabase the feature class is in - not needed at this point but should be kept in mind
I will be automating this process after the initial run, as the new data will be processed monthly and the jpgs generated automatically, so a python script will definitely used. Before I begin though, I am unsure as to which graphing method I should use. I have researched the following options for my approach:
1. Python + ArcPy graphing 2. Python + matplotlib 3. Python + Excel
My pros and cons for each option:
- I am used to ArcMap's graphing options, and have been using arcpy and ModelBuilder daily for the past year, so it will be relatively simple for me to use the inbuilt arcpy functionality.
- I have never used matplotlib before, but my brief research indicates that it is quite simple to use for basic charts, and it doesn't seem to be that much more difficult to create more advanced charts using it. Also, since it's included with ArcGIS, it seems like a logical choice.
- I have worked heavily with Excel for many years, and am very familiar with creating charts in it. I also did VBA, and it is my understanding that after looking at the VBA code for an action, one can translate that into Python quite quickly.
I am leaning towards the third option, since I feel most comfortable with that combination. However, since this process will have to be automated completely and will eventually run on the server, I do not like the idea of having to install Excel on the server so that this process can be run. I also fear that all the arcpy code will slow the process down (from a combination of not having enough experience with the graphing methods, not being able to optimise my code, slow computers in general, network issues), and that even though matplotlib appears to be the simplest/fastest approach, I will end up taking longer writing the code because I have not used it before.
My question is not which combination works the best overall (because that would be subjective/too localised), but which option would be the best combination to achieve the outcome for this particular task?