Kiara-Dev-Team / kiara-ai-public

We solve the extreme difficulty in recruiting executives. Specifically, we have an ambitious plan to replace executive-level personnel using large language models and ChatGPT.
https://kiara.team
1 stars 0 forks source link

19 May - Geo chart can be tried #47

Open daijapan opened 6 months ago

daijapan commented 6 months ago

this is good - datawrapper https://datawrapper.dwcdn.net/wMzPr/11/ since we are open source - we can use datawrapper public version https://www.datawrapper.de https://www.reddit.com/r/googlesheets/comments/y41huh/geochart_for_individual_state/

Screenshot 2024-05-19 at 5 57 15
daijapan commented 6 months ago

Yes, there are plugins and tools available that allow you to create and embed local geo charts in Google Sheets. Here are a few options:

  1. Google Sheets Add-ons:

    • Awesome Table: This add-on allows you to create various types of charts and maps, including geo charts, directly from your Google Sheets data.
    • Geosheets: This add-on is specifically designed for working with geographic data. It allows you to create maps and perform geospatial analysis directly in Google Sheets.
  2. Google Data Studio: Google Data Studio can connect to Google Sheets and allows you to create interactive dashboards and reports, including geo charts. You can use it to visualize your data on maps and embed the reports in your Google Sheets or other web pages.

  3. Google Charts: Google Charts provides a GeoChart tool that you can use to create geo charts. You can use Google Apps Script to integrate Google Charts with Google Sheets and create custom visualizations.

Here's a brief overview of how to get started with each option:

Awesome Table

  1. Install the Awesome Table add-on from the Google Workspace Marketplace.
  2. Open your Google Sheet, and navigate to Add-ons > Awesome Table to start creating charts.
  3. Follow the instructions to create and customize your geo chart.

Geosheets

  1. Install the Geosheets add-on from the Google Workspace Marketplace.
  2. Open your Google Sheet, and navigate to Add-ons > Geosheets > Open Geosheets to get started.
  3. Use the provided functions and tools to create maps and perform geospatial analysis.

Google Data Studio

  1. Go to Google Data Studio.
  2. Create a new report and connect your Google Sheets data source.
  3. Add a Geo Map component to your report and configure it with your data.
  4. Embed the Data Studio report into your Google Sheet or share it as needed.

Google Charts with Google Apps Script

  1. Open your Google Sheet and navigate to Extensions > Apps Script.
  2. Use the following script as a template to create a GeoChart:

    function drawGeoChart() {
     var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
     var data = sheet.getDataRange().getValues();
    
     var chartData = [['Country', 'Value']];
     for (var i = 1; i < data.length; i++) {
       chartData.push([data[i][0], data[i][1]]);
     }
    
     var htmlOutput = HtmlService.createHtmlOutput()
       .setContent('<html><body><div id="chart_div"></div><script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script><script type="text/javascript">google.charts.load("current", {packages:["geochart"]}); google.charts.setOnLoadCallback(drawRegionsMap); function drawRegionsMap() { var data = google.visualization.arrayToDataTable(' + JSON.stringify(chartData) + '); var options = {}; var chart = new google.visualization.GeoChart(document.getElementById("chart_div")); chart.draw(data, options); }</script></body></html>');
    
     var ui = SpreadsheetApp.getUi();
     ui.showModalDialog(htmlOutput, 'Geo Chart');
    }
  3. Save and run the script to display the GeoChart in a modal dialog within your Google Sheet.

These tools should help you integrate local geo charts into your Google Sheets seamlessly. If you need more specific guidance on any of these options, feel free to ask!

daijapan commented 6 months ago

appscript! wow

RizwanJdr commented 6 months ago

I created the first visulization using datawrapper https://datawrapper.dwcdn.net/u8XeI/2/

u8XeI-top-4-as-1w-10-up

RizwanJdr commented 6 months ago

normalized one https://datawrapper.dwcdn.net/X4h0h/2/ X4h0h-normalized-top-4-as-10-up