nrel_p3.pricing_tool.Estimate
- class Estimate(fp_csv)[source]
Bases:
object
Interface for pricing tool estimate
To export a file from the NREL pricing tool, go to an estimate in the pricing tool and click on the the three lines button in the top right of an estimate and select: “Download Detailed CSV Dump”
- Parameters:
fp_csv (str) – Filepath to NREL Pricing Tool CSV export. Extract this by clicking the three lines button in the top right of an estimate and select: “Download Detailed CSV Dump”
Methods
charge_code_regex
(text)Get the charge code "12765.07.01.01" from text if the charge code is in the format: "GMLC.12765.07.01.01"
get_employee_id
(text)Get the employee id from this format: "name, name (eid)"
plan
([filters])Extract a timeseries plan for the project.
remap_charge_codes
(map)If the pricing tool doesnt have charge codes in the effort names, use this function to add them.
Attributes
DROP_LINE_ITEMS
Get a employee cost-per-hour rates table where key is SLR category (e.g., TPRO1/LEAD2/MGMT1) and value is cost in $/hr
- static charge_code_regex(text)[source]
Get the charge code “12765.07.01.01” from text if the charge code is in the format: “GMLC.12765.07.01.01”
- Returns:
out (str | None) – Charge code string or None if not found
- static get_employee_id(text)[source]
Get the employee id from this format: “name, name (eid)”
- Returns:
out (str | None) – Employee ID in string format or None if not found
- remap_charge_codes(map)[source]
If the pricing tool doesnt have charge codes in the effort names, use this function to add them.
- Parameters:
map (dict) – Mapping of effort name (key) to charge code (value)
- plan(filters=None)[source]
Extract a timeseries plan for the project.
- Parameters:
filters (dict | None) – Set of filters where keys are columns in the estimate 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:
subdf (pd.DataFrame) – An aggregated version of the planning table with Year-Month index and columns: planned_cost, planned_cost_cumulative
- property rates
Get a employee cost-per-hour rates table where key is SLR category (e.g., TPRO1/LEAD2/MGMT1) and value is cost in $/hr
- Returns:
pd.Series