The CSV had 1,000 rows. It also had a problem: calorie counters, patient portals, gym apps, and appointment tools could all appear under Health & Fitness.
I wanted to compare apps that help people log food and track calories. Before plotting anything, I needed a smaller group whose numbers were worth looking at together.
This walkthrough uses a real US App Store export to build that group, validate the data, and produce a downloads-versus-revenue chart with Python. The final example contains 12 apps. The sample CSV and the complete script are included below, so you can run it locally.
Start with the scope, then open the file
I exported the source data from Appark on November 25, 2026, using these settings:
| Setting | Value |
|---|---|
| Store | Apple App Store |
| Country | United States |
| Category | Includes Health & Fitness |
| Sort | Estimated monthly downloads, descending |
| Rows in the export | 1,000 |
| Reporting period | October 2026 |
| Revenue currency | USD |
The monthly columns refer to the previous calendar month. For this November export, that means October. The download date is not the reporting period, and an app's release date is a different field again.
Both downloads and store revenue are model estimates, not publisher financial reports. Store revenue excludes advertising and other revenue earned outside the stores. I keep those definitions attached to the table and chart.
Disclosure: I’m involved with Appark, which supplied the source data for this example.
This is a selected export, not a census of every app in the category. The row count alone does not establish complete market coverage.
Narrow the list around a task people actually do
For this comparison, I used a simple inclusion rule: food logging and calorie or nutrition tracking must be part of the app's core purpose.
That puts a calorie counter within scope. A gym membership app or patient portal needs a different comparison, even when it shares a category.
I started with a name filter:
pattern = r"calorie|myfitnesspal|lose it|cronometer|foodvisor" It matched 30 rows in the original export. This is a practical way to generate candidates, but it misses products with unrelated names and can include apps that only mention the topic. It is not a complete discovery method.
For a manageable worked example, I selected 12 candidates and checked their public App Store descriptions for food logging or calorie/nutrition tracking. The other 18 remain not reviewed. I have not classified them as irrelevant, and these 12 are not a top-12 market ranking.
The review is about shared product purpose, not a claim that every app targets the same audience or offers identical features. For example, the official listings for Cronometer and MyNetDiary both describe food logging and nutrition tracking. That gives me a reason to compare them before investigating their differences.
I store the reviewed choices as app IDs in the script. Names can change. A fixed ID list also makes the selection visible to anyone rerunning the analysis.
Keep a small, runnable input
The original file had 23 columns. This example needs seven of them. I added two context columns, reporting_month and currency, to make the extracted sample easier to reuse without losing its meaning.
Save the following as sample_apps.csv. The numbers are copied from the source export; they have not been rounded to K or M display units.
IOS App ID,App Name,Developer Name,Region,Store Type,Estimated downloads for the previous calendar month,Estimated revenue for the previous calendar month,reporting_month,currency 341232718,MyFitnessPal: Calorie Counter,"MyFitnessPal, Inc.",US,App Store,176439,6345553,2026-10,USD 6480417616,Cal AI - Calorie Tracker,Viral Development LLC,US,App Store,111892,1054783,2026-10,USD 1145935738,Cronometer: Calorie Counter,Cronometer Software Inc,US,App Store,95466,654347,2026-10,USD 287529757,Calorie Counter - MyNetDiary,MyNetDiary Inc.,US,App Store,43290,674490,2026-10,USD 6447434453,Calo: AI Food Calorie Counter,Next Vision Limited,US,App Store,25064,229546,2026-10,USD 1064020872,Foodvisor - AI Calorie Counter,Foodvisor,US,App Store,23117,194513,2026-10,USD 297368629,Lose It! – Calorie Counter,FitNow,US,App Store,21343,529901,2026-10,USD 347184248,Calorie Counter by fatsecret,fatsecret,US,App Store,10862,16860,2026-10,USD 1448277011,Fitia: Calorie Counter & Diet,Nutrition Technologies,US,App Store,4285,19945,2026-10,USD 286906691,Lifesum: AI Calorie Counter,Lifesum AB,US,App Store,3973,128765,2026-10,USD 1011095795,Fitatu AI Calorie Counter,Fitatu Sp. z o.o.,US,App Store,2646,21785,2026-10,USD 946099227,AI Calorie Tracker by Yazio,YAZIO,US,App Store,2468,88644,2026-10,USD The sample above is already reduced to the reviewed 12 apps. Running the name filter on it will therefore return 12 candidates. Running the same filter on my original 1,000-row export returned 30.
If you use your own export, update the column mapping, reporting period, currency, country/store checks, and reviewed app IDs together. The script deliberately stops when those reviewed IDs are absent, rather than silently returning a different comparison.
Validate the rows before ranking them
There were no missing monthly download or revenue values in this export. The checks still belong in the script because the next file may be different.
I check a few specific things:
- IDs remain text. I read the CSV with
dtype="string". Identifiers do not need arithmetic, and large numeric-looking IDs can lose precision if converted carelessly. - Duplicate IDs trigger an error. In this file, iOS app IDs were unique, while some unified app IDs were shared across multiple iOS apps. I use the iOS ID for the unit being compared and investigate duplicates instead of deleting rows automatically.
- Missing values stay missing. A blank field and a measured or estimated zero have different meanings. Neither gets replaced with the other.
- Invalid numeric text triggers an error. An unexpected
1.2Kstring should make me inspect the export format rather than quietly losing a row. - Country and store stay consistent. The example expects US App Store rows throughout.
The parsing uses pandas' documented CSV reader and to_numeric. Numeric conversion is followed by validation so that unrecognized values don't disappear into the analysis unnoticed.
Run the complete script
I ran this with Python 3.12.14, pandas 2.2.3, and Matplotlib 3.10.8.
python -m pip install pandas==2.2.3 matplotlib==3.10.8 Save this as compare_apps.py beside the CSV:
from pathlib import Path import math import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import pandas as pd INPUT = Path("sample_apps.csv") OUT = Path("tutorial_output") MONTH, CURRENCY = "2026-10", "USD" OUT.mkdir(exist_ok=True) COLUMNS = { "IOS App ID": "app_id", "App Name": "app_name", "Developer Name": "developer", "Region": "region", "Store Type": "store", "Estimated downloads for the previous calendar month": "downloads_est", "Estimated revenue for the previous calendar month": "revenue_est", } # Reviewed for this example. This is not a complete list of calorie apps. REVIEWED = { "341232718": "MyFitnessPal", "6480417616": "Cal AI", "1145935738": "Cronometer", "287529757": "MyNetDiary", "6447434453": "Calo", "1064020872": "Foodvisor", "297368629": "Lose It!", "347184248": "fatsecret", "1448277011": "Fitia", "286906691": "Lifesum", "1011095795": "Fitatu", "946099227": "Yazio", } raw = pd.read_csv( INPUT, dtype="string", encoding="utf-8-sig", keep_default_na=False, ) missing_columns = set(COLUMNS) - set(raw.columns) if missing_columns: raise ValueError(f"Missing columns: {sorted(missing_columns)}") for column, expected in (("reporting_month", MONTH), ("currency", CURRENCY)): if column in raw and not raw[column].str.strip().eq(expected).all(): raise ValueError(f"Check {column}: expected {expected}") df = raw[list(COLUMNS)].rename(columns=COLUMNS).copy() for column in ("app_id", "app_name", "region", "store"): df[column] = df[column].str.strip() if df[column].eq("").any(): raise ValueError(f"Blank {column}") if not df["app_id"].str.fullmatch(r"\d+").all(): raise ValueError("Invalid app ID") if df["app_id"].duplicated().any(): raise ValueError("Repeated app IDs: inspect before removing anything") if not df["region"].eq("US").all() or not df["store"].eq("App Store").all(): raise ValueError("Expected US App Store rows only") for column in ("downloads_est", "revenue_est"): text = df[column].str.strip() values = pd.to_numeric(text.replace("", pd.NA), errors="coerce") if (text.ne("") & values.isna()).any(): raise ValueError(f"Unrecognized numeric value in {column}") if ( any(not math.isfinite(float(x)) for x in values.dropna()) or values.dropna().lt(0).any() ): raise ValueError(f"Invalid negative or non-finite value in {column}") df[column] = values pattern = r"calorie|myfitnesspal|lose it|cronometer|foodvisor" candidates = df.loc[ df["app_name"].str.contains(pattern, case=False, na=False) ].copy() absent = set(REVIEWED) - set(candidates["app_id"]) if absent: raise ValueError(f"Reviewed IDs missing: {sorted(absent)}") candidates["review_status"] = candidates["app_id"].map( lambda app_id: "included" if app_id in REVIEWED else "not_reviewed" ) candidates.to_csv(OUT / "candidate_selection.csv", index=False) sample = candidates.loc[candidates["review_status"].eq("included")].copy() sample["reporting_month"], sample["currency"] = MONTH, CURRENCY sample["downloads_rank"] = ( sample["downloads_est"] .rank(method="min", ascending=False) .astype("Int64") ) sample["revenue_rank"] = ( sample["revenue_est"] .rank(method="min", ascending=False) .astype("Int64") ) sample = sample.sort_values( ["downloads_est", "app_id"], ascending=[False, True], ) sample.to_csv(OUT / "competitor_report.csv", index=False) # Keep zeros and missing values in the CSV. They cannot go on log axes. plot_mask = sample[["downloads_est", "revenue_est"]].notna().all(axis=1) plot_mask &= sample["downloads_est"].gt(0) & sample["revenue_est"].gt(0) omitted = sample.loc[~plot_mask].copy() omitted["reason"] = "Missing or nonpositive value; retained in report" omitted.to_csv(OUT / "plot_omissions.csv", index=False) points = sample.loc[plot_mask] if points.empty: raise ValueError("No positive complete pairs for the log plot") fig, ax = plt.subplots(figsize=(11, 7)) ax.scatter( points["downloads_est"], points["revenue_est"], s=55, color="#2875C7", ) ax.set_xscale("log") ax.set_yscale("log") ax.set_xlabel("Estimated monthly downloads (log scale)") ax.set_ylabel("Estimated monthly store revenue (USD, log scale)") ax.set_title(f"Calorie-tracking app sample | US App Store | {MONTH}") ax.grid(alpha=0.2) ax.margins(x=0.25, y=0.25) offsets = { "MyFitnessPal": (-10, 10), "Cal AI": (10, 10), "Cronometer": (10, -18), "MyNetDiary": (-10, 10), "Calo": (10, 14), "Foodvisor": (10, -17), "Lose It!": (-10, 10), "fatsecret": (10, -3), "Fitia": (10, -9), "Lifesum": (10, 10), "Fitatu": (-10, -13), "Yazio": (-10, 8), } for row in points.itertuples(): label = REVIEWED[row.app_id] dx, dy = offsets[label] ax.annotate( label, (row.downloads_est, row.revenue_est), xytext=(dx, dy), textcoords="offset points", ha="right" if dx < 0 else "left", fontsize=9, ) fig.text( 0.1, 0.02, "Source: Appark estimates. Selected sample; not a market ranking.", fontsize=9, ) fig.tight_layout(rect=(0, 0.05, 1, 1)) fig.savefig(OUT / "downloads_vs_revenue.png", dpi=180) plt.close(fig) print( f"Input: {len(df)} | Candidates: {len(candidates)} " f"| Sample: {len(sample)}" ) print( f"Plotted: {len(points)} " f"| Omitted from log plot: {len(omitted)}" ) Then run:
python compare_apps.py With the 12-row CSV above, the output is:
Input: 12 | Candidates: 12 | Sample: 12 Plotted: 12 | Omitted from log plot: 0 The tutorial_output folder contains:
| File | Purpose |
|---|---|
candidate_selection.csv | Records which name matches were included or left unreviewed |
competitor_report.csv | Preserves the selected rows and their two within-sample ranks |
downloads_vs_revenue.png | Plots complete, positive download/revenue pairs |
plot_omissions.csv | Records any selected rows that cannot be shown on log axes |
There are no network calls in the script. Once the CSV is saved, the analysis runs locally.
Read the table before reading a story into it
Here is the selected sample, ordered by estimated downloads. Short names are used for readability; the CSV output preserves the exported names and IDs.
| App | Estimated downloads | Estimated store revenue (USD) | Downloads rank in sample | Revenue rank in sample |
|---|---|---|---|---|
| MyFitnessPal | 176,439 | $6,345,553 | 1 | 1 |
| Cal AI | 111,892 | $1,054,783 | 2 | 2 |
| Cronometer | 95,466 | $654,347 | 3 | 4 |
| MyNetDiary | 43,290 | $674,490 | 4 | 3 |
| Calo | 25,064 | $229,546 | 5 | 6 |
| Foodvisor | 23,117 | $194,513 | 6 | 7 |
| Lose It! | 21,343 | $529,901 | 7 | 5 |
| fatsecret | 10,862 | $16,860 | 8 | 12 |
| Fitia | 4,285 | $19,945 | 9 | 11 |
| Lifesum | 3,973 | $128,765 | 10 | 8 |
| Fitatu | 2,646 | $21,785 | 11 | 10 |
| Yazio | 2,468 | $88,644 | 12 | 9 |
The middle of the table is more interesting than the first row.
Lose It! moves from seventh by downloads to fifth by store revenue within this sample. The export estimates 21,343 downloads and $529,901 in store revenue, compared with Calo's 25,064 downloads and $229,546. A download-only sort would put Calo first. The revenue sort gives me a reason to inspect how both products charge and retain paying users.
It doesn't tell me which product has a better paywall. There is no paywall experiment, active-user count, or conversion funnel in this CSV.
Lifesum and fatsecret also change places. Lifesum has an estimated 3,973 downloads and $128,765 in store revenue. Fatsecret has 10,862 downloads and $16,860. The different order is visible without inventing an overall opportunity score.
Those are estimates for one country, store, and month. I would check additional periods before treating either pattern as persistent.
MyNetDiary and Cronometer are another useful reminder about precision. Their estimated revenues in this snapshot are $674,490 and $654,347. The script assigns different ranks, but a small gap between model estimates does not establish a meaningful lead. The file contains no uncertainty intervals.
Why the chart uses two log axes
The selected download values range from 2,468 to 176,439. Estimated revenue ranges from $16,860 to $6,345,553. On linear axes, the smaller apps collect near the bottom-left corner.
The generated scatter plot uses logarithmic axes so the remaining points are readable. Equal distances on a log axis represent equal ratios. The axis labels say that explicitly.
All 12 selected apps have positive values in this snapshot. For another file, a missing value or zero cannot appear on a standard log axis. The script keeps that row in the report and records its omission from the chart. It does not substitute a tiny positive number just to make the point appear.
The chart is useful for locating differences. I haven't divided it into "winning" and "losing" quadrants, because those labels would require information the file doesn't contain.
Use the report to decide what to check next
I would start the next pass with the apps whose positions change between the two sorts. I'd review their pricing, purchase options, and product positioning, then compare the same IDs over additional months.
I would also expand the discovery step beyond product names. A nutrition tracker can be relevant without containing any of my keywords. The reviewed ID list should be versioned as the research question changes.
Two tempting calculations deserve care. Revenue divided by downloads for the same month is not the value of that month's newly acquired users: subscription renewals can come from people who installed much earlier. And an app's share of these 12 rows is a share of this selected sample, not a market share estimate.
The code leaves me with a clear selection, a repeatable comparison, and a short list of questions for the next investigation. That is enough for this pass.
AI assistance: AI tools helped draft this tutorial and prepare the code. The scripts were executed against the supplied CSV, and the reported figures were checked against the export.


