Categories
data science

Modifying the Android Operating System.

Here are a few stats about all Android ROM related posts submitted to the XDA developers forum since Jan 2010. It shows three of the most talked about Android modification projects: CyanogenMod, AOKP, and MIUI. Observations are as follows. CyanogenMod AOKP MIUI Forum Members 26,185 9,268 11,488 Posts 93,408 30,790 39,604 Forum Threads 2,221 697 […]

Categories
data science

Sorting Vectors – R

A very quick reminder to myself on how to take data from a data frame, place them into vectors, then sort them from highest to lowest. The Data Frame The data frame now looks like this Create Vector Get all the subs and create a vector for a bar plot. we should get something like […]

Categories
data science

Plot for Density and Inclusiveness – R

This function will color all the nodes that are isolated in red. It will also draw the graph using the circle layout. No time to explain. Sorry. The Function

Categories
data science

Inequality and Lorenz Curve – R

Inspired by the train-wreck that was yesterday’s post, I was able to find a better solution to calculating inequality and plotting Lorenz Curves using the ineq library in R. EDIT: gini() in the reldist package also works. Installing and loading the Library Download and install Now load the library The Data I have a frequency […]

Categories
data science

Calculating network structure using Bradford’s Law – R

The method, based on Kevin Crowston et al’s “Core and Periphery” paper, is explained in greater detail here. This is the same as the other post, but it is now in a more convenient function form. The R Function To run the function you need to first load a file with all the user names […]

Categories
data science

Colouring Nodes According to Centrality – R

This R function will draw a graph and then colour the nodes according to centrality. There are three colours, red for high centrality, purple for medium centrality, and blue for low centrality. Node centrality was calculated using the betweenness( ) function in the igraph R library. It was then normalised manually so that we are […]

Categories
data science

Ordering Rows in a Data Frame – R

How to re-arrange the rows in a Data Frame using the values in a column. First we must build the data frame. Build Data Frame This data frame will have two columns, one for names and one for ages. We shall call it `df’ Now we can put both vectors into the data frame. Ascending […]

Categories
data science

Scatter Plot with Log Scale – R

Get a Frequency Count The user file looks like this First thing is to read the file Then we get the frequency count The frequency count should now return something like this Building the Scatter Plot We need to use Freq as the x coordinates and Var1 as the y coordinates. Now a simple scatter […]

Categories
data science

Smooth line for barplot graph – R

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… […]

Categories
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 […]