apmtools 0.2.22__tar.gz → 0.2.23__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: apmtools
3
- Version: 0.2.022
3
+ Version: 0.2.023
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>
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "apmtools"
7
- version = "0.2.022"
7
+ version = "0.2.023"
8
8
  authors = [
9
9
  { name="Federico Lorenzetti", email="lorenzetti.federico@gmail.com" },
10
10
  ]
@@ -449,6 +449,70 @@ def create_summary_app(
449
449
  subset_columns = columns
450
450
 
451
451
  app_ui = ui.page_sidebar(
452
+ ui.sidebar(
453
+ ui.h4("Plot controls"),
454
+ ui.input_select("plot_type", "Plot type",
455
+ choices=PLOT_TYPES, selected=plot_type),
456
+ ui.output_ui("x_control"),
457
+ ui.output_ui("y_control"),
458
+ ui.input_selectize(
459
+ "group_by", "Group by",
460
+ choices={c: c for c in group_columns},
461
+ selected=initial_groups,
462
+ multiple=True,
463
+ options={"placeholder": "Select one or more grouping columns"},
464
+ ),
465
+ ui.hr(),
466
+ ui.h5("Aggregation"),
467
+ ui.input_select(
468
+ "frequency", "Frequency", choices=FREQUENCIES,
469
+ selected="None (raw data)",
470
+ ),
471
+ ui.input_select(
472
+ "aggregate", "Statistic", choices=AGGREGATES,
473
+ selected="Mean",
474
+ ),
475
+ ui.hr(),
476
+ ui.h5("Subset"),
477
+ ui.input_selectize(
478
+ "subset_columns", "Columns", choices={c: c for c in subset_columns},
479
+ selected=[], multiple=True,
480
+ options={"placeholder": "Select one or more columns"},
481
+ ),
482
+ ui.output_ui("subset_filters"),
483
+ ui.hr(),
484
+ ui.h5("Datetime filter"),
485
+ ui.input_text(
486
+ "datetime_start", "Start datetime",
487
+ value="", placeholder="YYYY-MM-DD or YYYY-MM-DD HH:MM:SS",
488
+ ),
489
+ ui.input_text(
490
+ "datetime_end", "End datetime",
491
+ value="", placeholder="YYYY-MM-DD or YYYY-MM-DD HH:MM:SS",
492
+ ),
493
+ ui.panel_conditional(
494
+ "input.plot_type === 'histogram'",
495
+ ui.input_numeric("bins", "Histogram bins",
496
+ value=30, min=1, max=200, step=1),
497
+ ui.input_select("hist_density", "Density", choices={
498
+ "False": "False", "True": "True"}, selected="False"),
499
+ ui.input_select("hist_stacked", "Stacked", choices={
500
+ "False": "False", "True": "True"}, selected="False"),
501
+ ui.input_select("hist_type", "Histogram type", choices={
502
+ "bar": "bar", "barstacked": "barstacked",
503
+ "step": "step", "stepfilled": "stepfilled",
504
+ }, selected="bar"),
505
+ ui.input_select("hist_cumulative", "Cumulative", choices={
506
+ "0": "False", "1": "True (ascending)", "-1": "-1 (descending)",
507
+ }, selected="0"),
508
+ ),
509
+ ui.input_text("title", "Plot title", value=title),
510
+ ui.help_text(
511
+ "Subset and datetime filters are applied before aggregation. "
512
+ "When a frequency is selected, aggregation is performed with "
513
+ "Summary.group_stat()."
514
+ ),
515
+ ),
452
516
  ui.div(
453
517
  ui.tags.style("""
454
518
  /* Allow the main pane to consume all width remaining after the sidebar. */
@@ -514,70 +578,6 @@ def create_summary_app(
514
578
  class_="summary-plot-container",
515
579
  ),
516
580
  ),
517
- sidebar=ui.sidebar(
518
- ui.h4("Plot controls"),
519
- ui.input_select("plot_type", "Plot type",
520
- choices=PLOT_TYPES, selected=plot_type),
521
- ui.output_ui("x_control"),
522
- ui.output_ui("y_control"),
523
- ui.input_selectize(
524
- "group_by", "Group by",
525
- choices={c: c for c in group_columns},
526
- selected=initial_groups,
527
- multiple=True,
528
- options={"placeholder": "Select one or more grouping columns"},
529
- ),
530
- ui.hr(),
531
- ui.h5("Aggregation"),
532
- ui.input_select(
533
- "frequency", "Frequency", choices=FREQUENCIES,
534
- selected="None (raw data)",
535
- ),
536
- ui.input_select(
537
- "aggregate", "Statistic", choices=AGGREGATES,
538
- selected="Mean",
539
- ),
540
- ui.hr(),
541
- ui.h5("Subset"),
542
- ui.input_selectize(
543
- "subset_columns", "Columns", choices={c: c for c in subset_columns},
544
- selected=[], multiple=True,
545
- options={"placeholder": "Select one or more columns"},
546
- ),
547
- ui.output_ui("subset_filters"),
548
- ui.hr(),
549
- ui.h5("Datetime filter"),
550
- ui.input_text(
551
- "datetime_start", "Start datetime",
552
- value="", placeholder="YYYY-MM-DD or YYYY-MM-DD HH:MM:SS",
553
- ),
554
- ui.input_text(
555
- "datetime_end", "End datetime",
556
- value="", placeholder="YYYY-MM-DD or YYYY-MM-DD HH:MM:SS",
557
- ),
558
- ui.panel_conditional(
559
- "input.plot_type === 'histogram'",
560
- ui.input_numeric("bins", "Histogram bins",
561
- value=30, min=1, max=200, step=1),
562
- ui.input_select("hist_density", "Density", choices={
563
- "False": "False", "True": "True"}, selected="False"),
564
- ui.input_select("hist_stacked", "Stacked", choices={
565
- "False": "False", "True": "True"}, selected="False"),
566
- ui.input_select("hist_type", "Histogram type", choices={
567
- "bar": "bar", "barstacked": "barstacked",
568
- "step": "step", "stepfilled": "stepfilled",
569
- }, selected="bar"),
570
- ui.input_select("hist_cumulative", "Cumulative", choices={
571
- "0": "False", "1": "True (ascending)", "-1": "-1 (descending)",
572
- }, selected="0"),
573
- ),
574
- ui.input_text("title", "Plot title", value=title),
575
- ui.help_text(
576
- "Subset and datetime filters are applied before aggregation. "
577
- "When a frequency is selected, aggregation is performed with "
578
- "Summary.group_stat()."
579
- ),
580
- ),
581
581
  )
582
582
 
583
583
  def server(input, output, session):
File without changes
File without changes
File without changes