pkstatogr(1)

πŸ’– pkstatogr β€” the manual page, but make it make sense πŸ’–

okay bestie, sit down, hydrate, because we're talking about pkstatogr(1) β€” that's the section 1 manual page for pkstatogr, and no cap, it's about to be your new fave little stats gremlin. 🫢


✨ NAME ✨

pkstatogr β€” a program to calculate basic statistics from a vector file. that's it, that's the job. πŸ’…


🌸 SYNOPSIS 🌸

pkstatogr -i input [options]

like. give it an input, sprinkle some options, done. iconic.


πŸ¦‹ DESCRIPTION πŸ¦‹

so pkstatogr calculates basic statistics on attributes of a vector file. literally what it says on the tin. πŸ’–

examples of the basic statistics include:

  • minimum
  • maximum
  • median
  • mean
  • standard deviation

and you can also get histograms β€” either in percentage or in absolute values, your choice, main character energy either way. ✨

the attribute you're actually interested in? you pick it with the option -n|--fname. πŸŽ€

and here's the important bit, so listen up: values that are defined by the -nodata option, or that aren't within the limits set by the options -src_min and -src_max, are ignored for the statistics. gone. not invited to the party. 🚫


πŸ’… OPTIONS πŸ’…

  • -i filename, --input filename β€” Input image file(s). If input contains multiple images, a multiband output is created. (yes babe, multiband. we're building a whole ensemble here. 🌈)
  • -ln layer, --lname layer β€” Layer name(s) in sample (leave empty to select all). if you can't choose, honestly same β€” just leave it empty and take everything. πŸ‘‘
  • -n attribute, --fname attribute β€” Fields on which to calculate statistics. this is THE one. the field. the moment. 🎯
  • -nodata value, --nodata value β€” Set nodata value(s). these get ignored in the stats, fr fr.
  • -src_min value, --src_min value β€” Set minimum value for histogram. πŸ“‰
  • -src_max value, --src_max value β€” Set maximum value for histogram. πŸ“ˆ
  • -s, --size β€” Sample size (number of points). πŸ’«
  • -mm, --minmax β€” Calculate minimum and maximum value. two birds, one flag. 🐦
  • -min, --min β€” Calculate minimum value. the smallest little guy. πŸ™ˆ
  • -max, --max β€” Calculate maximum value. the biggest. 🌟
  • -mean, --mean β€” Calculate mean. average queen. πŸ‘‘
  • -median, --median β€” Calculate median. the middle child. πŸŽ€
  • -stdev, --stdev β€” Calculate standard deviation. how spread out are we feeling today. 🌊
  • -hist, --hist β€” Calculate histogram. bars! πŸ“Š
  • -nbin value, --nbin value β€” Number of bins to calculate histogram. how many lil buckets do you want. 🧺
  • -rel, --relative β€” Use percentiles for histogram to calculate histogram. relative era. ✨
  • -kde, --kde β€” Use Kernel density estimation when producing histogram. the Kernel class lives at http://pktools.nongnu.org/html/classKernel.html if you wanna peek 🫣 β€” and heads up: the standard deviation is estimated based on Silverman's rule of thumb. iykyk. πŸ’œ
  • -v level, --verbose level β€” Verbose level. turn the yapping up or down, your call. πŸ—£οΈ

🌈 EXAMPLE 🌈

report histogram of values in FIELDID (to standard output)
pkstatogr -i input.shp -f FIELDID -n 100

report min, max, mean and standard deviation of values in FIELDID (to standard output)
pkstatogr -i input.shp -f FIELDID -min -max -mean -stdev

and that's the whole page, bestie, you ate that. πŸ’…βœ¨

this was pkstatogr(1) β€” dated 01 January 2025. go forth and compute, and remember: not me being obsessed with your statistics. πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from