[{"data":1,"prerenderedAt":788},["ShallowReactive",2],{"content-query-bau2FWU62p":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"heading":10,"prompt":11,"tags":15,"files":17,"nav":17,"presets":18,"gallery":35,"body":37,"_type":781,"_id":782,"_source":783,"_file":784,"_stem":785,"_extension":786,"sitemap":787},"/tools/ai-network-graph","tools",false,"","Network Graph Generator for Excel & CSV","Create network graphs online from Excel and CSV data. Map relationships, influence, and connection strength with AI.","Network Graph Generator",{"prefix":12,"label":13,"placeholder":14},"Create a network graph","Describe the network you want to visualize","e.g. draw a network of countries connected by trade volume, sized by GDP",[16],"charts",true,[19,25,30],{"label":20,"prompt":21,"dataset_url":22,"dataset_title":23,"dataset_citation":24},"Global trade network","draw a network graph of countries as nodes connected by bilateral trade volume; size each node by total trade and color by continent","https://ourworldindata.org/grapher/trade-as-share-of-gdp.csv","Trade as share of GDP","Our World in Data",{"label":26,"prompt":27,"dataset_url":28,"dataset_title":29,"dataset_citation":24},"Migration flows","create a directed network graph showing migration flows between regions; use arrow thickness to represent the number of migrants","https://ourworldindata.org/grapher/net-migration.csv","Net migration",{"label":31,"prompt":32,"dataset_url":33,"dataset_title":34,"dataset_citation":24},"Correlation network","build a correlation network between all numeric variables; connect pairs with correlation above 0.6 and color edges by positive vs negative correlation","https://ourworldindata.org/grapher/life-expectancy-vs-gdp-per-capita.csv","Life expectancy vs. GDP per capita",[36],"/img/tools/network-graph.png",{"type":38,"children":39,"toc":770},"root",[40,49,77,110,129,135,232,238,377,383,485,491,598,604,609,682,688,709,715,732,742,760],{"type":41,"tag":42,"props":43,"children":45},"element","h2",{"id":44},"what-is-a-network-graph",[46],{"type":47,"value":48},"text","What Is a Network Graph?",{"type":41,"tag":50,"props":51,"children":52},"p",{},[53,55,61,63,68,70,75],{"type":47,"value":54},"A ",{"type":41,"tag":56,"props":57,"children":58},"strong",{},[59],{"type":47,"value":60},"network graph",{"type":47,"value":62}," (also called a graph or network diagram) represents entities as ",{"type":41,"tag":56,"props":64,"children":65},{},[66],{"type":47,"value":67},"nodes",{"type":47,"value":69}," and the relationships between them as ",{"type":41,"tag":56,"props":71,"children":72},{},[73],{"type":47,"value":74},"edges",{"type":47,"value":76},". The entities can be anything — countries, people, genes, websites, airports — and the edges can represent trade, migration, friendship, correlation, hyperlinks, or any measurable connection.",{"type":41,"tag":50,"props":78,"children":79},{},[80,82,87,89,94,96,101,103,108],{"type":47,"value":81},"Network graphs are used across disciplines: economists map ",{"type":41,"tag":56,"props":83,"children":84},{},[85],{"type":47,"value":86},"trade flows",{"type":47,"value":88},", epidemiologists trace ",{"type":41,"tag":56,"props":90,"children":91},{},[92],{"type":47,"value":93},"disease transmission",{"type":47,"value":95},", biologists study ",{"type":41,"tag":56,"props":97,"children":98},{},[99],{"type":47,"value":100},"protein interaction networks",{"type":47,"value":102},", and social scientists visualize ",{"type":41,"tag":56,"props":104,"children":105},{},[106],{"type":47,"value":107},"influence and collaboration",{"type":47,"value":109},". When your data contains relationships or co-occurrences between entities, a network graph reveals structure that a bar chart or table cannot.",{"type":41,"tag":50,"props":111,"children":112},{},[113,115,120,122,127],{"type":47,"value":114},"Two key properties govern what a network graph shows. ",{"type":41,"tag":56,"props":116,"children":117},{},[118],{"type":47,"value":119},"Degree",{"type":47,"value":121}," is the number of connections a node has — high-degree nodes are hubs. ",{"type":41,"tag":56,"props":123,"children":124},{},[125],{"type":47,"value":126},"Edge weight",{"type":47,"value":128}," encodes the strength of a relationship — a thick edge between countries means more trade or more migrants. Together these let you spot hubs, clusters, and isolated nodes at a glance.",{"type":41,"tag":42,"props":130,"children":132},{"id":131},"how-it-works",[133],{"type":47,"value":134},"How It Works",{"type":41,"tag":136,"props":137,"children":138},"ol",{},[139,181,197],{"type":41,"tag":140,"props":141,"children":142},"li",{},[143,148,150,157,159,165,166,172,174,179],{"type":41,"tag":56,"props":144,"children":145},{},[146],{"type":47,"value":147},"Upload your data",{"type":47,"value":149}," — provide a CSV or Excel file with at least two columns that identify the source and target of each relationship (e.g., ",{"type":41,"tag":151,"props":152,"children":154},"code",{"className":153},[],[155],{"type":47,"value":156},"origin",{"type":47,"value":158},", ",{"type":41,"tag":151,"props":160,"children":162},{"className":161},[],[163],{"type":47,"value":164},"destination",{"type":47,"value":158},{"type":41,"tag":151,"props":167,"children":169},{"className":168},[],[170],{"type":47,"value":171},"flow",{"type":47,"value":173},"). Multi-column datasets also work: the AI can compute a ",{"type":41,"tag":56,"props":175,"children":176},{},[177],{"type":47,"value":178},"correlation network",{"type":47,"value":180}," from numeric columns.",{"type":41,"tag":140,"props":182,"children":183},{},[184,189,191],{"type":41,"tag":56,"props":185,"children":186},{},[187],{"type":47,"value":188},"Describe the network",{"type":47,"value":190}," — e.g., ",{"type":41,"tag":192,"props":193,"children":194},"em",{},[195],{"type":47,"value":196},"\"draw a directed network of country-to-country migration flows, sized by total outflow\"",{"type":41,"tag":140,"props":198,"children":199},{},[200,205,207,214,216,222,224,230],{"type":41,"tag":56,"props":201,"children":202},{},[203],{"type":47,"value":204},"Get the visualization",{"type":47,"value":206}," — the AI writes Python code using ",{"type":41,"tag":208,"props":209,"children":211},"a",{"href":210},"https://networkx.org/",[212],{"type":47,"value":213},"NetworkX",{"type":47,"value":215}," and ",{"type":41,"tag":208,"props":217,"children":219},{"href":218},"https://matplotlib.org/",[220],{"type":47,"value":221},"Matplotlib",{"type":47,"value":223}," (or ",{"type":41,"tag":208,"props":225,"children":227},{"href":226},"https://plotly.com/python/",[228],{"type":47,"value":229},"Plotly",{"type":47,"value":231},") to build the graph, apply a layout algorithm, and render it.",{"type":41,"tag":42,"props":233,"children":235},{"id":234},"supported-data-formats",[236],{"type":47,"value":237},"Supported Data Formats",{"type":41,"tag":239,"props":240,"children":241},"table",{},[242,266],{"type":41,"tag":243,"props":244,"children":245},"thead",{},[246],{"type":41,"tag":247,"props":248,"children":249},"tr",{},[250,256,261],{"type":41,"tag":251,"props":252,"children":253},"th",{},[254],{"type":47,"value":255},"Format",{"type":41,"tag":251,"props":257,"children":258},{},[259],{"type":47,"value":260},"Example columns",{"type":41,"tag":251,"props":262,"children":263},{},[264],{"type":47,"value":265},"What the AI does",{"type":41,"tag":267,"props":268,"children":269},"tbody",{},[270,310,331],{"type":41,"tag":247,"props":271,"children":272},{},[273,282,305],{"type":41,"tag":274,"props":275,"children":276},"td",{},[277],{"type":41,"tag":56,"props":278,"children":279},{},[280],{"type":47,"value":281},"Edge list",{"type":41,"tag":274,"props":283,"children":284},{},[285,291,292,298,299],{"type":41,"tag":151,"props":286,"children":288},{"className":287},[],[289],{"type":47,"value":290},"source",{"type":47,"value":158},{"type":41,"tag":151,"props":293,"children":295},{"className":294},[],[296],{"type":47,"value":297},"target",{"type":47,"value":158},{"type":41,"tag":151,"props":300,"children":302},{"className":301},[],[303],{"type":47,"value":304},"weight",{"type":41,"tag":274,"props":306,"children":307},{},[308],{"type":47,"value":309},"Draws edges directly from rows",{"type":41,"tag":247,"props":311,"children":312},{},[313,321,326],{"type":41,"tag":274,"props":314,"children":315},{},[316],{"type":41,"tag":56,"props":317,"children":318},{},[319],{"type":47,"value":320},"Adjacency matrix",{"type":41,"tag":274,"props":322,"children":323},{},[324],{"type":47,"value":325},"columns = node names, rows = node names",{"type":41,"tag":274,"props":327,"children":328},{},[329],{"type":47,"value":330},"Reads the matrix as edge weights",{"type":41,"tag":247,"props":332,"children":333},{},[334,342,372],{"type":41,"tag":274,"props":335,"children":336},{},[337],{"type":41,"tag":56,"props":338,"children":339},{},[340],{"type":47,"value":341},"Multi-column tabular",{"type":41,"tag":274,"props":343,"children":344},{},[345,351,352,358,359,365,366],{"type":41,"tag":151,"props":346,"children":348},{"className":347},[],[349],{"type":47,"value":350},"country",{"type":47,"value":158},{"type":41,"tag":151,"props":353,"children":355},{"className":354},[],[356],{"type":47,"value":357},"gdp",{"type":47,"value":158},{"type":41,"tag":151,"props":360,"children":362},{"className":361},[],[363],{"type":47,"value":364},"life_exp",{"type":47,"value":158},{"type":41,"tag":151,"props":367,"children":369},{"className":368},[],[370],{"type":47,"value":371},"co2",{"type":41,"tag":274,"props":373,"children":374},{},[375],{"type":47,"value":376},"Computes a correlation network between variables",{"type":41,"tag":42,"props":378,"children":380},{"id":379},"interpreting-the-results",[381],{"type":47,"value":382},"Interpreting the Results",{"type":41,"tag":239,"props":384,"children":385},{},[386,402],{"type":41,"tag":243,"props":387,"children":388},{},[389],{"type":41,"tag":247,"props":390,"children":391},{},[392,397],{"type":41,"tag":251,"props":393,"children":394},{},[395],{"type":47,"value":396},"Visual element",{"type":41,"tag":251,"props":398,"children":399},{},[400],{"type":47,"value":401},"What it means",{"type":41,"tag":267,"props":403,"children":404},{},[405,421,437,453,469],{"type":41,"tag":247,"props":406,"children":407},{},[408,416],{"type":41,"tag":274,"props":409,"children":410},{},[411],{"type":41,"tag":56,"props":412,"children":413},{},[414],{"type":47,"value":415},"Node size",{"type":41,"tag":274,"props":417,"children":418},{},[419],{"type":47,"value":420},"Often mapped to degree, total weight, or a data column (e.g. GDP)",{"type":41,"tag":247,"props":422,"children":423},{},[424,432],{"type":41,"tag":274,"props":425,"children":426},{},[427],{"type":41,"tag":56,"props":428,"children":429},{},[430],{"type":47,"value":431},"Node color",{"type":41,"tag":274,"props":433,"children":434},{},[435],{"type":47,"value":436},"Typically encodes a category (region, cluster, type)",{"type":41,"tag":247,"props":438,"children":439},{},[440,448],{"type":41,"tag":274,"props":441,"children":442},{},[443],{"type":41,"tag":56,"props":444,"children":445},{},[446],{"type":47,"value":447},"Edge thickness",{"type":41,"tag":274,"props":449,"children":450},{},[451],{"type":47,"value":452},"Proportional to the weight of the relationship (e.g. trade volume)",{"type":41,"tag":247,"props":454,"children":455},{},[456,464],{"type":41,"tag":274,"props":457,"children":458},{},[459],{"type":41,"tag":56,"props":460,"children":461},{},[462],{"type":47,"value":463},"Edge color",{"type":41,"tag":274,"props":465,"children":466},{},[467],{"type":47,"value":468},"Can encode direction (in vs. out) or sign (positive vs. negative correlation)",{"type":41,"tag":247,"props":470,"children":471},{},[472,480],{"type":41,"tag":274,"props":473,"children":474},{},[475],{"type":41,"tag":56,"props":476,"children":477},{},[478],{"type":47,"value":479},"Layout algorithm",{"type":41,"tag":274,"props":481,"children":482},{},[483],{"type":47,"value":484},"Spring/force-directed layouts cluster tightly connected nodes together",{"type":41,"tag":42,"props":486,"children":488},{"id":487},"example-prompts",[489],{"type":47,"value":490},"Example Prompts",{"type":41,"tag":239,"props":492,"children":493},{},[494,510],{"type":41,"tag":243,"props":495,"children":496},{},[497],{"type":41,"tag":247,"props":498,"children":499},{},[500,505],{"type":41,"tag":251,"props":501,"children":502},{},[503],{"type":47,"value":504},"Scenario",{"type":41,"tag":251,"props":506,"children":507},{},[508],{"type":47,"value":509},"What to type",{"type":41,"tag":267,"props":511,"children":512},{},[513,530,547,564,581],{"type":41,"tag":247,"props":514,"children":515},{},[516,521],{"type":41,"tag":274,"props":517,"children":518},{},[519],{"type":47,"value":520},"Trade between regions",{"type":41,"tag":274,"props":522,"children":523},{},[524],{"type":41,"tag":151,"props":525,"children":527},{"className":526},[],[528],{"type":47,"value":529},"network graph of regional trade flows, thickness = export value",{"type":41,"tag":247,"props":531,"children":532},{},[533,538],{"type":41,"tag":274,"props":534,"children":535},{},[536],{"type":47,"value":537},"Airport connectivity",{"type":41,"tag":274,"props":539,"children":540},{},[541],{"type":41,"tag":151,"props":542,"children":544},{"className":543},[],[545],{"type":47,"value":546},"directed graph of flight routes, size airports by total passengers",{"type":41,"tag":247,"props":548,"children":549},{},[550,555],{"type":41,"tag":274,"props":551,"children":552},{},[553],{"type":47,"value":554},"Social influence",{"type":41,"tag":274,"props":556,"children":557},{},[558],{"type":41,"tag":151,"props":559,"children":561},{"className":560},[],[562],{"type":47,"value":563},"draw a follower network, highlight top-5 most connected accounts",{"type":41,"tag":247,"props":565,"children":566},{},[567,572],{"type":41,"tag":274,"props":568,"children":569},{},[570],{"type":47,"value":571},"Gene co-expression",{"type":41,"tag":274,"props":573,"children":574},{},[575],{"type":41,"tag":151,"props":576,"children":578},{"className":577},[],[579],{"type":47,"value":580},"correlation network of gene expression levels, threshold r > 0.7",{"type":41,"tag":247,"props":582,"children":583},{},[584,589],{"type":41,"tag":274,"props":585,"children":586},{},[587],{"type":47,"value":588},"Supply chain",{"type":41,"tag":274,"props":590,"children":591},{},[592],{"type":41,"tag":151,"props":593,"children":595},{"className":594},[],[596],{"type":47,"value":597},"network of suppliers to products to customers with edge weights",{"type":41,"tag":42,"props":599,"children":601},{"id":600},"choosing-a-layout",[602],{"type":47,"value":603},"Choosing a Layout",{"type":41,"tag":50,"props":605,"children":606},{},[607],{"type":47,"value":608},"The AI will pick an appropriate layout by default, but you can ask for a specific one:",{"type":41,"tag":610,"props":611,"children":612},"ul",{},[613,631,648,665],{"type":41,"tag":140,"props":614,"children":615},{},[616,621,623,629],{"type":41,"tag":56,"props":617,"children":618},{},[619],{"type":47,"value":620},"Spring / force-directed",{"type":47,"value":622}," (",{"type":41,"tag":151,"props":624,"children":626},{"className":625},[],[627],{"type":47,"value":628},"spring_layout",{"type":47,"value":630},") — general purpose; clusters connected nodes",{"type":41,"tag":140,"props":632,"children":633},{},[634,639,640,646],{"type":41,"tag":56,"props":635,"children":636},{},[637],{"type":47,"value":638},"Circular",{"type":47,"value":622},{"type":41,"tag":151,"props":641,"children":643},{"className":642},[],[644],{"type":47,"value":645},"circular_layout",{"type":47,"value":647},") — all nodes on a circle; good for comparing degree",{"type":41,"tag":140,"props":649,"children":650},{},[651,656,657,663],{"type":41,"tag":56,"props":652,"children":653},{},[654],{"type":47,"value":655},"Kamada-Kawai",{"type":47,"value":622},{"type":41,"tag":151,"props":658,"children":660},{"className":659},[],[661],{"type":47,"value":662},"kamada_kawai_layout",{"type":47,"value":664},") — aesthetically pleasing for medium-sized networks",{"type":41,"tag":140,"props":666,"children":667},{},[668,673,674,680],{"type":41,"tag":56,"props":669,"children":670},{},[671],{"type":47,"value":672},"Shell",{"type":47,"value":622},{"type":41,"tag":151,"props":675,"children":677},{"className":676},[],[678],{"type":47,"value":679},"shell_layout",{"type":47,"value":681},") — nested rings; useful for hierarchical structures",{"type":41,"tag":42,"props":683,"children":685},{"id":684},"related-tools",[686],{"type":47,"value":687},"Related Tools",{"type":41,"tag":50,"props":689,"children":690},{},[691,693,699,701,707],{"type":47,"value":692},"Use the ",{"type":41,"tag":208,"props":694,"children":696},{"href":695},"/tools/ai-sankey-diagram",[697],{"type":47,"value":698},"AI Sankey Diagram Generator",{"type":47,"value":700}," if you want to emphasize directional flows with quantities (e.g. energy or budget allocation) rather than a full relational graph. Use the ",{"type":41,"tag":208,"props":702,"children":704},{"href":703},"/tools/exploratory-data-analysis-ai",[705],{"type":47,"value":706},"Exploratory Data Analysis tool",{"type":47,"value":708}," first if you want to understand your dataset before building a network from it.",{"type":41,"tag":42,"props":710,"children":712},{"id":711},"frequently-asked-questions",[713],{"type":47,"value":714},"Frequently Asked Questions",{"type":41,"tag":50,"props":716,"children":717},{},[718,723,725,730],{"type":41,"tag":56,"props":719,"children":720},{},[721],{"type":47,"value":722},"What file format should my data be in?",{"type":47,"value":724},"\nCSV or Excel (.xlsx / .xls). The most common input is an ",{"type":41,"tag":56,"props":726,"children":727},{},[728],{"type":47,"value":729},"edge list",{"type":47,"value":731}," — one row per connection with a source column, a target column, and optionally a weight column. You can also upload a wide table of numeric columns and ask the AI to build a correlation network.",{"type":41,"tag":50,"props":733,"children":734},{},[735,740],{"type":41,"tag":56,"props":736,"children":737},{},[738],{"type":47,"value":739},"My network has thousands of nodes — will it still work?",{"type":47,"value":741},"\nLarge networks (500+ nodes) can become visually cluttered. Ask the AI to filter to the top N nodes by degree or weight, or to use a community-detection algorithm to summarize clusters before plotting.",{"type":41,"tag":50,"props":743,"children":744},{},[745,750,752,758],{"type":41,"tag":56,"props":746,"children":747},{},[748],{"type":47,"value":749},"Can I get a directed graph (arrows)?",{"type":47,"value":751},"\nYes — just say \"directed\" or \"draw arrows\" in your prompt. The AI will use a ",{"type":41,"tag":151,"props":753,"children":755},{"className":754},[],[756],{"type":47,"value":757},"DiGraph",{"type":47,"value":759}," in NetworkX and add arrowheads to the edges.",{"type":41,"tag":50,"props":761,"children":762},{},[763,768],{"type":41,"tag":56,"props":764,"children":765},{},[766],{"type":47,"value":767},"How is this different from a Sankey diagram?",{"type":47,"value":769},"\nA Sankey diagram is a special case of a flow diagram where quantities are conserved along paths (e.g. energy input → conversion → output). A network graph is more general: edges don't need to sum to anything, nodes can have any number of connections, and there's no required directionality.",{"title":7,"searchDepth":771,"depth":771,"links":772},2,[773,774,775,776,777,778,779,780],{"id":44,"depth":771,"text":48},{"id":131,"depth":771,"text":134},{"id":234,"depth":771,"text":237},{"id":379,"depth":771,"text":382},{"id":487,"depth":771,"text":490},{"id":600,"depth":771,"text":603},{"id":684,"depth":771,"text":687},{"id":711,"depth":771,"text":714},"markdown","content:tools:008.ai-network-graph.md","content","tools/008.ai-network-graph.md","tools/008.ai-network-graph","md",{"loc":4},1775502468196]