Portfolio / Weekly operations reporter

  • Python
  • pandas
  • Excel output

Weekly operations reporter

One button turns the week’s transactions into the report everyone asks for: sales, profit, transportation costs, recovered costs and clients worked, by location, with every customer’s last five weeks side by side. A second tab merges two notes sheets into one history.

Pick a week and press Run. I’ll build Monday’s report before your coffee is ready.

A real-life example

Meet Rachel, the operations manager for a company with three locations.

Every Monday she exports last week’s transactions, sorts them by location, works out transportation and recovered costs, and builds a summary for leadership. Then she copies each customer’s numbers next to the four weeks before so everyone can see the trend. On top of that, the ops team and the sales team each keep their own notes sheet, and somebody has to merge them.

Example scenario: the people and businesses on this page are made up.

Before

  • Monday morning spent rebuilding the same weekly summary
  • Each customer’s last 4 weeks copied over by hand for the trend
  • Transportation and recovered costs worked out separately
  • Two notes sheets with different columns, merged by hand

After

  • The weekly summary built with one click
  • Every customer’s 5-week trend, by location, automatically
  • A heads-up when a client stops ordering
  • One notes history that grows every week, with no duplicates

Try it yourself

Weekly Ops Reporter · Python app Sample data

A browser simulation with sample locations, customers and transactions. The real app is written in Python and writes the summary straight into Excel.

What it’s worth

What this could be worth to you

Monday’s report builds itself, and a 5-week trend shows a slipping account while you can still save it.

Example numbers to start you off. Move the sliders to match your business. These are estimates, not a guarantee or financial advice; your results depend on your situation.

Hours back per year
Value of that time
Caught or recovered per year
Total value per year
Pays for itself in
3-year value, after the cost

The problem

The weekly summary takes hours because the transactions have to be sorted by location, costs split out, and each customer’s recent weeks copied together to show a trend. Notes from two teams live in two differently formatted sheets.

The solution

A Python app that reads the transaction export, groups it by location and customer, calculates sales, profit, transportation and recovered costs, and lines up the current week with the four before it. A second tab standardizes both notes sheets and appends them to one history table, skipping duplicates.

How it's built

  1. ReadLoad the week’s transaction export.
  2. GroupBy location, customer and week.
  3. CalculateSales, profit, transportation, recovered costs, clients worked.
  4. TrendPut each customer’s current week next to the 4 before it.
  5. WriteSummary, location and customer sheets, plus the notes history.

The 5-week customer trend in pandas:

weeks = sorted(tx["week"].unique())[-5:]
recent = tx[tx["week"].isin(weeks)]

trend = (recent.pivot_table(index=["location", "customer"], columns="week",
                            values="gross_sales", aggfunc="sum", fill_value=0)
               .reindex(columns=weeks))
trend["vs_4wk_avg"] = trend[weeks[-1]] / trend[weeks[:-1]].mean(axis=1) - 1

with pd.ExcelWriter("Weekly_Summary.xlsx") as xl:
    summary.to_excel(xl, "Summary")
    trend.to_excel(xl, "Customers")

What it makes possible

  • Monday mornings back
  • Trends for every customer, so you spot a slipping account early
  • One notes history everyone can search

Skills shown

  • Python
  • pandas
  • Excel automation
  • Reporting
  • Data merging
Want this for your business?

Want your weekly report on autopilot?

Tell me what the report looks like today, and I’ll automate it.

Starting prices are for smaller projects. Bigger or more complex jobs are priced by scope: how much there is and how long it takes.