The Mistake: Hidden Patterns Your Manual Eyes Can't Spot
Last week, our team stared at 2,000 order records piled up in a Google Sheet and wondered, "Why does shipping delay always happen for orders placed between 3~5 PM?" Using spreadsheet filters and sorting made it hard to identify the exact pattern. We had plenty of data, but human eyes simply couldn't process it fast enough.
Automating Time-Based Analysis with Claude Code
Step 1: Confirm Data Structure
First, we organized the structure of order data in the Google Sheet.
Order ID | Order Time | Delivery Complete | Shipping Region | Delayed
001 | 2024-01-15 15:30 | 2024-01-16 09:00 | Seoul | Yes
002 | 2024-01-15 16:45 | 2024-01-17 11:00 | Busan | Yes
003 | 2024-01-15 10:20 | 2024-01-15 18:30 | Seoul | No
Step 2: Write Claude Code Prompt
We opened Claude Code on our Windows device and gave these instructions.
Please read the Google Sheet CSV file (orders_2024.csv).
Extract the hour slot (0~23) from the order time,
and calculate the average shipping delay time (in hours) for each hour.
Save the results to time_delay_analysis.json.
Step 3: Run Code and Discover the Pattern
After running the script generated by Claude Code, we got these results.
{
"hourly_analysis": [
{"hour": 15, "avg_delay_hours": 28.5, "order_count": 145},
{"hour": 16, "avg_delay_hours": 26.3, "order_count": 152},
{"hour": 17, "avg_delay_hours": 24.8, "order_count": 138},
{"hour": 10, "avg_delay_hours": 4.2, "order_count": 180},
{"hour": 11, "avg_delay_hours": 3.8, "order_count": 172}
]
}
Surprisingly, afternoon orders (3~5 PM) had 20+ hours longer delays on average compared to morning orders.
Step 4: Find the Root Cause and Take Action
When we discussed this data with the actual shipping team, we discovered that orders after 3 PM roll over to the next day's pickup system. This was a structural difference in the system that manual work would easily miss.
Step 5: Set Up Automated Repetition
We now registered a Python script in the Windows Task Scheduler to automatically run this analysis every Monday morning.
import schedule
import time
def run_analysis():
# Call the analysis function generated by Claude Code
analyze_orders_by_hour()
print("Analysis complete: Hourly shipping delay pattern updated")
schedule.every().monday.at("08:00").do(run_analysis)
while True:
schedule.run_pending()
time.sleep(60)
Key Takeaways
1. **The larger the dataset, the more hidden patterns exist.** Manual work can never uncover them.
2. **Data structure definition is crucial before Claude Code analysis.** Proper CSV or JSON format is essential.
3. **What happens after discovery is most critical.** Finding the pattern must connect to real business problem-solving to have true value.
Non-developer teams can also follow these 5 steps and discover their own hidden data patterns.