i have write this cypher for finding centrality in each community
MATCH (i:exp_amd_cif)
WITH distinct i.louvain_community as community
CALL gds.pageRank.stream({
nodeQuery:"MATCH (i:exp_amd_cif) WHERE i.louvain_community = $community
RETURN id(i) as id",
relationshipQuery: "MATCH (acs:exp_amd_cif)-[:transfer_to]->(act:exp_amd_cif)
RETURN id(acs) as source, id(act) as target",
parameters:{community:community}})
YIELD nodeId, score
WITH community, nodeId, score
ORDER BY score DESC
RETURN community,
collect(gds.util.asNode(nodeId).name)[..5] as top_5_representatives
but it has error like this:
Type mismatch: expected String but was Map (line 3, column 26 (offset: 96))
“CALL gds.pageRank.stream({“
reference : https://guides.neo4j.com/4.0-intro-graph-algos-exercises/PracticalApplication.html?_gl=1*c9mdia*_ga*MTU3MDQxMDg3LjE3MjM3OTc0OTA.*_ga_DZP8Z65KK4*MTcyNjc5OTE1NC4xMS4xLjE3MjY3OTk4OTkuMC4wLjA.
Page rank for each Community
Zayyed Akhmed Assidqie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.