Coder Social home page Coder Social logo

Comments (3)

delfrrr avatar delfrrr commented on June 20, 2024

Here you go:
Screenshot 2022-01-11 at 07 45 41

https://play.dekart.xyz/reports/de18012a-e1e4-425b-9eae-8450a948ab3e/source

with geometry as (
    SELECT
    (
      SELECT value
      FROM UNNEST(all_tags)
      WHERE key = 'name'
      LIMIT 1
    ) AS name,
    bqcarto.h3.ST_ASH3_POLYFILL(ST_SIMPLIFY(geometry, 1000), 6) as h3_arr
    FROM `bigquery-public-data.geo_openstreetmap.planet_features_multipolygons` AS features
    WHERE
    (
      'ISO3166-1',
      'RU'
    ) IN (
      SELECT (key, value)
      FROM         UNNEST(all_tags)
    )
    AND ('admin_level', '2') IN (
      SELECT (key, value)
      FROM UNNEST(all_tags)
    )
), geometry_hex as (
    select
        h3,
        ST_CENTROID(bqcarto.h3.ST_BOUNDARY(h3)) as point
    FROM geometry
    cross join unnest(h3_arr) as h3
), hexagones as (
    select 
        population,
        h3,
        last_updated
    FROM geometry_hex
        join `bigquery-public-data.worldpop.population_grid_1km` as pop
        on st_intersects(pop.geog, geometry_hex.point)
)
select 
    array_agg(population order by last_updated desc limit 1)[offset(0)] population,
    h3
from hexagones group by h3
  • Given the size of the country I simplified to 1000 meters (6 does not make sense, 100 is too small still)
  • also chose higher level of hexagons; level 6 already gives around 500k points

@Tsovak could please try to reproduce JS error and send a ling to the map 🙏

from dekart.

NoCoSancho avatar NoCoSancho commented on June 20, 2024

Hello!

I had this same issue. The cause was my mapbox token scope included some secret scopes.

2022-01-21_07-54-02

does your token start with pk.*? Mine did not, and I had to create a new one and ensure not to check any options from the secret scopes section.

2022-01-21_20-29-16

from dekart.

delfrrr avatar delfrrr commented on June 20, 2024

My mailbox token starts from pk pk.eyJ............PLA it's a default public token; I've tried other public scope token and it worked without errors. You should not use token with private scopes of sure.

@NoCoSancho I also believe this is different problem from one reported by @Tsovak

from dekart.

Related Issues (20)

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.