Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

19 May - Geo chart can be tried #47

Open
daijapan opened this issue May 18, 2024 · 4 comments
Open

19 May - Geo chart can be tried #47

daijapan opened this issue May 18, 2024 · 4 comments
Labels

Comments

@daijapan
Copy link
Contributor

daijapan commented May 18, 2024

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
Copy link
Contributor Author

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
Copy link
Contributor Author

appscript! wow

@daijapan daijapan changed the title geo chart can be tried 19 May - Geo chart can be tried May 18, 2024
@RizwanJdr
Copy link
Collaborator

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

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

@RizwanJdr
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants