The bar plot Start with a dataframe with the values already sorted, then place each into a vector. The three back into a dataframe The Bar Plot Place the bartop into a variable to use later The graph should look something like this A Ragged Line Take the Gini coef column from the original dataframe… […]

# Tag: data science

## Reordering Columns and Rows – R

How to reorder columns and rows in a dataframe. We start with three vectors which we will put into a data frame called tDF Renaming Columns There is away of entering the names when building the data frame, like this… But let’s just prentend we forgot to do that, and instead we’ve ended up with […]

## Connections Between Networks – R

This graph shows how connected each network is within a system. Each node represents a network, and each edges represents a person overlapping them. The darker the edge color, the more people spanning across the two communities. This post explains the method in a bit more detail. This graph was made in R, with the […]

## Draw and Save Network to PDF – R

Assuming you start with a pajek file, you can use the following two functions to draw the graph and save it on to a PDF file. Then you call the function like this …and you get something like this

## iGraph Graph Layouts Graph – R

Small Network Vertices: 241 Edges: 447

## Some Social Networks – R

Using this format Droid V6 Vertices: 118 Edges: 244 Slide V6 Vertices: 241 Edges: 447

## Graph Centrality – R

This little R script calculates all three of Freeman’s Centrality measures, for individual nodes and entire graph. I didn’t write it…I got it from here.

## From nCol to Pajek 2/2 – Python & R

Continues from here. I just found that the Python script in the previous post breaks when it encounters non-alphanumerical characters. That means I had to run a small code through Vim to delete them on both the usrIDs.txt and output.txt files. Once that was done then I had to change the usrIDs.txt file to add […]

The output file will create something like this

You must be logged in to post a comment.