plotData[run]["tag"] = nametag plotData[run]["color"] = plotcolor run += 1 #------------------------------------------------------------------------ filenamePrefix = '%s_%s_addInvest' % (country, version) output.getCombinedPlots(run, plotData, startYear=startYear - 1, filenamePrefix=filenamePrefix, save=True) output.getCompareDeathsAverted(run, plotData, scalePercent=0.1, filenamePrefix=filenamePrefix, title=title, save=True) output.getU5StuntingCasesAverted(run, plotData, scalePercent=0.5, filenamePrefix=filenamePrefix, title=title, save=True) output.getA5StuntingCasesAverted(run, plotData, scalePercent=0.5, filenamePrefix=filenamePrefix, title=title, save=True)
percentageIncrease = 50 title = '%s: 2016-2030 \n Scale up interventions by %i%% points'%(country,percentageIncrease) filenamePrefix = '%s_%i'%(country,percentageIncrease) numInterventions = len(spreadsheetData.interventionList) colorStep = 1./float(numInterventions)-1.e-2 for ichoose in range(numInterventions): chosenIntervention = spreadsheetData.interventionList[ichoose] pickleFilename = '%s_Intervention%i_P%i.pkl'%(country,ichoose,percentageIncrease) nametag = chosenIntervention print "\n"+nametag fileX = open(pickleFilename, 'rb') # read the model output with simple intervention modelXList = [] while 1: try: modelXList.append(pickle.load(fileX)) except (EOFError): break fileX.close() plotData.append({}) plotData[run]["modelList"] = modelXList plotData[run]["tag"] = nametag plotData[run]["color"] = (1.0-colorStep*run, 1.0-0.23*abs(run-4), 0.0+colorStep*run) run += 1 output.getCombinedPlots(run, plotData, filenamePrefix=filenamePrefix, save=True) output.getCompareDeathsAverted(run, plotData, filenamePrefix=filenamePrefix, title=title, save=True)