{"name":"@turf/quadrat-analysis","version":"7.3.2","keywords":["turf","quadrat-analysis"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/quadrat-analysis@7.3.2","maintainers":[{"name":"rowanwins","email":"rowanwins@yahoo.com.au"},{"name":"tmcw","email":"tom@macwright.com"},{"name":"morganherlocker","email":"morgan.herlocker@gmail.com"},{"name":"tcql","email":"tim.channell@gmail.com"},{"name":"mdfedderly","email":"mdfedderly@mdfedderly.com"},{"name":"twelch","email":"tim.j.welch@gmail.com"},{"name":"jamesmilneruk","email":"jamesmilner22@hotmail.com"},{"name":"morgan.herlocker","email":"morganherlocker@gmail.com"},{"name":"smallsaucepan","email":"james@smallsaucepan.com"}],"contributors":[{"name":"Haoming Zhuang","email":"@zhuang-hao-ming"}],"homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"d867a0cfc5f4639fd1e538af94af5746c338f3a0","tarball":"http://registry-npm.ywwl.com/@turf/quadrat-analysis/download/@turf/quadrat-analysis-7.3.2.tgz","fileCount":9,"integrity":"sha512-ioSBQqqZ5S6lOnc77sH1oFt1mzzBrzAnLHjiKjjkSQMeJQnmvb1J5C5yI2nHrQX7y2C/WHw+cBYYXhGMB0YCUg==","signatures":[{"sig":"MEUCIQC6YgVnQoVWzjM9pNWYVwx50cJ+Hgn5L8GFXfWZZ73XlwIgXm+XZXgR+/mZI5UFW4ghZ6a5oreh9EW2aDM15RffSbU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42652,"size":8512,"noattachment":false,"key":"/@turf/quadrat-analysis/-/@turf/quadrat-analysis-7.3.2.tgz"},"main":"dist/cjs/index.cjs","type":"module","types":"dist/esm/index.d.ts","module":"dist/esm/index.js","exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.cts","default":"./dist/cjs/index.cjs"}},"./package.json":"./package.json"},"funding":"https://opencollective.com/turf","gitHead":"099d9915467bacf45d554be4533fa9998c4efc88","scripts":{"docs":"tsx ../../scripts/generate-readmes.ts","test":"pnpm run /test:.*/","bench":"tsx bench.ts","build":"tsup --config ../../tsup.config.ts","test:tape":"tsx test.ts"},"_npmUser":{"name":"mdfedderly","email":"mdfedderly@mdfedderly.com"},"repository":{"url":"git://github.com/Turfjs/turf.git","type":"git"},"_npmVersion":"lerna/9.0.3/node@v20.19.6+x64 (linux)","description":"Quadrat analysis lays a set of equal-size areas(quadrat) over the study area and counts the number of features in each quadrat and creates a frequency table.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"tslib":"^2.8.1","@turf/area":"7.3.2","@turf/bbox":"7.3.2","@turf/random":"7.3.2","@turf/helpers":"7.3.2","@turf/centroid":"7.3.2","@types/geojson":"^7946.0.10","@turf/invariant":"7.3.2","@turf/point-grid":"7.3.2","@turf/square-grid":"7.3.2","@turf/bbox-polygon":"7.3.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.4","tape":"^5.9.0","tsup":"^8.4.0","benchmark":"^2.1.4","typescript":"^5.8.3","@types/tape":"^5.8.1","load-json-file":"^7.0.1","write-json-file":"^6.0.0","@types/benchmark":"^2.1.5","@turf/nearest-neighbor-analysis":"7.3.2"},"_npmOperationalInternal":{"tmp":"tmp/quadrat-analysis_7.3.2_1768358908808_0.23066421280092797","host":"s3://npm-registry-packages-npm-production"},"readme":"# @turf/quadrat-analysis\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n## quadratAnalysis\n\nQuadrat analysis lays a set of equal-size areas(quadrat) over the study area and counts\nthe number of features in each quadrat and creates a frequency table.\nThe table lists the number of quadrats containing no features,\nthe number containing one feature, two features, and so on,\nall the way up to the quadrat containing the most features.\nThe method then creates the frequency table for the random distribution, usually based on a Poisson distribution.\nThe method uses the distribution to calculate the probability for 0 feature occuring,\n1 feature occuring, 2 features, and so on,\nand lists these probabilities in the frequency table.\nBy comparing the two frequency tables, you can see whether the features create a pattern.\nIf the table for the observed distribution has more quadrats containing many features than the\ntable for the random distribution dose, then the features create a clustered pattern.\n\nIt is hard to judge the frequency tables are similar or different just by looking at them.\nSo, we can use serval statistical tests to find out how much the frequency tables differ.\nWe use Kolmogorov-Smirnov test.This method calculates cumulative probabilities for both distributions,\nand then compares the cumulative probabilities at each class level and selects the largest absolute difference D.\nThen, the test compares D to the critical value for a confidence level you specify.\nIf D is greater than the critical value, the difference between  the observed distribution and\nthe random distribution is significant. The greater the value the bigger the difference.\n\nTraditionally, squares are used for the shape of the quadrats, in a regular grid(square-grid).\nSome researchers suggest that the quadrat size equal twice the size of mean area per feature,\nwhich is simply the area of the study area divided by the number of features.\n\n### Parameters\n\n*   `pointFeatureSet` **[FeatureCollection][1]<[Point][2]>** point set to study\n*   `options` **[Object][3]** optional parameters (optional, default `{}`)\n\n    *   `options.studyBbox` **\\[[number][4], [number][4], [number][4], [number][4]]?** bbox representing the study area\n    *   `options.confidenceLevel` **(`20` | `15` | `10` | `5` | `2` | `1`)** a confidence level.\n        The unit is percentage . 5 means 95%, value must be in [K\\_TABLE][5] (optional, default `20`)\n\n### Examples\n\n```javascript\nvar bbox = [-65, 40, -63, 42];\nvar dataset = turf.randomPoint(100, { bbox: bbox });\nvar result = turf.quadratAnalysis(dataset);\n```\n\nReturns **[QuadratAnalysisResult][6]** result\n\n## K\\_TABLE\n\nthe confidence level\n\nType: [Object][3]\n\n### Properties\n\n*   `20` **[number][4]** 1.07275\n*   `15` **[number][4]** 1.13795\n*   `10` **[number][4]** 1.22385\n*   `5` **[number][4]** 1.3581\n*   `2` **[number][4]** 1.51743\n*   `1` **[number][4]** 1.62762\n\n## QuadratAnalysisResult\n\nthe return type of the quadratAnalysis\n\nType: [object][3]\n\n### Properties\n\n*   `criticalValue` **[number][4]**&#x20;\n*   `maxAbsoluteDifference` **[number][4]**&#x20;\n*   `isRandom` **[boolean][7]**&#x20;\n*   `observedDistribution` **[Array][8]<[number][4]>** the cumulative distribution of observed features,\n    the index represents the number of features in the quadrat.\n\n[1]: https://tools.ietf.org/html/rfc7946#section-3.3\n\n[2]: https://tools.ietf.org/html/rfc7946#section-3.1.2\n\n[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\n\n[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\n\n[5]: #k_table\n\n[6]: #quadratanalysisresult\n\n[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean\n\n[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array\n\n<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run \"yarn docs\" from the root of the turf project. -->\n\n---\n\nThis module is part of the [Turfjs project](https://turfjs.org/), an open source module collection dedicated to geographic algorithms. It is maintained in the [Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create PRs and issues.\n\n### Installation\n\nInstall this single module individually:\n\n```sh\n$ npm install @turf/quadrat-analysis\n```\n\nOr install the all-encompassing @turf/turf module that includes all modules as functions:\n\n```sh\n$ npm install @turf/turf\n```\n","publish_time":1768358908950,"_cnpm_publish_time":1768358908950,"dist-tags":{"latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}