I am new to GraphX and exploring example flight data analysis found on online. http://www.sparktutorials.net/analyzing-flight-data:-a-gentle-introduction-to-graphx-in-spark
I tried calculating inDegrees (understand how many incoming flights to an airport) but I see value which corresponds to unique routes incoming to the airport. This means that if there exist more than one flight between a particular source and destination, lets' say 5, I am seeing only 1 for this route. What I want is something similar in the line of weighted degrees where in while calculating indegrees, the weight associated with the edge should be considered. This weight value is in edge._attr parameter which is not being considered for the computing degrees. Here is the my code block val inDegrees = graph.inDegrees.join(airportVertices).sortBy(_._2._1, ascending=false).take(10) val outDegrees = graph.outDegrees.join(airportVertices).sortBy(_._2._1, ascending=false).take(10) // Top 10 Indegrees println("Top 10 indegrees - > " ) inDegrees.foreach{println} // Top 10 out degrees println("Top 10 outDegrees -> " ) outDegrees.foreach{println} Can someone point to me right link or provide me an hint to solve this? regards Bala