archives subcommand provides operations for listing, downloading, and parsing ESIOS archive files (such as I90DIA reports).
Commands
list
List all available ESIOS archives.--token, -t TEXT— ESIOS API key (overrides config/env)--format, -f TEXT— Output format:table,csv,json(default:table)
download
Download archive files for a specific date or date range.ARCHIVE_ID— Archive ID (required)
--date, -d TEXT— Single date inYYYY-MM-DDformat--start, -s TEXT— Start date inYYYY-MM-DDformat (requires--end)--end, -e TEXT— End date inYYYY-MM-DDformat (requires--start)--output, -o TEXT— Output directory (default: current directory.)--token, -t TEXT— ESIOS API key
--date or both --start and --end.
Examples:
sheets
List available sheets (table of contents) in an archive file. This is useful for discovering what data is available before parsing.ARCHIVE_ID— Archive ID (e.g., 34 for I90DIA)
--date, -d TEXT— Single date inYYYY-MM-DDformat--start, -s TEXT— Start date (requires--end)--end, -e TEXT— End date (requires--start)--token, -t TEXT— ESIOS API key
--date or both --start and --end. The command downloads and parses the first file to show available sheets.
Examples:
exec
Download archive files, parse a specific sheet, and evaluate a Python expression on the data. This provides powerful data extraction and analysis capabilities for archive files.ARCHIVE_ID— Archive ID (e.g., 34 for I90DIA)
--sheet TEXT— Sheet name to extract (e.g.,I90DIA03,I90DIA26) (required)--date, -d TEXT— Single date inYYYY-MM-DDformat--start, -s TEXT— Start date (requires--end)--end, -e TEXT— End date (requires--start)--expr, -x TEXT— Python expression to evaluate (default:"df")--token, -t TEXT— ESIOS API key--format, -f TEXT— Output format:table,csv,json(default:table)--output, -o TEXT— Output file path
--date or both --start and --end.
Available Variables:
In the expression context, you have access to:
df— pandas DataFrame with the parsed sheet datapd— pandas modulenp— numpy module
- Downloads archive files for the specified date range (cached)
- Parses the requested sheet from each file using
I90Book - Concatenates DataFrames from all files
- Evaluates the Python expression on the combined data
- Outputs in the requested format
Archive Types
I90DIA (Archive ID: 34)
Daily I90 reports containing:- I90DIA03 — Curtailments (renewable energy curtailments by technology and direction)
- I90DIA26 — PBF (Base Forecast Program) generation program
- I90DIA45 — System adjustments
- And many more sheets…
esios archives sheets 34 --date YYYY-MM-DD to see all available sheets.
I90MEN (Archive ID: 35)
Monthly I90 reports with aggregated data.Common Workflows
Discover Available Data
Analyze Curtailments
Export for Further Analysis
Time-Based Analysis
Performance and Caching
Archive files are automatically cached after the first download:Error Handling
Sheet Not Found
If you specify an invalid sheet name, the command shows available sheets:Date Range Validation
Both--date or --start+--end are required:
See Also
- Indicators — Work with indicator data
- Cache — Manage cached files
- Catalog — Browse offline archive metadata
