[{"data":1,"prerenderedAt":697},["ShallowReactive",2],{"content-query-RGJk89GTJr":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":36,"body":38,"_type":690,"_id":691,"_source":692,"_file":693,"_stem":694,"_extension":695,"sitemap":696},"/tools/ai-heatmap","tools",false,"","Heatmap Generator for Excel & CSV","Create heatmaps online from Excel and CSV data. Visualize matrices, patterns, intensity, and grouped comparisons with AI.","Heatmap Generator",{"prefix":12,"label":13,"placeholder":14},"Generate a heatmap","Describe the heatmap you want to generate","e.g. heatmap of monthly sales by region and year, use a blue-to-red color scale",[16],"charts",true,[19,25,30],{"label":20,"prompt":21,"dataset_url":22,"dataset_title":23,"dataset_citation":24},"Temperature anomalies by year","heatmap of annual temperature anomaly by country and decade, diverging red-blue color scale where blue is cooler and red is warmer","https://ourworldindata.org/grapher/temperature-anomaly.csv","Annual surface temperature change","Our World in Data",{"label":26,"prompt":27,"dataset_url":28,"dataset_title":29,"dataset_citation":24},"CO₂ by region and decade","heatmap of average CO2 emissions per capita by world region (rows) and decade (columns), sequential color scale from light to dark","https://ourworldindata.org/grapher/co-emissions-per-capita.csv","CO₂ emissions per capita",{"label":31,"prompt":32,"dataset_url":33,"dataset_title":34,"dataset_citation":35},"Inflation across countries","heatmap of annual inflation rate by country (rows) and year (columns) for the last 20 years, diverging colorscale centered at 0","https://api.worldbank.org/v2/en/indicator/FP.CPI.TOTL.ZG?downloadformat=excel","Inflation, consumer prices (annual %)","World Bank",[37],"/img/tools/heatmap.png",{"type":39,"children":40,"toc":680},"root",[41,50,64,97,123,129,225,231,371,377,471,477,584,590,626,632,642,652,670],{"type":42,"tag":43,"props":44,"children":46},"element","h2",{"id":45},"what-is-a-heatmap",[47],{"type":48,"value":49},"text","What Is a Heatmap?",{"type":42,"tag":51,"props":52,"children":53},"p",{},[54,56,62],{"type":48,"value":55},"A ",{"type":42,"tag":57,"props":58,"children":59},"strong",{},[60],{"type":48,"value":61},"heatmap",{"type":48,"value":63}," encodes a matrix of values as a grid of colored cells — the higher the value, the more intense the color. It turns a table of numbers into an instantly readable visual, letting you spot patterns, clusters, and outliers across two categorical or temporal dimensions at a glance.",{"type":42,"tag":51,"props":65,"children":66},{},[67,69,74,76,81,83,88,90,95],{"type":48,"value":68},"Heatmaps are used everywhere: a retail analyst tracking ",{"type":42,"tag":57,"props":70,"children":71},{},[72],{"type":48,"value":73},"sales by product and month",{"type":48,"value":75},", a web developer studying ",{"type":42,"tag":57,"props":77,"children":78},{},[79],{"type":48,"value":80},"user click patterns by hour and day",{"type":48,"value":82},", an epidemiologist comparing ",{"type":42,"tag":57,"props":84,"children":85},{},[86],{"type":48,"value":87},"disease rates by region and year",{"type":48,"value":89},", or a biologist visualising ",{"type":42,"tag":57,"props":91,"children":92},{},[93],{"type":48,"value":94},"gene expression across samples and conditions",{"type":48,"value":96},". Anywhere you have a value that varies across two axes, a heatmap is often the clearest way to show it.",{"type":42,"tag":51,"props":98,"children":99},{},[100,102,107,109,114,116,121],{"type":48,"value":101},"The choice of ",{"type":42,"tag":57,"props":103,"children":104},{},[105],{"type":48,"value":106},"color scale",{"type":48,"value":108}," matters enormously. A ",{"type":42,"tag":57,"props":110,"children":111},{},[112],{"type":48,"value":113},"sequential",{"type":48,"value":115}," scale (light → dark) works for values that only go in one direction (counts, rates, quantities). A ",{"type":42,"tag":57,"props":117,"children":118},{},[119],{"type":48,"value":120},"diverging",{"type":48,"value":122}," scale (red → white → blue) is essential when values can be positive or negative, or when a natural midpoint exists (e.g. temperature anomaly centered at zero, or correlation centered at zero). Using the wrong scale can completely mislead the viewer.",{"type":42,"tag":43,"props":124,"children":126},{"id":125},"how-it-works",[127],{"type":48,"value":128},"How It Works",{"type":42,"tag":130,"props":131,"children":132},"ol",{},[133,182,198],{"type":42,"tag":134,"props":135,"children":136},"li",{},[137,142,144,149,151,158,160,166,167,173,175,180],{"type":42,"tag":57,"props":138,"children":139},{},[140],{"type":48,"value":141},"Upload your data",{"type":48,"value":143}," — provide a CSV or Excel file. The AI can work with ",{"type":42,"tag":57,"props":145,"children":146},{},[147],{"type":48,"value":148},"long format",{"type":48,"value":150}," (columns: ",{"type":42,"tag":152,"props":153,"children":155},"code",{"className":154},[],[156],{"type":48,"value":157},"row_label",{"type":48,"value":159},", ",{"type":42,"tag":152,"props":161,"children":163},{"className":162},[],[164],{"type":48,"value":165},"col_label",{"type":48,"value":159},{"type":42,"tag":152,"props":168,"children":170},{"className":169},[],[171],{"type":48,"value":172},"value",{"type":48,"value":174},") or ",{"type":42,"tag":57,"props":176,"children":177},{},[178],{"type":48,"value":179},"wide format",{"type":48,"value":181}," (rows = one dimension, columns = another, cells = values)",{"type":42,"tag":134,"props":183,"children":184},{},[185,190,192],{"type":42,"tag":57,"props":186,"children":187},{},[188],{"type":48,"value":189},"Describe the heatmap",{"type":48,"value":191}," — e.g. ",{"type":42,"tag":193,"props":194,"children":195},"em",{},[196],{"type":48,"value":197},"\"heatmap of average revenue by region (rows) and quarter (columns), red-to-green color scale\"",{"type":42,"tag":134,"props":199,"children":200},{},[201,206,208,215,217,223],{"type":42,"tag":57,"props":202,"children":203},{},[204],{"type":48,"value":205},"Get the visualization",{"type":48,"value":207}," — the AI writes Python code using ",{"type":42,"tag":209,"props":210,"children":212},"a",{"href":211},"https://plotly.com/python/heatmaps/",[213],{"type":48,"value":214},"Plotly",{"type":48,"value":216}," or ",{"type":42,"tag":209,"props":218,"children":220},{"href":219},"https://seaborn.pydata.org/generated/seaborn.heatmap.html",[221],{"type":48,"value":222},"seaborn",{"type":48,"value":224}," to pivot, aggregate, and render the heatmap",{"type":42,"tag":43,"props":226,"children":228},{"id":227},"interpreting-the-results",[229],{"type":48,"value":230},"Interpreting the Results",{"type":42,"tag":232,"props":233,"children":234},"table",{},[235,254],{"type":42,"tag":236,"props":237,"children":238},"thead",{},[239],{"type":42,"tag":240,"props":241,"children":242},"tr",{},[243,249],{"type":42,"tag":244,"props":245,"children":246},"th",{},[247],{"type":48,"value":248},"Visual element",{"type":42,"tag":244,"props":250,"children":251},{},[252],{"type":48,"value":253},"What it means",{"type":42,"tag":255,"props":256,"children":257},"tbody",{},[258,275,291,307,323,339,355],{"type":42,"tag":240,"props":259,"children":260},{},[261,270],{"type":42,"tag":262,"props":263,"children":264},"td",{},[265],{"type":42,"tag":57,"props":266,"children":267},{},[268],{"type":48,"value":269},"Cell color intensity",{"type":42,"tag":262,"props":271,"children":272},{},[273],{"type":48,"value":274},"Magnitude of the value — darker/brighter = higher (sequential)",{"type":42,"tag":240,"props":276,"children":277},{},[278,286],{"type":42,"tag":262,"props":279,"children":280},{},[281],{"type":42,"tag":57,"props":282,"children":283},{},[284],{"type":48,"value":285},"Red cells (diverging scale)",{"type":42,"tag":262,"props":287,"children":288},{},[289],{"type":48,"value":290},"Values above the midpoint (e.g. above-average, positive)",{"type":42,"tag":240,"props":292,"children":293},{},[294,302],{"type":42,"tag":262,"props":295,"children":296},{},[297],{"type":42,"tag":57,"props":298,"children":299},{},[300],{"type":48,"value":301},"Blue cells (diverging scale)",{"type":42,"tag":262,"props":303,"children":304},{},[305],{"type":48,"value":306},"Values below the midpoint (e.g. below-average, negative)",{"type":42,"tag":240,"props":308,"children":309},{},[310,318],{"type":42,"tag":262,"props":311,"children":312},{},[313],{"type":42,"tag":57,"props":314,"children":315},{},[316],{"type":48,"value":317},"White / pale center (diverging)",{"type":42,"tag":262,"props":319,"children":320},{},[321],{"type":48,"value":322},"Values near zero or the defined midpoint",{"type":42,"tag":240,"props":324,"children":325},{},[326,334],{"type":42,"tag":262,"props":327,"children":328},{},[329],{"type":42,"tag":57,"props":330,"children":331},{},[332],{"type":48,"value":333},"Cluster of similar colors",{"type":42,"tag":262,"props":335,"children":336},{},[337],{"type":48,"value":338},"A group of row-column combinations sharing similar values",{"type":42,"tag":240,"props":340,"children":341},{},[342,350],{"type":42,"tag":262,"props":343,"children":344},{},[345],{"type":42,"tag":57,"props":346,"children":347},{},[348],{"type":48,"value":349},"Isolated bright cell",{"type":42,"tag":262,"props":351,"children":352},{},[353],{"type":48,"value":354},"An outlier — unusually high or low compared to neighbours",{"type":42,"tag":240,"props":356,"children":357},{},[358,366],{"type":42,"tag":262,"props":359,"children":360},{},[361],{"type":42,"tag":57,"props":362,"children":363},{},[364],{"type":48,"value":365},"Annotations inside cells",{"type":42,"tag":262,"props":367,"children":368},{},[369],{"type":48,"value":370},"Raw values printed for precision reading",{"type":42,"tag":43,"props":372,"children":374},{"id":373},"color-scale-guide",[375],{"type":48,"value":376},"Color Scale Guide",{"type":42,"tag":232,"props":378,"children":379},{},[380,401],{"type":42,"tag":236,"props":381,"children":382},{},[383],{"type":42,"tag":240,"props":384,"children":385},{},[386,391,396],{"type":42,"tag":244,"props":387,"children":388},{},[389],{"type":48,"value":390},"Scale type",{"type":42,"tag":244,"props":392,"children":393},{},[394],{"type":48,"value":395},"When to use",{"type":42,"tag":244,"props":397,"children":398},{},[399],{"type":48,"value":400},"Example",{"type":42,"tag":255,"props":402,"children":403},{},[404,427,450],{"type":42,"tag":240,"props":405,"children":406},{},[407,417,422],{"type":42,"tag":262,"props":408,"children":409},{},[410,415],{"type":42,"tag":57,"props":411,"children":412},{},[413],{"type":48,"value":414},"Sequential",{"type":48,"value":416}," (light → dark)",{"type":42,"tag":262,"props":418,"children":419},{},[420],{"type":48,"value":421},"All values positive; magnitude is what matters",{"type":42,"tag":262,"props":423,"children":424},{},[425],{"type":48,"value":426},"Sales volume, visitor counts",{"type":42,"tag":240,"props":428,"children":429},{},[430,440,445],{"type":42,"tag":262,"props":431,"children":432},{},[433,438],{"type":42,"tag":57,"props":434,"children":435},{},[436],{"type":48,"value":437},"Diverging",{"type":48,"value":439}," (red → white → blue)",{"type":42,"tag":262,"props":441,"children":442},{},[443],{"type":48,"value":444},"Values can be above or below a midpoint",{"type":42,"tag":262,"props":446,"children":447},{},[448],{"type":48,"value":449},"Temperature anomaly, correlation, % change",{"type":42,"tag":240,"props":451,"children":452},{},[453,461,466],{"type":42,"tag":262,"props":454,"children":455},{},[456],{"type":42,"tag":57,"props":457,"children":458},{},[459],{"type":48,"value":460},"Categorical",{"type":42,"tag":262,"props":462,"children":463},{},[464],{"type":48,"value":465},"Cells represent discrete categories, not numeric values",{"type":42,"tag":262,"props":467,"children":468},{},[469],{"type":48,"value":470},"Status labels, risk tiers",{"type":42,"tag":43,"props":472,"children":474},{"id":473},"example-prompts",[475],{"type":48,"value":476},"Example Prompts",{"type":42,"tag":232,"props":478,"children":479},{},[480,496],{"type":42,"tag":236,"props":481,"children":482},{},[483],{"type":42,"tag":240,"props":484,"children":485},{},[486,491],{"type":42,"tag":244,"props":487,"children":488},{},[489],{"type":48,"value":490},"Scenario",{"type":42,"tag":244,"props":492,"children":493},{},[494],{"type":48,"value":495},"What to type",{"type":42,"tag":255,"props":497,"children":498},{},[499,516,533,550,567],{"type":42,"tag":240,"props":500,"children":501},{},[502,507],{"type":42,"tag":262,"props":503,"children":504},{},[505],{"type":48,"value":506},"Website traffic",{"type":42,"tag":262,"props":508,"children":509},{},[510],{"type":42,"tag":152,"props":511,"children":513},{"className":512},[],[514],{"type":48,"value":515},"heatmap of page views by hour of day (rows) and day of week (columns)",{"type":42,"tag":240,"props":517,"children":518},{},[519,524],{"type":42,"tag":262,"props":520,"children":521},{},[522],{"type":48,"value":523},"Sales performance",{"type":42,"tag":262,"props":525,"children":526},{},[527],{"type":42,"tag":152,"props":528,"children":530},{"className":529},[],[531],{"type":48,"value":532},"heatmap of monthly revenue by product category and region, annotate each cell",{"type":42,"tag":240,"props":534,"children":535},{},[536,541],{"type":42,"tag":262,"props":537,"children":538},{},[539],{"type":48,"value":540},"Survey responses",{"type":42,"tag":262,"props":542,"children":543},{},[544],{"type":42,"tag":152,"props":545,"children":547},{"className":546},[],[548],{"type":48,"value":549},"heatmap of average rating by question (rows) and demographic group (columns)",{"type":42,"tag":240,"props":551,"children":552},{},[553,558],{"type":42,"tag":262,"props":554,"children":555},{},[556],{"type":48,"value":557},"Stock returns",{"type":42,"tag":262,"props":559,"children":560},{},[561],{"type":42,"tag":152,"props":562,"children":564},{"className":563},[],[565],{"type":48,"value":566},"heatmap of monthly returns by year and month, diverging red-green scale",{"type":42,"tag":240,"props":568,"children":569},{},[570,575],{"type":42,"tag":262,"props":571,"children":572},{},[573],{"type":48,"value":574},"Gene expression",{"type":42,"tag":262,"props":576,"children":577},{},[578],{"type":42,"tag":152,"props":579,"children":581},{"className":580},[],[582],{"type":48,"value":583},"heatmap of expression values by gene (rows) and sample (columns), cluster rows",{"type":42,"tag":43,"props":585,"children":587},{"id":586},"related-tools",[588],{"type":48,"value":589},"Related Tools",{"type":42,"tag":51,"props":591,"children":592},{},[593,595,601,603,608,610,616,618,624],{"type":48,"value":594},"Use the ",{"type":42,"tag":209,"props":596,"children":598},{"href":597},"/tools/exploratory-data-analysis-ai",[599],{"type":48,"value":600},"Exploratory Data Analysis tool",{"type":48,"value":602}," to get a full ",{"type":42,"tag":57,"props":604,"children":605},{},[606],{"type":48,"value":607},"correlation matrix heatmap",{"type":48,"value":609}," alongside other summary statistics in one step. Use the ",{"type":42,"tag":209,"props":611,"children":613},{"href":612},"/tools/pivot-table",[614],{"type":48,"value":615},"Pivot Table tool",{"type":48,"value":617}," if you want to aggregate your data before visualising it, or the ",{"type":42,"tag":209,"props":619,"children":621},{"href":620},"/tools/ai-scatter-chart-generator",[622],{"type":48,"value":623},"AI Scatter Chart Generator",{"type":48,"value":625}," to explore the relationship between two continuous variables instead of a grid.",{"type":42,"tag":43,"props":627,"children":629},{"id":628},"frequently-asked-questions",[630],{"type":48,"value":631},"Frequently Asked Questions",{"type":42,"tag":51,"props":633,"children":634},{},[635,640],{"type":42,"tag":57,"props":636,"children":637},{},[638],{"type":48,"value":639},"What data format does the heatmap tool expect?",{"type":48,"value":641},"\nEither long format (three columns: row label, column label, value) or wide format (a matrix where rows and columns are already the two dimensions). Just describe your layout in the prompt — the AI will pivot or reshape as needed.",{"type":42,"tag":51,"props":643,"children":644},{},[645,650],{"type":42,"tag":57,"props":646,"children":647},{},[648],{"type":48,"value":649},"Can I cluster rows and columns to group similar patterns together?",{"type":48,"value":651},"\nYes — ask for a \"clustered heatmap\" or \"dendrogram heatmap\". The AI will apply hierarchical clustering and reorder the rows and columns so that similar ones are adjacent, making patterns much easier to see.",{"type":42,"tag":51,"props":653,"children":654},{},[655,660,662,668],{"type":42,"tag":57,"props":656,"children":657},{},[658],{"type":48,"value":659},"How do I add the numeric value inside each cell?",{"type":48,"value":661},"\nInclude \"annotate cells\" or \"show values in cells\" in your prompt. For large matrices this can get crowded, so also consider asking to \"only annotate cells above ",{"type":42,"tag":663,"props":664,"children":665},"span",{},[666],{"type":48,"value":667},"threshold",{"type":48,"value":669},"\".",{"type":42,"tag":51,"props":671,"children":672},{},[673,678],{"type":42,"tag":57,"props":674,"children":675},{},[676],{"type":48,"value":677},"My matrix is very large — will it still be readable?",{"type":48,"value":679},"\nFor matrices larger than roughly 20×20, individual cell labels become too small. Ask the AI to aggregate first (e.g. group by decade instead of year) or focus on a subset of rows/columns most relevant to your question.",{"title":7,"searchDepth":681,"depth":681,"links":682},2,[683,684,685,686,687,688,689],{"id":45,"depth":681,"text":49},{"id":125,"depth":681,"text":128},{"id":227,"depth":681,"text":230},{"id":373,"depth":681,"text":376},{"id":473,"depth":681,"text":476},{"id":586,"depth":681,"text":589},{"id":628,"depth":681,"text":631},"markdown","content:tools:011.ai-heatmap.md","content","tools/011.ai-heatmap.md","tools/011.ai-heatmap","md",{"loc":4},1775502468196]