nrel_p3.workday_report.Report
- class Report(fp_xlsx)[source]
Bases:
object
Interface for workday task number reports
- To export report from workday, search the following:
“Task Number Report for Task Managers - Not Grouped”
Then enter a conservative start date and end date, enter your charge code of interest, and then press OK. In the top right you should see an option to expor the result to Excel.
To automatically create a report on a preset schedule, navigate the following flow:
Workday -> Menu -> Reports -> Tools -> Schedule a Report -> By Report Type -> Custom Reports -> Task Number Report for Task Managers - Not Grouped
Then select Run Frequency = “Weekly Recurrence”, do not check “Populate Default Prompt Values”, then press OK.
Finally, fill out the Report Criteria, Schedule, and Output to fit your preferences and press OK.
- Parameters:
fp_xlsx (str) – Filepath to NREL workday export from the following report: “Task Number Report for Task Managers - Not Grouped”. Can also be a list of these reports or a string with a wild*card for multiple reports (one for each charge code)
Methods
actuals
([filters])Run the calculation of actual charges through time
add_rates
(rates)Workday tables only have hours charged by default.
charge_code_regex
(text)Get the charge code "12765.07.01.01" from text if the charge code is in the format: "- > 12765 - 07.01.01-Topic 5.1 Downscalin (Starts: ..)"
Attributes
REQ_COL
worker_name}
Get a list of SLR names that are missing their rates (cost per hour).
employee_id}
- static charge_code_regex(text)[source]
Get the charge code “12765.07.01.01” from text if the charge code is in the format: “- > 12765 - 07.01.01-Topic 5.1 Downscalin (Starts: ..)”
- Returns:
out (str | None) – Charge code string or None if not found
- property worker_map
employee_id}
- Type:
Get a dictionary mapping {worker_name
- property eid_map
worker_name}
- Type:
Get a dictionary mapping {employee_id
- add_rates(rates)[source]
Workday tables only have hours charged by default. Take in a rates table from the pricing tool to calculate actual costs.
- Parameters:
rates (dict | pd.Series) – Input labor rates here either from nrel_p3.pricing_tool.Estimate.rates or with a custom dict, e.g., {‘NEW_SLR’: 100}
- property missing_rates
Get a list of SLR names that are missing their rates (cost per hour). Use
add_rates()
to add these rates to estimate labor costs.
- actuals(filters=None)[source]
Run the calculation of actual charges through time
- Parameters:
filters (dict | None) – Set of filters where keys are columns in the workday report file and values are one or more items to sub select in the column. For example,
filters={'charge_code': '12765.07.01.01', 'eid': '19864'}
will return data for a single charge code for a single person.- Returns:
actuals (pd.DataFrame) – An aggregated version of the workday actuals table with Year-Month index and columns: actual_cost, actual_cost_cumulative