Coder Social home page Coder Social logo

eurostat / gridtiler Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 2.0 4.97 MB

Tiling tool for gridded data

Home Page: https://github.com/eurostat/gridtiler

License: European Union Public License 1.2

JavaScript 100.00%
grid gridded-data mapping statistics tiling visualisation

gridtiler's People

Contributors

jgaffuri avatar joewdavies avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gridtiler's Issues

Update doc

describe utilisation of new parameters:

  • pre/post process
  • cols
  • aggregation rounding

Fails when using --positionFunction and --modFunction together

$ gridtiler -i ../assets/pop_5000m.csv -r 5000 -a 4 --positionFunction "const a=c.GRD_ID.split('N')[1].split('E');return {x:a[1],y:a[0]};" --modFunction "delete c.GRD_ID"
Load CSV data...
   182321 cells loaded
Modify cells...
Get cell positions...
undefined:3
const a=c.GRD_ID.split('N')[1].split('E');return {x:a[1],y:a[0]};
                 ^

TypeError: Cannot read properties of undefined (reading 'split')
    at eval (eval at <anonymous> (file:///F:/Github/gridtiler/npm/src/index.js:36:36), <anonymous>:3:18)
    at CsvParserStream.<anonymous> (file:///F:/Github/gridtiler/npm/src/index.js:38:33)
    at CsvParserStream.emit (node:events:513:28)
    at CsvParserStream.emit (F:\Github\gridtiler\npm\node_modules\@fast-csv\parse\build\src\CsvParserStream.js:45:23)
    at endReadableNT (node:internal/streams/readable:1358:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

Deal with warning message

Make it possible that this is not shown when executing the program:
"ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language."

This is because of
"import pkg from "../package.json" assert { type: "json" };"
in gridtiler.js file

this python gridtiler does not aggregate

https://github.com/wahlatlas/grid_data/blob/main/gridviz_tiled_csv.ipynb

Thanks for suggesting this python which I was trying to turn around to build an aggregation mode of MODE instead of the default sum.
However this code, althought also tiling does not have options to aggregate, or am I missing something @jgaffuri ?

Aggregation

It is not really tiling, but it might help gridviz users to also provide a "gridaggregation" command.
Or it could be incuded to the tiling command with a "aggregation multiplier" parameter.
Difficulty: several aggregations - not only sum. Also average, mode, etc.

post processing function

modify fun applies before.
we need another fun to apply in the end.

maybe:

  • preprocess fun (rename modifyfun)
  • postprocess fun

NPM build does not work

The UMD module cannot be built.
It has to do with the way webpack deals with "fs" dependency since version 5.
Just launch "npm build" to see the error message.

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.