Tested with Apache Spark 1.3.1, Python 2.7.9 and Java 1.8.0_45 + workaround for Spark 1.4.x from @enahwe.
Download and install it from oracle.com
// amount: number of random dates to create | |
// startYear: year range start | |
// startYear: year range end | |
WITH 1000 as amount, 2017 as startYear, 2021 as endYear | |
WITH range(1, amount) as xx, startYear, (endYear - startYear) as yearRange | |
UNWIND xx as x | |
WITH date({ | |
year:toInteger(1+startYear+floor(rand()*yearRange)), | |
month:toInteger(1+floor(rand()*12)), |
Tested with Apache Spark 1.3.1, Python 2.7.9 and Java 1.8.0_45 + workaround for Spark 1.4.x from @enahwe.
Download and install it from oracle.com
The tree
layout implements the Reingold-Tilford algorithm for efficient, tidy arrangement of layered nodes. The depth of nodes is computed by distance from the root, leading to a ragged appearance. Cartesian orientations are also supported. Implementation based on work by Jeff Heer and Jason Davies using Buchheim et al.'s linear-time variant of the Reingold-Tilford algorithm. Data shows the Flare class hierarchy, also courtesy Jeff Heer.
Compare to this Cartesian layout.
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<title>Force-Directed Graph</title> | |
<style> | |
.node { | |
cursor: pointer; | |
stroke: #3182bd; | |
stroke-width: 1.5px; | |
} |