transcript.md
↑ ContentsState Planner chat · https://stateplanner.com
- State: Tennessee (TN)
- Started: October 22, 2026, 12:31 AM UTC
- Runtime: 1 min 36 sec
- Status: completed
Prompt
What are Tennessee’s biggest freight trading partners and commodities, by tonnage and value, for truck, rail and water? Map Tennessee’s freight regions and each one’s top partners.
Model: Anthropic: Claude Haiku 5.5 (anthropic/claude-haiku-5.5, via openrouter)
Response
I'll start with the freight flow table's columns and caveats.
The four Tennessee zones and modes are clear. Next I'll check how imports and exports are coded, since their partner is a foreign region rather than a domestic zone.
Imports and exports carry a foreign partner (fr_orig / fr_dest), and domestic rows carry the other domestic zone. Next I'll rank statewide partners for truck, rail and water, by tonnage and by value.
The statewide partner list mixes in flows between Tennessee's own zones, which are not trading partners in the usual sense. I'll separate those out and rank external partners by zone, and rank commodities by mode.
I have the rankings I need. Now I'll map the four Tennessee zones with each zone's top five domestic partners, drawn as lines to partner centroids.
Tennessee's largest external freight partners in 2022 are neighbouring states (Indiana, Kentucky, Alabama, Mississippi, Georgia, Arkansas) and, by value, East Asia. Most tonnage, though, moves between Tennessee's own zones. Truck, rail and water together carried about 376 million short tons and $667 billion (2022 constant dollars).
Scope and definitions
- Source: FAF6 (BTS Freight Analysis Framework), 2022 shipments with Tennessee at one end. Modes: truck (including customer pick-up), rail and water.
- Tonnage is thousand short tons (kt). Value is million 2022 dollars ($M).
- A "partner" is the other end of a shipment. For domestic shipments that is the other zone. For imports and exports it is the foreign region (Eastern Asia, Europe, Canada and so on).
- These are shipment origins and destinations, not traffic on any highway.
Totals by mode
| Mode | Tons (kt) | Value ($M) | Tons moving inside Tennessee |
|---|---|---|---|
| Truck | 316,470 | 636,722 | 165,207 kt (52%) |
| Rail | 51,105 | 26,884 | 9,745 kt (19%) |
| Water | 8,455 | 3,689 | 31 kt |
Top external partners, all three modes
Tennessee's own zones are left out of this list because they are not trading partners.
Largest external partners by tonnage
| Partner | Tons (kt) | Value ($M) |
|---|---|---|
| Rest of Indiana | 22,168 | 9,256 |
| Rest of Kentucky | 20,284 | 25,041 |
| Rest of Alabama | 9,424 | 13,225 |
| Mississippi | 9,098 | 21,607 |
| Atlanta, GA | 8,852 | 26,458 |
| Rest of Missouri | 6,862 | 3,852 |
| Arkansas | 6,844 | 21,553 |
| Eastern Asia (foreign) | 5,692 | 35,313 |
| Las Vegas, NV | 5,508 | 607 |
| Rest of Georgia | 5,320 | 9,441 |
Largest external partners by value
| Partner | Value ($M) | Tons (kt) |
|---|---|---|
| Eastern Asia (foreign) | 35,313 | 5,692 |
| Atlanta, GA | 26,458 | 8,852 |
| Rest of Kentucky | 25,041 | 20,284 |
| Mississippi | 21,607 | 9,098 |
| Arkansas | 21,553 | 6,844 |
| Europe (foreign) | 19,858 | 2,711 |
| Canada | 16,382 | 3,714 |
| Mexico | 16,040 | 2,794 |
Top commodities
Statewide, by tonnage: gravel 53,720 kt (14% of tons), nonmetallic minerals 31,353 kt (8%), natural gas and other fossil products 27,971 kt (7%), cereal grains 27,875 kt (7%), waste and scrap 18,103 kt (5%).
By mode, ranked by tonnage and by value:
- Truck: gravel, nonmetallic minerals and natural gas lead by tonnage. By value, pharmaceuticals ($81.4B, 13% of truck value), motorized vehicles ($79.4B) and electronics ($59.7B) lead.
- Rail: cereal grains lead by tonnage (19,772 kt, 39% of rail tons). By value, motorized vehicles ($6.0B, 22%), gasoline ($4.7B, 18%) and basic chemicals ($2.6B) lead.
- Water: gravel leads by tonnage (5,440 kt, 64% of water tons). By value, motorized vehicles ($0.8B, 22%), other agricultural products ($0.4B) and textiles and leather ($0.4B) lead.
Top five external partners by tonnage, for each Tennessee zone
Memphis (TN part)
- Mississippi: 4,467 kt, $12.5B
- Rest of Missouri: 4,221 kt, $1.0B
- Arkansas: 3,392 kt, $15.7B
- Houston, TX: 1,396 kt, $2.3B
- Rest of Kentucky: 612 kt, $0.9B (this is the fifth entry on the map; Eastern Asia ranks fifth in tonnage but has no point to draw)
Nashville
- Rest of Kentucky: 7,218 kt, $12.0B
- Las Vegas, NV: 5,466 kt, $0.2B
- Rest of Alabama: 2,895 kt, $5.4B
- Atlanta, GA: 2,701 kt, $7.8B
- Birmingham, AL: 2,061 kt, $4.7B
Knoxville
- Rest of Indiana: 19,512 kt (46% of the zone's external tonnage), $1.6B
- Rest of Kentucky: 3,217 kt, $3.0B
- Houston, TX: 1,609 kt, $2.3B
- Atlanta, GA: 1,160 kt, $3.4B
- Rest of North Carolina: 815 kt, $1.3B
Rest of Tennessee
- Rest of Kentucky: 9,237 kt, $9.1B
- Rest of Alabama: 5,673 kt, $5.1B
- Atlanta, GA: 4,398 kt, $12.7B
- Rest of Virginia: 3,631 kt, $3.5B
- Mississippi: 3,187 kt, $5.6B
Map legend
- Shaded polygons: the four FAF zones (Memphis, Nashville, Knoxville, rest of Tennessee). The popup gives each zone's external tons and value.
- Coloured lines: each zone's top five domestic partners by tonnage, drawn from the zone centroid to the partner centroid. Red is from Memphis, orange from Nashville, teal from Knoxville, purple from the rest of Tennessee.
- Yellow dots: partner regions, with the zones that list them among their top five.
- Foreign partners (Eastern Asia, Europe, Canada and others) have no geometry in the data, so they appear in the tables only.
Caveats
- These are 2022 FAF6 estimates. Tonnage is rounded and value is in 2022 constant dollars.
- Zones are county groupings, not MPOs, Census urban areas or state highway districts.
- Partner shares are shares of all truck, rail and water freight. They are not shares of each zone's own total.

Tennessee Freight Zones and Top Partners
Exploratory Queries
Query 1 — List Tennessee's four freight zones and their names.
SELECT r.faf_id,
r.short_name,
r.name,
r.region_type,
(
SELECT count(*)
FROM tn_faf_od o
WHERE o.dms_orig = r.faf_id
OR o.dms_dest = r.faf_id
) AS rows_touch
FROM tn_faf_regions r
WHERE r.state = 'TN'
ORDER BY r.faf_id
| faf_id | short_name | name | region_type | rows_touch |
|---|---|---|---|---|
| 471 | Memphis TN-MS-AR (TN Part) | Memphis-Forrest City, TN-MS-AR CFS Area (TN Part) | C | 56464 |
| 472 | Nashville TN | Nashville-Davidson-Murfreesboro, TN CFS Area | C | 23248 |
| 473 | Knoxville TN | Knoxville-Morristown-Sevierville, TN CFS Area | C | 20142 |
| 479 | Rest of TN | Remainder of Tennessee | R | 22929 |
Query 2 — Check the totals by trade type and mode.
SELECT trade_type,
dms_mode,
m.name,
round(sum(tons)) AS kt,
round(sum(value)) AS usd_m,
count(*)
FROM tn_faf_od o
LEFT JOIN tn_faf_modes m ON m.code = o.dms_mode
GROUP BY 1,
2,
3
ORDER BY 1,
4 DESC
| trade_type | dms_mode | name | kt | usd_m | count |
|---|---|---|---|---|---|
| 1 | 1 | Truck (include customer pick-up) | 302211 | 542235 | 20629 |
| 1 | 6 | Pipeline | 122980 | 37101 | 140 |
| 1 | 2 | Rail | 46015 | 16167 | 423 |
| 1 | 5 | Multiple modes & mail | 44081 | 119011 | 16488 |
| 1 | 3 | Water | 7226 | 758 | 23 |
| 1 | 7 | Other and unknown | 3012 | 8527 | 1997 |
| 1 | 4 | Air (include truck-air) | 56 | 13598 | 1761 |
| 2 | 1 | Truck (include customer pick-up) | 8972 | 69141 | 8913 |
| 2 | 2 | Rail | 3192 | 7259 | 3078 |
| 2 | 5 | Multiple modes & mail | 1001 | 9087 | 2941 |
| 2 | 3 | Water | 781 | 2345 | 1701 |
| 2 | 4 | Air (include truck-air) | 306 | 45490 | 22842 |
| 2 | 6 | Pipeline | 102 | 22 | 6 |
| 2 | 7 | Other and unknown | 42 | 246 | 242 |
| 3 | 1 | Truck (include customer pick-up) | 5287 | 25346 | 8771 |
| 3 | 2 | Rail | 1898 | 3458 | 2924 |
| 3 | 5 | Multiple modes & mail | 463 | 1026 | 2394 |
| 3 | 3 | Water | 448 | 586 | 1334 |
| 3 | 4 | Air (include truck-air) | 322 | 57195 | 23525 |
| 3 | 7 | Other and unknown | 57 | 235 | 80 |
Query 3 — Look up the foreign region names and check the Tennessee zone rows.
SELECT faf_id,
name,
region_type,
centroid IS NOT NULL AS has_pt
FROM tn_faf_regions
WHERE state IS NULL
OR faf_id IN ('471', '472', '473', '479')
ORDER BY faf_id;
| faf_id | name | region_type | has_pt |
|---|---|---|---|
| 471 | Memphis-Forrest City, TN-MS-AR CFS Area (TN Part) | C | true |
| 472 | Nashville-Davidson-Murfreesboro, TN CFS Area | C | true |
| 473 | Knoxville-Morristown-Sevierville, TN CFS Area | C | true |
| 479 | Remainder of Tennessee | R | true |
| 801 | Canada | F | false |
| 802 | Mexico | F | false |
| 803 | Rest of Americas | F | false |
| 804 | Europe | F | false |
| 805 | Africa | F | false |
| 806 | SW & Central Asia | F | false |
| 807 | Eastern Asia | F | false |
| 808 | SE Asia & Oceania | F | false |
Query 4 — Check how domestic, import and export rows are split by Tennessee side for truck, rail and water.
SELECT trade_type,
CASE
WHEN dms_orig IN ('471', '472', '473', '479') THEN 'TN'
ELSE 'non-TN'
END AS orig_side,
CASE
WHEN dms_dest IN ('471', '472', '473', '479') THEN 'TN'
ELSE 'non-TN'
END AS dest_side,
fr_orig <> '' AS has_fr_orig,
fr_dest <> '' AS has_fr_dest,
count(*),
round(sum(tons)) AS kt,
round(sum(value)) AS usd_m
FROM tn_faf_od
WHERE dms_mode IN (1, 2, 3)
GROUP BY 1,
2,
3,
4,
5
ORDER BY 1,
2,
3,
4,
5
| trade_type | orig_side | dest_side | has_fr_orig | has_fr_dest | count | kt | usd_m |
|---|---|---|---|---|---|---|---|
| 1 | non-TN | TN | false | false | 10065 | 102022 | 191760 |
| 1 | TN | non-TN | false | false | 10419 | 78542 | 219824 |
| 1 | TN | TN | false | false | 591 | 174888 | 147577 |
| 2 | non-TN | TN | true | false | 11255 | 12838 | 58857 |
| 2 | TN | non-TN | true | false | 1301 | 22 | 1742 |
| 2 | TN | TN | true | false | 1136 | 86 | 18146 |
| 3 | non-TN | TN | false | true | 1069 | 9 | 1516 |
| 3 | TN | non-TN | false | true | 11072 | 7615 | 26078 |
| 3 | TN | TN | false | true | 888 | 8 | 1795 |
Query 5 — Rank statewide trading partners for truck, rail and water by tonnage.
WITH f AS (
SELECT o.trade_type,
o.dms_mode,
o.tons,
o.value,
CASE
WHEN o.trade_type = 1 THEN CASE
WHEN o.dms_orig IN ('471', '472', '473', '479') THEN o.dms_dest
ELSE o.dms_orig
END
WHEN o.trade_type = 2 THEN o.fr_orig
ELSE o.fr_dest
END AS partner_id
FROM tn_faf_od o
WHERE o.dms_mode IN (1, 2, 3)
),
p AS (
SELECT f.partner_id,
sum(f.tons) AS kt,
sum(f.value) AS usd_m,
sum(f.tons) FILTER (
WHERE trade_type = 1
) AS kt_dom,
sum(f.tons) FILTER (
WHERE trade_type <> 1
) AS kt_intl
FROM f
GROUP BY 1
)
SELECT p.partner_id,
r.short_name,
r.region_type,
round(p.kt) AS kt,
round(p.usd_m) AS usd_m,
round(p.kt_dom) AS kt_domestic,
round(coalesce(p.kt_intl, 0)) AS kt_foreign,
round(100 * p.kt / sum(p.kt) OVER ()) AS pct_tons
FROM p
LEFT JOIN tn_faf_regions r ON r.faf_id = p.partner_id
ORDER BY p.kt DESC
LIMIT 15
| partner_id | short_name | region_type | kt | usd_m | kt_domestic | kt_foreign | pct_tons |
|---|---|---|---|---|---|---|---|
| 472 | Nashville TN | C | 77785 | 51210 | 77785 | 0 | 21 |
| 479 | Rest of TN | R | 56716 | 40754 | 56716 | 0 | 15 |
| 189 | Rest of IN | R | 22168 | 9256 | 22168 | 0 | 6 |
| 473 | Knoxville TN | C | 21342 | 21377 | 21342 | 0 | 6 |
| 219 | Rest of KY | R | 20284 | 25041 | 20284 | 0 | 5 |
| 471 | Memphis TN-MS-AR (TN Part) | C | 19045 | 34237 | 19045 | 0 | 5 |
| 019 | Rest of AL | R | 9424 | 13225 | 9424 | 0 | 3 |
| 280 | Mississippi | R | 9098 | 21607 | 9098 | 0 | 2 |
| 131 | Atlanta GA | C | 8852 | 26458 | 8852 | 0 | 2 |
| 299 | Rest of MO | R | 6862 | 3852 | 6862 | 0 | 2 |
| 050 | Arkansas | R | 6844 | 21553 | 6844 | 0 | 2 |
| 807 | Eastern Asia | F | 5692 | 35313 | 5692 | 2 | |
| 321 | Las Vegas NV | C | 5508 | 607 | 5508 | 0 | 1 |
| 139 | Rest of GA | R | 5320 | 9441 | 5320 | 0 | 1 |
| 519 | Rest of VA | R | 4531 | 6439 | 4531 | 0 | 1 |
Query 6 — Rank statewide trading partners for truck, rail and water by value.
WITH f AS (
SELECT o.trade_type,
o.dms_mode,
o.tons,
o.value,
CASE
WHEN o.trade_type = 1 THEN CASE
WHEN o.dms_orig IN ('471', '472', '473', '479') THEN o.dms_dest
ELSE o.dms_orig
END
WHEN o.trade_type = 2 THEN o.fr_orig
ELSE o.fr_dest
END AS partner_id
FROM tn_faf_od o
WHERE o.dms_mode IN (1, 2, 3)
),
p AS (
SELECT f.partner_id,
sum(f.tons) AS kt,
sum(f.value) AS usd_m
FROM f
GROUP BY 1
)
SELECT p.partner_id,
r.short_name,
r.region_type,
round(p.kt) AS kt,
round(p.usd_m) AS usd_m,
round(100 * p.usd_m / sum(p.usd_m) OVER ()) AS pct_value
FROM p
LEFT JOIN tn_faf_regions r ON r.faf_id = p.partner_id
ORDER BY p.usd_m DESC
LIMIT 15
| partner_id | short_name | region_type | kt | usd_m | pct_value |
|---|---|---|---|---|---|
| 472 | Nashville TN | C | 77785 | 51210 | 8 |
| 479 | Rest of TN | R | 56716 | 40754 | 6 |
| 807 | Eastern Asia | F | 5692 | 35313 | 5 |
| 471 | Memphis TN-MS-AR (TN Part) | C | 19045 | 34237 | 5 |
| 131 | Atlanta GA | C | 8852 | 26458 | 4 |
| 219 | Rest of KY | R | 20284 | 25041 | 4 |
| 280 | Mississippi | R | 9098 | 21607 | 3 |
| 050 | Arkansas | R | 6844 | 21553 | 3 |
| 473 | Knoxville TN | C | 21342 | 21377 | 3 |
| 804 | Europe | F | 2711 | 19858 | 3 |
| 801 | Canada | F | 3714 | 16382 | 2 |
| 802 | Mexico | F | 2794 | 16040 | 2 |
| 019 | Rest of AL | R | 9424 | 13225 | 2 |
| 808 | SE Asia & Oceania | F | 2648 | 11838 | 2 |
| 171 | Chicago IL-IN-WI (IL Part) | C | 2295 | 11815 | 2 |
Query 7 — Rank commodities for truck, rail and water by tonnage and value.
WITH f AS (
SELECT o.sctg2,
o.dms_mode,
o.tons,
o.value
FROM tn_faf_od o
WHERE o.dms_mode IN (1, 2, 3)
)
SELECT f.sctg2,
s.title,
round(sum(tons)) AS kt,
round(sum(value)) AS usd_m,
round(100 * sum(tons) / sum(sum(tons)) OVER ()) AS pct_tons,
round(100 * sum(value) / sum(sum(value)) OVER ()) AS pct_value
FROM f
LEFT JOIN tn_faf_sctg s ON s.sctg2 = f.sctg2
GROUP BY 1,
2
ORDER BY sum(tons) DESC
LIMIT 15
| sctg2 | title | kt | usd_m | pct_tons | pct_value |
|---|---|---|---|---|---|
| 12 | Gravel | 53720 | 813 | 14 | 0 |
| 31 | Nonmetal min. prods. | 31353 | 11780 | 8 | 2 |
| 19 | Natural gas and other fossil products | 27971 | 8995 | 7 | 1 |
| 02 | Cereal grains | 27875 | 2963 | 7 | 0 |
| 41 | Waste/scrap | 18103 | 3230 | 5 | 0 |
| 11 | Natural sands | 16822 | 321 | 4 | 0 |
| 32 | Base metals | 16722 | 33174 | 4 | 5 |
| 26 | Wood prods. | 14139 | 13819 | 4 | 2 |
| 17 | Gasoline | 11968 | 10982 | 3 | 2 |
| 07 | Other foodstuffs | 11214 | 20400 | 3 | 3 |
| 43 | Mixed freight | 10872 | 46234 | 3 | 7 |
| 03 | Other ag prods. | 10458 | 8887 | 3 | 1 |
| 20 | Basic chemicals | 10018 | 12860 | 3 | 2 |
| 25 | Logs | 9945 | 803 | 3 | 0 |
| 24 | Plastics/rubber | 9381 | 34057 | 2 | 5 |
Query 8 — Rank each Tennessee zone's external partners for truck, rail and water.
WITH legs AS (
SELECT dms_orig AS zone,
CASE
WHEN trade_type = 1 THEN dms_dest
WHEN trade_type = 2 THEN fr_orig
ELSE fr_dest
END AS partner_id,
tons,
value
FROM tn_faf_od
WHERE dms_mode IN (1, 2, 3)
AND dms_orig IN ('471', '472', '473', '479')
UNION ALL
SELECT dms_dest,
CASE
WHEN trade_type = 1 THEN dms_orig
WHEN trade_type = 2 THEN fr_orig
ELSE fr_dest
END,
tons,
value
FROM tn_faf_od
WHERE dms_mode IN (1, 2, 3)
AND dms_dest IN ('471', '472', '473', '479')
),
p AS (
SELECT zone,
partner_id,
sum(tons) AS kt,
sum(value) AS usd_m
FROM legs
GROUP BY 1,
2
),
ranked AS (
SELECT p.*,
r.short_name AS partner,
row_number() OVER (
PARTITION BY zone
ORDER BY kt DESC
) AS rk_t,
row_number() OVER (
PARTITION BY zone
ORDER BY usd_m DESC
) AS rk_v,
sum(kt) OVER (
PARTITION BY zone
) AS zone_kt,
sum(usd_m) OVER (
PARTITION BY zone
) AS zone_usd
FROM p
LEFT JOIN tn_faf_regions r ON r.faf_id = p.partner_id
WHERE p.partner_id NOT IN ('471', '472', '473', '479')
)
SELECT zone,
rk_t,
partner,
partner_id,
round(kt) AS kt,
round(usd_m) AS usd_m,
round(100 * kt / zone_kt) AS pct_zone_tons,
round(100 * usd_m / zone_usd) AS pct_zone_value,
rk_v
FROM ranked
WHERE rk_t <= 6
OR rk_v <= 6
ORDER BY zone,
rk_t
| zone | rk_t | partner | partner_id | kt | usd_m | pct_zone_tons | pct_zone_value | rk_v |
|---|---|---|---|---|---|---|---|---|
| 471 | 1 | Mississippi | 280 | 4467 | 12502 | 15 | 10 | 2 |
| 471 | 2 | Rest of MO | 299 | 4221 | 1045 | 14 | 1 | 22 |
| 471 | 3 | Arkansas | 050 | 3392 | 15650 | 12 | 13 | 1 |
| 471 | 4 | Houston TX | 486 | 1396 | 2345 | 5 | 2 | 15 |
| 471 | 5 | Eastern Asia | 807 | 704 | 6036 | 2 | 5 | 5 |
| 471 | 6 | Rest of KY | 219 | 612 | 928 | 2 | 1 | 27 |
| 471 | 14 | Europe | 804 | 405 | 8375 | 1 | 7 | 3 |
| 471 | 40 | New York NY-NJ-CT-PA (NJ Part) | 341 | 161 | 6812 | 1 | 6 | 4 |
| 471 | 62 | Louisville KY-IN (KY Part) | 212 | 72 | 3229 | 0 | 3 | 6 |
| 472 | 1 | Rest of KY | 219 | 7218 | 12037 | 14 | 7 | 2 |
| 472 | 2 | Las Vegas NV | 321 | 5466 | 205 | 10 | 0 | 100 |
| 472 | 3 | Rest of AL | 019 | 2895 | 5410 | 5 | 3 | 5 |
| 472 | 4 | Atlanta GA | 131 | 2701 | 7767 | 5 | 4 | 3 |
| 472 | 5 | Birmingham AL | 011 | 2061 | 4687 | 4 | 3 | 9 |
| 472 | 6 | Eastern Asia | 807 | 1799 | 20827 | 3 | 12 | 1 |
| 472 | 15 | SE Asia & Oceania | 808 | 846 | 4933 | 2 | 3 | 6 |
| 472 | 16 | Europe | 804 | 846 | 6617 | 2 | 4 | 4 |
| 473 | 1 | Rest of IN | 189 | 19512 | 1585 | 46 | 3 | 9 |
| 473 | 2 | Rest of KY | 219 | 3217 | 2959 | 8 | 5 | 3 |
| 473 | 3 | Houston TX | 486 | 1609 | 2304 | 4 | 4 | 7 |
| 473 | 4 | Atlanta GA | 131 | 1160 | 3381 | 3 | 6 | 2 |
| 473 | 5 | Eastern Asia | 807 | 1050 | 6311 | 2 | 10 | 1 |
| 473 | 6 | Rest of NC | 379 | 815 | 1292 | 2 | 2 | 11 |
| 473 | 8 | Canada | 801 | 628 | 2655 | 1 | 4 | 4 |
| 473 | 15 | Europe | 804 | 473 | 2461 | 1 | 4 | 6 |
25 out of 36 are listed here.
Query 9 — Rank commodities within truck, rail and water by tonnage and value.
WITH f AS (
SELECT o.dms_mode,
o.sctg2,
o.tons,
o.value
FROM tn_faf_od o
WHERE o.dms_mode IN (1, 2, 3)
),
g AS (
SELECT dms_mode,
sctg2,
sum(tons) kt,
sum(value) usd
FROM f
GROUP BY 1,
2
),
r AS (
SELECT g.*,
s.title,
row_number() OVER (
PARTITION BY dms_mode
ORDER BY kt DESC
) rk_t,
row_number() OVER (
PARTITION BY dms_mode
ORDER BY usd DESC
) rk_v,
sum(kt) OVER (
PARTITION BY dms_mode
) mode_kt,
sum(usd) OVER (
PARTITION BY dms_mode
) mode_usd
FROM g
LEFT JOIN tn_faf_sctg s ON s.sctg2 = g.sctg2
)
SELECT dms_mode,
m.name AS mode,
title,
round(kt) kt,
round(usd) usd_m,
round(100 * kt / mode_kt) pct_mode_tons,
round(100 * usd / mode_usd) pct_mode_value,
rk_t,
rk_v
FROM r
LEFT JOIN tn_faf_modes m ON m.code = r.dms_mode
WHERE rk_t <= 5
OR rk_v <= 5
ORDER BY dms_mode,
rk_t
| dms_mode | mode | title | kt | usd_m | pct_mode_tons | pct_mode_value | rk_t | rk_v |
|---|---|---|---|---|---|---|---|---|
| 1 | Truck (include customer pick-up) | Gravel | 44751 | 740 | 14 | 0 | 1 | 35 |
| 1 | Truck (include customer pick-up) | Nonmetal min. prods. | 30768 | 11652 | 10 | 2 | 2 | 16 |
| 1 | Truck (include customer pick-up) | Natural gas and other fossil products | 25822 | 8083 | 8 | 1 | 3 | 20 |
| 1 | Truck (include customer pick-up) | Waste/scrap | 17514 | 2950 | 6 | 0 | 4 | 32 |
| 1 | Truck (include customer pick-up) | Natural sands | 16363 | 305 | 5 | 0 | 5 | 39 |
| 1 | Truck (include customer pick-up) | Mixed freight | 10866 | 46213 | 3 | 7 | 8 | 5 |
| 1 | Truck (include customer pick-up) | Machinery | 8205 | 49077 | 3 | 8 | 13 | 4 |
| 1 | Truck (include customer pick-up) | Motorized vehicles | 8188 | 79419 | 3 | 12 | 15 | 2 |
| 1 | Truck (include customer pick-up) | Electronics | 4904 | 59661 | 2 | 9 | 21 | 3 |
| 1 | Truck (include customer pick-up) | Pharmaceuticals | 2012 | 81355 | 1 | 13 | 31 | 1 |
| 2 | Rail | Cereal grains | 19772 | 804 | 39 | 3 | 1 | 8 |
| 2 | Rail | Coal | 5480 | 329 | 11 | 1 | 2 | 17 |
| 2 | Rail | Gasoline | 4657 | 4745 | 9 | 18 | 3 | 2 |
| 2 | Rail | Gravel | 3529 | 34 | 7 | 0 | 4 | 34 |
| 2 | Rail | Basic chemicals | 3034 | 2633 | 6 | 10 | 5 | 3 |
| 2 | Rail | Base metals | 1108 | 1736 | 2 | 6 | 8 | 5 |
| 2 | Rail | Plastics/rubber | 1056 | 1769 | 2 | 7 | 9 | 4 |
| 2 | Rail | Motorized vehicles | 635 | 5954 | 1 | 22 | 15 | 1 |
| 3 | Water | Gravel | 5440 | 39 | 64 | 1 | 1 | 22 |
| 3 | Water | Other ag prods. | 944 | 447 | 11 | 12 | 2 | 2 |
| 3 | Water | Cereal grains | 610 | 189 | 7 | 5 | 3 | 5 |
| 3 | Water | Metallic ores | 192 | 48 | 2 | 1 | 4 | 17 |
| 3 | Water | Motorized vehicles | 167 | 821 | 2 | 22 | 5 | 1 |
| 3 | Water | Textiles/leather | 82 | 399 | 1 | 11 | 9 | 3 |
| 3 | Water | Machinery | 64 | 299 | 1 | 8 | 12 | 4 |
Query 10 — Measure how much truck, rail and water freight stays inside Tennessee zone to zone.
SELECT o.dms_mode,
m.name,
round(
sum(o.tons) FILTER (
WHERE o.dms_orig IN ('471', '472', '473', '479')
AND o.dms_dest IN ('471', '472', '473', '479')
)
) AS intra_tn_kt,
round(sum(o.tons)) AS all_kt,
round(
sum(o.value) FILTER (
WHERE o.dms_orig IN ('471', '472', '473', '479')
AND o.dms_dest IN ('471', '472', '473', '479')
)
) AS intra_tn_usd_m,
round(sum(o.value)) AS all_usd_m
FROM tn_faf_od o
LEFT JOIN tn_faf_modes m ON m.code = o.dms_mode
WHERE o.dms_mode IN (1, 2, 3)
GROUP BY 1,
2
ORDER BY 1
| dms_mode | name | intra_tn_kt | all_kt | intra_tn_usd_m | all_usd_m |
|---|---|---|---|---|---|
| 1 | Truck (include customer pick-up) | 165207 | 316470 | 161535 | 636722 |
| 2 | Rail | 9745 | 51105 | 5967 | 26884 |
| 3 | Water | 31 | 8455 | 16 | 3689 |
Map Layer Queries
Tennessee freight zones (FAF 2022)
WITH legs AS (
SELECT dms_orig AS zone,
CASE
WHEN trade_type = 1 THEN dms_dest
WHEN trade_type = 2 THEN fr_orig
ELSE fr_dest
END AS partner_id,
tons,
value
FROM tn_faf_od
WHERE dms_mode IN (1, 2, 3)
AND dms_orig IN ('471', '472', '473', '479')
UNION ALL
SELECT dms_dest,
CASE
WHEN trade_type = 1 THEN dms_orig
WHEN trade_type = 2 THEN fr_orig
ELSE fr_dest
END,
tons,
value
FROM tn_faf_od
WHERE dms_mode IN (1, 2, 3)
AND dms_dest IN ('471', '472', '473', '479')
),
ext AS (
SELECT zone,
sum(tons) AS kt,
sum(value) AS usd
FROM legs
WHERE partner_id NOT IN ('471', '472', '473', '479')
GROUP BY zone
)
SELECT r.geom,
r.short_name AS "Freight zone",
round(e.kt) AS "External tons, truck+rail+water(kt)",
round(e.usd) AS "External value, truck+rail+water($M 2022)"
FROM tn_faf_regions r
JOIN ext e ON e.zone = r.faf_id
WHERE r.state = 'TN'
Picture: maps/turn-1-tn-freight-zones-partners.png
Top 5 partner flows by tons (from each zone) — colored by "From zone": From Memphis (#d62828), From Nashville (#f77f00), From Knoxville (#2a9d8f), From rest of TN (#6a4c93)
WITH legs AS (
SELECT dms_orig AS zone,
CASE
WHEN trade_type = 1 THEN dms_dest
WHEN trade_type = 2 THEN fr_orig
ELSE fr_dest
END AS partner_id,
tons,
value
FROM tn_faf_od
WHERE dms_mode IN (1, 2, 3)
AND dms_orig IN ('471', '472', '473', '479')
UNION ALL
SELECT dms_dest,
CASE
WHEN trade_type = 1 THEN dms_orig
WHEN trade_type = 2 THEN fr_orig
ELSE fr_dest
END,
tons,
value
FROM tn_faf_od
WHERE dms_mode IN (1, 2, 3)
AND dms_dest IN ('471', '472', '473', '479')
),
p AS (
SELECT zone,
partner_id,
sum(tons) AS kt,
sum(value) AS usd
FROM legs
WHERE partner_id NOT IN ('471', '472', '473', '479')
GROUP BY 1,
2
),
rk AS (
SELECT p.*,
row_number() OVER (
PARTITION BY zone
ORDER BY kt DESC
) AS rn
FROM p
JOIN tn_faf_regions pr ON pr.faf_id = p.partner_id
AND pr.centroid IS NOT NULL
)
SELECT ST_MakeLine(z.centroid, pr.centroid) AS geom,
z.short_name AS "From zone",
pr.short_name AS "Partner region",
round(rk.kt) AS "Tons, truck+rail+water(kt)",
round(rk.usd) AS "Value($M 2022)",
rk.rn AS "Rank by tons in zone"
FROM rk
JOIN tn_faf_regions z ON z.faf_id = rk.zone
JOIN tn_faf_regions pr ON pr.faf_id = rk.partner_id
WHERE rk.rn <= 5
Picture: maps/turn-1-tn-freight-zones-partners.png
Top 5 partner regions (domestic)
WITH legs AS (
SELECT dms_orig AS zone,
CASE
WHEN trade_type = 1 THEN dms_dest
WHEN trade_type = 2 THEN fr_orig
ELSE fr_dest
END AS partner_id,
tons,
value
FROM tn_faf_od
WHERE dms_mode IN (1, 2, 3)
AND dms_orig IN ('471', '472', '473', '479')
UNION ALL
SELECT dms_dest,
CASE
WHEN trade_type = 1 THEN dms_orig
WHEN trade_type = 2 THEN fr_orig
ELSE fr_dest
END,
tons,
value
FROM tn_faf_od
WHERE dms_mode IN (1, 2, 3)
AND dms_dest IN ('471', '472', '473', '479')
),
p AS (
SELECT zone,
partner_id,
sum(tons) AS kt,
sum(value) AS usd
FROM legs
WHERE partner_id NOT IN ('471', '472', '473', '479')
GROUP BY 1,
2
),
rk AS (
SELECT p.*,
row_number() OVER (
PARTITION BY zone
ORDER BY kt DESC
) AS rn
FROM p
JOIN tn_faf_regions pr ON pr.faf_id = p.partner_id
AND pr.centroid IS NOT NULL
)
SELECT pr.centroid AS geom,
pr.short_name AS "Partner region",
string_agg(DISTINCT z.short_name, '; ') AS "Top-5 partner for",
round(sum(rk.kt)) AS "Tons across those zones(kt)"
FROM rk
JOIN tn_faf_regions z ON z.faf_id = rk.zone
JOIN tn_faf_regions pr ON pr.faf_id = rk.partner_id
WHERE rk.rn <= 5
GROUP BY pr.faf_id,
pr.short_name,
pr.centroid
Picture: maps/turn-1-tn-freight-zones-partners.png
Used Data Sets
tn_faf_modes— last synced 2026-09-27 · 8 rowstn_faf_od— last synced 2026-09-27 · 120,212 rowstn_faf_regions— last synced 2026-09-27 · 142 rowstn_faf_sctg— last synced 2026-09-27 · 42 rows