How to Use Zepl’s Built-In Plotly Editor
April 28, 2021
The most effective way to tell a story of your data is to visualize it with charts and graphs. Some of the more popular visualization libraries for Python, Spark, and R are Matplotlib, Seaborn, Plotly, and ggplot2. Zepl supports the use of all these visualization libraries and using them in the Zepl notebook is the same process as any other notebook.
You can also use Zepl’s built-in Plotly editor, which lets you get started quickly with your data visualizations. Whether you’re an expert or beginner with Plotly, Zepl makes it easy for you to create Plotly visualizations with one line of code whether you are coding in Python, R or even Scala. Our Spark/Scala users love this feature since it’s very easy to create interactive charts without having to deal with setup like API keys and credentials. The one line code, z.show(DataFrame), reduces the number of lines of code required for all users to easily create charts and graphs.
To access the Plotly editor, run the function z.show(df) from a notebook paragraph where df is your DataFrame you pass in to the function. This will render the visualization options as seen below.
Select the last symbol in the charting list called “Plotly Chart”. The list contains many other charting options and you can find more information about it here.
Then click on the ‘Plotly Chart Editor” button.
This will open the Plotly Editor window and from here select the “+ Trace” button and select your trace “Type”. This will show a list of charting options.
As you can see from the screenshot, you have access to many types of traces. You also have the ability to create maps if your dataset includes geolocation data (latitude, longitude). Clicking on any of the map traces will open the following screen where you can select your latitude and longitude column in your dataset.
In this example, I created two subplots that show the start and end locations of bicycle trips in New York City. You can find a sample Zepl notebook that I published that shows various ways of using Plotly here .
This is a screenshot of one of the paragraphs in the notebook and you can see that I’m able to map my geolocation data on a map with just one line of code.
There are also many customization options you can play with using the Plotly Chart editor. For more information on this and Zepl’s data visualization capabilities, check out our documentation here. Let us know if you have any questions at email@example.com. We love to hear from you!