We are trying to measure our annual workload, across our clients. The input file lists events that occur seasonally for each client. Each client + season + event_type combination has certain tasks associated with them, and those tasks queue off of the events to start and end. So, for instance, we might build invoices (we'll call it 'task_1') starting 14 days after event type_A occurs at a client, and ending 3 days before the next event_type_B at the same client. Each task has specific rules for which event_types they queue off of (see: "Task Rules" below). This is what I want to know: On a given day of the year, how many clients are we performing task_1 for? How many clients are we performing task_2 for that same day? etc.
* IMPORTANT: Please optimize your code for readability, rather than efficiency--I don't care how slowly it runs; I need to be able to read it. I have some programming knowledge, but please err on the side of simplicity and modularity.
* I would prefer this in Python, maybe C#, but any common scripting language will do (if you can't do it in those).
Input: "DatesToBeProcessed [url removed, login to view]"
* This is the exact format of the input file, with one exception: I nulled the client names.
* Iterate through the dates in range (make range all of 2011)
* Apply the rules below to sum how many clients for which we're performing each task on a given date in range.
* Allow for updating or adding task rules.
* Do not count events for clients with #N/A in the team column towards any task's sum.
Output: "sample [url removed, login to view]"
* This file is an example of the output I'm looking for, with random output for sums of clients under each task.
I can handle the specific rules, as long as you can give me a way to handle something like this example:
Example: We are performing task_2 for a given client if today is between 14 days after event_type_a of a season with major_status of 1 (Boolean), and 7 days before event_type_b of the next season with major_status of 1.
I guess, looking at this, you'll first need to iterate through the input file and get a (list? array? dictionary? I don't know the right term) of seasons, each with an array of events...