This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
# People (first name, birth year) | |
people = [ | |
("Neil", 1945), | |
("Paul", 1956), | |
("Angus", 1955), | |
("Sean", 1959), | |
("Esme", 1949), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Simple script to plot actual solar generation observations with projection lines. | |
""" | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
from pathlib import Path | |
def plot_actual_solar_with_projections(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import matplotlib.pyplot as plt | |
from matplotlib.patches import Patch | |
import datetime | |
# data from https://www.bls.gov/news.release/empsit.nr0.htm | |
excel_file = '/content/cesvin00.xlsx' | |
df_data = pd.read_excel(excel_file, sheet_name='Data', header=2) | |
# Reference‐months |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1) find every record‐breaking year ≥ 1980 | |
post80 = ts.where(ts.index >= 1980) | |
current_max = -np.inf | |
record_years = [] | |
record_values = [] | |
for yr, val in post80.items(): | |
if np.isnan(val): | |
continue | |
if val >= current_max: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Google API Key (required) | |
GOOGLE_API_KEY= | |
# Couchbase Capella Configuration (required) | |
COUCHBASE_CONN_STR=couchbases://cb.... | |
COUCHBASE_USERNAME=... | |
COUCHBASE_PASSWORD=... | |
COUCHBASE_BUCKET=travel-sample |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder