geoprior.scripts.plot_litho_parity#

Plot lithology parity across cities.

Left: normalized composition bars (Nansha vs Zhongshan). Right: difference bars (Zhongshan - Nansha).

param - --src:

type - --src:

dataset directory

param - --col:

type - --col:

column name, default lithology_class

param - --year:

type - --year:

all or a year integer

param - --out:

type - --out:

output stem/path, saved into ``scripts/figs/``

param - -ns / -zh:

type - -ns / -zh:

city codes; the default uses both

Functions

chisq_cramers_v(counts_2xk)

compute_proportions(ns, zh, *, col, top_n, ...)

draw_lithology_parity(dfp, counts_mat, *, ...)

figS1_lithology_parity_main([argv, prog])

load_city_df(src, filename, *[, year, ...])

main([argv, prog])

geoprior.scripts.plot_litho_parity.chisq_cramers_v(counts_2xk)[source]#
Parameters:

counts_2xk (ndarray)

Return type:

tuple[float, float, int, float]

geoprior.scripts.plot_litho_parity.load_city_df(src, filename, *, year='all', sample_frac=None, sample_n=None, seed=42)[source]#
Parameters:
Return type:

DataFrame

geoprior.scripts.plot_litho_parity.compute_proportions(ns, zh, *, col, top_n, group_others)[source]#
Parameters:
Return type:

tuple[DataFrame, list[str], ndarray]

geoprior.scripts.plot_litho_parity.draw_lithology_parity(dfp, counts_mat, *, col, outpath, sharey)[source]#
Parameters:
Return type:

None

geoprior.scripts.plot_litho_parity.figS1_lithology_parity_main(argv=None, *, prog=None)[source]#
Parameters:
Return type:

None

geoprior.scripts.plot_litho_parity.main(argv=None, *, prog=None)[source]#
Parameters:
Return type:

None