|
31 | 31 | "from datetime import datetime as dt\n", |
32 | 32 | "\n", |
33 | 33 | "sys.path.insert(0, os.path.dirname(os.getcwd()))\n", |
34 | | - "from lcoe_calculator.full_scrape import FullScrape\n", |
| 34 | + "from lcoe_calculator.process_all import ProcessAll\n", |
35 | 35 | "from lcoe_calculator.tech_processors import (ALL_TECHS,\n", |
36 | 36 | " OffShoreWindProc, LandBasedWindProc, DistributedWindProc,\n", |
37 | 37 | " UtilityPvProc, CommPvProc, ResPvProc, UtilityPvPlusBatteryProc,\n", |
|
79 | 79 | "# Or process a single technology\n", |
80 | 80 | "techs = LandBasedWindProc\n", |
81 | 81 | "\n", |
82 | | - "# Initiate the scraper with the workbook location and desired technologies\n", |
83 | | - "scraper = FullScrape(atb_electricity_workbook, techs)" |
| 82 | + "# Initiate the processor with the workbook location and desired technologies\n", |
| 83 | + "processor = ProcessAll(atb_electricity_workbook, techs)" |
84 | 84 | ] |
85 | 85 | }, |
86 | 86 | { |
|
90 | 90 | "metadata": {}, |
91 | 91 | "source": [ |
92 | 92 | "## Run the pipeline\n", |
93 | | - "Now that the scraper knows where the data workbook is and which technologies were interested in we can kick it off. Depending on the number of requested technologies, this can take a couple minutes. Note that calculated LCOE and CAPEX is automatically compared to the values in the workbook. Not all technologies have LCOE and CAPEX." |
| 93 | + "Now that the processor knows where the data workbook is and which technologies we are interested in, we\n", |
| 94 | + "can kick it off. Depending on the number of requested technologies, this can take a couple minutes.\n", |
| 95 | + "Note that calculated LCOE and CAPEX is automatically compared to the values in the workbook. Not all\n", |
| 96 | + "technologies have LCOE and CAPEX." |
94 | 97 | ] |
95 | 98 | }, |
96 | 99 | { |
|
103 | 106 | "outputs": [], |
104 | 107 | "source": [ |
105 | 108 | "start = dt.now()\n", |
106 | | - "scraper.scrape()\n", |
| 109 | + "processor.process()\n", |
107 | 110 | "print('Processing completed in ', dt.now() - start)" |
108 | 111 | ] |
109 | 112 | }, |
|
124 | 127 | "outputs": [], |
125 | 128 | "source": [ |
126 | 129 | "# Save data to as a CSV\n", |
127 | | - "scraper.to_csv('atb_data.csv')\n", |
| 130 | + "processor.to_csv('atb_data.csv')\n", |
128 | 131 | "\n", |
129 | 132 | "# Save flattened data to as a CSV\n", |
130 | | - "scraper.flat_to_csv('atb_data_flat.csv')\n", |
| 133 | + "processor.flat_to_csv('atb_data_flat.csv')\n", |
131 | 134 | "\n", |
132 | 135 | "# Save meta data to as a CSV\n", |
133 | | - "scraper.meta_data_to_csv('atb_meta_data.csv')\n", |
| 136 | + "processor.meta_data_to_csv('atb_meta_data.csv')\n", |
134 | 137 | "\n", |
135 | 138 | "# Copy data to the clipboard so it can be pasted in a spreadsheet \n", |
136 | | - "scraper.data.to_clipboard()" |
| 139 | + "processor.data.to_clipboard()" |
137 | 140 | ] |
138 | 141 | }, |
139 | 142 | { |
|
152 | 155 | "metadata": {}, |
153 | 156 | "outputs": [], |
154 | 157 | "source": [ |
155 | | - "data = scraper.data\n", |
| 158 | + "data = processor.data\n", |
156 | 159 | "\n", |
157 | 160 | "# Show available parameters\n", |
158 | 161 | "print('Available parameters')\n", |
|
184 | 187 | "name": "python", |
185 | 188 | "nbconvert_exporter": "python", |
186 | 189 | "pygments_lexer": "ipython3", |
187 | | - "version": "3.11.4" |
| 190 | + "version": "3.10.12" |
188 | 191 | }, |
189 | 192 | "vscode": { |
190 | 193 | "interpreter": { |
|
0 commit comments