SlideShare a Scribd company logo
aRangodb
an R package for ArangoDB
Gabriele Galatolo
Software Developer & Data Scientist @ Kode Srl
Kode
Me
Me
You
You
Overview
● Relational Model vs Graph Model
● Data Science with R
● ArangoDB, a multi-model database
● aRangodb, an R package to interact with ArangoDB
● Usage of aRangodb in a real context: Tweetmood
Relational Vs Graph
Relational Model vs Graph Model
Why we 💗 the Relational Model:
○ Most popular way to structure and store data
○ Map reality with well-known paradigm (Entity-Relationship)
○ Supported by consolidated applications in almost every field
■ DBMS ↔ SQL
( E.F. Codd (1970), A Relational Model of Data for Large Shared Data Banks @ https://www.seas.upenn.edu/~zives/03f/cis550/codd.pdf )
Relational Model vs Graph Model
Drawbacks of the Relational Model:
○ DBMS are complex tools
■ Require deep knowledge to use them at best
○ In many contexts a small subset of features is used
■ Triggers? Stored Procedures? Functions? Full-text Search?
○ Used to model everything without critical thinking
■ A database cannot be denied to anyone
■ Used to model graphs too
Relational Model vs Graph Model
Sensor
Id: string batteryDuration: int productionDate: date
s001 30 2019-04-02
s002 21 2019-04-02
Relational Model vs Graph Model
Sensor
Id: string batteryDuration: int productionDate: date
s001 30 2019-04-02
s002 21 2019-04-02
Sensor
Id: string batteryDuration: int productionDate: date xy:string type: string desc: string
s001 30 2019-04-02 lat=30.11,
long=12.49
accelerometer prod=11123
s002 21 2019-04-02 (30,134;
14.333)
temperature max temp, 50°
next version
( source https://www.red-gate.com/simple-talk/sql/database-administration/ten-common-database-design-mistakes/ )
Relational Model vs Graph Model
“ People (myself included) do a lot
of really stupid things, at times, in
the name of ‘getting it done.’ ”
( source https://www.red-gate.com/simple-talk/sql/database-administration/ten-common-database-design-mistakes/ )
[Louis Davidson]
Relational Model vs Graph Model
Will graph databases/graph-based modelling save the
world?
Relational Model vs Graph Model
Will graph databases/graph-based modelling save the
world?
NO
Relational Model vs Graph Model
Anyway we 💗💗 graph-based modelling.
Many problems can be faced with a better modelization
with the use of graphs, for several reasons:
● relationships are everywhere
● it’s a more intuitive modelling than the relational one
● less structure implies flexibility and even better
performances
○ with OBVIOUS other side of the coin
aRangodb
aRangodb
Data Science with R
Data Science with R
Why we use R for data science projects:
● Data Science is strictly related to statistics…
● … and R is a statistics-focused programming language
○ Multi-paradigm
○ Interpreted
● Well supported and open source
○ programmers, statisticians, data scientist and more
○ lot of packages available to do almost everything
assignment to right
indexing from 1
round to even
( more @ https://ironholds.org/projects/rbitrary/#why-doesnt-round-work-like-you-think-it-should )
identifier with period
R in a nutshell
ASSIGNMENT
aNumeric <- 9
aString <- “hello world”
ABoolean <- TRUE
aVector <- c(1, 2, 3, 4)
DATA FRAME
df <- data.frame(”A”, “B”)
df[1, ] <- c(1, 2)
df[2, ] <- c(3, 4)
print( df[, df$B == 4] )
# A B
#[1, ] 3 4
LIST
l <- list(name=“anna”, age=31)
print(l$name)
print(l$[[”age”]])
# ”anna”
# 31
LOOP
sqr <- function(x) x*x
res <- apply(df, 2, sqr)
print(res)
# 4 16
R6 CLASSES
Cl <- R6::R6Class ( "Cl",
public = list(
f = function(),
... ),
private = list( a = NULL, … )
)
PIPE
res <- df %>%
filter(A==3) %>%
select(B)
print(res)
# B
#[1, ] 4
ArangoDB, a multi-model
database
ArangoDB, a multi-model database
“ArangoDB is a multi-model, open-source database with
flexible data models for documents, graphs, and key-values.
Build high performance applications using a convenient
SQL-like query language or JavaScript extensions.”
( more @ https://github.com/arangodb/arangodb )
ArangoDB, a multi-model database
Main concepts and internal data organization
COLLECTIONS GRAPHS
_key: a
k1
: v1
k2
: v2
_key: b
k3
: v3
k4
: v4
ArangoDB, a multi-model database
EDGES
COLLECTIONS
COLLECTIONS GRAPHS
_key: a
k1
: v1
k2
: v2
_key: b
k3
: v3
k4
: v4
_key: ...
_from: a
_to: b
ke
: ve
_key: ...
_from: a
_to: b
_key: ...
_from: a
_to: b
Main concepts and internal data organization
ArangoDB, alternatives?
● Multi-Model Database
○ Graph
○ Document
○ Key-Value
● First release: 2007
● Written in:
○ Java
● Server Side Scripts:
○ Java, Javascript
● DQL:
○ SQL-Like
● Multi-Model Database
○ Graph
○ Document
○ Key-Value
● First release: 2012
● Written in:
○ C, C++, JavaScript
● Server Side Scripts:
○ Javascript
● DQL:
○ AQL
● Graph Database
● First release: 2010
● Written in:
○ Java, Scala
● Server Side Scripts:
○ Java, Cypher
● DQL:
○ Cypher
( more @ https://db-engines.com/en/system/ArangoDB%3BNeo4j%3BOrientDB )
ArangoDB, alternatives?
( source @ https://www.arangodb.com/2018/02/nosql-performance-benchmark-2018-mongodb-postgresql-orientdb-neo4j-arangodb/ )
ArangoDB, alternatives?
( source @ https://db-engines.com/en/ranking_trend/system/ArangoDB%3BNeo4j%3BOrientDB )
aRangodb
(you’re ready now)
aRangodb, an R package for ArangoDB
An R package to interact with ArangoDB instances:
● collections management
○ CRUD of collections
● graphs management
○ CRUD of graphs
○ Traversal
● graph visualization
● (only for the brave) transform an AQL query in an R
function
aRangodb, connection to server
Connecting to the ArangoDB instance
aRangodb, collections management
Create or retrieve collections
aRangodb, collections management
Insert new documents and update existing ones
aRangodb, collections management
Search documents within a collection
aRangodb, graphs management
Create or retrieve a graph
aRangodb, graphs management
Adding relations to the graph
aRangodb, graphs management
Traverse a graph from a set of documents
aRangodb, graphs management
Adjacency tensor of a graph:
nodes
nodes
edges
(Adjacency and Tensor Representation in General Hypergraphs Part 1: e-adjacency Tensor Uniformisation Using
Homogeneous Polynomials
X. Ouvrard, J.M. Le Goff, S. Marchand-Maillet
@ https://arxiv.org/pdf/1712.08189.pdf )
aRangodb, graphs management
Adjacency tensor of a graph:
nodes
nodes
edges
good for graphs...
aRangodb, graphs management
Adjacency tensor of a graph:
good for graphs… and for multigraphs too
aRangodb, graphs management
Adjacency tensor of a graph:
good for graphs… and for multigraphs too
aRangodb, graphs management
Graph visualization:
aRangodb, (bonus) AQL and R functions
Compile an AQL query into an R function where binding
parameters become function parameters:
aRangodb, current status
● 0.0.1-beta version available
○ first stable release will be available by the end of
June (full test coverage, major bug fixes)
● https://gitlab.com/krpack/arango-driver
● Feel free to...
○ … share your suggestions
○ … give us your feedback
aRangodb, current status
● 0.0.1-beta version available
○ first stable release will be available by the end of
June (full test coverage, major bug fixes)
● https://gitlab.com/krpack/arango-driver
● Feel free to...
○ … share your suggestions
○ … give us your feedback
● Don’t feel free to
○ ...open issues (I’m joking 😬)
TweetMood
TweetMood at a glance
TweetMood, raw data
Tweet
User
TweetMood, view of a selection
TweetMood, view of a selection
TweetMood, secondary information
We added a secondary-source collection and two
additional relations from users’ and tweet data:
● Hashtags
○ “Hashtags” (contained_in)→ “Tweets”
● Mentions
○ “Users” (mentioned_in)→ “Tweets”
TweetMood, association rules on hashtags
Tweets (may) contain list of hashtags:
(Tutorial on association rules @ https://www.kdnuggets.com/2016/04/association-rules-apriori-algorithm-tutorial.html )
TweetMood, association rules on hashtags
Are there hidden patterns connecting tweet hashtags?
(Tutorial on association rules @ https://www.kdnuggets.com/2016/04/association-rules-apriori-algorithm-tutorial.html )
{#facebookdown} => {#instagramdown, #whatsappdown}
TweetMood, association rules (quick note)
(Tutorial on association rules @ https://www.kdnuggets.com/2016/04/association-rules-apriori-algorithm-tutorial.html )
“Association rules analysis is a technique to uncover how items are
associated to each other. For example: if there is a pair of items, X and
Y, that are frequently bought together:
● both X and Y can be placed on the same shelf;
● advertisements on X could be targeted at buyers who purchase Y;
● ...
how transactions must be
represented
TweetMood, association rules on hashtags
t0001 faceboo
kdown
instagra
mdown
whatsap
pdown
t0001 0 0 0 0
faceboo
kdown
1 0 0 0
instagra
mdown
1 0 0 0
whatsap
pdown
1 0 0 0
facebookdown instagramdown whatsappdown
t0001 1 1 1
TweetMood, association rules on hashtags
TweetMood, association rules on hashtags
this may be the feeling when
producing elegant packages that
work efficiently...
Before closing...
What does the future hold for us?
● Add support for bulk insert of data from csv/JSON
● Native support for well-known graphs algorithm
● Improve graph representation
○ Introduction of Laplacian matrix
○ Improve internal representation
● Presentation of aRangodb package @ useR!2019
○ See you there!
ONE MORE THING...
Before closing...
Discarded GIFs and comics (due to lack of time):
R vs Python Data Science warComputer Science Wars of Religion
ONE LAST THINGTHIS IS THE END
g.galatolo@kode.srl
www.kode-solutions.net

More Related Content

What's hot

Graph databases & data integration v2
Graph databases & data integration v2Graph databases & data integration v2
Graph databases & data integration v2
Dimitris Kontokostas
 
PhD thesis defense: Large-scale multilingual knowledge extraction, publishin...
PhD thesis defense:  Large-scale multilingual knowledge extraction, publishin...PhD thesis defense:  Large-scale multilingual knowledge extraction, publishin...
PhD thesis defense: Large-scale multilingual knowledge extraction, publishin...
Dimitris Kontokostas
 
GraphQL & DGraph with Go
GraphQL & DGraph with GoGraphQL & DGraph with Go
GraphQL & DGraph with Go
James Tan
 
Introduction to DGraph - A Graph Database
Introduction to DGraph - A Graph DatabaseIntroduction to DGraph - A Graph Database
Introduction to DGraph - A Graph Database
Knoldus Inc.
 
Data Modeling with Neo4j
Data Modeling with Neo4jData Modeling with Neo4j
Data Modeling with Neo4j
Neo4j
 
GraphDB Cloud: Enterprise Ready RDF Database on Demand
GraphDB Cloud: Enterprise Ready RDF Database on DemandGraphDB Cloud: Enterprise Ready RDF Database on Demand
GraphDB Cloud: Enterprise Ready RDF Database on Demand
Ontotext
 
Semantic Web talk TEMPLATE
Semantic Web talk TEMPLATESemantic Web talk TEMPLATE
Semantic Web talk TEMPLATE
Oleksiy Pylypenko
 
DGraph: Introduction To Basics & Quick Start W/Ratel
DGraph: Introduction To Basics & Quick Start W/RatelDGraph: Introduction To Basics & Quick Start W/Ratel
DGraph: Introduction To Basics & Quick Start W/Ratel
Knoldus Inc.
 
Semantic Variation Graphs the case for RDF & SPARQL
Semantic Variation Graphs the case for RDF & SPARQLSemantic Variation Graphs the case for RDF & SPARQL
Semantic Variation Graphs the case for RDF & SPARQL
Jerven Bolleman
 
Do it on your own - From 3 to 5 Star Linked Open Data with RMLio
Do it on your own - From 3 to 5 Star Linked Open Data with RMLioDo it on your own - From 3 to 5 Star Linked Open Data with RMLio
Do it on your own - From 3 to 5 Star Linked Open Data with RMLio
Open Knowledge Belgium
 
LD4KD 2015 - Demos and tools
LD4KD 2015 - Demos and toolsLD4KD 2015 - Demos and tools
LD4KD 2015 - Demos and tools
Vrije Universiteit Amsterdam
 
Seminario Cristian Lai, 06-09-2012
Seminario Cristian Lai, 06-09-2012Seminario Cristian Lai, 06-09-2012
Seminario Cristian Lai, 06-09-2012
CRS4 Research Center in Sardinia
 
Introduction to data analysis using R
Introduction to data analysis using RIntroduction to data analysis using R
Introduction to data analysis using R
Victoria López
 
Graph based data models
Graph based data modelsGraph based data models
Graph based data models
Moumie Soulemane
 
Dgraph: Graph database for production environment
Dgraph:  Graph database for production environmentDgraph:  Graph database for production environment
Dgraph: Graph database for production environment
openCypher
 
SF Python Meetup: TextRank in Python
SF Python Meetup: TextRank in PythonSF Python Meetup: TextRank in Python
SF Python Meetup: TextRank in Python
Paco Nathan
 
JSON-LD and SHACL for Knowledge Graphs
JSON-LD and SHACL for Knowledge GraphsJSON-LD and SHACL for Knowledge Graphs
JSON-LD and SHACL for Knowledge Graphs
Franz Inc. - AllegroGraph
 
An Introduction to Graph Databases
An Introduction to Graph DatabasesAn Introduction to Graph Databases
An Introduction to Graph Databases
InfiniteGraph
 
The Power of Semantic Technologies to Explore Linked Open Data
The Power of Semantic Technologies to Explore Linked Open DataThe Power of Semantic Technologies to Explore Linked Open Data
The Power of Semantic Technologies to Explore Linked Open Data
Ontotext
 
Data quality in Real Estate
Data quality in Real EstateData quality in Real Estate
Data quality in Real Estate
Dimitris Kontokostas
 

What's hot (20)

Graph databases & data integration v2
Graph databases & data integration v2Graph databases & data integration v2
Graph databases & data integration v2
 
PhD thesis defense: Large-scale multilingual knowledge extraction, publishin...
PhD thesis defense:  Large-scale multilingual knowledge extraction, publishin...PhD thesis defense:  Large-scale multilingual knowledge extraction, publishin...
PhD thesis defense: Large-scale multilingual knowledge extraction, publishin...
 
GraphQL & DGraph with Go
GraphQL & DGraph with GoGraphQL & DGraph with Go
GraphQL & DGraph with Go
 
Introduction to DGraph - A Graph Database
Introduction to DGraph - A Graph DatabaseIntroduction to DGraph - A Graph Database
Introduction to DGraph - A Graph Database
 
Data Modeling with Neo4j
Data Modeling with Neo4jData Modeling with Neo4j
Data Modeling with Neo4j
 
GraphDB Cloud: Enterprise Ready RDF Database on Demand
GraphDB Cloud: Enterprise Ready RDF Database on DemandGraphDB Cloud: Enterprise Ready RDF Database on Demand
GraphDB Cloud: Enterprise Ready RDF Database on Demand
 
Semantic Web talk TEMPLATE
Semantic Web talk TEMPLATESemantic Web talk TEMPLATE
Semantic Web talk TEMPLATE
 
DGraph: Introduction To Basics & Quick Start W/Ratel
DGraph: Introduction To Basics & Quick Start W/RatelDGraph: Introduction To Basics & Quick Start W/Ratel
DGraph: Introduction To Basics & Quick Start W/Ratel
 
Semantic Variation Graphs the case for RDF & SPARQL
Semantic Variation Graphs the case for RDF & SPARQLSemantic Variation Graphs the case for RDF & SPARQL
Semantic Variation Graphs the case for RDF & SPARQL
 
Do it on your own - From 3 to 5 Star Linked Open Data with RMLio
Do it on your own - From 3 to 5 Star Linked Open Data with RMLioDo it on your own - From 3 to 5 Star Linked Open Data with RMLio
Do it on your own - From 3 to 5 Star Linked Open Data with RMLio
 
LD4KD 2015 - Demos and tools
LD4KD 2015 - Demos and toolsLD4KD 2015 - Demos and tools
LD4KD 2015 - Demos and tools
 
Seminario Cristian Lai, 06-09-2012
Seminario Cristian Lai, 06-09-2012Seminario Cristian Lai, 06-09-2012
Seminario Cristian Lai, 06-09-2012
 
Introduction to data analysis using R
Introduction to data analysis using RIntroduction to data analysis using R
Introduction to data analysis using R
 
Graph based data models
Graph based data modelsGraph based data models
Graph based data models
 
Dgraph: Graph database for production environment
Dgraph:  Graph database for production environmentDgraph:  Graph database for production environment
Dgraph: Graph database for production environment
 
SF Python Meetup: TextRank in Python
SF Python Meetup: TextRank in PythonSF Python Meetup: TextRank in Python
SF Python Meetup: TextRank in Python
 
JSON-LD and SHACL for Knowledge Graphs
JSON-LD and SHACL for Knowledge GraphsJSON-LD and SHACL for Knowledge Graphs
JSON-LD and SHACL for Knowledge Graphs
 
An Introduction to Graph Databases
An Introduction to Graph DatabasesAn Introduction to Graph Databases
An Introduction to Graph Databases
 
The Power of Semantic Technologies to Explore Linked Open Data
The Power of Semantic Technologies to Explore Linked Open DataThe Power of Semantic Technologies to Explore Linked Open Data
The Power of Semantic Technologies to Explore Linked Open Data
 
Data quality in Real Estate
Data quality in Real EstateData quality in Real Estate
Data quality in Real Estate
 

Similar to aRangodb, un package per l'utilizzo di ArangoDB con R

Fishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data LakeFishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data Lake
ArangoDB Database
 
Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...
Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...
Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...
Big Data Spain
 
Multiplaform Solution for Graph Datasources
Multiplaform Solution for Graph DatasourcesMultiplaform Solution for Graph Datasources
Multiplaform Solution for Graph Datasources
Stratio
 
Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022
Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022
Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022
ArangoDB Database
 
How To Model and Construct Graphs with Oracle Database (AskTOM Office Hours p...
How To Model and Construct Graphs with Oracle Database (AskTOM Office Hours p...How To Model and Construct Graphs with Oracle Database (AskTOM Office Hours p...
How To Model and Construct Graphs with Oracle Database (AskTOM Office Hours p...
Jean Ihm
 
Oslo baksia2014
Oslo baksia2014Oslo baksia2014
Oslo baksia2014
Max Neunhöffer
 
Fishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data Lake Fishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data Lake
DataWorks Summit/Hadoop Summit
 
ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....
ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....
ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....
ArangoDB Database
 
Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022
Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022
Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022
ArangoDB Database
 
Graph analysis over relational database
Graph analysis over relational databaseGraph analysis over relational database
Graph analysis over relational database
GraphRM
 
Data Structure Graph DMZ #DMZone
Data Structure Graph DMZ #DMZoneData Structure Graph DMZ #DMZone
Data Structure Graph DMZ #DMZone
Doug Needham
 
Multiplatform Spark solution for Graph datasources by Javier Dominguez
Multiplatform Spark solution for Graph datasources by Javier DominguezMultiplatform Spark solution for Graph datasources by Javier Dominguez
Multiplatform Spark solution for Graph datasources by Javier Dominguez
Big Data Spain
 
R tutorial
R tutorialR tutorial
R tutorial
Richard Vidgen
 
Machine Learning + Graph Databases for Better Recommendations
Machine Learning + Graph Databases for Better RecommendationsMachine Learning + Graph Databases for Better Recommendations
Machine Learning + Graph Databases for Better Recommendations
ChristopherWoodward16
 
How do You Graph
How do You GraphHow do You Graph
How do You Graph
Ben Krug
 
3DRepo
3DRepo3DRepo
3DRepo
MongoDB
 
GraphGen: Conducting Graph Analytics over Relational Databases
GraphGen: Conducting Graph Analytics over Relational DatabasesGraphGen: Conducting Graph Analytics over Relational Databases
GraphGen: Conducting Graph Analytics over Relational Databases
Konstantinos Xirogiannopoulos
 
GraphGen: Conducting Graph Analytics over Relational Databases
GraphGen: Conducting Graph Analytics over Relational DatabasesGraphGen: Conducting Graph Analytics over Relational Databases
GraphGen: Conducting Graph Analytics over Relational Databases
PyData
 
Linked Open Data for Digital Humanities
Linked Open Data for Digital HumanitiesLinked Open Data for Digital Humanities
Linked Open Data for Digital Humanities
Christophe Guéret
 

Similar to aRangodb, un package per l'utilizzo di ArangoDB con R (20)

Fishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data LakeFishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data Lake
 
Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...
Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...
Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...
 
Multiplaform Solution for Graph Datasources
Multiplaform Solution for Graph DatasourcesMultiplaform Solution for Graph Datasources
Multiplaform Solution for Graph Datasources
 
Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022
Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022
Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022
 
How To Model and Construct Graphs with Oracle Database (AskTOM Office Hours p...
How To Model and Construct Graphs with Oracle Database (AskTOM Office Hours p...How To Model and Construct Graphs with Oracle Database (AskTOM Office Hours p...
How To Model and Construct Graphs with Oracle Database (AskTOM Office Hours p...
 
Oslo baksia2014
Oslo baksia2014Oslo baksia2014
Oslo baksia2014
 
Fishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data Lake Fishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data Lake
 
ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....
ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....
ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....
 
Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022
Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022
Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022
 
Graph analysis over relational database
Graph analysis over relational databaseGraph analysis over relational database
Graph analysis over relational database
 
Data Structure Graph DMZ #DMZone
Data Structure Graph DMZ #DMZoneData Structure Graph DMZ #DMZone
Data Structure Graph DMZ #DMZone
 
Multiplatform Spark solution for Graph datasources by Javier Dominguez
Multiplatform Spark solution for Graph datasources by Javier DominguezMultiplatform Spark solution for Graph datasources by Javier Dominguez
Multiplatform Spark solution for Graph datasources by Javier Dominguez
 
R tutorial
R tutorialR tutorial
R tutorial
 
Machine Learning + Graph Databases for Better Recommendations
Machine Learning + Graph Databases for Better RecommendationsMachine Learning + Graph Databases for Better Recommendations
Machine Learning + Graph Databases for Better Recommendations
 
How do You Graph
How do You GraphHow do You Graph
How do You Graph
 
Oslo bekk2014
Oslo bekk2014Oslo bekk2014
Oslo bekk2014
 
3DRepo
3DRepo3DRepo
3DRepo
 
GraphGen: Conducting Graph Analytics over Relational Databases
GraphGen: Conducting Graph Analytics over Relational DatabasesGraphGen: Conducting Graph Analytics over Relational Databases
GraphGen: Conducting Graph Analytics over Relational Databases
 
GraphGen: Conducting Graph Analytics over Relational Databases
GraphGen: Conducting Graph Analytics over Relational DatabasesGraphGen: Conducting Graph Analytics over Relational Databases
GraphGen: Conducting Graph Analytics over Relational Databases
 
Linked Open Data for Digital Humanities
Linked Open Data for Digital HumanitiesLinked Open Data for Digital Humanities
Linked Open Data for Digital Humanities
 

More from GraphRM

A gentle introduction to random and strategic networks
A gentle introduction to random and strategic networksA gentle introduction to random and strategic networks
A gentle introduction to random and strategic networks
GraphRM
 
How to leverage Kafka data streams with Neo4j
How to leverage Kafka data streams with Neo4jHow to leverage Kafka data streams with Neo4j
How to leverage Kafka data streams with Neo4j
GraphRM
 
From zero to gremlin hero - Part I
From zero to gremlin hero - Part IFrom zero to gremlin hero - Part I
From zero to gremlin hero - Part I
GraphRM
 
Topology Visualization at Sysdig
Topology Visualization at SysdigTopology Visualization at Sysdig
Topology Visualization at Sysdig
GraphRM
 
Tecniche per la Visualizzazione di Grafi di Grandi Dimensioni Basate sulla Co...
Tecniche per la Visualizzazione di Grafi di Grandi Dimensioni Basate sulla Co...Tecniche per la Visualizzazione di Grafi di Grandi Dimensioni Basate sulla Co...
Tecniche per la Visualizzazione di Grafi di Grandi Dimensioni Basate sulla Co...
GraphRM
 
The power of the cosmos in a DB .... CosmosDB
The power of the cosmos in a DB .... CosmosDBThe power of the cosmos in a DB .... CosmosDB
The power of the cosmos in a DB .... CosmosDB
GraphRM
 
OrientDB graph e l'importanza di una relazione mancante
OrientDB graph e l'importanza di una relazione mancanteOrientDB graph e l'importanza di una relazione mancante
OrientDB graph e l'importanza di una relazione mancante
GraphRM
 
Il "Knowledge Graph" della Pubblica Amministrazione Italiana
Il "Knowledge Graph" della Pubblica Amministrazione ItalianaIl "Knowledge Graph" della Pubblica Amministrazione Italiana
Il "Knowledge Graph" della Pubblica Amministrazione Italiana
GraphRM
 
Elastic loves Graphs
Elastic loves GraphsElastic loves Graphs
Elastic loves Graphs
GraphRM
 
From text to entities: Information Extraction in the Era of Knowledge Graphs
From text to entities: Information Extraction in the Era of Knowledge GraphsFrom text to entities: Information Extraction in the Era of Knowledge Graphs
From text to entities: Information Extraction in the Era of Knowledge Graphs
GraphRM
 
GraphRM - Introduzione al Graph modelling
GraphRM  - Introduzione al Graph modellingGraphRM  - Introduzione al Graph modelling
GraphRM - Introduzione al Graph modelling
GraphRM
 
GraphQL ♥︎ GraphDB
GraphQL ♥︎ GraphDBGraphQL ♥︎ GraphDB
GraphQL ♥︎ GraphDB
GraphRM
 
Costruiamo un motore di raccomandazione con Neo4J - Workshop 25/1/2018
Costruiamo un motore di raccomandazione con Neo4J - Workshop 25/1/2018Costruiamo un motore di raccomandazione con Neo4J - Workshop 25/1/2018
Costruiamo un motore di raccomandazione con Neo4J - Workshop 25/1/2018
GraphRM
 

More from GraphRM (13)

A gentle introduction to random and strategic networks
A gentle introduction to random and strategic networksA gentle introduction to random and strategic networks
A gentle introduction to random and strategic networks
 
How to leverage Kafka data streams with Neo4j
How to leverage Kafka data streams with Neo4jHow to leverage Kafka data streams with Neo4j
How to leverage Kafka data streams with Neo4j
 
From zero to gremlin hero - Part I
From zero to gremlin hero - Part IFrom zero to gremlin hero - Part I
From zero to gremlin hero - Part I
 
Topology Visualization at Sysdig
Topology Visualization at SysdigTopology Visualization at Sysdig
Topology Visualization at Sysdig
 
Tecniche per la Visualizzazione di Grafi di Grandi Dimensioni Basate sulla Co...
Tecniche per la Visualizzazione di Grafi di Grandi Dimensioni Basate sulla Co...Tecniche per la Visualizzazione di Grafi di Grandi Dimensioni Basate sulla Co...
Tecniche per la Visualizzazione di Grafi di Grandi Dimensioni Basate sulla Co...
 
The power of the cosmos in a DB .... CosmosDB
The power of the cosmos in a DB .... CosmosDBThe power of the cosmos in a DB .... CosmosDB
The power of the cosmos in a DB .... CosmosDB
 
OrientDB graph e l'importanza di una relazione mancante
OrientDB graph e l'importanza di una relazione mancanteOrientDB graph e l'importanza di una relazione mancante
OrientDB graph e l'importanza di una relazione mancante
 
Il "Knowledge Graph" della Pubblica Amministrazione Italiana
Il "Knowledge Graph" della Pubblica Amministrazione ItalianaIl "Knowledge Graph" della Pubblica Amministrazione Italiana
Il "Knowledge Graph" della Pubblica Amministrazione Italiana
 
Elastic loves Graphs
Elastic loves GraphsElastic loves Graphs
Elastic loves Graphs
 
From text to entities: Information Extraction in the Era of Knowledge Graphs
From text to entities: Information Extraction in the Era of Knowledge GraphsFrom text to entities: Information Extraction in the Era of Knowledge Graphs
From text to entities: Information Extraction in the Era of Knowledge Graphs
 
GraphRM - Introduzione al Graph modelling
GraphRM  - Introduzione al Graph modellingGraphRM  - Introduzione al Graph modelling
GraphRM - Introduzione al Graph modelling
 
GraphQL ♥︎ GraphDB
GraphQL ♥︎ GraphDBGraphQL ♥︎ GraphDB
GraphQL ♥︎ GraphDB
 
Costruiamo un motore di raccomandazione con Neo4J - Workshop 25/1/2018
Costruiamo un motore di raccomandazione con Neo4J - Workshop 25/1/2018Costruiamo un motore di raccomandazione con Neo4J - Workshop 25/1/2018
Costruiamo un motore di raccomandazione con Neo4J - Workshop 25/1/2018
 

Recently uploaded

20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 

Recently uploaded (20)

20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 

aRangodb, un package per l'utilizzo di ArangoDB con R

  • 1. aRangodb an R package for ArangoDB Gabriele Galatolo Software Developer & Data Scientist @ Kode Srl
  • 3. Me
  • 4. Me
  • 5. You
  • 6. You
  • 7. Overview ● Relational Model vs Graph Model ● Data Science with R ● ArangoDB, a multi-model database ● aRangodb, an R package to interact with ArangoDB ● Usage of aRangodb in a real context: Tweetmood
  • 9.
  • 10.
  • 11. Relational Model vs Graph Model Why we 💗 the Relational Model: ○ Most popular way to structure and store data ○ Map reality with well-known paradigm (Entity-Relationship) ○ Supported by consolidated applications in almost every field ■ DBMS ↔ SQL ( E.F. Codd (1970), A Relational Model of Data for Large Shared Data Banks @ https://www.seas.upenn.edu/~zives/03f/cis550/codd.pdf )
  • 12. Relational Model vs Graph Model Drawbacks of the Relational Model: ○ DBMS are complex tools ■ Require deep knowledge to use them at best ○ In many contexts a small subset of features is used ■ Triggers? Stored Procedures? Functions? Full-text Search? ○ Used to model everything without critical thinking ■ A database cannot be denied to anyone ■ Used to model graphs too
  • 13. Relational Model vs Graph Model Sensor Id: string batteryDuration: int productionDate: date s001 30 2019-04-02 s002 21 2019-04-02
  • 14. Relational Model vs Graph Model Sensor Id: string batteryDuration: int productionDate: date s001 30 2019-04-02 s002 21 2019-04-02 Sensor Id: string batteryDuration: int productionDate: date xy:string type: string desc: string s001 30 2019-04-02 lat=30.11, long=12.49 accelerometer prod=11123 s002 21 2019-04-02 (30,134; 14.333) temperature max temp, 50° next version ( source https://www.red-gate.com/simple-talk/sql/database-administration/ten-common-database-design-mistakes/ )
  • 15. Relational Model vs Graph Model “ People (myself included) do a lot of really stupid things, at times, in the name of ‘getting it done.’ ” ( source https://www.red-gate.com/simple-talk/sql/database-administration/ten-common-database-design-mistakes/ ) [Louis Davidson]
  • 16. Relational Model vs Graph Model Will graph databases/graph-based modelling save the world?
  • 17. Relational Model vs Graph Model Will graph databases/graph-based modelling save the world? NO
  • 18. Relational Model vs Graph Model Anyway we 💗💗 graph-based modelling. Many problems can be faced with a better modelization with the use of graphs, for several reasons: ● relationships are everywhere ● it’s a more intuitive modelling than the relational one ● less structure implies flexibility and even better performances ○ with OBVIOUS other side of the coin
  • 22. Data Science with R Why we use R for data science projects: ● Data Science is strictly related to statistics… ● … and R is a statistics-focused programming language ○ Multi-paradigm ○ Interpreted ● Well supported and open source ○ programmers, statisticians, data scientist and more ○ lot of packages available to do almost everything
  • 23. assignment to right indexing from 1 round to even ( more @ https://ironholds.org/projects/rbitrary/#why-doesnt-round-work-like-you-think-it-should ) identifier with period
  • 24.
  • 25. R in a nutshell ASSIGNMENT aNumeric <- 9 aString <- “hello world” ABoolean <- TRUE aVector <- c(1, 2, 3, 4) DATA FRAME df <- data.frame(”A”, “B”) df[1, ] <- c(1, 2) df[2, ] <- c(3, 4) print( df[, df$B == 4] ) # A B #[1, ] 3 4 LIST l <- list(name=“anna”, age=31) print(l$name) print(l$[[”age”]]) # ”anna” # 31 LOOP sqr <- function(x) x*x res <- apply(df, 2, sqr) print(res) # 4 16 R6 CLASSES Cl <- R6::R6Class ( "Cl", public = list( f = function(), ... ), private = list( a = NULL, … ) ) PIPE res <- df %>% filter(A==3) %>% select(B) print(res) # B #[1, ] 4
  • 27. ArangoDB, a multi-model database “ArangoDB is a multi-model, open-source database with flexible data models for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions.” ( more @ https://github.com/arangodb/arangodb )
  • 28. ArangoDB, a multi-model database Main concepts and internal data organization COLLECTIONS GRAPHS _key: a k1 : v1 k2 : v2 _key: b k3 : v3 k4 : v4
  • 29. ArangoDB, a multi-model database EDGES COLLECTIONS COLLECTIONS GRAPHS _key: a k1 : v1 k2 : v2 _key: b k3 : v3 k4 : v4 _key: ... _from: a _to: b ke : ve _key: ... _from: a _to: b _key: ... _from: a _to: b Main concepts and internal data organization
  • 30. ArangoDB, alternatives? ● Multi-Model Database ○ Graph ○ Document ○ Key-Value ● First release: 2007 ● Written in: ○ Java ● Server Side Scripts: ○ Java, Javascript ● DQL: ○ SQL-Like ● Multi-Model Database ○ Graph ○ Document ○ Key-Value ● First release: 2012 ● Written in: ○ C, C++, JavaScript ● Server Side Scripts: ○ Javascript ● DQL: ○ AQL ● Graph Database ● First release: 2010 ● Written in: ○ Java, Scala ● Server Side Scripts: ○ Java, Cypher ● DQL: ○ Cypher ( more @ https://db-engines.com/en/system/ArangoDB%3BNeo4j%3BOrientDB )
  • 31. ArangoDB, alternatives? ( source @ https://www.arangodb.com/2018/02/nosql-performance-benchmark-2018-mongodb-postgresql-orientdb-neo4j-arangodb/ )
  • 32. ArangoDB, alternatives? ( source @ https://db-engines.com/en/ranking_trend/system/ArangoDB%3BNeo4j%3BOrientDB )
  • 34. aRangodb, an R package for ArangoDB An R package to interact with ArangoDB instances: ● collections management ○ CRUD of collections ● graphs management ○ CRUD of graphs ○ Traversal ● graph visualization ● (only for the brave) transform an AQL query in an R function
  • 35. aRangodb, connection to server Connecting to the ArangoDB instance
  • 36. aRangodb, collections management Create or retrieve collections
  • 37. aRangodb, collections management Insert new documents and update existing ones
  • 38. aRangodb, collections management Search documents within a collection
  • 39. aRangodb, graphs management Create or retrieve a graph
  • 40. aRangodb, graphs management Adding relations to the graph
  • 41. aRangodb, graphs management Traverse a graph from a set of documents
  • 42. aRangodb, graphs management Adjacency tensor of a graph: nodes nodes edges (Adjacency and Tensor Representation in General Hypergraphs Part 1: e-adjacency Tensor Uniformisation Using Homogeneous Polynomials X. Ouvrard, J.M. Le Goff, S. Marchand-Maillet @ https://arxiv.org/pdf/1712.08189.pdf )
  • 43. aRangodb, graphs management Adjacency tensor of a graph: nodes nodes edges good for graphs...
  • 44. aRangodb, graphs management Adjacency tensor of a graph: good for graphs… and for multigraphs too
  • 45. aRangodb, graphs management Adjacency tensor of a graph: good for graphs… and for multigraphs too
  • 47. aRangodb, (bonus) AQL and R functions Compile an AQL query into an R function where binding parameters become function parameters:
  • 48. aRangodb, current status ● 0.0.1-beta version available ○ first stable release will be available by the end of June (full test coverage, major bug fixes) ● https://gitlab.com/krpack/arango-driver ● Feel free to... ○ … share your suggestions ○ … give us your feedback
  • 49. aRangodb, current status ● 0.0.1-beta version available ○ first stable release will be available by the end of June (full test coverage, major bug fixes) ● https://gitlab.com/krpack/arango-driver ● Feel free to... ○ … share your suggestions ○ … give us your feedback ● Don’t feel free to ○ ...open issues (I’m joking 😬)
  • 51. TweetMood at a glance
  • 53. TweetMood, view of a selection
  • 54. TweetMood, view of a selection
  • 55. TweetMood, secondary information We added a secondary-source collection and two additional relations from users’ and tweet data: ● Hashtags ○ “Hashtags” (contained_in)→ “Tweets” ● Mentions ○ “Users” (mentioned_in)→ “Tweets”
  • 56. TweetMood, association rules on hashtags Tweets (may) contain list of hashtags: (Tutorial on association rules @ https://www.kdnuggets.com/2016/04/association-rules-apriori-algorithm-tutorial.html )
  • 57. TweetMood, association rules on hashtags Are there hidden patterns connecting tweet hashtags? (Tutorial on association rules @ https://www.kdnuggets.com/2016/04/association-rules-apriori-algorithm-tutorial.html ) {#facebookdown} => {#instagramdown, #whatsappdown}
  • 58. TweetMood, association rules (quick note) (Tutorial on association rules @ https://www.kdnuggets.com/2016/04/association-rules-apriori-algorithm-tutorial.html ) “Association rules analysis is a technique to uncover how items are associated to each other. For example: if there is a pair of items, X and Y, that are frequently bought together: ● both X and Y can be placed on the same shelf; ● advertisements on X could be targeted at buyers who purchase Y; ● ... how transactions must be represented
  • 59. TweetMood, association rules on hashtags t0001 faceboo kdown instagra mdown whatsap pdown t0001 0 0 0 0 faceboo kdown 1 0 0 0 instagra mdown 1 0 0 0 whatsap pdown 1 0 0 0 facebookdown instagramdown whatsappdown t0001 1 1 1
  • 61. TweetMood, association rules on hashtags this may be the feeling when producing elegant packages that work efficiently...
  • 62. Before closing... What does the future hold for us? ● Add support for bulk insert of data from csv/JSON ● Native support for well-known graphs algorithm ● Improve graph representation ○ Introduction of Laplacian matrix ○ Improve internal representation ● Presentation of aRangodb package @ useR!2019 ○ See you there!
  • 64. Before closing... Discarded GIFs and comics (due to lack of time): R vs Python Data Science warComputer Science Wars of Religion
  • 65. ONE LAST THINGTHIS IS THE END