Geochart in Anvil

What I’m trying to do: I’m trying to try load in google geocharts into anvil

What I’ve tried and what’s not working: I’ve tried pasting their sample code in ‘Region Geochart’ into the anvil Native Libaries space, this displays the chart but I can’t figure out a way to modify the chart dynamically and link it with the data I’ve already got in my anvil app. Honestly, I’m so clueless, I’ve tried searching everywhere (including the google charts docs Visualization: GeoChart  |  Charts  |  Google Developers) but to no avail, I’m super new to all of this so I feel like I’m deadstuck.

Tried to translate the javascript on the google sample to python but I’m not sure how to get ‘document’, I don’t even know if this is the right direction. :confused:

Code Sample:

# code snippet
 #MAP STUFF!
  
    google.charts.load('current', {
        'packages':['geochart'],
        'mapsApiKey': 'AIzaSyDNXl6BICIeGJHrCxUtqHHC7qOfGInLOaI'
      });
    data = google.visualization.arrayToDataTable([
      ['Country', 'Popularity'],
      ['Germany',  200],
      ['United States', 300],
    ])
    options = []
    #chart = google.visualization.GeoChart(document.getElementById('regions_div'));
    #chart.draw(data, options);

Clone link:
share a copy of your app
https://anvil.works/build#clone:IGJWNXZZHOTS6KUT=GGB75Z53BMOAACHP5I4QJRS5