title: Can NetworkX library read RDF data in Ntriple format and build a Graph object along with attributes or node features
body: <p>Can NetworkX library read RDF data in Ntriple format and build a Graph object along with attributes or node features.
  I tried the below code to convert the RDF data(.nt file) in to Graph using the rdflib,</p>
  
  <pre><code>from rdflib.extras.external_graph_libs import *
  from rdflib import Graph, URIRef, Literal
  import networkx as nx
  
  graph = Graph()
  graph.parse(“Airports-with-lables.nt”, format=“nt”)
  nx_graph = rdflib_to_networkx_multidigraph(graph)
  nx.write_graphml(nx_graph,“example_airport.graphml”)
  </code></pre>
  
  <p>However the generated grahml file doesn’t have attributes, because of which I am not able to proceed with StellarGraph Hinsage algorithm(<a href="https://github.com/stellargraph/stellargraph/tree/develop/demos/node-classification/hinsage" rel="nofollow noreferrer">https://github.com/stellargraph/stellargraph/tree/develop/demos/node-classification/hinsage</a>) which expects the node features as one of the parameter.</p>
  
  <p>Can anyone help on this please.</p>