energy_data_retrieval.sources.pvdaq.client#

Bounded daily CSV reads from PVDAQ’s public, anonymous OEDI S3 archive.

energy_data_retrieval.sources.pvdaq.client.daily_url(system_id, day)[source]#

Return the provider’s partitioned daily CSV path (source calendar date).

Parameters:
  • system_id (int)

  • day (date)

Return type:

str

energy_data_retrieval.sources.pvdaq.client.parse_generation_csv(content, *, system_id, power_column, unit, source_timezone, maximum_rows=1000000)[source]#

Select one measured power channel, retaining every native CSV column.

Units and local-clock convention must be selected from the system/channel documentation. CSV exports do not contain these fields, and catalogue offset numbers are not guessed. Values are unchanged; no calibration is reapplied.

Parameters:
  • content (str | bytes)

  • system_id (int)

  • power_column (str)

  • unit (str)

  • source_timezone (str)

  • maximum_rows (int)

Return type:

DataFrame

class energy_data_retrieval.sources.pvdaq.client.PVDAQClient(http, maximum_requests=31, maximum_rows=1000000)[source]#

Bases: object

Download selected daily files, never an unbounded archive or bulk bucket.

Parameters:
  • http (HTTPClient)

  • maximum_requests (int)

  • maximum_rows (int)

http: HTTPClient#
maximum_requests: int#
maximum_rows: int#
system_metadata(system_id)[source]#

Read public system/site/module metadata with request provenance.

Parameters:

system_id (int)

Return type:

JSONResponse

metrics(system_id)[source]#

Read channel names, units, scaling and aggregation metadata for a system.

This is metadata, not generation. The provider’s current per-system metadata partition is a small Parquet file; the HTTP byte limit applies.

Parameters:

system_id (int)

Return type:

GenerationResult

generation(system_id, start, end, *, power_column, unit, source_timezone)[source]#

Fetch inclusive source dates with explicit channel/clock semantics.

Some catalogue date ranges contain gaps. Missing files raise the normal retrieval error rather than creating zeros or quietly returning a partial request. A new output path can preserve a later provider revision.

Parameters:
  • system_id (int)

  • start (date)

  • end (date)

  • power_column (str)

  • unit (str)

  • source_timezone (str)

Return type:

GenerationResult