|
16 | 16 | import pvlib
|
17 | 17 | import time
|
18 | 18 |
|
19 |
| -nsrdb_api_key = '4z5fRAXbGB3qldVVd3c6WH5CuhtY5mhgC2DyD952' |
20 |
| -nsrdb_user_email = "[email protected]" |
21 |
| - |
22 | 19 | def pull_power_data(system_id, grouping, timezone):
|
23 | 20 | """
|
24 | 21 | Pull the AC power data associated with the site.
|
@@ -54,34 +51,6 @@ def pull_power_data(system_id, grouping, timezone):
|
54 | 51 | pv_dataframe = pd.DataFrame()
|
55 | 52 | return pv_dataframe
|
56 | 53 |
|
57 |
| -def pull_nsrdb_data(time_series, system_id, grouping): |
58 |
| - """ |
59 |
| - Pull the NSRDB data for a particular system. |
60 |
| - """ |
61 |
| - # Get the time frequency of the time series |
62 |
| - time_series.index = pd.to_datetime(time_series.index) |
63 |
| - freq_minutes = mode( |
64 |
| - time_series.index.to_series().diff( |
65 |
| - ).dt.seconds / 60) |
66 |
| - data_freq = str(freq_minutes) + "min" |
67 |
| - psm3s = [] |
68 |
| - years = list(time_series.index.year.drop_duplicates()) |
69 |
| - years = [int(x) for x in years if x <= 2020] |
70 |
| - for year in years: |
71 |
| - psm3 = pd.read_csv("C:/tmp/PVFleetDataInitiative/Results/" + grouping |
72 |
| - + "/nsrdb/" + str(system_id) + "_"+ str(year) + ".csv", |
73 |
| - index_col=0, parse_dates=True) |
74 |
| - psm3s.append(psm3) |
75 |
| - if len(psm3s) > 0: |
76 |
| - psm3 = pd.concat(psm3s) |
77 |
| - psm3 = psm3.groupby(psm3.index).first() |
78 |
| - psm3 = psm3.reindex(pd.date_range(psm3.index[0], |
79 |
| - psm3.index[-1], |
80 |
| - freq=data_freq)).interpolate() |
81 |
| - psm3.index = psm3.index.tz_convert(time_series.index.tz) |
82 |
| - psm3 = psm3.reindex(time_series.index).interpolate() |
83 |
| - return psm3 |
84 |
| - |
85 | 54 | def pvanalytics_mount_check(estimated_az, estimated_tilt, estimated_mount,
|
86 | 55 | gt_az, gt_tilt, gt_mount, system_id,
|
87 | 56 | az_diff_degrees_max = 15,
|
|
0 commit comments