本文整理汇总了Python中StatValues.percent方法的典型用法代码示例。如果您正苦于以下问题:Python StatValues.percent方法的具体用法?Python StatValues.percent怎么用?Python StatValues.percent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StatValues
的用法示例。
在下文中一共展示了StatValues.percent方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: compute21a
# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import percent [as 别名]
def compute21a(subFolder, statData): # aggregate
print '\nComputing values for slide 2.1.1.'
values = ParseInput.extractAnswers(statData, [38,39])
values = StatValues.joinLists(values)
yesNum = values.count('87') + values.count('88')
noNum = values.count('89') + values.count('90')
[yesNumP, noNumP] = StatValues.percent([yesNum,noNum])
BuildTexts.addMacro(subFolder, 'valBAAyesNumP', str(yesNumP))
BuildTexts.addMacro(subFolder, 'valBAAnoNumP', str(noNumP))
BuildCharts.YesNoPieSVG(subFolder, 'pie211.svg', yesNumP, noNumP)
示例2: compute22a
# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import percent [as 别名]
def compute22a(subFolder, statData): # aggregate
print '\nComputing values for slide 2.2.1.'
values = ParseInput.extractAnswers(statData, [28,29,46,47])
values = StatValues.joinLists(values)
yesNum = values.count('83') + values.count('84')
noNum = values.count('85') + values.count('86')
[yesNumP, noNumP] = StatValues.percent([yesNum,noNum])
BuildTexts.addMacro(subFolder, 'valBBAyesNumP', str(yesNumP))
BuildTexts.addMacro(subFolder, 'valBBAnoNumP', str(noNumP))
BuildCharts.YesNoPieSVG(subFolder, 'pie221.svg', yesNumP, noNumP)
示例3: compute42c
# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import percent [as 别名]
def compute42c(subFolder, statData): # one question
print '\nComputing values for slide 4.2.c.'
values = ParseInput.extractAnswers(statData, [54])
yesNum = values.count('87') + values.count('88')
noNum = values.count('89') + values.count('90')
[yesNumP, noNumP] = StatValues.percent([yesNum,noNum])
BuildTexts.addMacro(subFolder, 'valDBCyesNum', str(yesNum))
BuildTexts.addMacro(subFolder, 'valDBCnoNum', str(noNum))
BuildTexts.addMacro(subFolder, 'valDBCyesNP', str(yesNumP))
BuildTexts.addMacro(subFolder, 'valDBCnoNP', str(noNumP))
BuildCharts.YesNoPieSVG(subFolder,'pie423.svg', yesNumP, noNumP)
示例4: compute31a
# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import percent [as 别名]
def compute31a(subFolder, statData): # aggregate
print '\nComputing values for slide 3.1.1.'
values = StatValues.extractAnswers(statData, [43])
yesNum = values.count('103') + values.count('104')
noNum = values.count('105') + values.count('106')
[yesNumP, noNumP] = StatValues.percent([yesNum,noNum])
BuildTex.addMacros(subFolder, 'valCAAyesNum', str(yesNum))
BuildTex.addMacros(subFolder, 'valCAAnoNum', str(noNum))
BuildTex.addMacros(subFolder, 'valCAAyesNumP', str(yesNumP))
BuildTex.addMacros(subFolder, 'valCAAnoNumP', str(noNumP))
BuildCharts.YesNoPie(subFolder + '\\pie311.png', yesNum, noNum)
示例5: compute23d
# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import percent [as 别名]
def compute23d(subFolder, statData): # aggregate
print '\nComputing values for slide 2.3.4.'
values = ParseInput.extractAnswers(statData, [30])
yesNum = values.count('83') + values.count('84')
noNum = values.count('85') + values.count('86')
[yesNumP, noNumP] = StatValues.percent([yesNum,noNum])
BuildTexts.addMacro(subFolder, 'valBCDyesNum', str(yesNum))
BuildTexts.addMacro(subFolder, 'valBCDnoNum', str(noNum))
BuildTexts.addMacro(subFolder, 'valBCDyesNP', str(yesNumP))
BuildTexts.addMacro(subFolder, 'valBCDnoNP', str(noNumP))
BuildCharts.YesNoPieSVG(subFolder, 'pie234.svg', yesNumP, noNumP)
示例6: compute23b
# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import percent [as 别名]
def compute23b(subFolder, statData): # aggregate
print '\nComputing values for slide 2.3.2.'
values = ParseInput.extractAnswers(statData, [52])
yesNum = values.count('99') + values.count('100')
noNum = values.count('101') + values.count('102')
[yesNumP, noNumP] = StatValues.percent([yesNum,noNum])
BuildTexts.addMacro(subFolder, 'valBCByesNum', str(yesNum))
BuildTexts.addMacro(subFolder, 'valBCBnoNum', str(noNum))
BuildTexts.addMacro(subFolder, 'valBCByesNP', str(yesNumP))
BuildTexts.addMacro(subFolder, 'valBCBnoNP', str(noNumP))
BuildCharts.YesNoPieSVG(subFolder, 'pie232.svg', yesNumP, noNumP)
示例7: compute23a
# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import percent [as 别名]
def compute23a(subFolder, statData): # aggregate
print '\nComputing values for slide 2.3.1.'
values = ParseInput.extractAnswers(statData, [23])
yesNum = values.count('61')
noNum = values.count('62')
[yesNumP, noNumP] = StatValues.percent([yesNum,noNum])
BuildTexts.addMacro(subFolder, 'valBCAyesNum', str(yesNum))
BuildTexts.addMacro(subFolder, 'valBCAnoNum', str(noNum))
BuildTexts.addMacro(subFolder, 'valBCAyesNP', str(yesNumP))
BuildTexts.addMacro(subFolder, 'valBCAnoNP', str(noNumP))
BuildCharts.YesNoPieSVG(subFolder, 'pie231.svg', yesNumP, noNumP)
示例8: compute32a
# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import percent [as 别名]
def compute32a(subFolder, statData): # aggregate
print '\nComputing values for slide 3.2.1.'
values = StatValues.extractAnswers(statData, [40,41,42])
values = StatValues.joinLists(values)
yesNum = values.count('99') + values.count('100')
noNum = values.count('101') + values.count('102')
[yesNumP, noNumP] = StatValues.percent([yesNum,noNum])
BuildTex.addMacros(subFolder, 'valCBAyesNum', str(yesNum))
BuildTex.addMacros(subFolder, 'valCBAnoNum', str(noNum))
BuildTex.addMacros(subFolder, 'valCBAyesNumP', str(yesNumP))
BuildTex.addMacros(subFolder, 'valCBAnoNumP', str(noNumP))
BuildCharts.YesNoPie(subFolder + '\\pie321.png', yesNum, noNum)
示例9: compute71
# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import percent [as 别名]
def compute71(subFolder, statData): # aggregate
print "\nComputing values for slide 7.1."
values = StatValues.extractAnswers(statData, [56, 57])
values = StatValues.joinLists(values)
yesNum = values.count("87") + values.count("88")
noNum = values.count("89") + values.count("90")
[yesNumP, noNumP] = StatValues.percent([yesNum, noNum])
BuildTex.addMacros(subFolder, "valGAyesNum", str(yesNum))
BuildTex.addMacros(subFolder, "valGAnoNum", str(noNum))
BuildTex.addMacros(subFolder, "valGAyesNumP", str(yesNumP))
BuildTex.addMacros(subFolder, "valGAnoNumP", str(noNumP))
BuildCharts.YesNoPie(subFolder + "\\pie71.png", yesNumP, noNumP)
示例10: compute23c
# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import percent [as 别名]
def compute23c(subFolder, statData): # aggregate (1 question)
print '\nComputing values for slide 2.3.3.'
values = ParseInput.extractAnswers(statData, [53])
ansA = values.count('120')
ansB = values.count('121')
ansC = values.count('122')
[ansAp, ansBp, ansCp] = StatValues.percent([ansA, ansB, ansC])
BuildTexts.addMacro(subFolder, 'valBCCansA', str(ansA))
BuildTexts.addMacro(subFolder, 'valBCCansB', str(ansB))
BuildTexts.addMacro(subFolder, 'valBCCansC', str(ansC))
BuildTexts.addMacro(subFolder, 'valBCCanAp', str(ansAp))
BuildTexts.addMacro(subFolder, 'valBCCanBp', str(ansBp))
BuildTexts.addMacro(subFolder, 'valBCCanCp', str(ansCp))
BuildCharts.Pie(subFolder, 'pie233.svg', [ansAp, ansBp, ansCp])
示例11: compute42a
# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import percent [as 别名]
def compute42a(subFolder, statData): # one question
print '\nComputing values for slide 4.2.a'
values = ParseInput.extractAnswers(statData, [37])
ansA = values.count('95')
ansB = values.count('96')
ansC = values.count('97')
ansD = values.count('98')
[ansAp, ansBp, ansCp, ansDp] = StatValues.percent([ansA, ansB, ansC, ansD])
BuildTexts.addMacro(subFolder, 'valDBAansAv', str(ansA))
BuildTexts.addMacro(subFolder, 'valDBAansBv', str(ansB))
BuildTexts.addMacro(subFolder, 'valDBAansCv', str(ansC))
BuildTexts.addMacro(subFolder, 'valDBAansDv', str(ansD))
BuildTexts.addMacro(subFolder, 'valDBAansAp', str(ansAp))
BuildTexts.addMacro(subFolder, 'valDBAansBp', str(ansBp))
BuildTexts.addMacro(subFolder, 'valDBAansCp', str(ansCp))
BuildTexts.addMacro(subFolder, 'valDBAansDp', str(ansDp))
BuildCharts.Pie(subFolder,'pie421.svg', [ansAp, ansBp, ansCp, ansDp])
示例12: compute41
# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import percent [as 别名]
def compute41(subFolder, statData): # one question
print '\nComputing values for slide 4.1.'
values = StatValues.extractAnswers(statData, [36])
ansA = values.count('91')
ansB = values.count('92')
ansC = values.count('93')
ansD = values.count('94')
[ansAp, ansBp, ansCp, ansDp] = StatValues.percent([ansA, ansB, ansC, ansD])
BuildTex.addMacros(subFolder, 'valDAansA', str(ansA))
BuildTex.addMacros(subFolder, 'valDAansB', str(ansB))
BuildTex.addMacros(subFolder, 'valDAansC', str(ansC))
BuildTex.addMacros(subFolder, 'valDAansD', str(ansD))
BuildTex.addMacros(subFolder, 'valDAansAp', str(ansAp))
BuildTex.addMacros(subFolder, 'valDAansBp', str(ansBp))
BuildTex.addMacros(subFolder, 'valDAansCp', str(ansCp))
BuildTex.addMacros(subFolder, 'valDAansDp', str(ansDp))
BuildCharts.Pie(subFolder + '\\pie41.png', [ansAp, ansBp, ansCp, ansDp])
示例13: compute22e
# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import percent [as 别名]
def compute22e(subFolder, statData): # aggregate (1 question)
print '\nComputing values for slide 2.2.5.'
values = StatValues.extractAnswers(statData, [49])
ansA = values.count('115')
ansB = values.count('116')
ansC = values.count('117')
ansD = values.count('118')
[ansAp, ansBp, ansCp, ansDp] = StatValues.percent([ansA, ansB, ansC, ansD])
BuildTex.addMacros(subFolder, 'valBBEansA', str(ansA))
BuildTex.addMacros(subFolder, 'valBBEansB', str(ansB))
BuildTex.addMacros(subFolder, 'valBBEansC', str(ansC))
BuildTex.addMacros(subFolder, 'valBBEansD', str(ansD))
BuildTex.addMacros(subFolder, 'valBBEansAp', str(ansAp))
BuildTex.addMacros(subFolder, 'valBBEansBp', str(ansBp))
BuildTex.addMacros(subFolder, 'valBBEansCp', str(ansCp))
BuildTex.addMacros(subFolder, 'valBBEansDp', str(ansDp))
BuildCharts.Pie(subFolder + '\\pie225.png', [ansA, ansB, ansC, ansD])
示例14: compute42b
# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import percent [as 别名]
def compute42b(subFolder, statData): # one question
print '\nComputing values for slide 4.2.b.'
values = ParseInput.extractAnswers(statData, [45])
ansA = values.count('107')
ansB = values.count('108')
ansC = values.count('109')
ansD = values.count('110')
ansE = values.count('111')
[ansAp, ansBp, ansCp, ansDp, ansEp] = StatValues.percent([ansA, ansB, ansC, ansD, ansE])
BuildTexts.addMacro(subFolder, 'valDBBansAv', str(ansA))
BuildTexts.addMacro(subFolder, 'valDBBansBv', str(ansB))
BuildTexts.addMacro(subFolder, 'valDBBansCv', str(ansC))
BuildTexts.addMacro(subFolder, 'valDBBansDv', str(ansD))
BuildTexts.addMacro(subFolder, 'valDBBansEv', str(ansE))
BuildTexts.addMacro(subFolder, 'valDBBansAp', str(ansAp))
BuildTexts.addMacro(subFolder, 'valDBBansBp', str(ansBp))
BuildTexts.addMacro(subFolder, 'valDBBansCp', str(ansCp))
BuildTexts.addMacro(subFolder, 'valDBBansDp', str(ansDp))
BuildTexts.addMacro(subFolder, 'valDBBansEp', str(ansEp))
BuildCharts.Pie(subFolder,'pie422.svg', [ansAp, ansBp, ansCp, ansDp, ansEp])