Customizable Interactive Map Data Analysis

Maps in CanvasXpress allow users to create interactive and customizable visualizations for geographical data. You can integrate various map types, such as choropleths or point maps, and layer your data to highlight trends, distributions, or relationships across regions. With its flexibility, Maps in CanvasXpress support detailed analysis and presentation of spatial data for a wide range of applications.


Economist GGPlot Excel Paul Tol Black And White Solarized Stata Tableau Wall Street CanvasXpress
<html>

  <head>
    <!-- Include the CanvasXpress library in your HTML file -->
    <link rel="stylesheet" href="https://www.canvasxpress.org/dist/canvasXpress.css" type="text/css"/>
    <script src="https://www.canvasxpress.org/dist/canvasXpress.min.js"></script>
  </head>

  <body>

    <!-- Create a canvas element for the chart with the desired dimensions -->
    <div>
      <canvas id="canvasId" width="600" height="600"></canvas>
    </div>


    <!-- Create a script to initialize the chart -->
    <script>

      // Use a data frame (2D-array) for the graph
      var data = [
        [ "Id", "Gold", "Silver", "Bronze", "Total"],
        [ "ALB", 0, 0, 2, 2],
        [ "ARG", 1, 1, 1, 3],
        [ "ARM", 0, 3, 1, 4],
        [ "AUS", 18, 19, 16, 53],
        [ "AUT", 2, 0, 3, 5],
        [ "AZE", 2, 2, 3, 7],
        [ "BEL", 3, 1, 6, 10],
        [ "BGR", 3, 1, 3, 7],
        [ "BHR", 2, 1, 1, 4],
        [ "BRA", 3, 7, 10, 20],
        [ "BWA", 1, 1, 0, 2],
        [ "CAN", 9, 7, 11, 27],
        [ "CHE", 1, 2, 5, 8],
        [ "CHL", 1, 1, 0, 2],
        [ "CHN", 40, 27, 24, 91],
        [ "CIV", 0, 0, 1, 1],
        [ "COL", 0, 3, 1, 4],
        [ "CPV", 0, 0, 1, 1],
        [ "CUB", 2, 1, 6, 9],
        [ "CYP", 0, 1, 0, 1],
        [ "CZE", 3, 0, 2, 5],
        [ "DEU", 12, 13, 8, 33],
        [ "DMA", 1, 0, 0, 1],
        [ "DNK", 2, 2, 5, 9],
        [ "DOM", 1, 0, 2, 3],
        [ "DZA", 2, 0, 1, 3],
        [ "ECU", 1, 2, 2, 5],
        [ "EGY", 1, 1, 1, 3],
        // ... (data truncated after 29 records for clarity)
      ]

      // Create the configuration for the graph
      var config = {
         "colorBy" : "Total",
         "graphType" : "Map",
         "legendPosition" : "bottom",
         "mapId" : "medals",
         "theme" : "tableau",
         "title" : "Total Number of Olympic Medals in Paris - 2024",
         "topoJSON" : "https://www.canvasxpress.org/data/json/world.geojson"
      }

      // Event used to create graph (optional)
      var events = false


      // Call the CanvasXpress function to create the graph
      var cX = new CanvasXpress("canvasId", data, config, events);

      
    </script>

  </body>

</html>
<html>

  <head>
    <!-- Include the CanvasXpress library in your HTML file -->
    <link rel="stylesheet" href="https://www.canvasxpress.org/dist/canvasXpress.css" type="text/css"/>
    <script src="https://www.canvasxpress.org/dist/canvasXpress.min.js"></script>
  </head>

  <body>

    <!-- Create a canvas element for the chart with the desired dimensions -->
    <div>
      <canvas id="canvasId" width="600" height="600"></canvas>
    </div>


    <!-- Create a script to initialize the chart -->
    <script>

      // Create the data for the graph
      var data = {
         "y" : {
            "data" : [
              [0,0,2,2],
              [1,1,1,3],
              [0,3,1,4],
              [18,19,16,53],
              [2,0,3,5],
              [2,2,3,7],
              [3,1,6,10],
              [3,1,3,7],
              [2,1,1,4],
              [3,7,10,20],
              [1,1,0,2],
              [9,7,11,27],
              [1,2,5,8],
              [1,1,0,2],
              [40,27,24,91],
              [0,0,1,1],
              [0,3,1,4],
              [0,0,1,1],
              [2,1,6,9],
              [0,1,0,1],
              [3,0,2,5],
              [12,13,8,33],
              [1,0,0,1],
              [2,2,5,9],
              [1,0,2,3],
              [2,0,1,3],
              [1,2,2,5],
              [1,1,1,3],
              [0,0,1,1],
              [5,4,9,18],
              [1,3,0,4],
              [0,1,0,1],
              [16,26,22,64],
              [14,22,29,65],
              [3,3,1,7],
              [1,1,6,8],
              [0,0,2,2],
              [1,0,1,2],
              [2,0,2,4],
              [2,2,3,7],
              [6,7,6,19],
              [2,0,0,2],
              [0,1,5,6],
              [4,0,3,7],
              [3,6,3,12],
              [1,5,1,7],
              [12,13,15,40],
              [1,3,2,6],
              [0,1,0,1],
              [20,12,13,45],
              [1,3,3,7],
              [4,2,5,11],
              [0,2,4,6],
              [13,9,10,32],
              [0,1,1,2],
              [1,1,0,2],
              [0,2,2,4],
              [1,0,1,2],
              [0,1,3,4],
              [0,3,2,5],
              [0,1,0,1],
              [0,0,2,2],
              [15,7,12,34],
              [4,1,3,8],
              [10,7,3,20],
              [1,0,0,1],
              [0,1,0,1],
              [0,0,1,1],
              [2,0,2,4],
              [1,4,5,10],
              [0,0,2,2],
              [0,2,4,6],
              [1,2,1,4],
              [0,0,1,1],
              [3,4,2,9],
              [1,3,1,5],
              [0,0,1,1],
              [3,1,1,5],
              [0,0,1,1],
              [2,1,0,3],
              [4,4,3,11],
              [1,3,2,6],
              [0,0,3,3],
              [2,0,5,7],
              [1,1,1,3],
              [0,3,5,8],
              [1,1,0,2],
              [3,5,4,12],
              [40,44,42,126],
              [8,2,3,13],
              [1,3,2,6],
              [0,0,1,1]
            ],
            "smps" : ["Gold","Silver","Bronze","Total"],
            "vars" : ["ALB","ARG","ARM","AUS","AUT","AZE","BEL","BGR","BHR","BRA","BWA","CAN","CHE","CHL","CHN","CIV","COL","CPV","CUB","CYP","CZE","DEU","DMA","DNK","DOM","DZA","ECU","EGY","-99","ESP","ETH","FJI","FRA","GBR","GEO","GRC","GRD","GTM","HKG","HRV","HUN","IDN","IND","IRL","IRN","ISR","ITA","JAM","JOR","JPN","KAZ","KEN","KGZ","KOR","KSV","LCA","LTU","MAR","MDA","MEX","MNG","MYS","NLD","NOR","NZL","PAK","PAN","PER","PHL","POL","PRI","PRK","PRT","QAT","ROU","RUS","SGP","SRB","SVK","SVN","SWE","THA","TJK","TWN","TUN","TUR","UGA","UKR","USA","UZB","ZAF","ZMB"]
         }
      }

      // Create the configuration for the graph
      var config = {
         "colorBy" : "Total",
         "graphType" : "Map",
         "legendPosition" : "bottom",
         "mapId" : "medals",
         "theme" : "tableau",
         "title" : "Total Number of Olympic Medals in Paris - 2024",
         "topoJSON" : "https://www.canvasxpress.org/data/json/world.geojson"
      }

      // Event used to create graph (optional)
      var events = false


      // Call the CanvasXpress function to create the graph
      var cX = new CanvasXpress("canvasId", data, config, events);

      
    </script>

  </body>

</html>
library(canvasXpress)
y=read.table("https://www.canvasxpress.org/data/r/cX-OlympicMedalsT-dat.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
canvasXpress(
  data=y,
  colorBy="Total",
  graphType="Map",
  legendPosition="bottom",
  mapId="medals",
  theme="tableau",
  title="Total Number of Olympic Medals in Paris - 2024",
  topoJSON="https://www.canvasxpress.org/data/json/world.geojson"
)