apmtools 0.2.6__tar.gz → 0.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {apmtools-0.2.6 → apmtools-0.2.7}/PKG-INFO +1 -1
- {apmtools-0.2.6 → apmtools-0.2.7}/pyproject.toml +1 -1
- {apmtools-0.2.6 → apmtools-0.2.7}/src/apmtools/shiny/summary.py +37 -6
- {apmtools-0.2.6 → apmtools-0.2.7}/.gitignore +0 -0
- {apmtools-0.2.6 → apmtools-0.2.7}/LICENSE +0 -0
- {apmtools-0.2.6 → apmtools-0.2.7}/README.md +0 -0
- {apmtools-0.2.6 → apmtools-0.2.7}/src/apmtools/__init__.py +0 -0
- {apmtools-0.2.6 → apmtools-0.2.7}/src/apmtools/classes.py +0 -0
- {apmtools-0.2.6 → apmtools-0.2.7}/src/apmtools/data_processing.py +0 -0
- {apmtools-0.2.6 → apmtools-0.2.7}/src/apmtools/functions.py +0 -0
- {apmtools-0.2.6 → apmtools-0.2.7}/src/apmtools/legacy.py +0 -0
- {apmtools-0.2.6 → apmtools-0.2.7}/src/apmtools/shiny/__init__.py +0 -0
- {apmtools-0.2.6 → apmtools-0.2.7}/src/apmtools/units.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: apmtools
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.007
|
|
4
4
|
Summary: A collection of tools for processing air pollution monitoring data
|
|
5
5
|
Project-URL: Homepage, https://github.com/federlorenz/apmtools
|
|
6
6
|
Author-email: Federico Lorenzetti <lorenzetti.federico@gmail.com>
|
|
@@ -351,12 +351,43 @@ def create_summary_app(
|
|
|
351
351
|
)
|
|
352
352
|
|
|
353
353
|
if selected_plot == "histogram":
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
354
|
+
if group_columns:
|
|
355
|
+
# With grouping, overlay one histogram per group on the
|
|
356
|
+
# same axes. ``group`` is the color dimension rather
|
|
357
|
+
# than the selected variable, so each group gets its own
|
|
358
|
+
# histogram. Transparency makes overlapping groups
|
|
359
|
+
# directly comparable.
|
|
360
|
+
group_column = "__plot_group"
|
|
361
|
+
long_df = plot_df[[group_column, *y_columns]].melt(
|
|
362
|
+
id_vars=[group_column],
|
|
363
|
+
var_name="variable",
|
|
364
|
+
value_name="value",
|
|
365
|
+
)
|
|
366
|
+
fig = px.histogram(
|
|
367
|
+
long_df,
|
|
368
|
+
x="value",
|
|
369
|
+
color=group_column,
|
|
370
|
+
nbins=int(input.bins()),
|
|
371
|
+
barmode="overlay",
|
|
372
|
+
opacity=0.45,
|
|
373
|
+
facet_row=("variable" if len(y_columns) > 1 else None),
|
|
374
|
+
)
|
|
375
|
+
# Keep the groups as the legend entries rather than the
|
|
376
|
+
# selected Y variables.
|
|
377
|
+
fig.update_traces(marker_line_width=0)
|
|
378
|
+
else:
|
|
379
|
+
long_df = plot_df[y_columns].melt(
|
|
380
|
+
var_name="variable", value_name="value"
|
|
381
|
+
)
|
|
382
|
+
fig = px.histogram(
|
|
383
|
+
long_df,
|
|
384
|
+
x="value",
|
|
385
|
+
color="variable",
|
|
386
|
+
nbins=int(input.bins()),
|
|
387
|
+
barmode="overlay" if len(
|
|
388
|
+
y_columns) > 1 else "relative",
|
|
389
|
+
opacity=0.65 if len(y_columns) > 1 else 1.0,
|
|
390
|
+
)
|
|
360
391
|
elif selected_plot == "box":
|
|
361
392
|
if not group_columns:
|
|
362
393
|
long_df = plot_df[y_columns].melt(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|