.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/busan_beach.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. or to run this example in your browser via Binder .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_busan_beach.py: =========================== beach water quality =========================== .. GENERATED FROM PYTHON SOURCE LINES 6-14 .. code-block:: Python from tabulight import EDA from tabulight import wq_data from tabulight.utils import print_info # sphinx_gallery_thumbnail_number = 7 print_info() .. rst-class:: sphx-glr-script-out .. code-block:: none numpy 2.3.4 pandas 2.3.3 tabulight 0.1.0 python 3.12.10 (main, May 6 2025, 10:49:23) [GCC 11.4.0] os posix matplotlib 3.10.7 scipy 1.16.2 seaborn 0.13.2 statsmodels 0.14.5 Script Executed on: 18 October 2025 18:28:05 tot_cpus 2 avail_cpus 2 mem_gib 7.555534362792969 .. GENERATED FROM PYTHON SOURCE LINES 18-23 .. code-block:: Python data = wq_data(target=['ecoli', 'sul1_coppml', 'aac_coppml', 'tetx_coppml', 'blaTEM_coppml']) print(data.shape) .. rst-class:: sphx-glr-script-out .. code-block:: none (1446, 18) .. GENERATED FROM PYTHON SOURCE LINES 24-27 .. code-block:: Python data.head() .. raw:: html
tide_cm wat_temp_c sal_psu air_temp_c pcp_mm pcp3_mm pcp6_mm pcp12_mm wind_dir_deg wind_speed_mps air_p_hpa mslp_hpa rel_hum ecoli sul1_coppml aac_coppml tetx_coppml blaTEM_coppml
index
2018-06-19 00:00:00 36.407149 19.321232 33.956058 19.780000 0.0 0.0 0.0 0.0 159.533333 0.960000 1002.856667 1007.256667 95.000000 NaN NaN NaN NaN NaN
2018-06-19 00:30:00 35.562515 19.320124 33.950508 19.093333 0.0 0.0 0.0 0.0 86.596667 0.163333 1002.300000 1006.700000 95.000000 NaN NaN NaN NaN NaN
2018-06-19 01:00:00 34.808016 19.319666 33.942532 18.733333 0.0 0.0 0.0 0.0 2.260000 0.080000 1001.973333 1006.373333 95.000000 NaN NaN NaN NaN NaN
2018-06-19 01:30:00 30.645216 19.320406 33.931263 18.760000 0.0 0.0 0.0 0.0 62.710000 0.193333 1001.776667 1006.120000 95.006667 NaN NaN NaN NaN NaN
2018-06-19 02:00:00 26.608980 19.326729 33.917961 18.633333 0.0 0.0 0.0 0.0 63.446667 0.510000 1001.743333 1006.103333 95.006667 NaN NaN NaN NaN NaN


.. GENERATED FROM PYTHON SOURCE LINES 28-31 .. code-block:: Python data.isna().sum() .. rst-class:: sphx-glr-script-out .. code-block:: none tide_cm 0 wat_temp_c 0 sal_psu 0 air_temp_c 0 pcp_mm 0 pcp3_mm 0 pcp6_mm 0 pcp12_mm 0 wind_dir_deg 0 wind_speed_mps 0 air_p_hpa 0 mslp_hpa 0 rel_hum 0 ecoli 1279 sul1_coppml 1228 aac_coppml 1228 tetx_coppml 1228 blaTEM_coppml 1228 dtype: int64 .. GENERATED FROM PYTHON SOURCE LINES 32-35 .. code-block:: Python data.isna().sum() .. rst-class:: sphx-glr-script-out .. code-block:: none tide_cm 0 wat_temp_c 0 sal_psu 0 air_temp_c 0 pcp_mm 0 pcp3_mm 0 pcp6_mm 0 pcp12_mm 0 wind_dir_deg 0 wind_speed_mps 0 air_p_hpa 0 mslp_hpa 0 rel_hum 0 ecoli 1279 sul1_coppml 1228 aac_coppml 1228 tetx_coppml 1228 blaTEM_coppml 1228 dtype: int64 .. GENERATED FROM PYTHON SOURCE LINES 36-39 .. code-block:: Python eda = EDA(data, save=False) .. GENERATED FROM PYTHON SOURCE LINES 40-43 .. code-block:: Python eda.data_availability() .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_001.png :alt: busan beach :srcset: /auto_examples/images/sphx_glr_busan_beach_001.png, /auto_examples/images/sphx_glr_busan_beach_001_2_00x.png 2.00x :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none /home/docs/checkouts/readthedocs.org/user_builds/tabulight/checkouts/latest/tabulight/_main.py:347: UserWarning: set_ticklabels() should only be used with a fixed number of ticks, i.e. after set_ticks() or using a FixedLocator. im.axes.set_xticklabels(
.. GENERATED FROM PYTHON SOURCE LINES 44-47 .. code-block:: Python _ = eda.plot_missing() .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_002.png :alt: busan beach :srcset: /auto_examples/images/sphx_glr_busan_beach_002.png, /auto_examples/images/sphx_glr_busan_beach_002_2_00x.png 2.00x :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none /home/docs/checkouts/readthedocs.org/user_builds/tabulight/checkouts/latest/tabulight/_main.py:444: UserWarning: set_ticklabels() should only be used with a fixed number of ticks, i.e. after set_ticks() or using a FixedLocator. ax1.set_yticklabels(ax1.get_yticks(), fontsize="18") .. GENERATED FROM PYTHON SOURCE LINES 48-56 .. code-block:: Python # _ = eda.plot_data(subplots=True, max_cols_in_plot=20, figsize=(14, 20)) # # ########################################################### _ = eda.plot_data(subplots=True, max_cols_in_plot=20, figsize=(14, 20), ignore_datetime_index=True) .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_003.png :alt: busan beach :srcset: /auto_examples/images/sphx_glr_busan_beach_003.png, /auto_examples/images/sphx_glr_busan_beach_003_2_00x.png 2.00x :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 57-60 .. code-block:: Python _ = eda.plot_histograms() .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_004.png :alt: tide_cm, wat_temp_c, sal_psu, air_temp_c, pcp_mm, pcp3_mm, pcp6_mm, pcp12_mm, wind_dir_deg, wind_speed_mps, air_p_hpa, mslp_hpa, rel_hum, ecoli, sul1_coppml, aac_coppml, tetx_coppml, blaTEM_coppml :srcset: /auto_examples/images/sphx_glr_busan_beach_004.png, /auto_examples/images/sphx_glr_busan_beach_004_2_00x.png 2.00x :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 61-64 .. code-block:: Python _ = eda.box_plot(max_features=18, palette="Set3") .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_005.png :alt: busan beach :srcset: /auto_examples/images/sphx_glr_busan_beach_005.png, /auto_examples/images/sphx_glr_busan_beach_005_2_00x.png 2.00x :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none /home/docs/checkouts/readthedocs.org/user_builds/tabulight/checkouts/latest/tabulight/_main.py:1424: UserWarning: set_ticklabels() should only be used with a fixed number of ticks, i.e. after set_ticks() or using a FixedLocator. axis.set_xticklabels(list(data.columns), fontdict={'rotation': 70}) .. GENERATED FROM PYTHON SOURCE LINES 65-68 .. code-block:: Python eda.box_plot(max_features=18, palette="Set3", violen=True) .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_006.png :alt: busan beach :srcset: /auto_examples/images/sphx_glr_busan_beach_006.png, /auto_examples/images/sphx_glr_busan_beach_006_2_00x.png 2.00x :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none /home/docs/checkouts/readthedocs.org/user_builds/tabulight/checkouts/latest/tabulight/_main.py:1424: UserWarning: set_ticklabels() should only be used with a fixed number of ticks, i.e. after set_ticks() or using a FixedLocator. axis.set_xticklabels(list(data.columns), fontdict={'rotation': 70}) .. GENERATED FROM PYTHON SOURCE LINES 69-77 .. code-block:: Python eda.correlation(figsize=(14, 14)) # ########################################################### # # # eda.grouped_scatter(max_subplots=18) .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_007.png :alt: busan beach :srcset: /auto_examples/images/sphx_glr_busan_beach_007.png, /auto_examples/images/sphx_glr_busan_beach_007_2_00x.png 2.00x :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 78-81 .. code-block:: Python _ = eda.autocorrelation(n_lags=15) .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_008.png :alt: Autocorrelation :srcset: /auto_examples/images/sphx_glr_busan_beach_008.png, /auto_examples/images/sphx_glr_busan_beach_008_2_00x.png 2.00x :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none cannot plot autocorrelation for ecoli feature cannot plot autocorrelation for sul1_coppml feature cannot plot autocorrelation for aac_coppml feature .. GENERATED FROM PYTHON SOURCE LINES 82-85 .. code-block:: Python _ = eda.partial_autocorrelation(n_lags=15) .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_009.png :alt: Partial Autocorrelation :srcset: /auto_examples/images/sphx_glr_busan_beach_009.png, /auto_examples/images/sphx_glr_busan_beach_009_2_00x.png 2.00x :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none cannot plot autocorrelation for ecoli feature cannot plot autocorrelation for sul1_coppml feature cannot plot autocorrelation for aac_coppml feature .. GENERATED FROM PYTHON SOURCE LINES 86-89 .. code-block:: Python _ = eda.lag_plot(n_lags=14, s=0.4) .. rst-class:: sphx-glr-horizontal * .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_010.png :alt: tide_cm :srcset: /auto_examples/images/sphx_glr_busan_beach_010.png, /auto_examples/images/sphx_glr_busan_beach_010_2_00x.png 2.00x :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_011.png :alt: wat_temp_c :srcset: /auto_examples/images/sphx_glr_busan_beach_011.png, /auto_examples/images/sphx_glr_busan_beach_011_2_00x.png 2.00x :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_012.png :alt: sal_psu :srcset: /auto_examples/images/sphx_glr_busan_beach_012.png, /auto_examples/images/sphx_glr_busan_beach_012_2_00x.png 2.00x :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_013.png :alt: air_temp_c :srcset: /auto_examples/images/sphx_glr_busan_beach_013.png, /auto_examples/images/sphx_glr_busan_beach_013_2_00x.png 2.00x :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_014.png :alt: pcp_mm :srcset: /auto_examples/images/sphx_glr_busan_beach_014.png, /auto_examples/images/sphx_glr_busan_beach_014_2_00x.png 2.00x :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_015.png :alt: pcp3_mm :srcset: /auto_examples/images/sphx_glr_busan_beach_015.png, /auto_examples/images/sphx_glr_busan_beach_015_2_00x.png 2.00x :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_016.png :alt: pcp6_mm :srcset: /auto_examples/images/sphx_glr_busan_beach_016.png, /auto_examples/images/sphx_glr_busan_beach_016_2_00x.png 2.00x :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_017.png :alt: pcp12_mm :srcset: /auto_examples/images/sphx_glr_busan_beach_017.png, /auto_examples/images/sphx_glr_busan_beach_017_2_00x.png 2.00x :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_018.png :alt: wind_dir_deg :srcset: /auto_examples/images/sphx_glr_busan_beach_018.png, /auto_examples/images/sphx_glr_busan_beach_018_2_00x.png 2.00x :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_019.png :alt: wind_speed_mps :srcset: /auto_examples/images/sphx_glr_busan_beach_019.png, /auto_examples/images/sphx_glr_busan_beach_019_2_00x.png 2.00x :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_020.png :alt: air_p_hpa :srcset: /auto_examples/images/sphx_glr_busan_beach_020.png, /auto_examples/images/sphx_glr_busan_beach_020_2_00x.png 2.00x :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_021.png :alt: mslp_hpa :srcset: /auto_examples/images/sphx_glr_busan_beach_021.png, /auto_examples/images/sphx_glr_busan_beach_021_2_00x.png 2.00x :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_022.png :alt: rel_hum :srcset: /auto_examples/images/sphx_glr_busan_beach_022.png, /auto_examples/images/sphx_glr_busan_beach_022_2_00x.png 2.00x :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_023.png :alt: ecoli :srcset: /auto_examples/images/sphx_glr_busan_beach_023.png, /auto_examples/images/sphx_glr_busan_beach_023_2_00x.png 2.00x :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_024.png :alt: sul1_coppml :srcset: /auto_examples/images/sphx_glr_busan_beach_024.png, /auto_examples/images/sphx_glr_busan_beach_024_2_00x.png 2.00x :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_025.png :alt: aac_coppml :srcset: /auto_examples/images/sphx_glr_busan_beach_025.png, /auto_examples/images/sphx_glr_busan_beach_025_2_00x.png 2.00x :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_026.png :alt: tetx_coppml :srcset: /auto_examples/images/sphx_glr_busan_beach_026.png, /auto_examples/images/sphx_glr_busan_beach_026_2_00x.png 2.00x :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_027.png :alt: blaTEM_coppml :srcset: /auto_examples/images/sphx_glr_busan_beach_027.png, /auto_examples/images/sphx_glr_busan_beach_027_2_00x.png 2.00x :class: sphx-glr-multi-img .. GENERATED FROM PYTHON SOURCE LINES 90-94 .. code-block:: Python _ = eda.plot_ecdf(figsize=(10, 14)) .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_028.png :alt: busan beach :srcset: /auto_examples/images/sphx_glr_busan_beach_028.png, /auto_examples/images/sphx_glr_busan_beach_028_2_00x.png 2.00x :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 95-96 .. code-block:: Python eda.normality_test() .. image-sg:: /auto_examples/images/sphx_glr_busan_beach_029.png :alt: busan beach :srcset: /auto_examples/images/sphx_glr_busan_beach_029.png, /auto_examples/images/sphx_glr_busan_beach_029_2_00x.png 2.00x :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 25.167 seconds) .. _sphx_glr_download_auto_examples_busan_beach.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/sphinx-gallery/sphinx-gallery.github.io/master?urlpath=lab/tree/notebooks/auto_examples/busan_beach.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: busan_beach.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: busan_beach.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: busan_beach.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_