Live data from Hacker News

JavaScript for Data Science

js4ds.org

1–10 of 83 posts

Re: JavaScript for Data Science

#2
I know that data science is a broad and somewhat vague term but this -

   We will cover:

    Core features of modern JavaScript

    Programming with callbacks and promises

    Creating objects and classes

    Writing HTML and CSS

    Creating interactive pages with React

    Building data services

    Testing

    Data visualization

    Combining everything to create a three-tier web application
- this isn't data science.

Re: JavaScript for Data Science

#3
I don’t want to repeat the old and tired JavaScript hate, but this just isn’t a great idea.

I’d suggest that there are 3 important primitives for data science: flexible numeric types, fast math/algorithm libraries, and data manipulation being easy.

JavaScript doesn’t really have any of these. Numbers are 64bit floats only - no integers, no big numbers. There aren’t equivalents to Numpy/Pandas/Scikit Learn, and the lack of standard library and expressiveness in data manipulation in the language makes basic tasks harder.

JavaScript has its uses, but there’s really no reason to force data science be one of them.

Re: JavaScript for Data Science

#4

I know that data science is a broad and somewhat vague term but this - We will cover: Core features of modern JavaScript Programming with callbacks and promises Creating objects and classes Writing HTML and CSS Creating interactive pages with React Building data services Testing Data visualization Combining everything to create a three-tier web application - this isn't data science.

out of context it's not data science

Re: JavaScript for Data Science

#5
They use data-forge.js, which has less stars than danfo.js.

I can't find any benchmark how they compare to data.table or pandas.

Without a dominant and high performance data frame library as a foundation, I wouldn't even try.

Re: JavaScript for Data Science

#6

I don’t want to repeat the old and tired JavaScript hate, but this just isn’t a great idea. I’d suggest that there are 3 important primitives for data science: flexible numeric types, fast math/algorithm libraries, and data manipulation being easy. JavaScript doesn’t really have any of these. Numbers are 64bit floats only - no integers, no big numbers. There aren’t equivalents to Numpy/Pandas/Scikit Learn, and the la…

There is decimal.js but yes it's not going to be fast.

Re: JavaScript for Data Science

#7

I don’t want to repeat the old and tired JavaScript hate, but this just isn’t a great idea. I’d suggest that there are 3 important primitives for data science: flexible numeric types, fast math/algorithm libraries, and data manipulation being easy. JavaScript doesn’t really have any of these. Numbers are 64bit floats only - no integers, no big numbers. There aren’t equivalents to Numpy/Pandas/Scikit Learn, and the la…

I don't see JS as less powerful than Python for data science, it's faster than Python, or can use bindings just like Python. JS is maybe less commonly used than Python in data science nowadays, but I wouldn't be surprised if this changes in next years. There are equivalent libs like tensorflow-core, there are native features like BigInt, and there are libs for 64bits floats (decimal.js, big.js). I'd be glad to spend some time converting Scikit-learn into JS and also show you how expressive JS actually is, if you show me some Python code, I'll translate it

Re: JavaScript for Data Science

#8

I don’t want to repeat the old and tired JavaScript hate, but this just isn’t a great idea. I’d suggest that there are 3 important primitives for data science: flexible numeric types, fast math/algorithm libraries, and data manipulation being easy. JavaScript doesn’t really have any of these. Numbers are 64bit floats only - no integers, no big numbers. There aren’t equivalents to Numpy/Pandas/Scikit Learn, and the la…

> Numbers are 64bit floats only - no integers, no big numbers.

That is not true. BigInt has been available for a bit already.

MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Availability: https://caniuse.com/bigint

I don't want to argue for or against using JS for "data science" (I myself used R for that but I use JS a lot for other things), just a clarification on this one concrete claim.

Re: JavaScript for Data Science

#9

I don’t want to repeat the old and tired JavaScript hate, but this just isn’t a great idea. I’d suggest that there are 3 important primitives for data science: flexible numeric types, fast math/algorithm libraries, and data manipulation being easy. JavaScript doesn’t really have any of these. Numbers are 64bit floats only - no integers, no big numbers. There aren’t equivalents to Numpy/Pandas/Scikit Learn, and the la…

Well, nowadays you can use WASM with JS to access libraries at near native speed.

Re: JavaScript for Data Science

#10

I don’t want to repeat the old and tired JavaScript hate, but this just isn’t a great idea. I’d suggest that there are 3 important primitives for data science: flexible numeric types, fast math/algorithm libraries, and data manipulation being easy. JavaScript doesn’t really have any of these. Numbers are 64bit floats only - no integers, no big numbers. There aren’t equivalents to Numpy/Pandas/Scikit Learn, and the la…

You can get a long way nowadays with Arquero[0] and Observable[1]. Arquero allows columnar based data storage and processing, with a grammar of data processing verbs similar to e.g. dplyr. Not as fast as vectorized computations in e.g. Python or R, but faster than has previously been possible.

I'm not suggesting these are the first tools you'd reach for for data science in production, but I've found them extremely useful for prototyping, experimenting with algorithms, and visualization. I think it's got to the stage they should be seriously considered for some types of relatively simple data processing work due to their ease of deployment.

[0]https://github.com/uwdata/arquero [1]https://observablehq.com/

Post reply on HN