Skip to content

Commit

Permalink
Changed the timestamp calls for the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kperrynrel committed Feb 8, 2024
1 parent bc8ef28 commit 56c5f5c
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/examples/clipping/clipping.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
data['label'] = data['label'].astype(bool)
# This is the known frequency of the time series. You may need to infer
# the frequency or set the frequency with your AC power time series.
freq = "15T"
freq = "15min"

data['value_normalized'].plot()
data.loc[data['label'], 'value_normalized'].plot(ls='', marker='o')
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/day-night-masking/day-night-masking.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# This is the known frequency of the time series. You may need to infer
# the frequency or set the frequency with your AC power time series.
freq = "1T"
freq = "1min"
# These are the latitude-longitude coordinates associated with the
# SERF East system.
latitude = 39.742
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/gaps/data-completeness.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
pvanalytics_dir = pathlib.Path(pvanalytics.__file__).parent
file = pvanalytics_dir / 'data' / 'ac_power_inv_2173.csv'
data = pd.read_csv(file, index_col=0, parse_dates=True)
data = data.asfreq("15T")
data = data.asfreq("15min")

# %%
# Now, we use :py:func:`pvanalytics.quality.gaps.completeness_score` to get the
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/gaps/stale-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
pvanalytics_dir = pathlib.Path(pvanalytics.__file__).parent
file = pvanalytics_dir / 'data' / 'ac_power_inv_2173_stale_data.csv'
data = pd.read_csv(file, index_col=0, parse_dates=True)
data = data.asfreq("15T")
data = data.asfreq("15min")
data['value_normalized'].plot()
data.loc[data["stale_data_mask"], "value_normalized"].plot(ls='', marker='.')
plt.legend(labels=["AC Power", "Inserted Stale Data"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
pvanalytics_dir = pathlib.Path(pvanalytics.__file__).parent
rmis_file = pvanalytics_dir / 'data' / 'irradiance_RMIS_NREL.csv'
data = pd.read_csv(rmis_file, index_col=0, parse_dates=True)
freq = '5T'
freq = '5min'
# Make the datetime index tz-aware.
data.index = data.index.tz_localize("Etc/GMT+7")

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/metrics/variability-index.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
# an hourly frequency.
variability_index_series = variability_index(data['irradiance_ghi__7981'],
clearsky['ghi'],
freq='1H')
freq='1h')

# %%
# Plot the calculated VI against the underlying GHI measurements, for the
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/system/infer-orientation-fit-pvwatts.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
data = pd.read_csv(ac_power_file, index_col=0, parse_dates=True)
data = data.sort_index()
time_series = data['ac_power']
time_series = time_series.asfreq('15T')
time_series = time_series.asfreq('15min')

# Plot the first few days of the time series to visualize it
time_series[:pd.to_datetime("2016-07-06 00:00:00-07:00")].plot()
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/system/system-tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
data = pd.read_csv(ac_power_file, index_col=0, parse_dates=True)
data = data.sort_index()
time_series = data['ac_power']
time_series = time_series.asfreq('15T')
time_series = time_series.asfreq('15min')

# Plot the first few days of the time series to visualize it
time_series[:pd.to_datetime("2016-07-06 00:00:00-07:00")].plot()
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/weather/module-temperature-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
# We mask the irradiance time series into day-night periods, and remove
# any nighttime data to clean up the future regression.
predicted_day_night_mask = power_or_irradiance(
series=data['poa_irradiance__771'], freq='15T')
series=data['poa_irradiance__771'], freq='15min')
# Filter out nighttime periods
data = data[predicted_day_night_mask]

Expand Down

0 comments on commit 56c5f5c

Please sign in to comment.