Git Product home page Git Product logo

leaflet-gsheets's Introduction

Hi, I'm Chris

I’m a software/infra/data engineer and love building and breaking and tinkering. If I’m inside but not at the computer, I’m probably reading. And when outside, I’d ideally be climbing mountains but more frequently running and cycling.

I’ve been lucky enough to work across the tech spectrum: designing systems, building apps and services, exploring data, taming models.

By day I write Python (with Pyright set to hard mode) and TypeScript (tRPC + Next.js aren’t so bad), while by night I enjoy Go and Rust and playing with LLMs (because who doesn’t).

I’ve worked with some hot startups in the finance, climate and energy spaces, supported top research institutions and multinationals.

leaflet-gsheets's People

Contributors

carderne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

leaflet-gsheets's Issues

missing CSV files

Your instructions state "To get started, fork this repo and use the .CSV files in the data-sources folder as examples to create the Google Sheets ..." but there are no CSV files in your repository upon which to model my Google Sheet. Thanks!

How to make it work with Mapbox ?

Hi Carderne,

Thanks a lot for the whole process ! I am trying to make it work with a mapbox style. I tried to do it by deleting this part :

var map = L.map('map').setView([40, -100], 4);

// This is the Carto Positron basemap
var basemap = L.tileLayer('https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}{r}.png', {
  attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> &copy; <a href="http://cartodb.com/attributions">CartoDB</a>',
  subdomains: 'abcd',
  maxZoom: 19
});
basemap.addTo(map);

And by adding this one instead :

mapboxgl.accessToken = 'My_access_token'; var map = new mapboxgl.Map({ container: 'map', style: 'My_style_URL', center: [-1.547264, 47.204631], zoom: 10 }); basemap.addTo(map);

I am quite new at coding, and every element I found about G. Sheets + Mapbox is old and tools presented do not exist anymore. So, I am counting a lot on your solution, do you think it could work with Mapbox ?

Bests,

Koosch

Circle Markers

Hi Chris,

I really appreciate this tool!

I'm looking for a mechanism where I can load circles instead of Polygons, this way we could define more general 'regions' instead of administrative boundaries (this is a hand coded example, built a few years ago - https://specproj.web.viu.ca/Coal/CoalMines/NanaimoCoalMines.html) - doing projects like this via a spreadsheet would greatly simply things.

I've tried swapping out the polygons items like[polyURL, polygonLayer . . . ] and modifying them for circles,

  for (var row in data) {
    // The Sheets data has a column 'include' that specifies if that row should be mapped
    if (data[row].include == "y") {
      var coords = JSON.parse(data[row].geometry);

      geojsonStates.features.push({
        type: "Feature",
        geometry: {
          type: "Circle",   // I don't think Circle is supported
          coordinates: coords
        },
        properties: {
          name: data[row].name,
          summary: data[row].summary,
          state: data[row].state,
          local: data[row].local
        }
      });
    }
  }

I tried the same with the points . . . thinking of a circle as a point with a radius. But, I think I have the wrong approach here.

Maybe you have explored this in the past? I was wondering if you had any pointers as to how to modify this?

Thanks for considering,

Dan

CORS issues

Thanks to @zenfinity for pointing this out.

There are currently CORS issues with Google Sheets and PapaParse: jsoma/tabletop#189

There are a few workarounds proposed in the thread above but I'm going to hold off for now, as the Sheets API change will likely break some of them...

developing locally

How to develop locally? Browser complains about CORS amongst others
image

(map loads but the Google sheets data is not imported)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.