Skip to content

Commit 8514156

Browse files
committed
Update readme, add bloom perspective, add relate.json
1 parent 037fe43 commit 8514156

File tree

9 files changed

+299
-1159
lines changed

9 files changed

+299
-1159
lines changed

README.adoc

+40-50
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,66 @@
1-
:repo: https://github.com/neo4j-graph-examples/pole
2-
//name of the graph example
31
:name: pole
42
:long_name: Crime Investigation
5-
//graph example description
63
:description: Explore connections in crime data using the POLE - Person, Object, Location, Event - model in a public dataset from Manchester, U.K.
7-
//icon representing graph example
8-
:icon: resources/pole-icon.png
9-
//associated search tags, separate multiple tags with comma
10-
:tags: pole, crime investigation, crime detection
11-
//graph example author
4+
:icon:
5+
:logo: documentation/img/pole-icon.png
6+
:tags: example-data,dataset,crime-data,pole,crime-investigation,crime-detection
127
:author: Joe Depeau
13-
//use a script to generate/process data? Set to either path for script, or nothing if not used
14-
:use-load-script: false
15-
//use a graph dump file for initial data set? Set to either path for dump file, or nothing if not used
8+
:use-load-script:
9+
:data:
1610
:use-dump-file: data/pole-40.dump
17-
//use a plugin for the database, separate multiple plugins with comma. 'public' plugins are apoc, graph-algorithms.
18-
//other algorithms are specified by path, e.g. apoc,graph-algorithms; Set to nothing if not used
1911
:use-plugin: graph-algorithms
20-
//target version of the database this example should run on
2112
:target-db-version: 3.5.14
22-
//specify a Bloom perspective, or false if not used
23-
:bloom-perspective: false
24-
//guide for the graph example. Should be friendly enough to be converted into various document formats
25-
:guide: documentation/pole_guide.adoc
26-
//rendered guide - will remove later
13+
:bloom-perspective: bloom/pole.bloom-perspective
14+
:guide: documentation/pole.neo4j-browser-guide
2715
:rendered-guide: https://guides.neo4j.com/sandbox/pole/index.html
28-
//guide for modelling decisions. Should be friendly enough to be converted into various document formats
29-
:model-guide: false
16+
:model: documentation/img/model.jpeg
17+
:example: documentation/img/example.png
3018

31-
image::{repo}/raw/master/{icon}[width=100]
19+
:query: MATCH (l:Location {address:$address})<-[r:OCCURRED_AT]-(c:Crime) +
20+
RETURN c.date as crimeDate +
3221

33-
== {long_name} Graph Example ({name})
34-
35-
Description: {description}
22+
:param-name: address
23+
:param-value: Piccadilly
24+
:result-column: crimeDate
25+
:expected-result: 31/08/2017
3626

37-
=== Setup
27+
:model-guide:
28+
:todo:
29+
image::{logo}[width=200]
3830

39-
This is for Neo4j version: {target-db-version}
40-
41-
Required plugins: {use-plugin}
31+
== {long_name} Graph Example ({name})
4232

43-
Rendered guide available via: `:play {rendered-guide}`
33+
Description: _{description}_
4434

45-
Download the zip file link:{repo}/raw/master/{name}.zip[{name}.zip] and add it as "project from file" to https://neo4j.com/developer/neo4j-desktop[Neo4j Desktop^].
35+
.Model
36+
image::{model}[]
4637

47-
Load graph data via
38+
.Example
39+
image::{example}[width=600]
4840

49-
ifeval::[{use-dump-file} != false]
50-
[source,shell,subs=attributes]
41+
.Example Query:
42+
[source,cypher,subs=attributes]
5143
----
52-
bin/neo4j-admin load --from {use-dump-file} [--database <database>]
44+
{query}
5345
----
5446

55-
Or upload dump file to Neo4j Aura via https://console.neo4j.io/#import-instructions
56-
57-
endif::[]
58-
59-
ifeval::[{use-load-script} != false]
47+
=== Setup
6048

61-
[source,shell,subs=attributes]
62-
----
63-
bin/cypher-shell -u neo4j -p <password> -f {use-load-script} [-d <database>]
64-
----
49+
This is for Neo4j version: `{target-db-version}`
6550

66-
Or import in Neo4j Browser by dragging or pasting the content of {use-load-script}.
51+
Rendered guide available from: `:play pole`
52+
// or `:play {rendered-guide}``
6753

68-
endif::[]
54+
Unrendered guide: link:{guide}[]
6955

70-
=== Feedback
56+
Data files: `{data}`
7157

72-
Repository: {repo}
58+
Zip file: download data/{name}.zip[{name}.zip] and add it as "project from file" to https://neo4j.com/developer/neo4j-desktop[Neo4j Desktop^].
7359

74-
GitHub Issues: {repo}/issues
60+
=== Code Examples
7561

76-
Browser Guide Source: link:{repo}/tree/master/{guide}[{guide}]
62+
* link:code/javascript/example.js[JavaScript]
63+
* link:code/java/Example.java[Java]
64+
* link:code/csharp/Example.cs[C#]
65+
* link:code/python/example.py[Python]
66+
* link:code/go/example.go[Go]

bloom/pole.bloom-perspective

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"name":"GraphEx-Pole Perspective 1","id":"e40e77c0-29cd-11eb-9f32-41176dc4c79c","categories":[{"id":0,"name":"Other","color":"#6B6B6B","size":1,"icon":"no-icon","labels":[],"properties":[],"caption":[""]},{"id":1,"name":"Person","color":"#FFE081","size":1,"icon":"no-icon","labels":["Person"],"properties":[{"name":"nhs_no","exclude":false,"isCaption":false,"dataType":"string"},{"name":"name","exclude":false,"isCaption":true,"dataType":"string"},{"name":"surname","exclude":false,"isCaption":false,"dataType":"string"},{"name":"age","exclude":false,"isCaption":false,"dataType":"string"}],"caption":[""],"createdAt":1605724983645,"lastEditedAt":1605724983645},{"id":2,"name":"Location","color":"#C990C0","size":1,"icon":"no-icon","labels":["Location"],"properties":[{"name":"address","exclude":false,"isCaption":true,"dataType":"string"},{"name":"postcode","exclude":false,"isCaption":false,"dataType":"string"},{"name":"longitude","exclude":false,"isCaption":false,"dataType":"number"},{"name":"latitude","exclude":false,"isCaption":false,"dataType":"number"}],"caption":[""],"createdAt":1605724983645,"lastEditedAt":1605724983645},{"id":3,"name":"Phone","color":"#F79767","size":1,"icon":"no-icon","labels":["Phone"],"properties":[{"name":"phoneNo","exclude":false,"isCaption":true,"dataType":"string"}],"caption":[""],"createdAt":1605724983645,"lastEditedAt":1605724983645},{"id":4,"name":"Email","color":"#57C7E3","size":1,"icon":"no-icon","labels":["Email"],"properties":[{"name":"email_address","exclude":false,"isCaption":true,"dataType":"string"}],"caption":[""],"createdAt":1605724983645,"lastEditedAt":1605724983645},{"id":5,"name":"Officer","color":"#F16667","size":1,"icon":"no-icon","labels":["Officer"],"properties":[{"name":"name","exclude":false,"isCaption":false,"dataType":"string"},{"name":"surname","exclude":false,"isCaption":true,"dataType":"string"},{"name":"badge_no","exclude":false,"isCaption":false,"dataType":"string"},{"name":"rank","exclude":false,"isCaption":false,"dataType":"string"}],"caption":[""],"createdAt":1605724983645,"lastEditedAt":1605724983645},{"id":6,"name":"PostCode","color":"#D9C8AE","size":1,"icon":"no-icon","labels":["PostCode"],"properties":[{"name":"code","exclude":false,"isCaption":true,"dataType":"string"}],"caption":[""],"createdAt":1605724983645,"lastEditedAt":1605724983645},{"id":7,"name":"Area","color":"#8DCC93","size":1,"icon":"no-icon","labels":["Area"],"properties":[{"name":"areaCode","exclude":false,"isCaption":true,"dataType":"string"}],"caption":[""],"createdAt":1605724983645,"lastEditedAt":1605724983645},{"id":8,"name":"PhoneCall","color":"#ECB5C9","size":1,"icon":"no-icon","labels":["PhoneCall"],"properties":[{"name":"call_date","exclude":false,"isCaption":true,"dataType":"string"},{"name":"call_type","exclude":false,"isCaption":false,"dataType":"string"},{"name":"call_duration","exclude":false,"isCaption":false,"dataType":"string"},{"name":"call_time","exclude":false,"isCaption":false,"dataType":"string"}],"caption":[""],"createdAt":1605724983645,"lastEditedAt":1605724983645},{"id":9,"name":"Crime","color":"#4C8EDA","size":1,"icon":"no-icon","labels":["Crime"],"properties":[{"name":"id","exclude":false,"isCaption":false,"dataType":"string"},{"name":"date","exclude":false,"isCaption":false,"dataType":"string"},{"name":"type","exclude":false,"isCaption":true,"dataType":"string"},{"name":"last_outcome","exclude":false,"isCaption":false,"dataType":"string"},{"name":"charge","exclude":false,"isCaption":false,"dataType":"string"},{"name":"note","exclude":false,"isCaption":false,"dataType":"string"}],"caption":[""],"createdAt":1605724983645,"lastEditedAt":1605724983645},{"id":10,"name":"Object","color":"#FFC454","size":1,"icon":"no-icon","labels":["Object"],"properties":[{"name":"id","exclude":false,"isCaption":false,"dataType":"string"},{"name":"type","exclude":false,"isCaption":true,"dataType":"string"},{"name":"description","exclude":false,"isCaption":false,"dataType":"string"}],"caption":[""],"createdAt":1605724983645,"lastEditedAt":1605724983645},{"id":11,"name":"Vehicle","color":"#DA7194","size":1,"icon":"no-icon","labels":["Vehicle"],"properties":[{"name":"make","exclude":false,"isCaption":true,"dataType":"string"},{"name":"model","exclude":false,"isCaption":false,"dataType":"string"},{"name":"year","exclude":false,"isCaption":false,"dataType":"string"},{"name":"reg","exclude":false,"isCaption":false,"dataType":"string"}],"caption":[""],"createdAt":1605724983645,"lastEditedAt":1605724983645}],"relationshipTypes":[{"properties":[],"name":"CURRENT_ADDRESS","id":"CURRENT_ADDRESS"},{"properties":[],"name":"HAS_PHONE","id":"HAS_PHONE"},{"properties":[],"name":"HAS_EMAIL","id":"HAS_EMAIL"},{"properties":[],"name":"HAS_POSTCODE","id":"HAS_POSTCODE"},{"properties":[],"name":"POSTCODE_IN_AREA","id":"POSTCODE_IN_AREA"},{"properties":[],"name":"LOCATION_IN_AREA","id":"LOCATION_IN_AREA"},{"properties":[],"name":"KNOWS_SN","id":"KNOWS_SN"},{"properties":[],"name":"KNOWS","id":"KNOWS"},{"properties":[],"name":"CALLER","id":"CALLER"},{"properties":[],"name":"CALLED","id":"CALLED"},{"properties":[],"name":"KNOWS_PHONE","id":"KNOWS_PHONE"},{"properties":[],"name":"OCCURRED_AT","id":"OCCURRED_AT"},{"properties":[],"name":"INVESTIGATED_BY","id":"INVESTIGATED_BY"},{"properties":[],"name":"INVOLVED_IN","id":"INVOLVED_IN"},{"properties":[],"name":"PARTY_TO","id":"PARTY_TO"},{"properties":[{"propertyKey":"rel_type","type":"FAMILY_REL","dataType":"string"}],"name":"FAMILY_REL","id":"FAMILY_REL"},{"properties":[],"name":"KNOWS_LW","id":"KNOWS_LW"}],"palette":{"colors":["#FFE081","#C990C0","#F79767","#57C7E3","#F16667","#D9C8AE","#8DCC93","#ECB5C9","#4C8EDA","#FFC454","#DA7194","#569480","#848484","#D9D9D9"],"currentIndex":11},"createdAt":1605724983612,"lastEditedAt":1605724983612,"templates":[],"hiddenRelationshipTypes":[],"hiddenCategories":[],"hideUncategorisedData":false,"parentPerspectiveId":null,"version":"1.4.1"}

pole.zip renamed to data/pole.zip

File renamed without changes.

documentation/img/example.png

251 KB
Loading
File renamed without changes.

0 commit comments

Comments
 (0)