Skip to main content

Overview

After loading your Excel file, you need to tell Network Analysis which columns represent origins, destinations, weights, and coordinates. This mapping determines how your data is visualized across all four visualization types.

Accessing Column Mapping

The column mapping controls are located in the sidebar panel on the left side of the screen:
1

Load Your Excel File

Click Load Excel and select your .xlsx file
2

Select Sheet (if needed)

If your file has multiple sheets, choose one from the prompt
3

View Available Columns

All column headers from your Excel file now appear in the mapping dropdowns
The sidebar can be toggled using the hamburger menu button (☰) in the top-left corner.

Required Mappings

Origin Column

The Origin column identifies the source node in each relationship:
  • In a referral network: the person making the referral
  • In a supply chain: the supplier or manufacturer
  • In a communication network: the message sender
  • In geographic flows: the departure location
Selection:
  1. Open the Origin dropdown in the sidebar
  2. Choose the column name that represents your source nodes
Origin and Destination must be different columns. The app will warn you if you select the same column for both.

Destination Column

The Destination column identifies the target node in each relationship:
  • In a referral network: the person being referred
  • In a supply chain: the recipient or distributor
  • In a communication network: the message receiver
  • In geographic flows: the arrival location
Selection:
  1. Open the Destination dropdown in the sidebar
  2. Choose the column name that represents your target nodes

Automatic Visualization

As soon as you select both Origin and Destination columns, the app automatically:
  • Processes and aggregates your edges
  • Generates the Sankey diagram
  • Generates the Gravitational Network
  • Populates filter dropdowns
  • Enables the Ego Networks tab
You’ll see a green success message: ”✓ Configuration valid. Visualizations will update.”

Optional Mappings

Weight Column

By default, the app counts each row as 1 connection. If you have a numeric column representing the strength or value of each relationship, map it as the Weight column:Example use cases:
  • Sales amount
  • Number of referrals
  • Message count
  • Units shipped
How it works:
// Without weight column:
AliceBob (appears 3 times in Excel)
Result: edge weight = 3

// With weight column:
AliceBob, weight: 100
AliceBob, weight: 150
Result: edge weight = 250
If the Weight column contains non-numeric values, they’re treated as weight = 1.

Coordinate Columns

To enable the Geographic Map visualization, you need to provide latitude and longitude columns. You can map coordinates for origins, destinations, or both.

Origin Coordinates

  • Origin Lat: Latitude of the origin node (decimal degrees, -90 to 90)
  • Origin Lng: Longitude of the origin node (decimal degrees, -180 to 180)

Destination Coordinates

  • Dest Lat: Latitude of the destination node (decimal degrees, -90 to 90)
  • Dest Lng: Longitude of the destination node (decimal degrees, -180 to 180)
The map will only draw edges where:
  • The origin node has coordinates from Origin Lat/Lng columns
  • The destination node has coordinates from Dest Lat/Lng columns
Nodes without valid coordinates are excluded from the map (but still appear in other visualizations).
Example coordinate mapping:
Column in ExcelMap to
Referrer_LatitudeOrigin Lat
Referrer_LongitudeOrigin Lng
Customer_LatitudeDest Lat
Customer_LongitudeDest Lng

Column Mapping UI

The sidebar contains three sections:

1. Data Source

┌─────────────────────────────┐
│ File: your_file.xlsx        │
│ [Load Excel]                │
│ ✓ Loaded: 150 rows, 8 cols  │
└─────────────────────────────┘

2. Column Mapping

┌─────────────────────────────┐
│ Origin:      [Select ▼]     │
│ Destination: [Select ▼]     │
│ Weight:      [Automatic ▼]  │
└─────────────────────────────┘

3. Coordinates (optional)

┌─────────────────────────────┐
│ Origin Lat:  [Optional ▼]   │
│ Origin Lng:  [Optional ▼]   │
│ Dest Lat:    [Optional ▼]   │
│ Dest Lng:    [Optional ▼]   │
└─────────────────────────────┘

Real-Time Updates

Dynamic Re-rendering: Any change to column mapping instantly re-processes your data and updates all visualizations. This includes:
  • Changing Origin or Destination columns
  • Adding or removing a Weight column
  • Updating coordinate columns

What Happens Behind the Scenes

When you change column mappings, the app:
1

Validates Selection

Ensures Origin ≠ Destination and both are selected
2

Aggregates Edges

Groups rows by unique origin→destination pairs and sums weights
3

Builds Indices

Creates fast lookup tables for outgoing and incoming edges per node
4

Populates Filters

Fills filter dropdowns with unique origin and destination values
5

Renders Visualizations

Updates Sankey, Network, and Map (if coordinates are available)
6

Enables Ego Networks

Populates destination dropdowns for the 4 ego-network panels

Source Code Reference

The column mapping logic is implemented in app.js:217-293:
function handleColumnChange() {
    // Read selected columns from dropdowns
    appState.originCol = originColEl.value;
    appState.destCol = destColEl.value;
    appState.weightCol = weightColEl.value;
    
    // Validate: origin ≠ destination
    if (originCol === destCol && originCol !== '') {
        showConfig('⚠ Origin and Destination cannot be the same column.', 'warning');
        return;
    }
    
    // Process and render
    if (originCol && destCol) {
        processAggregatedEdges();
        populateFilters();
        renderSankey();
        renderNetwork();
        if (coordinates available) renderMap();
    }
}
See app.js:339-378 for the edge aggregation algorithm.

Common Workflows

1. Load file: referrals.xlsx
2. Origin: Referrer_Name
3. Destination: Customer_Name
4. Weight: (leave as Automatic)
5. ✓ Visualizations appear

Troubleshooting

“Origin and Destination cannot be the same column” — You’ve selected the same column for both. Choose different columns.
  • Check that both Origin and Destination are selected (not ”— Select —”)
  • Look for a success message: ”✓ Configuration valid”
  • Open browser console (F12) to check for errors
  • Verify your Weight column contains numeric values
  • Non-numeric cells are treated as weight = 1
  • If using automatic counting, each row contributes 1 to the edge weight
  • You must select all four coordinate columns: Origin Lat, Origin Lng, Dest Lat, Dest Lng
  • Alternatively, select Origin Lat/Lng OR Dest Lat/Lng if your data only has one set
  • Ensure coordinate columns contain valid decimal numbers

Next Steps

Data Format

Learn about Excel file requirements

Filtering

Use filters to focus on specific nodes

Build docs developers (and LLMs) love