Finance Yahoo Currencies API - currency

Previously we are using https://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote?format=json to get all the currencies exchange rate for our application. However, realized that currently this link doesn't work anymore. What should we use now?

You can use YahooFinancials (Python Module) to get currency data from YahooFinanace:
$ pip install yahoofinancials
https://github.com/JECSand/yahoofinancials
from yahoofinancials import YahooFinancials
currencies = ['EURUSD=X', 'JPY=X', 'GBPUSD=X']
yahoo_financials_currencies = YahooFinancials(currencies)
print(yahoo_financials_currencies.get_historical_price_data("2018-08-01", "2018-08-10", "daily"))
Which returns:
{
"JPY=X": {
"eventsData": {},
"firstTradeDate": {
"date": 846633600,
"formatted_date": "1996-10-30"
},
"currency": "JPY",
"prices": [
{
"high": 112.13700103759766,
"volume": 0,
"formatted_date": "2018-07-31",
"low": 111.69999694824219,
"adjclose": 111.80799865722656,
"date": 1533078000,
"close": 111.80799865722656,
"open": 111.79499816894531
},
{
"high": 111.7239990234375,
"volume": 0,
"formatted_date": "2018-08-01",
"low": 111.33000183105469,
"adjclose": 111.62000274658203,
"date": 1533164400,
"close": 111.62000274658203,
"open": 111.63700103759766
},
{
"high": 111.78299713134766,
"volume": 0,
"formatted_date": "2018-08-02",
"low": 111.0999984741211,
"adjclose": 111.69000244140625,
"date": 1533250800,
"close": 111.69000244140625,
"open": 111.6989974975586
},
{
"high": 111.52200317382812,
"volume": 0,
"formatted_date": "2018-08-05",
"low": 111.16699981689453,
"adjclose": 111.23400115966797,
"date": 1533510000,
"close": 111.23400115966797,
"open": 111.21700286865234
},
{
"high": 111.36399841308594,
"volume": 0,
"formatted_date": "2018-08-06",
"low": 110.9990005493164,
"adjclose": 111.33999633789062,
"date": 1533596400,
"close": 111.33999633789062,
"open": 111.3280029296875
},
{
"high": 111.41999816894531,
"volume": 0,
"formatted_date": "2018-08-07",
"low": 110.83999633789062,
"adjclose": 111.34500122070312,
"date": 1533682800,
"close": 111.34500122070312,
"open": 111.34700012207031
},
{
"high": 111.1780014038086,
"volume": 0,
"formatted_date": "2018-08-08",
"low": 110.70999908447266,
"adjclose": 110.89199829101562,
"date": 1533769200,
"close": 110.89199829101562,
"open": 110.90299987792969
},
{
"high": 111.12799835205078,
"volume": 0,
"formatted_date": "2018-08-09",
"low": 110.51799774169922,
"adjclose": 111.09100341796875,
"date": 1533855600,
"close": 111.09100341796875,
"open": 111.06400299072266
}
],
"timeZone": {
"gmtOffset": 3600
},
"instrumentType": "CURRENCY"
},
"EURUSD=X": {
"eventsData": {},
"firstTradeDate": {
"date": 1070236800,
"formatted_date": "2003-12-01"
},
"currency": "USD",
"prices": [
{
"high": 1.169864296913147,
"volume": 0,
"formatted_date": "2018-07-31",
"low": 1.166534423828125,
"adjclose": 1.168961763381958,
"date": 1533078000,
"close": 1.168961763381958,
"open": 1.168961763381958
},
{
"high": 1.1669973134994507,
"volume": 0,
"formatted_date": "2018-08-01",
"low": 1.1604158878326416,
"adjclose": 1.1665889024734497,
"date": 1533164400,
"close": 1.1665889024734497,
"open": 1.1663848161697388
},
{
"high": 1.1612001657485962,
"volume": 0,
"formatted_date": "2018-08-02",
"low": 1.1562163829803467,
"adjclose": 1.1586008071899414,
"date": 1533250800,
"close": 1.1586008071899414,
"open": 1.1585606336593628
},
{
"high": 1.1570056676864624,
"volume": 0,
"formatted_date": "2018-08-05",
"low": 1.1530966758728027,
"adjclose": 1.1562297344207764,
"date": 1533510000,
"close": 1.1562297344207764,
"open": 1.156136155128479
},
{
"high": 1.1609008312225342,
"volume": 0,
"formatted_date": "2018-08-06",
"low": 1.1552013158798218,
"adjclose": 1.1558021306991577,
"date": 1533596400,
"close": 1.1558021306991577,
"open": 1.155748724937439
},
{
"high": 1.1629259586334229,
"volume": 0,
"formatted_date": "2018-08-07",
"low": 1.1574609279632568,
"adjclose": 1.1602946519851685,
"date": 1533682800,
"close": 1.1602946519851685,
"open": 1.1603351831436157
},
{
"high": 1.1621150970458984,
"volume": 0,
"formatted_date": "2018-08-08",
"low": 1.156176209449768,
"adjclose": 1.1610760688781738,
"date": 1533769200,
"close": 1.1610760688781738,
"open": 1.1610087156295776
},
{
"high": 1.1539349555969238,
"volume": 0,
"formatted_date": "2018-08-09",
"low": 1.1396141052246094,
"adjclose": 1.1523923873901367,
"date": 1533855600,
"close": 1.1523923873901367,
"open": 1.1528706550598145
}
],
"timeZone": {
"gmtOffset": 3600
},
"instrumentType": "CURRENCY"
},
"GBPUSD=X": {
"eventsData": {},
"firstTradeDate": {
"date": 1070236800,
"formatted_date": "2003-12-01"
},
"currency": "USD",
"prices": [
{
"high": 1.314578652381897,
"volume": 0,
"formatted_date": "2018-07-31",
"low": 1.3097577095031738,
"adjclose": 1.3121638298034668,
"date": 1533078000,
"close": 1.3121638298034668,
"open": 1.3118367195129395
},
{
"high": 1.3128528594970703,
"volume": 0,
"formatted_date": "2018-08-01",
"low": 1.3018969297409058,
"adjclose": 1.3126115798950195,
"date": 1533164400,
"close": 1.3126115798950195,
"open": 1.3125253915786743
},
{
"high": 1.3043080568313599,
"volume": 0,
"formatted_date": "2018-08-02",
"low": 1.2976226806640625,
"adjclose": 1.3018121719360352,
"date": 1533250800,
"close": 1.3018121719360352,
"open": 1.301574945449829
},
{
"high": 1.3007283210754395,
"volume": 0,
"formatted_date": "2018-08-05",
"low": 1.292073130607605,
"adjclose": 1.3003562688827515,
"date": 1533510000,
"close": 1.3003562688827515,
"open": 1.300153374671936
},
{
"high": 1.2973533868789673,
"volume": 0,
"formatted_date": "2018-08-06",
"low": 1.2938284873962402,
"adjclose": 1.2944984436035156,
"date": 1533596400,
"close": 1.2944984436035156,
"open": 1.294247031211853
},
{
"high": 1.2961763143539429,
"volume": 0,
"formatted_date": "2018-08-07",
"low": 1.2855453491210938,
"adjclose": 1.2946659326553345,
"date": 1533682800,
"close": 1.2946659326553345,
"open": 1.2946659326553345
},
{
"high": 1.2911388874053955,
"volume": 0,
"formatted_date": "2018-08-08",
"low": 1.2843565940856934,
"adjclose": 1.2881617546081543,
"date": 1533769200,
"close": 1.2881617546081543,
"open": 1.2879958152770996
},
{
"high": 1.283861756324768,
"volume": 0,
"formatted_date": "2018-08-09",
"low": 1.2726045846939087,
"adjclose": 1.2828407287597656,
"date": 1533855600,
"close": 1.2828407287597656,
"open": 1.2830052375793457
}
],
"timeZone": {
"gmtOffset": 3600
},
"instrumentType": "CURRENCY"
}
}
From here you can easily save this JSON data to a file if needed.

Related

Twilio - Studio - HTTP Request

Hello I am working with Twilio Studio and I am using an HTTP Request, which brings me the following information.
[
{
"id": 131316,
"name": "User 1",
"location_id": 38716,
"times": [
{
"day": 1,
"day_name": "Monday",
"open": "08:30",
"close": "13:00"
},
{
"day": 1,
"day_name": " Monday",
"open": "14:00",
"close": "18:00"
},
{
"day": 2,
"day_name": "Tuesday",
"open": "08:30",
"close": "13:00"
},
{
"day": 2,
"day_name": "Tuesday",
"open": "14:00",
"close": "18:00"
},
{
"day": 3,
"day_name": "Wednesday",
"open": "08:30",
"close": "13:00"
},
{
"day": 3,
"day_name": "Wednesday",
"open": "14:00",
"close": "18:00"
},
{
"day": 4,
"day_name": "Thursday",
"open": "08:30",
"close": "13:00"
},
{
"day": 4,
"day_name": "Thursday",
"open": "14:00",
"close": "18:00"
},
{
"day": 5,
"day_name": "Friday",
"open": "08:30",
"close": "13:00"
},
{
"day": 5,
"day_name": "Friday",
"open": "14:00",
"close": "17:00"
}
]
},
{
"id": 131313,
"name": "User 2",
"location_id": 38716,
"times": [
{
"day": 1,
"day_name": " Monday",
"open": "08:30",
"close": "14:00"
},
{
"day": 1,
"day_name": " Monday",
"open": "15:00",
"close": "18:00"
},
{
"day": 2,
"day_name": "Tuesday",
"open": "08:30",
"close": "14:00"
},
{
"day": 2,
"day_name": "Tuesday",
"open": "15:00",
"close": "18:00"
},
{
"day": 3,
"day_name": "Wednesday",
"open": "08:30",
"close": "14:00"
},
{
"day": 3,
"day_name": "Wednesday",
"open": "15:00",
"close": "18:00"
},
{
"day": 4,
"day_name": "Thursday",
"open": "08:30",
"close": "14:00"
},
{
"day": 4,
"day_name": "Thursday",
"open": "15:00",
"close": "18:00"
},
{
"day": 5,
"day_name": "Friday",
"open": "08:30",
"close": "14:00"
},
{
"day": 5,
"day_name": "Friday",
"open": "15:00",
"close": "17:00"
}
]
},
{
"id": 130975,
"name": "User 3",
"location_id": 38716,
"times": [
{
"day": 1,
"day_name": " Monday",
"open": "08:30",
"close": "13:00"
},
{
"day": 1,
"day_name": " Monday",
"open": "14:00",
"close": "18:00"
},
{
"day": 2,
"day_name": "Tuesday",
"open": "08:30",
"close": "13:00"
},
{
"day": 2,
"day_name": "Tuesday",
"open": "14:00",
"close": "18:00"
},
{
"day": 3,
"day_name": "Wednesday",
"open": "08:30",
"close": "13:00"
},
{
"day": 3,
"day_name": "Wednesday",
"open": "14:00",
"close": "18:00"
},
{
"day": 4,
"day_name": "Thursday",
"open": "08:30",
"close": "13:00"
},
{
"day": 4,
"day_name": "Thursday",
"open": "14:00",
"close": "18:00"
},
{
"day": 5,
"day_name": "Friday",
"open": "08:30",
"close": "13:00"
},
{
"day": 5,
"day_name": "Friday",
"open": "14:00",
"close": "17:00"
}
]
}
]
I want to capture the "name" information that comes from the HTTP response but I have not been able to do it. I have used the following options without it working for me.
{{widgets.ListaPrestadores.response.parsed.name}}
{{widgets.ListaPrestadores.response.parsed.name[0]}}
{{widgets.ListaPrestadores.response.body.parsed.name}}
{{widgets.ListaPrestadores.response.body.parsed.name[0]}}
Does anyone have an idea how I could do this? Thank you.
Try wrapping the array in an object like below, then access first element in the array with the syntax.
Note that, although an array is valid JSON, if your request returns an array of objects, it will not be parsed by your Studio Flow
{{widgets.http_1.parsed.data[0].name}}
{"data":
[
{
"id": 131316,
"name": "User 1",
"location_id": 38716,
"times": [
{
"day": 1,
"day_name": "Monday",
"open": "08:30",
"close": "13:00"
},
{
"day": 1,
"day_name": " Monday",
"open": "14:00",
"close": "18:00"
},
{
"day": 2,
"day_name": "Tuesday",
"open": "08:30",
"close": "13:00"
},
{
"day": 2,
"day_name": "Tuesday",
"open": "14:00",
"close": "18:00"
},
{
"day": 3,
"day_name": "Wednesday",
"open": "08:30",
"close": "13:00"
},
{
"day": 3,
"day_name": "Wednesday",
"open": "14:00",
"close": "18:00"
},
{
"day": 4,
"day_name": "Thursday",
"open": "08:30",
"close": "13:00"
},
{
"day": 4,
"day_name": "Thursday",
"open": "14:00",
"close": "18:00"
},
{
"day": 5,
"day_name": "Friday",
"open": "08:30",
"close": "13:00"
},
{
"day": 5,
"day_name": "Friday",
"open": "14:00",
"close": "17:00"
}
]
},
{
"id": 131313,
"name": "User 2",
"location_id": 38716,
"times": [
{
"day": 1,
"day_name": " Monday",
"open": "08:30",
"close": "14:00"
},
{
"day": 1,
"day_name": " Monday",
"open": "15:00",
"close": "18:00"
},
{
"day": 2,
"day_name": "Tuesday",
"open": "08:30",
"close": "14:00"
},
{
"day": 2,
"day_name": "Tuesday",
"open": "15:00",
"close": "18:00"
},
{
"day": 3,
"day_name": "Wednesday",
"open": "08:30",
"close": "14:00"
},
{
"day": 3,
"day_name": "Wednesday",
"open": "15:00",
"close": "18:00"
},
{
"day": 4,
"day_name": "Thursday",
"open": "08:30",
"close": "14:00"
},
{
"day": 4,
"day_name": "Thursday",
"open": "15:00",
"close": "18:00"
},
{
"day": 5,
"day_name": "Friday",
"open": "08:30",
"close": "14:00"
},
{
"day": 5,
"day_name": "Friday",
"open": "15:00",
"close": "17:00"
}
]
},
{
"id": 130975,
"name": "User 3",
"location_id": 38716,
"times": [
{
"day": 1,
"day_name": " Monday",
"open": "08:30",
"close": "13:00"
},
{
"day": 1,
"day_name": " Monday",
"open": "14:00",
"close": "18:00"
},
{
"day": 2,
"day_name": "Tuesday",
"open": "08:30",
"close": "13:00"
},
{
"day": 2,
"day_name": "Tuesday",
"open": "14:00",
"close": "18:00"
},
{
"day": 3,
"day_name": "Wednesday",
"open": "08:30",
"close": "13:00"
},
{
"day": 3,
"day_name": "Wednesday",
"open": "14:00",
"close": "18:00"
},
{
"day": 4,
"day_name": "Thursday",
"open": "08:30",
"close": "13:00"
},
{
"day": 4,
"day_name": "Thursday",
"open": "14:00",
"close": "18:00"
},
{
"day": 5,
"day_name": "Friday",
"open": "08:30",
"close": "13:00"
},
{
"day": 5,
"day_name": "Friday",
"open": "14:00",
"close": "17:00"
}
]
}
]
}

How to connect Nest.js and NEo4j

I am new to Neo4j and want it to connect with Nest.js,I am using neo4j Version 3.5.12 and
following the tutorial.I connect Nest.js and Neo4j by using Graphql but we cannot get the result and show some JSON type and also I try without using Graphql but the GET and POST were not working.
This my controller
import { Controller, Get } from '#nestjs/common';
import {Neo4jService} from './neo4j.service';
#Controller('neo4j')
export class Neo4jController {
constructor (private readonly retriveNodes: Neo4jService){}
#Get()
async findAll() {
console.log('retriving nodes as per given query in findAll() method. ');
//return'Welcome To All';
return this.retriveNodes.findAll();
}
}
Service
import { Injectable, Inject } from '#nestjs/common';
import * as v1 from 'neo4j-driver';
#Injectable()
export class Neo4jService {
constructor(#Inject("Neo4j") private readonly neo4j: v1.Driver) {}
async findAll(): Promise<any> {
return this.neo4j.session().run('MATCH (n:Movie) RETURN n LIMIT 5');
}
}
Using this I get the result in JSON form.
OUTPUT
{
"records": [
{
"keys": [
"n"
],
"length": 1,
"_fields": [
{
"identity": {
"low": 0,
"high": 0
},
"labels": [
"Movie"
],
"properties": {
"title": "The Martix",
"year": {
"low": 1999,
"high": 0
},
"id": "82999192-ae57-406e-8c19-d7753d0d5748"
}
}
],
"_fieldLookup": {
"n": 0
}
},
{
"keys": [
"n"
],
"length": 1,
"_fields": [
{
"identity": {
"low": 1,
"high": 0
},
"labels": [
"Movie"
],
"properties": {
"title": "A Few Good Men",
"year": {
"low": 1992,
"high": 0
},
"id": "c52c721c-c410-45a2-8d2e-824caa51847a"
}
}
],
"_fieldLookup": {
"n": 0
}
},
{
"keys": [
"n"
],
"length": 1,
"_fields": [
{
"identity": {
"low": 2,
"high": 0
},
"labels": [
"Movie"
],
"properties": {
"title": "Top Gun",
"year": {
"low": 1986,
"high": 0
},
"id": "d121663a-597f-4963-8acc-c68021bee860"
}
}
],
"_fieldLookup": {
"n": 0
}
},
{
"keys": [
"n"
],
"length": 1,
"_fields": [
{
"identity": {
"low": 17,
"high": 0
},
"labels": [
"Movie"
],
"properties": {
"title": "The Martix",
"year": {
"low": 1999,
"high": 0
},
"id": "453941ca-c309-419b-8cad-41d150e06b2a"
}
}
],
"_fieldLookup": {
"n": 0
}
},
{
"keys": [
"n"
],
"length": 1,
"_fields": [
{
"identity": {
"low": 18,
"high": 0
},
"labels": [
"Movie"
],
"properties": {
"title": "A Few Good Men",
"year": {
"low": 1992,
"high": 0
},
"id": "79fc529c-bfd1-4f7d-9bae-7f00b6d7d540"
}
}
],
"_fieldLookup": {
"n": 0
}
}
],
"summary": {
"query": {
"text": "MATCH (n:Movie) RETURN n LIMIT 5",
"parameters": {
}
},
"queryType": "r",
"counters": {
"_stats": {
"nodesCreated": 0,
"nodesDeleted": 0,
"relationshipsCreated": 0,
"relationshipsDeleted": 0,
"propertiesSet": 0,
"labelsAdded": 0,
"labelsRemoved": 0,
"indexesAdded": 0,
"indexesRemoved": 0,
"constraintsAdded": 0,
"constraintsRemoved": 0
},
"_systemUpdates": 0
},
"updateStatistics": {
"_stats": {
"nodesCreated": 0,
"nodesDeleted": 0,
"relationshipsCreated": 0,
"relationshipsDeleted": 0,
"propertiesSet": 0,
"labelsAdded": 0,
"labelsRemoved": 0,
"indexesAdded": 0,
"indexesRemoved": 0,
"constraintsAdded": 0,
"constraintsRemoved": 0
},
"_systemUpdates": 0
},
"plan": false,
"profile": false,
"notifications": [
],
"server": {
"address": "localhost:7687",
"version": "Neo4j/3.5.12"
},
"resultConsumedAfter": {
"low": 191,
"high": 0
},
"resultAvailableAfter": {
"low": 437,
"high": 0
},
"database": {
"name": null
}
}
}
I want both .run and .then but in here only .run is showing .No sugection is showing i want field,properties and id in above code.

How do I make the x-axis category label in a polar chart of HighChart non-wordwrap?

Here is the source code:
https://jsfiddle.net/24zrbqpL/
Highcharts.chart('container', {
"chart": {
"type": "line",
"polar": true
},
"xAxis": {
"min": 0.5,
"max": 6.5,
"categories": ['Clarify Objectives', 'Propose Initiates', 'Prioritise & Select', 'Track Performance', 'Review Portfolio', 'Adjust Course', ''],
"labels": {
"distance": 25
},
"tickmarkPlacement": "on",
"lineWidth": 0,
"gridLineColor": "#575756",
"title": {
"style": {
"fontFamily": "\"Lucida Grande\", \"Lucida Sans Unicode\", Verdana, Arial, Helvetica, sans-serif",
"color": "#666666",
"fontSize": "30px",
"fontWeight": "normal",
"fontStyle": "normal"
}
}
},
"yAxis": {
"plotBands": [{
"from": 1,
"to": 2,
"color": "#f8c4c0",
"outerRadius": "105%",
"thickness": "50%"
}, {
"from": 2,
"to": 3,
"color": "#f39d96",
"outerRadius": "105%",
"thickness": "50%"
}, {
"from": 3,
"to": 4,
"color": "#ee766d",
"outerRadius": "105%",
"thickness": "50%"
}, {
"from": 4,
"to": 5,
"color": "#eb584d",
"outerRadius": "105%",
"thickness": "50%"
}],
"reversed": true,
"min": 1,
"max": 5,
"allowDecimals": false,
"tickInterval": 1,
"tickAmount": 6,
"tickLength": 10,
"gridLineInterpolation": "polygon",
"gridLineColor": "",
"lineWidth": 0,
"tickmarkPlacement": "between",
"tickPixelInterval": 100,
"tickPosition": "outside",
"labels": {
"enabled": true,
"style": {
"fontWeight": "bold"
},
//"y": 25
}
},
"title": {
"text": "APM Spiderweb"
},
"series": [{
data: [1, 2, 3, 4, 5, 6]
}, {
}],
"plotOptions": {
"series": {
"animation": true,
"lineWidth": 4,
"marker": {
"radius": 8,
"symbol": "circle"
},
"_colorIndex": 0,
"_symbolIndex": 0
}
},
"credits": {
"enabled": false
},
"colors": [
"#7cb5ec",
"#90ed7d",
"#f7a35c",
"#8085e9",
"#f15c80",
"#e4d354",
"#2b908f",
"#f45b5b",
"#91e8e1"
]
});
Setting a whiteSpace to 'nowrap' in the labels.style object is a solution which you are looking for.
"labels": {
"distance": 25,
"style": {
"whiteSpace": 'nowrap'
}
},
Demo: https://jsfiddle.net/BlackLabel/edpcjL3k/
API: https://api.highcharts.com/highcharts/xAxis.labels.style

How to use multiple buffers in gltf 2.0?

I try to use multiple buffers to include different bin files(one for geometry data, one for animation data) but the animation bin file in buffers1 does not work in Babylonjs [Uncaught TypeError: Cannot read property 'frame' of undefined].
My questions are: Is there something wrong in my gltf file? How to use multiple bin file in gltf?
Below is my complete gltf file:
And the bin files
{
"accessors": [
{
"bufferView": 0,
"componentType": 5126,
"count": 24,
"type": "VEC3",
"max": [
0.3,
0.3,
0.3
],
"min": [
-0.3,
-0.3,
-0.3
],
"name": "Positions Accessor"
},
{
"bufferView": 1,
"componentType": 5126,
"count": 24,
"type": "VEC3",
"name": "Normals Accessor"
},
{
"bufferView": 2,
"componentType": 5126,
"count": 24,
"type": "VEC2",
"name": "UV Accessor 0"
},
{
"bufferView": 3,
"componentType": 5125,
"count": 36,
"type": "SCALAR",
"name": "Indices Accessor"
},
{
"bufferView": 4,
"componentType": 5126,
"count": 3,
"type": "SCALAR",
"max": [
2.0
],
"min": [
0.0
],
"name": "Animation Sampler Input"
},
{
"bufferView": 5,
"componentType": 5126,
"count": 3,
"type": "VEC3",
"name": "Animation Sampler Output"
}
],
"animations": [
{
"channels": [
{
"sampler": 0,
"target": {
"node": 0,
"path": "translation"
}
}
],
"samplers": [
{
"input": 4,
"output": 5
}
]
}
],
"asset": {
"generator": "glTF Asset Generator",
"version": "2.0"
},
"buffers": [
{
"uri": "Test_Geometry.bin",
"byteLength": 912
},
{
"uri": "Test_Animation.bin",
"byteLength": 48
}
],
"bufferViews": [
{
"buffer": 0,
"byteLength": 288,
"name": "Positions"
},
{
"buffer": 0,
"byteOffset": 288,
"byteLength": 288,
"name": "Normals"
},
{
"buffer": 0,
"byteOffset": 576,
"byteLength": 192,
"name": "Texture Coords 0"
},
{
"buffer": 0,
"byteOffset": 768,
"byteLength": 144,
"name": "Indices"
},
{
"buffer": 1,
"byteLength": 12,
"name": "Animation Sampler Input"
},
{
"buffer": 1,
"byteOffset": 12,
"byteLength": 36,
"name": "Animation Sampler Output"
}
],
"images": [
{
"uri": "Test/MultipleBuffers.png"
}
],
"materials": [
{
"pbrMetallicRoughness": {
"baseColorTexture": {
"index": 0
}
}
}
],
"meshes": [
{
"primitives": [
{
"attributes": {
"POSITION": 0,
"NORMAL": 1,
"TEXCOORD_0": 2
},
"indices": 3,
"material": 0
}
]
}
],
"nodes": [
{
"mesh": 0
}
],
"scene": 0,
"scenes": [
{
"nodes": [
0
]
}
],
"textures": [
{
"source": 0
}
]
}

Find minimum weighted spanning tree in Neo4j graph

I have drawn a graph in neo4j which have following nodes:
Driver
School
Students
Which have following conditions:
A driver is connected to all students by 'connects' relationship with 'distance' as attribute
Each Student is connected to each other by same 'connects' relationship with same 'distance' attribute
Each Student is also connected on one School by same 'connects' relationship with same 'distance' attribute
Now I want to get the minimum path that driver will cover to reach to school with N number students. For that, I am using neo4j predefined procedures(Algorithms):
MATCH (n:Driver{name:"Driver2"}),(s:student),(sc:school),(n)-[c:connects]->
(s),(s)-[d:connects]->(sc) CALL
algo.spanningTree.minimum('students','connects','distance',ID(n)) YIELD
loadMillis, computeMillis, writeMillis, effectiveNodeCount
RETURN loadMillis, computeMillis, writeMillis, effectiveNodeCount
which gives result like this:
[
{
"keys": [
"loadMillis",
"computeMillis",
"writeMillis",
"effectiveNodeCount"
],
"length": 4,
"_fields": [
{
"low": 5,
"high": 0
},
{
"low": 1,
"high": 0
},
{
"low": 0,
"high": 0
},
{
"low": 1,
"high": 0
}
],
"_fieldLookup": {
"loadMillis": 0,
"computeMillis": 1,
"writeMillis": 2,
"effectiveNodeCount": 3
}
},
{
"keys": [
"loadMillis",
"computeMillis",
"writeMillis",
"effectiveNodeCount"
],
"length": 4,
"_fields": [
{
"low": 5,
"high": 0
},
{
"low": 0,
"high": 0
},
{
"low": 0,
"high": 0
},
{
"low": 1,
"high": 0
}
],
"_fieldLookup": {
"loadMillis": 0,
"computeMillis": 1,
"writeMillis": 2,
"effectiveNodeCount": 3
}
},
{
"keys": [
"loadMillis",
"computeMillis",
"writeMillis",
"effectiveNodeCount"
],
"length": 4,
"_fields": [
{
"low": 4,
"high": 0
},
{
"low": 0,
"high": 0
},
{
"low": 0,
"high": 0
},
{
"low": 1,
"high": 0
}
],
"_fieldLookup": {
"loadMillis": 0,
"computeMillis": 1,
"writeMillis": 2,
"effectiveNodeCount": 3
}
},
{
"keys": [
"loadMillis",
"computeMillis",
"writeMillis",
"effectiveNodeCount"
],
"length": 4,
"_fields": [
{
"low": 4,
"high": 0
},
{
"low": 0,
"high": 0
},
{
"low": 0,
"high": 0
},
{
"low": 1,
"high": 0
}
],
"_fieldLookup": {
"loadMillis": 0,
"computeMillis": 1,
"writeMillis": 2,
"effectiveNodeCount": 3
}
}
]
MY QUESTION IS: How to interpret this data? and if it not the right way then which Neo4j procedure(algo) should i use?

Resources