apmtools 0.2.28__tar.gz → 0.2.30__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.28 → apmtools-0.2.30}/PKG-INFO +1 -1
- {apmtools-0.2.28 → apmtools-0.2.30}/pyproject.toml +1 -1
- {apmtools-0.2.28 → apmtools-0.2.30}/src/apmtools/classes.py +14 -7
- apmtools-0.2.30/src/apmtools/shiny/summary.py +2093 -0
- apmtools-0.2.28/src/apmtools/shiny/summary.py +0 -977
- {apmtools-0.2.28 → apmtools-0.2.30}/.gitignore +0 -0
- {apmtools-0.2.28 → apmtools-0.2.30}/LICENSE +0 -0
- {apmtools-0.2.28 → apmtools-0.2.30}/README.md +0 -0
- {apmtools-0.2.28 → apmtools-0.2.30}/src/apmtools/__init__.py +0 -0
- {apmtools-0.2.28 → apmtools-0.2.30}/src/apmtools/data_processing.py +0 -0
- {apmtools-0.2.28 → apmtools-0.2.30}/src/apmtools/functions.py +0 -0
- {apmtools-0.2.28 → apmtools-0.2.30}/src/apmtools/legacy.py +0 -0
- {apmtools-0.2.28 → apmtools-0.2.30}/src/apmtools/shiny/__init__.py +0 -0
- {apmtools-0.2.28 → apmtools-0.2.30}/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.30
|
|
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>
|
|
@@ -1440,17 +1440,17 @@ class Summary(pd.DataFrame):
|
|
|
1440
1440
|
|
|
1441
1441
|
if isinstance(frequency, str):
|
|
1442
1442
|
if grouping_by != None:
|
|
1443
|
-
output = df.groupby(grouping_by+[frequency])
|
|
1443
|
+
output = df.groupby(grouping_by+[frequency], dropna=False)
|
|
1444
1444
|
else:
|
|
1445
|
-
output = df.groupby([frequency])
|
|
1445
|
+
output = df.groupby([frequency], dropna=False)
|
|
1446
1446
|
if isinstance(frequency, list):
|
|
1447
1447
|
if grouping_by != None:
|
|
1448
|
-
output = df.groupby(grouping_by+frequency)
|
|
1448
|
+
output = df.groupby(grouping_by+frequency, dropna=False)
|
|
1449
1449
|
else:
|
|
1450
|
-
output = df.groupby(frequency)
|
|
1450
|
+
output = df.groupby(frequency, dropna=False)
|
|
1451
1451
|
if frequency == None:
|
|
1452
1452
|
if grouping_by != None:
|
|
1453
|
-
output = df.groupby(grouping_by)
|
|
1453
|
+
output = df.groupby(grouping_by, dropna=False)
|
|
1454
1454
|
else:
|
|
1455
1455
|
output = df
|
|
1456
1456
|
|
|
@@ -1473,6 +1473,7 @@ class Summary(pd.DataFrame):
|
|
|
1473
1473
|
|
|
1474
1474
|
return output
|
|
1475
1475
|
|
|
1476
|
+
|
|
1476
1477
|
def get_monitor(self, value):
|
|
1477
1478
|
|
|
1478
1479
|
out = self.subset({"monitor": [value]})
|
|
@@ -1490,6 +1491,7 @@ class Summary(pd.DataFrame):
|
|
|
1490
1491
|
port=0,
|
|
1491
1492
|
launch_browser=True,
|
|
1492
1493
|
daemon=True,
|
|
1494
|
+
backend="plotly",
|
|
1493
1495
|
):
|
|
1494
1496
|
"""
|
|
1495
1497
|
Launch an interactive Shiny plotting application for this Summary.
|
|
@@ -1500,8 +1502,9 @@ class Summary(pd.DataFrame):
|
|
|
1500
1502
|
Initial X-axis or categorical column.
|
|
1501
1503
|
y : str or sequence of str, optional
|
|
1502
1504
|
Initial numeric variable or variables.
|
|
1503
|
-
group_by : str, optional
|
|
1504
|
-
Initial grouping column.
|
|
1505
|
+
group_by : str or sequence of str, optional
|
|
1506
|
+
Initial grouping column or columns. Multiple columns are passed to
|
|
1507
|
+
``Summary.group_stat(grouping_by=[...])`` when aggregation is used.
|
|
1505
1508
|
plot_type : {"line", "bar", "histogram", "box"}, default="line"
|
|
1506
1509
|
Initial plot type. The user can change the plot type in the app.
|
|
1507
1510
|
title : str, default="Summary plot"
|
|
@@ -1515,6 +1518,9 @@ class Summary(pd.DataFrame):
|
|
|
1515
1518
|
daemon : bool, default=True
|
|
1516
1519
|
Run the server thread as a daemon.
|
|
1517
1520
|
|
|
1521
|
+
backend : {"plotly", "matplotlib"}, default="plotly"
|
|
1522
|
+
Plot rendering backend.
|
|
1523
|
+
|
|
1518
1524
|
Returns
|
|
1519
1525
|
-------
|
|
1520
1526
|
threading.Thread
|
|
@@ -1545,6 +1551,7 @@ class Summary(pd.DataFrame):
|
|
|
1545
1551
|
port=port,
|
|
1546
1552
|
launch_browser=launch_browser,
|
|
1547
1553
|
daemon=daemon,
|
|
1554
|
+
backend=backend,
|
|
1548
1555
|
)
|
|
1549
1556
|
|
|
1550
1557
|
class Apm(pd.DataFrame):
|