Data Analysis and Charts with Google Gemini

Leon Nicholls
7 min readJun 25, 2024


Hey, data wizards! If you’re like me, you’re always looking for tools that can make your data analysis and visualization tasks a breeze. Get ready to be impressed because Google Gemini is like having a super-smart data analyst at your fingertips, ready to crunch numbers, uncover insights, and create stunning visuals from your data.

The best part? You can interact with Gemini using natural language prompts—no coding skills are required!

Note: The data analysis feature is only available with the Google Gemini Advanced chatbot (a paid service).

Getting Started with Data Analysis in Gemini

Alright, data enthusiasts, let’s get this party started! Uploading your data files to Gemini is easy. Just look for the “Upload file” button and select your file. Gemini can handle CSV, TSV, XLSX, and Google Sheets files. Remember that you can upload up to 10 files simultaneously, with a maximum size of 100 MB each.

Now for the fun part: analyzing your data! To do so, type your question or request in the chatbox using natural language.

Let’s say you uploaded a CSV file containing global temperature data to give you a taste of what’s possible. You could ask Gemini something like, “Plot the average temperature for each year,” and it would generate a beautiful line chart showing the trend over time. You can customize the chart’s type, title, and labels using the “Customize the chart” button.

Using the same data, you could ask for other kinds of analysis. For example, you might ask Gemini, “Show me a scatter plot of temperature over time.” Gemini will then work its magic and present the results in a snap.

Note: I’ve used this temperature data for most of the example prompts in this blog post.

Creating and Customizing Charts

Now that you’ve loaded your data, let’s unleash Gemini’s inner artist and create eye-catching charts! Gemini masters many chart types, from scatter plots and bar charts to line charts. If that’s your jam, you can ask it to whip up histograms, box plots, or pie charts.

Gemini lets you customize your charts using a prompt that fits your heart’s content. Do you want to change the chart type? No problem! Just ask Gemini to transform your scatter plot into a bar chart, and it’ll do it in a flash. You can also tweak the axis labels, add titles, and even play around with color schemes. It’s like having a personal design assistant for your data visualizations:
Create a scatter plot from the data. On the x-axis, put the `Date` column. The y value is the ‘LandAndOceanAverageTemperature’ value. Each point should be colored by ‘LandAndOceanAverageTemperature’. Use a linear color scale where higher anomaly values are red and lower are blue. Each point should be opacity 0.5.

Here is another example of a customized chart prompt using data from the RIAA (including additional turns in the conversation for customizing the chart):

One of the most incredible things about Gemini charts is their interaction. You can zoom in and out, pan around, and even hover over data points to see detailed information in tooltips. This makes exploring your data a genuinely immersive experience. You can also use the “View in table” button to see all the data behind the chart in a table format.

If you’re feeling adventurous, you can ask Gemini to copy the chart as an image to the clipboard or download your chart as an image. This is perfect for sharing your findings with others or embedding them in presentations and reports.

Advanced Chart Customization and Analysis

Hold on to your hats, folks, because we’ll take your chart game to the next level! Gemini isn’t just about creating basic charts; it can also handle some seriously advanced customizations and analyses.

Want to add a trend line to your scatter plot? Easy peasy! Just ask Gemini to “Add a linear trend line” or “Show a polynomial trend of degree 2.” You can even get fancy and request a moving average to smooth out fluctuations in your data.

But why stop there? Gemini can also create faceted or multi-panel charts to compare different groups or categories within your data. For example, you might ask Gemini, “Show a scatter plot of temperature over time, faceted by hemisphere.” This would generate two plots, one for the northern hemisphere and one for the southern hemisphere, allowing you to compare trends easily.

If you’re feeling statistically adventurous, you can ask Gemini to transform your data before plotting it. For instance, you could request a log transformation to visualize data with a wide range of values or a z-score transformation to standardize your data.

But Gemini isn’t just about pretty pictures; it can also help you analyze and interpret your data. You can ask Gemini to explain the insights in your charts, such as “What are the key trends in global temperature over time?” or “Are there any correlations between rainfall and crop yield?”. Gemini will then use its vast knowledge and analytical skills to provide valuable insights and explanations.

You can even use Gemini to perform calculations or aggregations on your data. For example, ask, “What’s the average temperature for each decade?” or “Calculate the correlation coefficients between LandAverageTemperature and other temperature measures.” Gemini will then crunch the numbers and present the results clearly and concisely.

Exporting and Sharing

Alright, data fans, let’s talk about sharing your newfound Gemini chart magic with the world (or at least your colleagues)! Gemini makes exporting and sharing your data visualizations easy so that you can spread the data love far and wide.

First, you can download the raw data behind your charts and analysis as a handy JSON file:
Make the data available as a JSON file.

This is perfect if you want to do further analysis in another tool or keep a copy for your records.

But that’s not all! Gemini also lets you peek under the hood and see the Python code used to create your chart:
Make all the code available to generate the chart.

This is a great way to learn how Gemini works and customize the code to create even more sophisticated visualizations. For further analysis and experimentation, you can use the “Share & export” button to export this code directly to Colab, Google’s cloud-based Python environment.

And let’s remember to share! Gemini makes it simple to share your charts and insights with others. Just click the “Share” button to generate a link you can send to your colleagues or embed in a presentation. So spread the data joy and show off your Gemini skills!

Note: Shared chats won’t allow the original data used in the prompt to be downloaded by others.

Tips and Best Practices

Alright, data adventurers, before we wrap up this Gemini journey, here are a few tips and best practices to help you get the most out of this powerful tool:

  • Clean Data FTW: Remember, garbage in and garbage out. The cleaner and more organized your data, the better your Gemini magic will work. Gemini does basic data cleaning (e.g., handling missing values and converting data types). But it’s best if you take a few minutes to tidy up your files before uploading them. A table with a single header row or no merged cells is the best way for Gemini to get to work.
  • Experiment with Prompts: Be bold and use open-ended and specific prompts. You might be surprised by the insights Gemini can uncover when you give it some freedom to explore. And if you have a particular question, don’t hesitate to ask! Let Gemini wow you by explaining its rationale and assumptions to answer your questions.
  • Unleash the Power of Multiple Files: If you have related data sets, try uploading them together. Gemini can do cross-comparisons and provide even deeper insights and analysis.
  • Don’t be Shy to Ask for Help: If you need help phrasing a prompt or deciding what kind of analysis to perform, ask Gemini! It’s like having a data mentor right in your pocket.
  • Embrace the Learning Curve: Like any powerful tool, Gemini requires some practice to master. But trust me, the time you invest in learning its ins and outs will pay off big time in terms of efficiency and insights.

And most importantly, have fun with it! Gemini is an incredible tool that can open up a new world of data exploration and visualization. So go forth, experiment, and let your data adventures begin!


Well, there you have it, data adventurers! We’ve just scratched the surface of what Google Gemini can do for your data analysis and visualization tasks. From simple charts to advanced customizations and in-depth analysis, Gemini has got your back. And with its easy exporting and sharing options, you can spread the data love and collaborate with others effortlessly.

So, what are you waiting for? Dive into Gemini, experiment with different prompts, and let your data creativity run wild! Who knows what unique insights and discoveries you might uncover?

Check out my reading list of other Google Gemini articles.

This post was created using AI writing tools, carefully reviewed, and polished by the human author. Google provided some prompt examples.