This interactive Neo4j graph tutorial shows how to use Neo4j to analyse the Offshore Leaks : the case of Azerbaijan.
| library(shiny) | |
| library(dygraphs) | |
| # Helper function to present Shiny controls in a dialog-like layout | |
| dialogPage <- function(outputControl) { | |
| bootstrapPage( | |
| tags$style(" | |
| html, body { width: 100%; height: 100%; overflow: none; } | |
| #dialogMainOutput { position: absolute; top: 10px; left: 10px; right: 10px; bottom: 40px; } | |
| #dialogControls { |
| # Returns a reactive that debounces the given expression by the given time in | |
| # milliseconds. | |
| # | |
| # This is not a true debounce in that it will not prevent \code{expr} from being | |
| # called many times (in fact it may be called more times than usual), but | |
| # rather, the reactive invalidation signal that is produced by expr is debounced | |
| # instead. This means that this function should be used when \code{expr} is | |
| # cheap but the things it will trigger (outputs and reactives that use | |
| # \code{expr}) are expensive. | |
| debounce <- function(expr, millis, env = parent.frame(), quoted = FALSE, |
| == Skip Lists in Cypher | |
| :neo4j-version: 2.0.0 | |
| :author: Wes Freeman | |
| :twitter: @wefreema | |
| :tags: in-graph index:skiplist:range lookup:timeline | |
| Skip lists are my new favorite probabilistic sorted data structure. O(log N) for most operations (insert/delete/find/range!). If you don't know what they are, for the rest of the explanation I'll assume that you've at least read the http://en.wikipedia.org/wiki/Skip_list[wikipedia page]. You take a random number and calculate the number of levels a particular node should have. In this case, our max level is 3. To calculate the random level, we'll take the \(\large \log _.5 \left( rand() \right) \) which gives us about a 1/2 chance for our node to have just 1 level, and a 1/4 chance for our node to have just 2 levels, and a 1/8 chance for our node to have 3 levels. In a normal skip list, you'd want several more levels, but we'll keep it down to 3 for the purpose of this experiment. | |
| From wikipedia (shows a skip list structure): |
| Last login: Sat Oct 3 08:12:01 on ttys000 | |
| e-mac:~ e$ cd $(brew --repository) && git reset --hard origin/master | |
| HEAD is now at 80170b5 gdal: update 1.11.3 bottle. | |
| e-mac:local e$ brew update | |
| Stashing your changes: | |
| M .editorconfig | |
| M .gitattributes | |
| M .gitignore | |
| M .rspec | |
| M .rubocop.yml |
| = Car manufacturers 2013 | |
| This is a graph of all the major car manufacturers and their earnings in 2013, alongside all of their main suppliers. | |
| It also shows the relationships between the various manufactures: cooperations, jointventuress and stock ownership. and the type of those | |
| relationships.(For example a cooperation can be of the type: research/development) | |
| //hide |
OpenBeerDB.com has a list of 1400+ breweries and 5900+ beers. Here’s a graph of the first 50 breweries from that list. The graph makes beer recommendations based on beer style, beer category, location, and alcohol content.
The k-nearest neighbors (k-NN) algorithm is among the simplest algorithms in the data mining field. Distances / similarities are calculated between each element in the data set using some distance / similarity metric ^[1]^ that the researcher chooses (there are many distance / similarity metrics), where the distance / similarity between any two elements is calculated based on the two elements' attributes. A data element’s k-NN are the k closest data elements according to this distance / similarity.
The domain model is fairly simple and straight forward. Each :Phone node is connected to at least one :Manufacturer, :Type, :OS and :Category node. Different 'weight' were given to different type of relation between these nodes. These 'weight' are the factors that will affect the ranking of the recommendation. It rates what people are more concerned with when considering for a new phone.

