I'm after calculating s2 cell from given Lat and Lon, I am new to python and JavaScript, fiddle around the net and found Javascript code on URL https://npm.runkit.com/s2-geometry. I have a csv file with two fields: lat and lot with 3 million records and want to add the s2 cell to the given data.
I have found code which gives result in decimal, also need to add function to convert the result in hexadecimal.
var s2Geometry = require("s2-geometry").S2;
var lat = -33.804115;
var lng = 150.992465;
var level = 18;
var key = s2Geometry.latLngToKey(lat, lng, level);
var id = s2Geometry.keyToId(key);
not sure how to modify the script to get the csv file in python, modify the script for the desired result, I am new to python and JavaScript, why Python: coz I have access to python and R.
Expected result - three column in csv (Lat lon s2cell)