import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
import os, gzip, json, re
import seaborn as sns
from dplython import (DplyFrame, X, diamonds, select, sift,
sample_n, sample_frac, head, arrange, mutate, group_by,
summarize, DelayFunction, dfilter)
import dplython
from plotnine import *
import pandas as pd
from IPython.display import display, Markdown
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/patsy/constraint.py:13: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working from collections import Mapping /home/jaa6766/.conda/envs/cuda/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject /home/jaa6766/.conda/envs/cuda/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject /home/jaa6766/.conda/envs/cuda/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject /home/jaa6766/.conda/envs/cuda/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject
base_dir = "data/airdata"
data_dir = os.path.join(
os.getcwd(),
base_dir
)
airdata = []
display(Markdown(f"Listing data files from: {data_dir}"))
generator = (file for file in os.listdir(data_dir) if (file.find(".json.gz") > 0))
for filegz in generator:
display(Markdown(f"* Loading {filegz}"))
try:
with gzip.open(os.path.join(data_dir, filegz), 'rt') as file:
for (i, line) in enumerate(file):
#print(f"{filegz}:{i}", line.strip())
json_line = json.loads(line.strip())
airdata.append(json_line)
except EOFError:
continue
except Exception as e:
print(f"Error while reading file {filegz}", type(e))
raise e
display(Markdown("Done!"))
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
Listing data files from: /home/jaa6766/Documents/jorge3a/itam/deeplearning/dlfinal/data/airdata
Done!
%%time
df = pd.DataFrame(airdata)
df["datetime"] = pd.to_datetime(df["datetime"], unit='s')
df["year"] = [dt.year for dt in df.datetime]
df["month"] = [dt.month for dt in df.datetime]
df["day"] = [dt.day for dt in df.datetime]
df["hour"] = [dt.hour for dt in df.datetime]
df["minute"] = [dt.minute for dt in df.datetime]
df.head()
CPU times: user 1min 22s, sys: 1.72 s, total: 1min 24s Wall time: 1min 24s
temperature | pressure | humidity | gasResistance | IAQ | iaqAccuracy | datetime | year | month | day | hour | minute | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 21.54 | 777.41 | 43.93 | 151328 | 37.5 | 1 | 2021-02-12 06:04:09.089621067 | 2021 | 2 | 12 | 6 | 4 |
1 | 21.56 | 777.41 | 43.89 | 152702 | 35.6 | 1 | 2021-02-12 06:04:12.087778807 | 2021 | 2 | 12 | 6 | 4 |
2 | 21.53 | 777.41 | 43.97 | 151328 | 37.5 | 1 | 2021-02-12 06:04:15.072475433 | 2021 | 2 | 12 | 6 | 4 |
3 | 21.51 | 777.41 | 44.03 | 151464 | 38.5 | 1 | 2021-02-12 06:04:18.070170164 | 2021 | 2 | 12 | 6 | 4 |
4 | 21.51 | 777.41 | 44.05 | 152425 | 36.9 | 1 | 2021-02-12 06:04:21.061994791 | 2021 | 2 | 12 | 6 | 4 |
df.shape
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
(3925591, 12)
(
ggplot(df, aes(x = "datetime", y = "IAQ", color="iaqAccuracy")) +
geom_jitter(alpha=0.05, size=1.25) +
theme(axis_text_x=element_text(angle=45))
)
<ggplot: (8746818913985)>
(
ggplot(df, aes(x = "datetime", y = "temperature", color="pressure")) +
geom_jitter(alpha=0.05) +
theme(axis_text_x=element_text(angle=45)) +
labs(y="Temp (C)", color="Pressure (hPa)")
)
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
<ggplot: (8746820669393)>
(
ggplot(df, aes(x = "datetime", y = "IAQ", color="hour")) +
geom_jitter(alpha=0.05, size=1.25) +
theme(axis_text_x=element_text(angle=45))
)
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
<ggplot: (8746773744657)>
(
ggplot(df, aes(x = "datetime", y = "temperature", color="hour")) +
geom_jitter(alpha=0.05) +
theme(axis_text_x=element_text(angle=45)) +
labs(y="Temp (C)")
)
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
<ggplot: (8746769753545)>
(
ggplot(df, aes(x = "datetime", y = "pressure", color="hour")) +
geom_jitter(alpha=0.05) +
theme(axis_text_x=element_text(angle=45)) +
labs(y="Pressure (hPa)")
)
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
<ggplot: (8746769753425)>
(
ggplot(df, aes(x = "datetime", y = "iaqAccuracy", color="hour")) +
geom_jitter(alpha=0.05, size=1.25) +
theme(axis_text_x=element_text(angle=45))
)
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
<ggplot: (8746769753401)>
df.to_pickle("data/airdata/air.pickle")
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
base_dir = "data/sinaica/"
data_dir = os.path.join(
os.getcwd(),
base_dir
)
df = pd.read_pickle("data/airdata/air.pickle")
display(Markdown(f"Listing data files from: {data_dir}..."))
generator = (file for file in os.listdir(data_dir)
if (re.match(r"Datos SINAICA - [-A-ZƔƩĆóúĆĆĆĆĆa-z0-9. ]{30,80}\.csv", file) is not None))
sinaica = None
for (j, file_csv) in enumerate(generator):
#display(Markdown(f"{i+1}. File \"{file_csv}\""))
try:
station, sensor = re.match(
r"Datos SINAICA - ([A-ZƔƩĆóúĆĆĆĆĆa-z. ]{3,20}) - ([A-Z0-9a-z.]+) - [-0-9 ]+\.csv",
file_csv).groups()
#display(Markdown(f" * {station}, {sensor}"))
df2 = pd.read_csv(os.path.join(data_dir, file_csv))
df2 = df2.assign(Estacion=station)
sinaica = pd.concat([sinaica, df2])
sinaica["Hora"] = sinaica[["Hora"]].replace("- .*$", "", regex=True)
sinaica["Fecha"] = pd.to_datetime(sinaica["Fecha"] + " " + sinaica["Hora"])
#display(df2.head(3))
except Exception as e:
print(f"Error while reading file {file_csv}", type(e))
raise e
if sinaica is None:
print("Loading pickle prev data...")
sinaica = pd.read_pickle("data/sinaica/sinaica.pickle")
sinaica = sinaica.sort_values(by=["Fecha", "Estacion", "ParƔmetro"])
sinaica = sinaica[(sinaica["Fecha"] >= "2021-01-01")].copy()
display(Markdown(f"Done reading {j+1} files!"))
display(pd.concat([sinaica.head(5), sinaica.tail(5)]))
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
Listing data files from: /home/jaa6766/Documents/jorge3a/itam/deeplearning/dlfinal/data/sinaica/...
Loading pickle prev data...
Done reading 1 files!
ParƔmetro | Fecha | Valor | Unidad | Estacion | |
---|---|---|---|---|---|
1 | CO | 2021-01-01 00:00:00 | 0.600 | ppm | Camarones |
1 | NO | 2021-01-01 00:00:00 | 0.006 | ppm | Camarones |
1 | NO2 | 2021-01-01 00:00:00 | 0.029 | ppm | Camarones |
1 | NOx | 2021-01-01 00:00:00 | 0.034 | ppm | Camarones |
1 | O3 | 2021-01-01 00:00:00 | 0.011 | ppm | Camarones |
425 | NOx | 2021-04-01 23:00:00 | 0.014 | ppm | Tlalnepantla |
701 | O3 | 2021-04-01 23:00:00 | 0.029 | ppm | Tlalnepantla |
681 | PM10 | 2021-04-01 23:00:00 | 55.000 | µg/m³ | Tlalnepantla |
679 | PM2.5 | 2021-04-01 23:00:00 | 22.000 | µg/m³ | Tlalnepantla |
696 | SO2 | 2021-04-01 23:00:00 | 0.002 | ppm | Tlalnepantla |
sinaica
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
ParƔmetro | Fecha | Valor | Unidad | Estacion | |
---|---|---|---|---|---|
1 | CO | 2021-01-01 00:00:00 | 0.600 | ppm | Camarones |
1 | NO | 2021-01-01 00:00:00 | 0.006 | ppm | Camarones |
1 | NO2 | 2021-01-01 00:00:00 | 0.029 | ppm | Camarones |
1 | NOx | 2021-01-01 00:00:00 | 0.034 | ppm | Camarones |
1 | O3 | 2021-01-01 00:00:00 | 0.011 | ppm | Camarones |
... | ... | ... | ... | ... | ... |
425 | NOx | 2021-04-01 23:00:00 | 0.014 | ppm | Tlalnepantla |
701 | O3 | 2021-04-01 23:00:00 | 0.029 | ppm | Tlalnepantla |
681 | PM10 | 2021-04-01 23:00:00 | 55.000 | µg/m³ | Tlalnepantla |
679 | PM2.5 | 2021-04-01 23:00:00 | 22.000 | µg/m³ | Tlalnepantla |
696 | SO2 | 2021-04-01 23:00:00 | 0.002 | ppm | Tlalnepantla |
88034 rows Ć 5 columns
Encontramos que las siguientes son algunas de las estaciones cercanas a "Camarones" que estÔ próxima a nuestro sensor:
(
ggplot(sinaica) +
geom_point(aes(x="Fecha", y="Valor", color="ParƔmetro")) +
facet_wrap("ParƔmetro", scales="free") +
labs(title="Visualización general de las Variables de Contaminantes") +
theme(axis_text_x=element_text(angle=90),
subplots_adjust={'wspace': 0.25, 'hspace': 0.25}
)
)
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
<ggplot: (8794041603197)>
(
ggplot(sinaica[(sinaica["Estacion"] == "Camarones")]) +
geom_point(aes(x="Fecha", y="Valor", color="ParƔmetro")) +
facet_wrap("ParƔmetro", scales="free") +
labs(title="Estación Camarones") +
theme(axis_text_x=element_text(angle=90),
subplots_adjust={'wspace': 0.25, 'hspace': 0.25}
)
)
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
<ggplot: (8794040273033)>
sinaica.to_pickle("data/sinaica/sinaica.pickle")
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
Se obtienen los promedios para que sean alineables con el monitoreo del aire de la Ciudad de MƩxico.
ddf = DplyFrame(df)
ddf.head(5)
temperature | pressure | humidity | gasResistance | IAQ | iaqAccuracy | datetime | year | month | day | hour | minute | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 21.54 | 777.41 | 43.93 | 151328 | 37.5 | 1 | 2021-02-12 06:04:09.089621067 | 2021 | 2 | 12 | 6 | 4 |
1 | 21.56 | 777.41 | 43.89 | 152702 | 35.6 | 1 | 2021-02-12 06:04:12.087778807 | 2021 | 2 | 12 | 6 | 4 |
2 | 21.53 | 777.41 | 43.97 | 151328 | 37.5 | 1 | 2021-02-12 06:04:15.072475433 | 2021 | 2 | 12 | 6 | 4 |
3 | 21.51 | 777.41 | 44.03 | 151464 | 38.5 | 1 | 2021-02-12 06:04:18.070170164 | 2021 | 2 | 12 | 6 | 4 |
4 | 21.51 | 777.41 | 44.05 | 152425 | 36.9 | 1 | 2021-02-12 06:04:21.061994791 | 2021 | 2 | 12 | 6 | 4 |
(
ddf >>
dfilter(X.datetime >= '2021-03-01 06:00:00',
X.datetime <= '2021-03-01 06:02:00',
) >>
dplython.head(3)
)
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above. /home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/dplython/dplython.py:196: DeprecationWarning: 'dfilter' is deprecated. Please use 'sift' instead.
temperature | pressure | humidity | gasResistance | IAQ | iaqAccuracy | datetime | year | month | day | hour | minute | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
490473 | 28.06 | 780.7 | 30.37 | 175863 | 198.1 | 3 | 2021-03-01 06:00:01.807887316 | 2021 | 3 | 1 | 6 | 0 |
490474 | 28.05 | 780.7 | 30.38 | 176417 | 197.7 | 3 | 2021-03-01 06:00:04.803511858 | 2021 | 3 | 1 | 6 | 0 |
490475 | 28.05 | 780.7 | 30.41 | 175313 | 198.0 | 3 | 2021-03-01 06:00:07.798833609 | 2021 | 3 | 1 | 6 | 0 |
%%time
ddf = (
ddf >>
sift(X.iaqAccuracy > 0) >> ## descartamos las lecturas del sensor incorrectas
group_by(X.year, X.month, X.day, X.hour) >>
summarize(temperature=X.temperature.mean(),
pressure=X.pressure.mean(),
humidity=X.humidity.mean(),
gasResistance=X.gasResistance.mean(),
IAQ=X.IAQ.mean(),
iaqAccuracy=X.iaqAccuracy.mode()
)
)
ddf
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
CPU times: user 10.9 s, sys: 1.21 s, total: 12.1 s Wall time: 12.1 s
year | month | day | hour | temperature | pressure | humidity | gasResistance | IAQ | iaqAccuracy | |
---|---|---|---|---|---|---|---|---|---|---|
0 | 2021 | 2 | 12 | 6 | 21.557391 | 777.271496 | 44.289745 | 1.439648e+05 | 90.755292 | 1 |
1 | 2021 | 2 | 12 | 7 | 21.153699 | 777.077872 | 43.183375 | 1.497397e+05 | 81.831588 | 1 |
2 | 2021 | 2 | 12 | 8 | 20.653242 | 776.620657 | 42.604564 | 1.537118e+05 | 86.220615 | 1 |
3 | 2021 | 2 | 12 | 9 | 20.406470 | 776.213214 | 42.223995 | 1.491061e+05 | 138.266030 | 1 |
4 | 2021 | 2 | 12 | 10 | 20.051380 | 776.202968 | 42.269584 | 1.428894e+05 | 198.164339 | 1 |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
1716 | 2021 | 4 | 24 | 18 | 27.295599 | 780.395033 | 25.525715 | 7.906306e+05 | 88.733278 | 3 |
1717 | 2021 | 4 | 24 | 19 | 28.083486 | 779.418394 | 25.280607 | 7.800011e+05 | 95.956905 | 3 |
1718 | 2021 | 4 | 24 | 20 | 28.737169 | 778.412748 | 25.206611 | 7.655807e+05 | 94.872606 | 3 |
1719 | 2021 | 4 | 24 | 21 | 29.299792 | 777.575840 | 23.264110 | 1.208911e+06 | 28.357321 | 3 |
1720 | 2021 | 4 | 24 | 22 | 29.503994 | 777.256463 | 22.274451 | 1.454203e+06 | 27.110366 | 2 |
1721 rows Ć 10 columns
EstadĆsticas de los valores de las lecturas
ddf.describe()
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
year | month | day | hour | temperature | pressure | humidity | gasResistance | IAQ | iaqAccuracy | |
---|---|---|---|---|---|---|---|---|---|---|
count | 1721.0 | 1721.000000 | 1721.000000 | 1721.000000 | 1721.000000 | 1721.000000 | 1721.000000 | 1.721000e+03 | 1721.000000 | 1721.000000 |
mean | 2021.0 | 3.100523 | 15.786171 | 11.524695 | 24.804104 | 780.636987 | 30.110417 | 4.330384e+05 | 161.171283 | 2.673446 |
std | 0.0 | 0.746935 | 8.006440 | 6.911534 | 2.760569 | 2.388429 | 5.908258 | 2.500892e+05 | 71.309153 | 0.717909 |
min | 2021.0 | 2.000000 | 1.000000 | 0.000000 | 17.282542 | 774.004780 | 8.750125 | 9.540458e+04 | 22.751331 | 1.000000 |
25% | 2021.0 | 3.000000 | 9.000000 | 6.000000 | 22.995145 | 778.994576 | 26.068603 | 2.410431e+05 | 97.133527 | 3.000000 |
50% | 2021.0 | 3.000000 | 16.000000 | 12.000000 | 24.891373 | 780.565998 | 30.486997 | 3.960417e+05 | 181.048878 | 3.000000 |
75% | 2021.0 | 4.000000 | 22.000000 | 18.000000 | 26.915882 | 782.311847 | 34.016855 | 5.355609e+05 | 225.373295 | 3.000000 |
max | 2021.0 | 4.000000 | 31.000000 | 23.000000 | 30.485691 | 787.527854 | 44.289745 | 1.978295e+06 | 255.292928 | 3.000000 |
sinaica
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
ParƔmetro | Fecha | Valor | Unidad | Estacion | |
---|---|---|---|---|---|
1 | CO | 2021-01-01 00:00:00 | 0.600 | ppm | Camarones |
1 | NO | 2021-01-01 00:00:00 | 0.006 | ppm | Camarones |
1 | NO2 | 2021-01-01 00:00:00 | 0.029 | ppm | Camarones |
1 | NOx | 2021-01-01 00:00:00 | 0.034 | ppm | Camarones |
1 | O3 | 2021-01-01 00:00:00 | 0.011 | ppm | Camarones |
... | ... | ... | ... | ... | ... |
425 | NOx | 2021-04-01 23:00:00 | 0.014 | ppm | Tlalnepantla |
701 | O3 | 2021-04-01 23:00:00 | 0.029 | ppm | Tlalnepantla |
681 | PM10 | 2021-04-01 23:00:00 | 55.000 | µg/m³ | Tlalnepantla |
679 | PM2.5 | 2021-04-01 23:00:00 | 22.000 | µg/m³ | Tlalnepantla |
696 | SO2 | 2021-04-01 23:00:00 | 0.002 | ppm | Tlalnepantla |
88034 rows Ć 5 columns
dsinaica = DplyFrame(sinaica)
dsinaica2 = (
dsinaica.
pivot_table(index=["Fecha", ], columns=["Estacion", "ParƔmetro"], values="Valor",
)
)
dsinaica2.columns = ["_".join(x).strip() for x in dsinaica2.columns]
dsinaica2.insert(0, "Fecha", dsinaica2.index)
dsinaica2.reset_index(drop=True, inplace=True)
dsinaica2
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
Fecha | Camarones_CO | Camarones_NO | Camarones_NO2 | Camarones_NOx | Camarones_O3 | Camarones_PM10 | Camarones_PM2.5 | Camarones_SO2 | FES AcatlƔn_CO | ... | Miguel Hidalgo_O3 | Miguel Hidalgo_SO2 | Tlalnepantla_CO | Tlalnepantla_NO | Tlalnepantla_NO2 | Tlalnepantla_NOx | Tlalnepantla_O3 | Tlalnepantla_PM10 | Tlalnepantla_PM2.5 | Tlalnepantla_SO2 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 2021-01-01 00:00:00 | 0.6 | 0.006 | 0.029 | 0.034 | 0.011 | NaN | NaN | 0.002 | 0.4 | ... | 0.009 | 0.003 | 0.6 | NaN | 0.030 | 0.034 | 0.012 | 37.0 | 19.0 | 0.002 |
1 | 2021-01-01 01:00:00 | 1.0 | 0.021 | 0.038 | 0.059 | 0.002 | NaN | NaN | 0.002 | 0.6 | ... | 0.006 | 0.003 | 0.6 | NaN | 0.026 | 0.029 | 0.013 | 42.0 | 29.0 | 0.003 |
2 | 2021-01-01 02:00:00 | 0.8 | 0.013 | 0.035 | 0.049 | 0.003 | NaN | NaN | 0.001 | 0.9 | ... | 0.003 | 0.002 | 0.7 | NaN | 0.032 | 0.036 | 0.006 | 58.0 | 43.0 | 0.002 |
3 | 2021-01-01 03:00:00 | 1.0 | 0.031 | 0.034 | 0.065 | 0.002 | NaN | NaN | 0.001 | 0.8 | ... | 0.004 | 0.002 | 0.7 | NaN | 0.033 | 0.039 | 0.004 | 59.0 | 41.0 | 0.002 |
4 | 2021-01-01 04:00:00 | 0.6 | 0.005 | 0.029 | 0.034 | 0.005 | NaN | NaN | 0.001 | 1.0 | ... | 0.006 | 0.002 | 0.7 | NaN | 0.032 | 0.038 | 0.004 | 64.0 | 46.0 | 0.002 |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
2166 | 2021-04-01 19:00:00 | 0.4 | 0.003 | 0.011 | 0.013 | 0.016 | 69.0 | 7.0 | 0.001 | 0.3 | ... | 0.023 | 0.000 | 0.3 | 0.009 | 0.017 | 0.025 | 0.017 | 52.0 | 24.0 | 0.003 |
2167 | 2021-04-01 20:00:00 | 0.4 | 0.002 | 0.011 | 0.012 | 0.018 | 71.0 | 9.0 | 0.001 | 0.2 | ... | 0.024 | 0.000 | 0.4 | 0.004 | 0.015 | 0.019 | 0.020 | 22.0 | 10.0 | 0.005 |
2168 | 2021-04-01 21:00:00 | 0.4 | 0.002 | 0.013 | 0.015 | 0.016 | 37.0 | 9.0 | 0.001 | 0.2 | ... | 0.023 | 0.000 | 0.3 | 0.002 | 0.014 | 0.017 | 0.021 | 21.0 | 14.0 | 0.002 |
2169 | 2021-04-01 22:00:00 | 0.4 | 0.002 | 0.019 | 0.021 | 0.012 | 19.0 | 0.0 | 0.001 | 0.1 | ... | 0.027 | 0.000 | 0.3 | 0.002 | 0.011 | 0.013 | 0.022 | 11.0 | 7.0 | 0.001 |
2170 | 2021-04-01 23:00:00 | 0.4 | 0.001 | 0.014 | 0.015 | 0.021 | 61.0 | 21.0 | 0.001 | 0.2 | ... | 0.033 | 0.001 | 0.3 | 0.001 | 0.014 | 0.014 | 0.029 | 55.0 | 22.0 | 0.002 |
2171 rows Ć 45 columns
def describe_with_na(dataframe):
dna = dataframe.isna()
dna = dna.astype('int').sum()
dna.name = "NAs"
dataframe = dataframe.describe()
dataframe = dataframe.append(dna)
dataframe = dataframe.T
dataframe.insert(0, "Estacion", dataframe.index)
return dataframe
dsinaica2_describe = describe_with_na(dsinaica2)
dsinaica2_describe
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
Estacion | count | mean | std | min | 25% | 50% | 75% | max | NAs | |
---|---|---|---|---|---|---|---|---|---|---|
Camarones_CO | Camarones_CO | 2050.0 | 0.771805 | 0.430131 | 0.000 | 0.500 | 0.700 | 1.0000 | 3.200 | 121.0 |
Camarones_NO | Camarones_NO | 2042.0 | 0.025181 | 0.045487 | 0.000 | 0.002 | 0.006 | 0.0260 | 0.432 | 129.0 |
Camarones_NO2 | Camarones_NO2 | 2042.0 | 0.031787 | 0.015682 | 0.003 | 0.020 | 0.031 | 0.0420 | 0.111 | 129.0 |
Camarones_NOx | Camarones_NOx | 2042.0 | 0.056961 | 0.054418 | 0.004 | 0.022 | 0.039 | 0.0710 | 0.499 | 129.0 |
Camarones_O3 | Camarones_O3 | 2042.0 | 0.025693 | 0.024107 | 0.001 | 0.004 | 0.018 | 0.0420 | 0.103 | 129.0 |
Camarones_PM10 | Camarones_PM10 | 1616.0 | 58.066213 | 26.906212 | 0.000 | 41.000 | 55.000 | 71.0000 | 437.000 | 555.0 |
Camarones_PM2.5 | Camarones_PM2.5 | 1604.0 | 25.158978 | 12.946419 | 0.000 | 16.000 | 24.000 | 33.0000 | 126.000 | 567.0 |
Camarones_SO2 | Camarones_SO2 | 2042.0 | 0.006598 | 0.013053 | 0.000 | 0.002 | 0.003 | 0.0050 | 0.162 | 129.0 |
FES AcatlƔn_CO | FES AcatlƔn_CO | 2020.0 | 0.634901 | 0.370808 | 0.100 | 0.400 | 0.500 | 0.8000 | 2.900 | 151.0 |
FES AcatlƔn_NO | FES AcatlƔn_NO | 1304.0 | 0.014301 | 0.024926 | 0.000 | 0.002 | 0.004 | 0.0130 | 0.215 | 867.0 |
FES AcatlƔn_NO2 | FES AcatlƔn_NO2 | 2015.0 | 0.025607 | 0.014263 | 0.002 | 0.015 | 0.023 | 0.0330 | 0.092 | 156.0 |
FES AcatlƔn_NOx | FES AcatlƔn_NOx | 2019.0 | 0.041234 | 0.035480 | 0.002 | 0.018 | 0.028 | 0.0520 | 0.260 | 152.0 |
FES AcatlƔn_O3 | FES AcatlƔn_O3 | 2015.0 | 0.033841 | 0.026037 | 0.003 | 0.013 | 0.027 | 0.0480 | 0.137 | 156.0 |
FES AcatlƔn_PM10 | FES AcatlƔn_PM10 | 1991.0 | 47.245605 | 32.511497 | 0.000 | 27.000 | 41.000 | 61.0000 | 388.000 | 180.0 |
FES AcatlƔn_SO2 | FES AcatlƔn_SO2 | 2015.0 | 0.006546 | 0.010034 | 0.000 | 0.002 | 0.004 | 0.0070 | 0.136 | 156.0 |
Gustavo A. Madero_NO2 | Gustavo A. Madero_NO2 | 2085.0 | 0.025859 | 0.014361 | 0.003 | 0.013 | 0.026 | 0.0360 | 0.081 | 86.0 |
Gustavo A. Madero_O3 | Gustavo A. Madero_O3 | 2076.0 | 0.031555 | 0.029610 | 0.001 | 0.004 | 0.023 | 0.0510 | 0.128 | 95.0 |
Gustavo A. Madero_PM10 | Gustavo A. Madero_PM10 | 2035.0 | 52.755283 | 27.911189 | 0.000 | 34.500 | 50.000 | 67.0000 | 495.000 | 136.0 |
Gustavo A. Madero_PM2.5 | Gustavo A. Madero_PM2.5 | 2026.0 | 23.785291 | 13.182547 | 0.000 | 14.000 | 22.000 | 31.0000 | 117.000 | 145.0 |
La Presa_CO | La Presa_CO | 2034.0 | 0.933628 | 0.513861 | 0.100 | 0.600 | 0.800 | 1.1000 | 3.500 | 137.0 |
La Presa_O3 | La Presa_O3 | 1863.0 | 0.029086 | 0.025911 | 0.001 | 0.006 | 0.024 | 0.0455 | 0.118 | 308.0 |
La Presa_SO2 | La Presa_SO2 | 2017.0 | 0.005163 | 0.009749 | 0.000 | 0.001 | 0.002 | 0.0050 | 0.118 | 154.0 |
Merced_CO | Merced_CO | 2087.0 | 1.151749 | 0.413130 | 0.500 | 0.900 | 1.000 | 1.3000 | 3.900 | 84.0 |
Merced_NO | Merced_NO | 1381.0 | 0.021361 | 0.034552 | 0.000 | 0.003 | 0.008 | 0.0220 | 0.318 | 790.0 |
Merced_NO2 | Merced_NO2 | 2070.0 | 0.032723 | 0.014052 | 0.005 | 0.022 | 0.032 | 0.0410 | 0.087 | 101.0 |
Merced_NOx | Merced_NOx | 2070.0 | 0.056423 | 0.044741 | 0.006 | 0.027 | 0.042 | 0.0710 | 0.386 | 101.0 |
Merced_O3 | Merced_O3 | 2076.0 | 0.028389 | 0.029109 | 0.000 | 0.003 | 0.018 | 0.0460 | 0.140 | 95.0 |
Merced_PM10 | Merced_PM10 | 2142.0 | 54.485061 | 23.727621 | 0.000 | 39.000 | 53.000 | 67.0000 | 411.000 | 29.0 |
Merced_PM2.5 | Merced_PM2.5 | 2137.0 | 26.730463 | 12.805604 | 0.000 | 18.000 | 25.000 | 33.0000 | 122.000 | 34.0 |
Merced_SO2 | Merced_SO2 | 2094.0 | 0.006420 | 0.010345 | 0.000 | 0.002 | 0.003 | 0.0060 | 0.146 | 77.0 |
Miguel Hidalgo_CO | Miguel Hidalgo_CO | 2090.0 | 0.544785 | 0.343697 | 0.000 | 0.300 | 0.500 | 0.7000 | 2.600 | 81.0 |
Miguel Hidalgo_NO | Miguel Hidalgo_NO | 2077.0 | 0.021710 | 0.038798 | 0.000 | 0.002 | 0.005 | 0.0220 | 0.368 | 94.0 |
Miguel Hidalgo_NO2 | Miguel Hidalgo_NO2 | 2078.0 | 0.029400 | 0.013166 | 0.004 | 0.019 | 0.028 | 0.0390 | 0.086 | 93.0 |
Miguel Hidalgo_NOx | Miguel Hidalgo_NOx | 2078.0 | 0.051113 | 0.046729 | 0.005 | 0.022 | 0.034 | 0.0620 | 0.395 | 93.0 |
Miguel Hidalgo_O3 | Miguel Hidalgo_O3 | 2082.0 | 0.033624 | 0.028588 | 0.002 | 0.009 | 0.027 | 0.0500 | 0.145 | 89.0 |
Miguel Hidalgo_SO2 | Miguel Hidalgo_SO2 | 2081.0 | 0.005228 | 0.008925 | 0.000 | 0.001 | 0.002 | 0.0050 | 0.099 | 90.0 |
Tlalnepantla_CO | Tlalnepantla_CO | 2023.0 | 0.740287 | 0.360615 | 0.100 | 0.500 | 0.600 | 0.9000 | 2.900 | 148.0 |
Tlalnepantla_NO | Tlalnepantla_NO | 1039.0 | 0.020687 | 0.031055 | 0.000 | 0.003 | 0.007 | 0.0220 | 0.219 | 1132.0 |
Tlalnepantla_NO2 | Tlalnepantla_NO2 | 1751.0 | 0.031346 | 0.014525 | 0.004 | 0.021 | 0.030 | 0.0390 | 0.097 | 420.0 |
Tlalnepantla_NOx | Tlalnepantla_NOx | 1752.0 | 0.052864 | 0.040767 | 0.005 | 0.026 | 0.039 | 0.0660 | 0.274 | 419.0 |
Tlalnepantla_O3 | Tlalnepantla_O3 | 2077.0 | 0.027766 | 0.025335 | 0.000 | 0.007 | 0.020 | 0.0430 | 0.125 | 94.0 |
Tlalnepantla_PM10 | Tlalnepantla_PM10 | 1989.0 | 48.649573 | 27.959538 | 0.000 | 33.000 | 45.000 | 59.0000 | 423.000 | 182.0 |
Tlalnepantla_PM2.5 | Tlalnepantla_PM2.5 | 1973.0 | 22.273188 | 12.075484 | 0.000 | 14.000 | 21.000 | 29.0000 | 90.000 | 198.0 |
Tlalnepantla_SO2 | Tlalnepantla_SO2 | 2066.0 | 0.008569 | 0.014821 | 0.001 | 0.002 | 0.004 | 0.0080 | 0.179 | 105.0 |
Fecha | Fecha | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 |
dsinaica2_describe = (
dsinaica2_describe[["Estacion", "NAs"]]
)[dsinaica2_describe["Estacion"] != "Fecha"]
dsinaica2_describe.index.name = ""
dsinaica2_describe.reset_index(inplace=True)
dsinaica2_describe[["Estacion", "NAs"]].sort_values("NAs",
ascending=False,
inplace=True)
dsinaica2_describe
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above. /home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel_launcher.py:8: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
Estacion | NAs | ||
---|---|---|---|
0 | Camarones_CO | Camarones_CO | 121.0 |
1 | Camarones_NO | Camarones_NO | 129.0 |
2 | Camarones_NO2 | Camarones_NO2 | 129.0 |
3 | Camarones_NOx | Camarones_NOx | 129.0 |
4 | Camarones_O3 | Camarones_O3 | 129.0 |
5 | Camarones_PM10 | Camarones_PM10 | 555.0 |
6 | Camarones_PM2.5 | Camarones_PM2.5 | 567.0 |
7 | Camarones_SO2 | Camarones_SO2 | 129.0 |
8 | FES AcatlƔn_CO | FES AcatlƔn_CO | 151.0 |
9 | FES AcatlƔn_NO | FES AcatlƔn_NO | 867.0 |
10 | FES AcatlƔn_NO2 | FES AcatlƔn_NO2 | 156.0 |
11 | FES AcatlƔn_NOx | FES AcatlƔn_NOx | 152.0 |
12 | FES AcatlƔn_O3 | FES AcatlƔn_O3 | 156.0 |
13 | FES AcatlƔn_PM10 | FES AcatlƔn_PM10 | 180.0 |
14 | FES AcatlƔn_SO2 | FES AcatlƔn_SO2 | 156.0 |
15 | Gustavo A. Madero_NO2 | Gustavo A. Madero_NO2 | 86.0 |
16 | Gustavo A. Madero_O3 | Gustavo A. Madero_O3 | 95.0 |
17 | Gustavo A. Madero_PM10 | Gustavo A. Madero_PM10 | 136.0 |
18 | Gustavo A. Madero_PM2.5 | Gustavo A. Madero_PM2.5 | 145.0 |
19 | La Presa_CO | La Presa_CO | 137.0 |
20 | La Presa_O3 | La Presa_O3 | 308.0 |
21 | La Presa_SO2 | La Presa_SO2 | 154.0 |
22 | Merced_CO | Merced_CO | 84.0 |
23 | Merced_NO | Merced_NO | 790.0 |
24 | Merced_NO2 | Merced_NO2 | 101.0 |
25 | Merced_NOx | Merced_NOx | 101.0 |
26 | Merced_O3 | Merced_O3 | 95.0 |
27 | Merced_PM10 | Merced_PM10 | 29.0 |
28 | Merced_PM2.5 | Merced_PM2.5 | 34.0 |
29 | Merced_SO2 | Merced_SO2 | 77.0 |
30 | Miguel Hidalgo_CO | Miguel Hidalgo_CO | 81.0 |
31 | Miguel Hidalgo_NO | Miguel Hidalgo_NO | 94.0 |
32 | Miguel Hidalgo_NO2 | Miguel Hidalgo_NO2 | 93.0 |
33 | Miguel Hidalgo_NOx | Miguel Hidalgo_NOx | 93.0 |
34 | Miguel Hidalgo_O3 | Miguel Hidalgo_O3 | 89.0 |
35 | Miguel Hidalgo_SO2 | Miguel Hidalgo_SO2 | 90.0 |
36 | Tlalnepantla_CO | Tlalnepantla_CO | 148.0 |
37 | Tlalnepantla_NO | Tlalnepantla_NO | 1132.0 |
38 | Tlalnepantla_NO2 | Tlalnepantla_NO2 | 420.0 |
39 | Tlalnepantla_NOx | Tlalnepantla_NOx | 419.0 |
40 | Tlalnepantla_O3 | Tlalnepantla_O3 | 94.0 |
41 | Tlalnepantla_PM10 | Tlalnepantla_PM10 | 182.0 |
42 | Tlalnepantla_PM2.5 | Tlalnepantla_PM2.5 | 198.0 |
43 | Tlalnepantla_SO2 | Tlalnepantla_SO2 | 105.0 |
(
ggplot(dsinaica2_describe) +
geom_col(aes(x="reorder(Estacion, (NAs))", y="NAs", fill="Estacion"),
show_legend=False) +
theme(axis_text_x=element_text(rotation=90)) +
labs(x="Estación", y="# Lectura Faltantes",
title="Histograma de Lecturas Faltantes\n"+
"por Contaminante-Estacion de Monitoreo")
)
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
<ggplot: (8794040176029)>
(
ggplot(dsinaica2_describe) +
geom_col(aes(x="reorder(Estacion, (NAs))", y="100*NAs/dsinaica2.shape[0]",
fill="Estacion"),
show_legend=False) +
theme(axis_text_x=element_text(rotation=90)) +
labs(x="Estación", y="% Lectura Faltantes",
title="Porcentaje de Lecturas Faltantes\n"+
"por Contaminante-Estacion de Monitoreo")
)
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
<ggplot: (8794039635125)>
(
ggplot(dsinaica2_describe[dsinaica2_describe["Estacion"].str.match("Camarones")]) +
geom_col(aes(x="reorder(Estacion, (NAs))", y="NAs", fill="Estacion"),
show_legend=False) +
theme(axis_text_x=element_text(rotation=90)) +
labs(x="Estación", y="# Lectura Faltantes",
title="Histograma de Lecturas Faltantes\n"+
"por Contaminante en la Estación Camarones")
)
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
<ggplot: (8794029225769)>
(
ggplot(dsinaica2_describe[dsinaica2_describe["Estacion"].str.match("Camarones")]) +
geom_col(aes(x="reorder(Estacion, (NAs))", y="100*NAs/dsinaica2.shape[0]",
fill="Estacion"),
show_legend=False) +
theme(axis_text_x=element_text(rotation=90)) +
labs(x="Estación", y="% Lectura Faltantes",
title="Porcentaje de Lecturas Faltantes\n"+
"por Contaminante en Camarones")
)
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
<ggplot: (8794029080221)>
dsinaica2_describe[dsinaica2_describe["Estacion"].str.match("Camarones")]
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
Estacion | NAs | ||
---|---|---|---|
0 | Camarones_CO | Camarones_CO | 121.0 |
1 | Camarones_NO | Camarones_NO | 129.0 |
2 | Camarones_NO2 | Camarones_NO2 | 129.0 |
3 | Camarones_NOx | Camarones_NOx | 129.0 |
4 | Camarones_O3 | Camarones_O3 | 129.0 |
5 | Camarones_PM10 | Camarones_PM10 | 555.0 |
6 | Camarones_PM2.5 | Camarones_PM2.5 | 567.0 |
7 | Camarones_SO2 | Camarones_SO2 | 129.0 |
dsinaica2_describe[dsinaica2_describe["Estacion"].str.match("Merced")]
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
Estacion | NAs | ||
---|---|---|---|
22 | Merced_CO | Merced_CO | 84.0 |
23 | Merced_NO | Merced_NO | 790.0 |
24 | Merced_NO2 | Merced_NO2 | 101.0 |
25 | Merced_NOx | Merced_NOx | 101.0 |
26 | Merced_O3 | Merced_O3 | 95.0 |
27 | Merced_PM10 | Merced_PM10 | 29.0 |
28 | Merced_PM2.5 | Merced_PM2.5 | 34.0 |
29 | Merced_SO2 | Merced_SO2 | 77.0 |
(
ggplot(dsinaica2_describe[dsinaica2_describe["Estacion"].str.match("Merced")]) +
geom_col(aes(x="reorder(Estacion, (NAs))", y="NAs", fill="Estacion"),
show_legend=False) +
theme(axis_text_x=element_text(rotation=90)) +
labs(x="Estación", y="# Lectura Faltantes",
title="Histograma de Lecturas Faltantes\n"+
"por Contaminante en la Estación Merced")
)
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
<ggplot: (8794040214689)>
(
ggplot(dsinaica2_describe[dsinaica2_describe["Estacion"].str.match("Miguel Hidalgo")]) +
geom_col(aes(x="reorder(Estacion, (NAs))", y="NAs", fill="Estacion"),
show_legend=False) +
theme(axis_text_x=element_text(rotation=90)) +
labs(x="Estación", y="# Lectura Faltantes",
title="Histograma de Lecturas Faltantes\n"+
"por Contaminante en la Estación Miguel Hidalgo")
)
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
<ggplot: (8794029368701)>
dsinaica2.to_pickle("data/sinaica/dsinaica.pickle")
/home/jaa6766/.conda/envs/cuda/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
Bosch BME680 Datasheet. 2021.
Mancuso, Daniel. Indoor Air Quality Monitor | Hackster.io. 2019.