diff --git a/docs/data_refresh_python/data_refresh_py.html b/docs/data_refresh_python/data_refresh_py.html index 953d14c5d8..f073741273 100644 --- a/docs/data_refresh_python/data_refresh_py.html +++ b/docs/data_refresh_python/data_refresh_py.html @@ -117,7 +117,7 @@

EIA API - Data Refrsh (Python Version)

Load libraries

-
+
import eia_api as api
 import eia_data 
 import pandas as pd
@@ -130,7 +130,7 @@ 

Load libraries

import great_tables as gt

API Settings:

-
+
raw_json = open("../metadata/series.json")
 meta_json = json.load(raw_json)
 series = pd.DataFrame(meta_json["series"])
@@ -148,7 +148,7 @@ 

Load libraries

meta_path = "../metadata/ciso_log_py.csv" data_path = "../csv/ciso_grid_py.csv"
-
+
# api_metadata = api.eia_metadata(api_key = eia_api_key, api_path = api_path)
 
 
@@ -156,55 +156,55 @@ 

Load libraries

# end = pd.to_datetime(api_metadata.meta["endPeriod"]) # print(end)
-
+
meta_obj = eia_data.get_metadata(api_key = eia_api_key, api_path = api_path, meta_path = meta_path, series = series)
 
 gt.GT(meta_obj.request_meta,)
-
+
@@ -225,7 +225,7 @@

Load libraries

PGAE 2024-08-26 07:00:00 2024-08-26 08:00:00 -2025-01-07 08:00:00 +2025-01-08 08:00:00 True @@ -233,7 +233,7 @@

Load libraries

SCE 2024-08-23 07:00:00 2024-08-23 08:00:00 -2025-01-07 08:00:00 +2025-01-08 08:00:00 True @@ -241,7 +241,7 @@

Load libraries

SDGE 2024-11-01 07:00:00 2024-11-01 08:00:00 -2025-01-07 08:00:00 +2025-01-08 08:00:00 True @@ -249,7 +249,7 @@

Load libraries

VEA 2024-11-01 07:00:00 2024-11-01 08:00:00 -2025-01-07 08:00:00 +2025-01-08 08:00:00 True @@ -260,7 +260,7 @@

Load libraries

-
+
m = meta_obj.request_meta
 index = meta_obj.last_index + 1
 data = None
@@ -324,53 +324,53 @@ 

Load libraries

{'parent': 'CISO', 'subba': 'VEA'}
-
+
gt.GT(meta_new,rowname_col = "index")
-
+
@@ -400,14 +400,14 @@

Load libraries

CISO PGAE -2025-01-08 00:26:00.154682+00:00 +2025-01-08 12:10:53.688882+00:00 2024-08-26 08:00:00 -2025-01-07 08:00:00 +2025-01-08 08:00:00 2024-08-26 08:00:00 -2025-01-07 08:00:00 +2025-01-08 08:00:00 True True -3217 +3241 54 refresh False @@ -418,14 +418,14 @@

Load libraries

CISO SCE -2025-01-08 00:26:01.799011+00:00 +2025-01-08 12:10:55.527862+00:00 2024-08-23 08:00:00 -2025-01-07 08:00:00 +2025-01-08 08:00:00 2024-08-23 08:00:00 -2025-01-07 08:00:00 +2025-01-08 08:00:00 True True -3289 +3313 63 refresh False @@ -436,14 +436,14 @@

Load libraries

CISO SDGE -2025-01-08 00:26:02.511470+00:00 +2025-01-08 12:10:56.369510+00:00 2024-11-01 08:00:00 -2025-01-07 08:00:00 +2025-01-08 08:00:00 2024-11-01 08:00:00 -2025-01-07 08:00:00 +2025-01-08 08:00:00 True True -1609 +1633 48 refresh False @@ -454,14 +454,14 @@

Load libraries

CISO VEA -2025-01-08 00:26:03.810728+00:00 +2025-01-08 12:10:57.143303+00:00 2024-11-01 08:00:00 -2025-01-07 08:00:00 +2025-01-08 08:00:00 2024-11-01 08:00:00 -2025-01-07 08:00:00 +2025-01-08 08:00:00 True True -1609 +1633 48 refresh False @@ -476,13 +476,13 @@

Load libraries

-
+
meta_updated = eia_data.append_metadata(meta_path = meta_path, meta = meta_new, save = True, init = False)

Plot the Series

We will use Plotly to visualize the series:

-
+
if data is not None:
     d = data.sort_values(by = ["subba", "period"])
     p = px.line(data, x="period", y="value", color="subba")
@@ -490,9 +490,9 @@ 

Plot the Series

else: print("No new data is available")
-
-
+
full_data = pd.read_csv(data_path)
 full_data.head()
 
@@ -525,9 +525,9 @@ 

Plot the Series

p = px.line(full_data, x="period", y="value", color="subba") p.show()
-