You are on page 1of 25
611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science Openinapp 7 Sign In Qh Search Medium 0:19 This is your last free member-only story this month. Sign up for Medium and get an extra one, + Member-only story Using PyGWalker to Enhance Your Jupyter Notebook EDA Experience An Introduction to the PyGWalker Library for Easy Data Visualisation q Andy McDonald - Follow Published in Towards Data Science 8minread » Mar © Listen ") Share PyGWalker showing multiple plots within the same view. Image by the author, tps: /towardsdatascience.com/use-pygwalksr-fo-enhance-yourjupyler-notebook-eda-experiencs-cTaSee358be9 18, 71208, 1237 AM Using Pyke to Ennance Your Jupyer Notebook EDA Experone [by Andy MeDona | Towards Data Science Creating effective and compelling data visualisations quickly and efficiently is a key part of the data science workflow. There are several options available to do this ranging from commercial software like Tableau to free alternatives like dedicated python libraries. The amount of skill and time needed to generate plots can vary between the different options. 0:19 Over the years, several python libraries have been developed to simplify the pre. jf exploring your data. So simple in fact, that all you need to get started are 3-5 lines ot code. One such library that has recently appeared on the EDA scene is PyGWalker. PyGWalker (Python binding of Graphic Walker) is a python library that can help speed up the data analysis and visualisation workflow directly within a Jupyter notebook. It leverages the power of interactivity by providing an interface similar to the popular data analytics software called Tableau. Creating a scatter plot in PygWalker using well log data. Image by the author. With this type of interface, we can drag and drop our variables into specific sections and quickly create a plot, filter it, and understand our data. tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 2106 611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science You can visit the GitHub repository for PyGWalker using the link below. GitHub - Kanaries/pygwalker: PyGWalker: Turn your pandas dataframe into a Tableau-style User... PyGWalker can simplify your Jupyter Notebook data analysis and data 0:19 visualization workflow, by turning your pandas... github.com wi This article will explore some of the features of PyGWalker using one of my favourite well log data sets (details at the end of the article). At the time of writing this article, the version of PygWalker is 0.1.4.6, and some of the features illustrated may have been updated since this version. Video Tutorial A video version of this tutorial is available on my YouTube channel if you want to see PyGWalker in action. Installing and Running PyGWalker in Jupyter Lab tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 3128 srana, 237 AM Using Pyke to Ennance Your Jupyer Notebook EDA Experone [by Andy MeDona | Towards Data Science To get started with PyGWalker, we need to install it. We can do this by using pip install pygwalker Or conda install pygwalker if you are using Anaconda, After the PyGWalker library has been installed, we can open our Jupyter Notebook and then import PyGWalker alongside the pandas library, which will be used to load 0:19 data from a CSV file. w ‘import pandas as pd ‘import pygwalker as pyg After these have been imported, the next step is to load the data we are going to be using for this tutorial. We can load this data by calling upon the familiar pd.read_csv() function from pandas, and then pass in our CSV file. f = pd.read_csv('Data/Keek Well_15-9-15.csv") Now itis time to run PyGWalker, and we can do it with the following straightforward call. pyg.walk (df) Once the cell has been run, we will get a very nice interface showing the available variables within the dataset. The variables will be split based on their type. tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 4128 611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science PyGWalker User Interface directly within a Jupyter Notebook. Image by the author, Building a Scatter Plot with PygWalker ‘ter plot of RHOB and NPHI — a commonly The first plot we will create is a simple sc: used plot within petrophysics. Before we do this, we need to turn off the aggregation on the toolbar. This will allow us to plot the actual data values rather than any form of aggregation. tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 526 611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science [emer Ca tert) Chart? +New g Field List fae w iene foto Rouen) uTH Toggling the aggregation option off will allow the plotting of actual data values. Image by the author. Now we can select the variables we want to plot from the field list on the left. These can be clicked on and dragged into the x or y-axis boxes, depending on what axis you want the variables on. You will also notice that the items within the field list have different icons. The blue document-like icons represent categorical data, and the purple hashtags represent numeric data. In this example, I have placed the NPHI on the x-axis and RHOB on the y-axis. tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 626 611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science Creating a scatter plot in PygWalker using well log data. Image by the author. Changing the PygWalker Plot Size When the plot appears, it may look very small. However, we can increase the size of our plot very e sily. This is done by going to the menu and changing the layout mode from auto to fixed. Once that option has been changed, we can either change the size by clicking on the blue border that appears around our plot or by clicking on the cog icon next to the Layout Mode button and adjusting the sliders. tps: itowardsdatascience.com/use-pygwalker-to-enhance-yourjupyterntebook: sexperience-cTaSee35tbe9 17128 611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science 1B Date or oT corres cod ums oo Cr id Changing the figure size within PygWalker. Image by the author. Adding Additional Var bles to the PyGWalker Scatter Plot We can also apply more variables to the plot to help us understand our data better. These additional variables can be categorical or numeric, and we can use them to add colour, opacity, size and shape. In the example below, I have added the LITH variable, which will colour the data points by different lithologies. We can then hover over any point in the scatter plot and view its values. tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 2126 611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science aes Veinaatan! chart + New Applying a categorical variable to the scatter plot created by PyGWalker. Image by the author. If we use a numeric variable instead, we will get a colour bar along the side of the plot. ‘The range of values for this axis can be changed by applying a filter — we will see how to do this shortly. tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 9126 611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science Coy pore oo uma cod Applying a numeric variable to the scatter plot created by PyGWalker. Image by the author. Zooming and Moving Around the PygWalker Scatter Plot If we want to change the scales or zoom in on a section of data, we first have to click on the Auto Resizing button on the toolbar and then we can zoom in or out using the mouse scroll wheel. We can then move around the plot by using the left mouse clicking, holding that button, and dragging the cursor around the plot. tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 10725 611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science Cee con cod ic} oad id coed Zooming and moving around the scatter plot in PyGWalker. Image by the author. It would be nice to be able to change the scales on the plot manually by clicking on the axis or the corners of the axis, similar to how we can do it in a Plotly chart. Filtering Data By Categories We can also filter the data using our variables. When we filter using categorical data, we click and drag the variable we want into the filters section and then deselect the categories we do not want to see. tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 1125 611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science Applying categorical filters in PygWalker. Image by the author. When filtering using a numeric variable, we get a slider where we can control the min and max range. It does not appear as if we can edit the values manually, which would be a nice feature to have. Anice feature is that we can we can apply multiple filters by adding another variable into the filter box and setting the range or selecting the categories we want. tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 12205 611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science = rd Applying numerical filters to data using PygWalker. Image by the author. Creating a Line Plot with PyGWalker There are several different plot types available within PyGWalker. When adding data and the Mark Type is set to Auto, the library will try to find the best plot for your data, However, this may not always be the most appropriate chart type. You can change the chart type by clicking the Mark Type button on the toolbar and then selecting the type you want. The example below shows how you can create a line plot with two variables. tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 1325 611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science Cae Creating a line plot in PyGWalker. Image by the author. Viewing Raw Data PyGWalker provides a nice way to view the raw data within your dataframe and change the data type if required. This is handy if a column has been accidentally identified as the wrong data type and you need to change it quickly. It would be nice to be able to do more on the data view, such as filtering the data or applying colour scales to the columns, as sometimes this can help reveal any issues within the data. tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 14125 611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science ‘The raw data view within PyGWalker. Image by the author. Summary PyGWalker has provided one of the most interactive experiences and nicest-looking setups I have come across with EDA libraries in a Jupyter notebook. The interface provides an easy way for non-coders or beginner coders to start creating charts immediately. You should give it a try for your next project. Check out my article below if you want to see other powerful Python EDA libraries. 5 Powerful Python Libraries For EDA You Need to Know About Leverage the Power of Python to Explore and Understand Your Data towardsdatascience.com tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 1525 611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science The dataset used in this article is a subset of a training dataset used as part of a Machine Learning competition run by Xeek and FORCE 2020 (Bormann et al., 2020). It is released under a NOLD 2.0 licence from the Norwegian Government, details of which can be found here: Norwegian Licence for Open Government Data (NLQ) 9:19 The full dataset can be accessed here. w The full reference for the dataset is: Bormann, Peter, Aursand, Peder, Dilib, Fahad, Manral, Surrender, & Dischington, Peter. (2020). FORCE 2020 Well well log and lithofacies dataset for machine learning competition [Data set]. Zenodo. http://doi.org/10.5281/zenodo.43511. Thanks for reading. Before you go, you should definitely subscribe to my content and get my articles in your inbox. You can do that here! Alternatively, you can sign up for my. newsletter to get additional content straight into your inbox for free. Secondly, you can get the full Medium experience and support me and thousands of other writers by signing up for a membership. It only costs you $5 a month, and you have full access to all of the fantastic Medium articles and the chance to make money with your writing. If you sign up using my link, you will support me directly with a portion of your fee, and it ‘won't cost you more. If you do so, thank you so much for your support! DataScience _Jupyter Exploratory Data Analysis Data Analysis, Python tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 16128 611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science Written by Andy McDonald 2.7K Followers - Writer for Towards Data Science Petrophysicist and Data Scientist with a passion for data analytics, machine learning, and Al. httpsy/andymedonaldgeo.medium.com/membership, More from Andy McDonald and Towards Data Science tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 1726 611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science cot) ® Andy Mcdonald in Towards Data Science Cyberpunking Your Matplotlib Figures Taking Your Matplotlib Figures from Boring to Interesting with a Few Lines of Code + + Bminread - May21 on Qi tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 18128 611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science @ Jacob Marks, Ph.D. in Towards Data Science How | Turned My Company’s Docs into a Searchable Database with OpenAl And how you can do the same with your docs 1Sminread » Apr25 ‘DeprooeToooTODeToONTONOIT (9011200111100000111211010009 ‘012112000101101110011110000/ 101001010001000100010001000 a1o101010121011012110101010] zo101201010101011210111000] (011010101010001000001000109 (010002000001000100020001009 30902112002120121100000111 101000001221200010110111001| 1110000/1020010100010001000 ‘000100011010101011101101113 ‘1o10r010101201010101011119 111000101101010201000100000 1190010020002000001000100010] (901090200011110011101121000. \ “IT } || Leonie Monigatt in Towards Data Science 10 Exciting Project Ideas Using Large Language Models (LLMs) for Your Portfolio Learn how to build apps and showcase your skills with large language models (LLMs). Get started today! + + tminread - May15 8 2K tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 19128 611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science @® Andy MeDonala in Towards Data Science 5 Powerful Python Libraries For EDA You Need to Know About Leverage the Power of Python to Explore and Understand Your Data + 10min read + Feb 15 300 Qe See all from Andy McDonald i C See all from Towards Data Science Recommended from Medium tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 20126 611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science S cave Araujo, MSc. © in Level Up Coding 5 Introducing PandasAl: The Generative Al Python Library (5 Pandas Alis an additional Python library that enhances Pandas, the widely-used data analysis and manipulation tool, by incorporating... + 9minread + May 16 Soe Qu a tps: itowardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experiencs-cTaSee358be9 21126 112723, 12:37 AM Using Py Waker to Enhance Your Jupytr Notebook EDA Experience | by Andy McDonald | Towards Data Science @ Parvathy Krishnan in Towards Data Science Accessing and Visualizing Digital Elevation Models with Python tutorial in Python with openly available DEM data on19 + - Tminread ~ Mars S16 Qi wi Lists What is ChatGPT? Qstories - 93 saves Stories to Help You Level-Up at Work stories . 87 saves, Staff Picks 342 stories - 102 saves @ Matt chapman in Towards Data Science tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 208 611223, 12357 AM Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science Simplify Your Data Preparation With These 4 Lesser-Known Sci Classes -Learn Forget train_test_split: Pipeline, ColumnTransformer, FeatureUnion and FunctionTransformer are indispensable even if you use XGBoost or. +> + 10minread - Junt 0:19 sr Qt f @® Andy McDonald in Towards Data Science D-Tale for Fast and Easy Exploratory Data Analysis of Well Log Data ‘Speeding Up The Exploratory Data Analysis Workflow With The D-Tale Python Library + - 9minread - Feb13 6% Q tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 208 Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science 611223, 12357 AM @ Bex. in Towards Data Science 6 New Booming Data Science Libraries You Must Learn To Boost Your Skill Set in 2023 Data science isn't just Pandas, NumPy, and Scikit-learn anymore + Tmin ead « Jano O7 ct mk Q tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 24126 Using Py@Walker to Enhance Your Jupyter Notebook EDA Experience | by Andy McDonald | Towards Data Science 611223, 12357 AM D Leonie Monigatt in Towards Data Science Getting Started with LangChain: A Beginner’s Guide to Building LLM- Powered Applications A LangChain tutorial to build anything with large language models in Python + + 12minread » Apr25 amk OQ 19 XY ‘See more recommendations - \ tps: /towardsdatascience.com/use-pygwalker-fo-enhance-yourjupyler-notebook-eda-experience-cTaSee358be9 28:26

You might also like