plot1Att | R Documentation |
Plots graph data using the GGally library and ggnet function while incorporating demographic properties. Use this plot function if you have all demographic data available to plot.
plot1Att(
data,
prop = 20,
graphmode = "fruchtermanreingold",
attribute = NULL,
attribute.label = NULL,
attribute.node.labels = NULL,
attribute.nodesize = 10
)
data |
Data from the prepareGraphs function |
prop |
Rescaling the graph edge sizes for the plot |
graphmode |
Type of graphical projection to use. Default is Fruchterman Reingold. Refer to gplot.layout for the various available options |
attribute |
Mapping to the attribute information, can be list or column in data frame |
attribute.label |
Name of the attribute info (Required) |
attribute.node.labels |
Mapping to the node labels, can be list or column in data frame |
attribute.nodesize |
Size of the nodes. Default will result in size of 10. Can be replaced with custom mapping in list or column in data frame. (Required) |
df <- sampleData1
prepNet <- tabulate_edges(df, silentNodes = 0)
baseNet <- prepareGraphs(prepNet, project_title = "Sample Data 1", weightedGraph = TRUE)
attdata <- attributeData
plot1Att(baseNet, prop = 20, graphmode = "fruchtermanreingold",
attribute = attdata$gender,
attribute.label = "Gender",
attribute.node.labels = attdata$node, attribute.nodesize = 12)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.