C# Class Smrf.NodeXL.ExcelTemplate.TwitterSearchNetworkTopItemsCalculator2

Calculates the top items within a Twitter search network.
This class calculates various top-item metrics for a Twitter search network. If the workbook doesn't contain a Twitter search network, this class does nothing.

This graph metric calculator differs from most other calculators in that it reads tweet-related columns that were written to the Excel workbook by the TwitterSearchNetworkImporter class. The other calculators look only at how the graph's vertices are connected to each other. Therefore, there is no corresponding lower-level TwitterSearchNetworkTopItemsCalculator class in the Smrf.NodeXL.Algorithms namespace, and the top items in a Twitter search network cannot be calculated outside of this ExcelTemplate project.

Here are the metrics calculated by this class.

For the Twitter Search network top items worksheet:

Top URLs, domains, hashtags, words, word pairs, replies-to, and mentions in tweets; and top tweeters. These get calculated for the entire graph, as well as for the graph's top groups, ranked by vertex count.

For the group worksheet:

Top URLs, domains, hashtags, words, word pairs, replies-to, and mentions in tweets; and top tweeters. These get calculated for each group.

For the vertex worksheet:

Top URLs, domains, hashtags, words, and word pairs in tweets, by both count and salience. These get calculated for each vertex.

Inheritance: TopItemsCalculatorBase2
Exibir arquivo Open project: 2014-sed-team3/term-project

Protected Properties

Property Type Description
m_oGraphHistory GraphHistory
m_oTwitterStatusTextParser Smrf.SocialNetworkLib.Twitter.TwitterStatusTextParser

Public Methods

Method Description
AssertValid ( ) : void
TwitterSearchNetworkTopItemsCalculator2 ( GraphHistory graphHistory ) : System

Initializes a new instance of the class.

Protected Methods

Method Description
AddColumnsForRepliesToAndMentions ( Int32 &iTableIndex, List oAllGroupEdgeInfos, List oGraphMetricColumns ) : void
AddColumnsForStatusContent ( Int32 &iTableIndex, List oAllGroupEdgeInfos, String sEdgeColumnName, System.Boolean bEdgeColumnContainsUrls, String sGroupTableColumnName, List oGraphMetricColumns ) : void
AddColumnsForTweeters ( Int32 &iTableIndex, IGraph oGraph, List oGraphMetricColumns ) : void
AddGraphMetricColumnPair ( String sTableName, String sGraphMetricColumn1Name, String sGraphMetricColumn2Name, List oTopStrings, List oTopStringCounts, System.Boolean bTopStringsContainUrls, List oGraphMetricColumns ) : void
AdjustColumnWidths ( List oGraphMetricColumns, List oAllGroupEdgeInfos ) : void
FilterAndReformatWordMetrics ( Int32 &iTableIndex, GraphMetricColumn oWordMetricColumns, List oAllGroupEdgeInfos, List oGraphMetricColumns ) : void
FilterAndReformatWordMetrics ( Int32 &iTableIndex, String sTableDescription, GraphMetricColumnOrdered oWord1Column, GraphMetricColumnOrdered oWord2Column, GraphMetricColumnOrdered oCountColumn, GraphMetricColumnOrdered oGroupNameColumn, List oAllGroupEdgeInfos, String sGroupTableColumnName, List oGraphMetricColumns ) : void
GetGraphMetricColumnNames ( String sTableDescription, String sGroupName, String &sGraphMetricColumn1Name, String &sGraphMetricColumn2Name ) : void
GetGroupName ( GroupEdgeInfo oGroupEdgeInfo ) : String
GetGroupRowID ( GroupEdgeInfo oGroupEdgeInfo ) : Int32
GetSearchTerm ( ) : String
GetTableName ( Int32 &iTableIndex ) : String
ReportProgressAndCheckCancellationPending ( CalculateGraphMetricsContext oCalculateGraphMetricsContext ) : System.Boolean
TryAddColumnsForWordsAndWordPairs ( Int32 &iTableIndex, IGraph oGraph, List oAllGroupEdgeInfos, CalculateGraphMetricsContext oCalculateGraphMetricsContext, List oGraphMetricColumns ) : System.Boolean
TryCalculateGraphMetricsInternal ( IGraph oGraph, CalculateGraphMetricsContext oCalculateGraphMetricsContext, List oGraphMetricColumns ) : System.Boolean
TryCalculateTopItemAndGroupMetrics ( IGraph oGraph, CalculateGraphMetricsContext oCalculateGraphMetricsContext, List oGraphMetricColumns ) : System.Boolean
TryCalculateVertexMetrics ( IGraph oGraph, CalculateGraphMetricsContext oCalculateGraphMetricsContext, List oGraphMetricColumns ) : System.Boolean

Method Details

AddColumnsForRepliesToAndMentions() protected method

protected AddColumnsForRepliesToAndMentions ( Int32 &iTableIndex, List oAllGroupEdgeInfos, List oGraphMetricColumns ) : void
iTableIndex System.Int32
oAllGroupEdgeInfos List
oGraphMetricColumns List
return void

AddColumnsForStatusContent() protected method

protected AddColumnsForStatusContent ( Int32 &iTableIndex, List oAllGroupEdgeInfos, String sEdgeColumnName, System.Boolean bEdgeColumnContainsUrls, String sGroupTableColumnName, List oGraphMetricColumns ) : void
iTableIndex System.Int32
oAllGroupEdgeInfos List
sEdgeColumnName String
bEdgeColumnContainsUrls System.Boolean
sGroupTableColumnName String
oGraphMetricColumns List
return void

AddColumnsForTweeters() protected method

protected AddColumnsForTweeters ( Int32 &iTableIndex, IGraph oGraph, List oGraphMetricColumns ) : void
iTableIndex System.Int32
oGraph IGraph
oGraphMetricColumns List
return void

AddGraphMetricColumnPair() protected method

protected AddGraphMetricColumnPair ( String sTableName, String sGraphMetricColumn1Name, String sGraphMetricColumn2Name, List oTopStrings, List oTopStringCounts, System.Boolean bTopStringsContainUrls, List oGraphMetricColumns ) : void
sTableName String
sGraphMetricColumn1Name String
sGraphMetricColumn2Name String
oTopStrings List
oTopStringCounts List
bTopStringsContainUrls System.Boolean
oGraphMetricColumns List
return void

AdjustColumnWidths() protected method

protected AdjustColumnWidths ( List oGraphMetricColumns, List oAllGroupEdgeInfos ) : void
oGraphMetricColumns List
oAllGroupEdgeInfos List
return void

AssertValid() public method

public AssertValid ( ) : void
return void

FilterAndReformatWordMetrics() protected method

protected FilterAndReformatWordMetrics ( Int32 &iTableIndex, GraphMetricColumn oWordMetricColumns, List oAllGroupEdgeInfos, List oGraphMetricColumns ) : void
iTableIndex System.Int32
oWordMetricColumns GraphMetricColumn
oAllGroupEdgeInfos List
oGraphMetricColumns List
return void

FilterAndReformatWordMetrics() protected method

protected FilterAndReformatWordMetrics ( Int32 &iTableIndex, String sTableDescription, GraphMetricColumnOrdered oWord1Column, GraphMetricColumnOrdered oWord2Column, GraphMetricColumnOrdered oCountColumn, GraphMetricColumnOrdered oGroupNameColumn, List oAllGroupEdgeInfos, String sGroupTableColumnName, List oGraphMetricColumns ) : void
iTableIndex System.Int32
sTableDescription String
oWord1Column GraphMetricColumnOrdered
oWord2Column GraphMetricColumnOrdered
oCountColumn GraphMetricColumnOrdered
oGroupNameColumn GraphMetricColumnOrdered
oAllGroupEdgeInfos List
sGroupTableColumnName String
oGraphMetricColumns List
return void

GetGraphMetricColumnNames() protected method

protected GetGraphMetricColumnNames ( String sTableDescription, String sGroupName, String &sGraphMetricColumn1Name, String &sGraphMetricColumn2Name ) : void
sTableDescription String
sGroupName String
sGraphMetricColumn1Name String
sGraphMetricColumn2Name String
return void

GetGroupName() protected method

protected GetGroupName ( GroupEdgeInfo oGroupEdgeInfo ) : String
oGroupEdgeInfo GroupEdgeInfo
return String

GetGroupRowID() protected method

protected GetGroupRowID ( GroupEdgeInfo oGroupEdgeInfo ) : Int32
oGroupEdgeInfo GroupEdgeInfo
return System.Int32

GetSearchTerm() protected method

protected GetSearchTerm ( ) : String
return String

GetTableName() protected method

protected GetTableName ( Int32 &iTableIndex ) : String
iTableIndex System.Int32
return String

ReportProgressAndCheckCancellationPending() protected method

protected ReportProgressAndCheckCancellationPending ( CalculateGraphMetricsContext oCalculateGraphMetricsContext ) : System.Boolean
oCalculateGraphMetricsContext CalculateGraphMetricsContext
return System.Boolean

TryAddColumnsForWordsAndWordPairs() protected method

protected TryAddColumnsForWordsAndWordPairs ( Int32 &iTableIndex, IGraph oGraph, List oAllGroupEdgeInfos, CalculateGraphMetricsContext oCalculateGraphMetricsContext, List oGraphMetricColumns ) : System.Boolean
iTableIndex System.Int32
oGraph IGraph
oAllGroupEdgeInfos List
oCalculateGraphMetricsContext CalculateGraphMetricsContext
oGraphMetricColumns List
return System.Boolean

TryCalculateGraphMetricsInternal() protected method

protected TryCalculateGraphMetricsInternal ( IGraph oGraph, CalculateGraphMetricsContext oCalculateGraphMetricsContext, List oGraphMetricColumns ) : System.Boolean
oGraph IGraph
oCalculateGraphMetricsContext CalculateGraphMetricsContext
oGraphMetricColumns List
return System.Boolean

TryCalculateTopItemAndGroupMetrics() protected method

protected TryCalculateTopItemAndGroupMetrics ( IGraph oGraph, CalculateGraphMetricsContext oCalculateGraphMetricsContext, List oGraphMetricColumns ) : System.Boolean
oGraph IGraph
oCalculateGraphMetricsContext CalculateGraphMetricsContext
oGraphMetricColumns List
return System.Boolean

TryCalculateVertexMetrics() protected method

protected TryCalculateVertexMetrics ( IGraph oGraph, CalculateGraphMetricsContext oCalculateGraphMetricsContext, List oGraphMetricColumns ) : System.Boolean
oGraph IGraph
oCalculateGraphMetricsContext CalculateGraphMetricsContext
oGraphMetricColumns List
return System.Boolean

TwitterSearchNetworkTopItemsCalculator2() public method

Initializes a new instance of the class.
public TwitterSearchNetworkTopItemsCalculator2 ( GraphHistory graphHistory ) : System
graphHistory GraphHistory /// Describes how the graph was created. ///
return System

Property Details

m_oGraphHistory protected_oe property

protected GraphHistory,Smrf.NodeXL.ExcelTemplate m_oGraphHistory
return GraphHistory

m_oTwitterStatusTextParser protected_oe property

protected TwitterStatusTextParser,Smrf.SocialNetworkLib.Twitter m_oTwitterStatusTextParser
return Smrf.SocialNetworkLib.Twitter.TwitterStatusTextParser