本文整理汇总了Python中SSUtilities.addColon方法的典型用法代码示例。如果您正苦于以下问题:Python SSUtilities.addColon方法的具体用法?Python SSUtilities.addColon怎么用?Python SSUtilities.addColon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SSUtilities
的用法示例。
在下文中一共展示了SSUtilities.addColon方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createDiagnosticReport
# 需要导入模块: import SSUtilities [as 别名]
# 或者: from SSUtilities import addColon [as 别名]
def createDiagnosticReport(self):
"""Creates a formatted summary table of the OLS
diagnostics."""
#### Create PValue Array ####
allPVals = NUM.array( [self.fProb, self.waldProb,
self.BPProb, self.JBProb] )
#### Check For Any Significance for Extra Padding ####
signFlag = NUM.any(allPVals <= 0.05)
#### Table Title ####
header = ARCPY.GetIDMessage(84076)
feet = [84104, 84105, 84106, 84107]
feet = [ ARCPY.GetIDMessage(i) for i in feet ]
dFoot, eFoot, fFoot, gFoot = feet
dFoot = ARCPY.GetIDMessage(84104)
row1 = [UTILS.addColon(ARCPY.GetIDMessage(84253)),
self.ssdo.inName,
' ' + UTILS.addColon(ARCPY.GetIDMessage(84254)),
UTILS.padValue(self.depVarName, significant = signFlag)]
aiccLab = ARCPY.GetIDMessage(84251) + " " + dFoot
row2 = [UTILS.addColon(ARCPY.GetIDMessage(84093)),
str(self.n), ' ' + UTILS.addColon(aiccLab),
UTILS.padValue(UTILS.formatValue(self.aicc),
significant = signFlag)]
r2Lab = ARCPY.GetIDMessage(84019) + " " + dFoot
adjR2Lab = ARCPY.GetIDMessage(84022) + " " + dFoot
row3 = [UTILS.addColon(r2Lab), UTILS.formatValue(self.r2),
' ' + UTILS.addColon(adjR2Lab),
UTILS.padValue(UTILS.formatValue(self.r2Adj),
significant = signFlag)]
fdofLab = ARCPY.GetIDMessage(84028)
fLab = ARCPY.GetIDMessage(84025) + " " + eFoot
row4 = [UTILS.addColon(fLab), UTILS.formatValue(self.fStat),
" " + UTILS.addColon(fdofLab.format(self.q, self.dof)),
UTILS.writePVal(self.fProb, padNonSig = True)]
chiMess = ARCPY.GetIDMessage(84034)
wLab = ARCPY.GetIDMessage(84031) + " " + eFoot
row5 = [UTILS.addColon(wLab), UTILS.formatValue(self.waldStat),
" " + UTILS.addColon(chiMess.format(self.q)),
UTILS.writePVal(self.waldProb, padNonSig = True)]
kLab = ARCPY.GetIDMessage(84037) + " " + fFoot
row6 = [UTILS.addColon(kLab), UTILS.formatValue(self.BP),
' '+ UTILS.addColon(chiMess.format(self.q)),
UTILS.writePVal(self.BPProb, padNonSig = True)]
jbLab = ARCPY.GetIDMessage(84043) + " " + gFoot
row7 = [UTILS.addColon(jbLab), UTILS.formatValue(self.JB),
' '+ UTILS.addColon(chiMess.format(2)),
UTILS.writePVal(self.JBProb, padNonSig = True)]
#### Finalize Diagnostic Table ####
diagTotal = [ row1, row2, row3, row4, row5, row6, row7 ]
diagJustify = ["left", "right", "left", "right"]
self.diagTable = UTILS.outputTextTable(diagTotal,
header = header, pad = 1,
justify = diagJustify)
self.diagRaw = diagTotal
self.diagJustify = diagJustify
示例2: reportHTML
# 需要导入模块: import SSUtilities [as 别名]
# 或者: from SSUtilities import addColon [as 别名]
def reportHTML(self, htmlFile = None):
"""Generates a graphical html report for Moran's I."""
#### Shorthand Attributes ####
zi = self.zi
#### Progress and Create HTML File Name ####
writeMSG = ARCPY.GetIDMessage(84228)
ARCPY.SetProgressor("default", writeMSG)
ARCPY.AddMessage(writeMSG)
if not htmlFile:
prefix = ARCPY.GetIDMessage(84227)
outputDir = UTILS.returnScratchWorkSpace()
baseDir = UTILS.getBaseFolder(outputDir)
htmlFile = UTILS.returnScratchName(prefix, fileType = "TEXT",
scratchWS = baseDir,
extension = "html")
#### Obtain Correct Images ####
imageDir = UTILS.getImageDir()
clustStr = ARCPY.GetIDMessage(84243)
dispStr = ARCPY.GetIDMessage(84244)
if zi <= -2.58:
imageFile = OS.path.join(imageDir, "dispersedValues01.png")
info = ("1%", dispStr)
imageBox = OS.path.join(imageDir, "dispersedBox01.png")
elif (-2.58 < zi <= -1.96):
imageFile = OS.path.join(imageDir, "dispersedValues05.png")
info = ("5%", dispStr)
imageBox = OS.path.join(imageDir, "dispersedBox05.png")
elif (-1.96 < zi <= -1.65):
imageFile = OS.path.join(imageDir, "dispersedValues10.png")
info = ("10%", dispStr)
imageBox = OS.path.join(imageDir, "dispersedBox10.png")
elif (-1.65 < zi < 1.65):
imageFile = OS.path.join(imageDir, "randomValues.png")
imageBox = OS.path.join(imageDir, "randomBox.png")
elif (1.65 <= zi < 1.96):
imageFile = OS.path.join(imageDir, "clusteredValues10.png")
info = ("10%", clustStr)
imageBox = OS.path.join(imageDir, "clusteredBox10.png")
elif (1.96 <= zi < 2.58):
imageFile = OS.path.join(imageDir, "clusteredValues05.png")
info = ("5%", clustStr)
imageBox = OS.path.join(imageDir, "clusteredBox05.png")
else:
imageFile = OS.path.join(imageDir, "clusteredValues01.png")
info = ("1%", clustStr)
imageBox = OS.path.join(imageDir, "clusteredBox01.png")
#### Footnote ####
footStart = ARCPY.GetIDMessage(84230).format(zi)
if abs(zi) >= 1.65:
footEnd = ARCPY.GetIDMessage(84231)
footEnd = footEnd.format(*info)
footerText = footStart + footEnd
else:
footEnd = ARCPY.GetIDMessage(84232)
footerText = footStart + footEnd
#### Root Element ####
title = ARCPY.GetIDMessage(84229)
reportElement, reportTree = REPORT.xmlReport(title = title)
#### Begin Graphic SubElement ####
graphicElement = REPORT.xmlGraphic(reportElement, imageFile,
footerText = footerText)
#### Floating Table ####
rowVals = [ [ARCPY.GetIDMessage(84148), self.giString, ""],
[ARCPY.GetIDMessage(84151), self.ziString, imageBox],
[ARCPY.GetIDMessage(84152), self.pvString, ""] ]
fTable = REPORT.xmlTable(graphicElement, rowVals,
tType = "ssFloat")
#### Moran Table ####
rowVals = [ [ARCPY.GetIDMessage(84148), self.giString],
[ARCPY.GetIDMessage(84149), self.eiString],
[ARCPY.GetIDMessage(84150), self.viString],
[ARCPY.GetIDMessage(84151), self.ziString],
[ARCPY.GetIDMessage(84152), self.pvString] ]
mTable = REPORT.xmlTable(reportElement, rowVals,
title = ARCPY.GetIDMessage(84160))
#### Dataset Table ####
rowVals = [ [UTILS.addColon(ARCPY.GetIDMessage(84233)),
self.ssdo.inputFC],
[UTILS.addColon(ARCPY.GetIDMessage(84016)),
self.varName],
[UTILS.addColon(ARCPY.GetIDMessage(84234)),
WU.wTypeDispatch[self.wType]],
[UTILS.addColon(ARCPY.GetIDMessage(84235)),
self.concept],
[UTILS.addColon(ARCPY.GetIDMessage(84236)),
str(self.rowStandard)],
[UTILS.addColon(ARCPY.GetIDMessage(84237)),
self.thresholdStr],
[UTILS.addColon(ARCPY.GetIDMessage(84238)),
#.........这里部分代码省略.........
示例3: reportHTML
# 需要导入模块: import SSUtilities [as 别名]
# 或者: from SSUtilities import addColon [as 别名]
def reportHTML(self, htmlFile = None):
"""Generates a graphical html report for Nearest Neighbor Stat."""
#### Shorthand Attributes ####
zScore = self.zn
#### Progress and Create HTML File Name ####
writeMSG = ARCPY.GetIDMessage(84228)
ARCPY.SetProgressor("default", writeMSG)
ARCPY.AddMessage(writeMSG)
if not htmlFile:
prefix = ARCPY.GetIDMessage(84240)
outputDir = UTILS.returnScratchWorkSpace()
baseDir = UTILS.getBaseFolder(outputDir)
htmlFile = UTILS.returnScratchName(prefix, fileType = "TEXT",
scratchWS = baseDir,
extension = "html")
#### Obtain Correct Images ####
imageDir = UTILS.getImageDir()
clustStr = ARCPY.GetIDMessage(84243)
dispStr = ARCPY.GetIDMessage(84244)
if zScore <= -2.58:
imageFile = OS.path.join(imageDir, "clusteredPoints01.png")
info = ("1%", clustStr)
imageBox = OS.path.join(imageDir, "dispersedBox01.png")
elif (-2.58 < zScore <= -1.96):
imageFile = OS.path.join(imageDir, "clusteredPoints05.png")
info = ("5%", clustStr)
imageBox = OS.path.join(imageDir, "dispersedBox05.png")
elif (-1.96 < zScore <= -1.65):
imageFile = OS.path.join(imageDir, "clusteredPoints10.png")
info = ("10%", clustStr)
imageBox = OS.path.join(imageDir, "dispersedBox10.png")
elif (-1.65 < zScore < 1.65):
imageFile = OS.path.join(imageDir, "randomPoints.png")
imageBox = OS.path.join(imageDir, "randomBox.png")
elif (1.65 <= zScore < 1.96):
imageFile = OS.path.join(imageDir, "dispersedPoints10.png")
info = ("10%", dispStr)
imageBox = OS.path.join(imageDir, "clusteredBox10.png")
elif (1.96 <= zScore < 2.58):
imageFile = OS.path.join(imageDir, "dispersedPoints05.png")
info = ("5%", dispStr)
imageBox = OS.path.join(imageDir, "clusteredBox05.png")
else:
imageFile = OS.path.join(imageDir, "dispersedPoints01.png")
info = ("1%", dispStr)
imageBox = OS.path.join(imageDir, "clusteredBox01.png")
#### Footnote ####
footStart = ARCPY.GetIDMessage(84230).format(zScore)
if abs(zScore) >= 1.65:
footEnd = ARCPY.GetIDMessage(84231)
footEnd = footEnd.format(*info)
footerText = footStart + footEnd
else:
footEnd = ARCPY.GetIDMessage(84232)
footerText = footStart + footEnd
#### Root Element ####
title = ARCPY.GetIDMessage(84161)
reportElement, reportTree = REPORT.xmlReport(title = title)
#### Begin Graphic SubElement ####
graphicElement = REPORT.xmlGraphic(reportElement, imageFile,
footerText = footerText)
#### Floating Table ####
rowVals = [ [ARCPY.GetIDMessage(84164), self.ratioString, ""],
[ARCPY.GetIDMessage(84151), self.znString, imageBox],
[ARCPY.GetIDMessage(84152), self.pvString, ""] ]
fTable = REPORT.xmlTable(graphicElement, rowVals,
tType = "ssFloat")
#### NN Table ####
rowVals = [ [ARCPY.GetIDMessage(84162), self.nnStringD],
[ARCPY.GetIDMessage(84163), self.enStringD],
[ARCPY.GetIDMessage(84164), self.ratioString],
[ARCPY.GetIDMessage(84151), self.znString],
[ARCPY.GetIDMessage(84152), self.pvString] ]
nnTable = REPORT.xmlTable(reportElement, rowVals,
title = ARCPY.GetIDMessage(84161))
#### Dataset Table ####
rowVals = [ [UTILS.addColon(ARCPY.GetIDMessage(84233)),
self.ssdo.inputFC],
[UTILS.addColon(ARCPY.GetIDMessage(84235)),
self.concept],
[UTILS.addColon(ARCPY.GetIDMessage(84241)),
LOCALE.format("%0.6f", self.studyArea)],
[UTILS.addColon(ARCPY.GetIDMessage(84418)),
str(self.ssdo.selectionSet)] ]
dTable = REPORT.xmlTable(reportElement, rowVals,
title = ARCPY.GetIDMessage(84239))
#### Create HTML ####
#.........这里部分代码省略.........