The Scenario
The new feature shipped three weeks ago and the VP of Product wants a geographic breakdown of who's actually using it — by country, then by city within the top countries — before the leadership review on Friday. You have a CSV export from the analytics platform sitting on your desktop: 3,000 raw IP addresses from unique sessions, one per row.
This is the third time this month you've been handed a raw IP list and asked to turn it into a readable report. The first two times you exported to a spreadsheet and called the IPinfo API from a Jupyter notebook. Each time took about two hours — most of it wrestling with the response format, not doing actual analysis.
The bad version:
- Paste 3,000 IPs into a Google Sheet, open a notebook, write the batch API call, handle pagination manually because 3,000 exceeds the 1,000-IP limit.
- Parse the JSON response, extract country codes, write them to a CSV, re-import into the sheet.
- Build the pivot table by hand, realize the country codes aren't sorted, fix the sort, reformat for the slide deck.
Every step of that is data plumbing. The actual insight — which countries matter, which cities are outliers — takes ten minutes once the data is clean. The plumbing takes two hours.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your Google Sheet that reads your data and talks to IPinfo on your behalf. It handles the batch pagination, the response parsing, and the summary table — you just describe what you want.
Open the SheetXAI sidebar and paste this:
Geocode all 3,000 IPs in column A with IPinfo, group by country, and write the top 20 countries sorted by IP count descending to a new sheet called "Traffic Summary."
What You Get
- Each IP in column A enriched with country code in column B (written as a side effect of the batch call)
- A new "Traffic Summary" tab with country code in column A and IP count in column B, sorted high to low
- The top 20 rows — so the slide-ready table is already trimmed
- Rows where IPinfo returned no country are bucketed as "Unknown" in the summary
What If the Data Is Not Quite Ready
IPs came from multiple analytics exports and there are duplicates
Column A has 3,000 IPs but many appear more than once because the export included all sessions, not unique visitors. Deduplicate column A, geocode the unique IPs with IPinfo, then build a session-weighted country summary by counting each IP's original occurrences in the raw list and grouping by country — write the result to a new tab called "Country Sessions."
I also need a city breakdown for the top 5 countries
Geocode all IPs in column A with IPinfo and write country and city to columns B and C. Then write two summary tables to a new tab called "Breakdown": first a country count table sorted by count descending, then a city count table filtered to only the top 5 countries, also sorted descending.
Some IPs are from internal QA testing and should be excluded
The IP list in column A includes internal office and VPN IPs from column C of the "Exclusions" tab. Geocode all IPs in column A with IPinfo, skip any IP that appears in Exclusions column C, then write country code to column B and build a top-20 country summary table on a new tab called "Traffic Summary."
Full pipeline: clean, geocode, and build the executive summary in one shot
Column A has 3,000 raw session IPs, some duplicated, some from internal ranges listed in Exclusions tab column C. Deduplicate, remove internal IPs, geocode the remaining IPs with IPinfo, write country and city to columns B and C, then produce a top-20 country session-count table and a top-10 city table for the top 5 countries — all on a new tab called "Feature Launch Summary."
One prompt replaces the two-hour plumbing exercise.
Try It
Get the 7-day free trial of SheetXAI and open any Google Sheet with a raw IP export from your analytics platform, then ask it to geocode the list and build the country breakdown with IPinfo. See also batch enrichment with full geolocation fields or generating a shareable map. Hub overview: IPinfo + Google Sheets.
