
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
linearcorrelation
Advanced tools
JavaScript library that performs linear regression and recovers residuals and normalized residuals
linearcorrelation is a tiny JavaScript library that performs linear regression and recovers residuals and normalized residuals.
<script src="https://cdn.jsdelivr.net/npm/linearcorrelation" charset="utf-8"></script>
Last version
corr = require("linearcorrelation")
test()the test function calculates indicators to measure the degree of association between two quantitative variables. The test returns the linear correlation (Pearson), the rank correlation (Spearman) and the number of missing data not taken into account in the calculations.
test(data, {x: "gdp", y:"co2" })
It is also possible to calculate the relation with the log of the variables
test(data, {x: "gdp", y:"co2", logx: true, logy: false })
lm()The lm function calculates linear regression. It returns the regression line function and the coefficient of determination (rsquared). It also returns data with residuals and normalized residuals. As before, the parameters logx and logy can be used to transform variables into log.
lm(data, {x: "gdp", y:"co2", logx: true, logy: false })
A live demo is available on this Observable notebook: https://observablehq.com/@neocartocnrs/corr
FAQs
JavaScript library that performs linear regression and recovers residuals and normalized residuals
The npm package linearcorrelation receives a total of 5 weekly downloads. As such, linearcorrelation popularity was classified as not popular.
We found that linearcorrelation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.