How sarahishtar/embalses_automatico works
This repository automates weekly updates to three Datawrapper graphics from MITECO hydrological bulletins. The linea, cuencas, and embalses processes run independently; each obtains and processes its relevant bulletin data, validates it, then writes graphic data and historical records. Shared download, configuration, validation, and atomic-write behavior lives in procesos/comun.py. The README documents the scheduled/manual runs and published outputs; the workflow implementation itself is not mapped here.
Main entry points: embalses.py Reservoir map update · linea.py Line chart update · cuencas.py Basin map update · comun.py Shared download and I/O
Components 18
Update processes
- Line chart update
procesos/linea.py - Basin map update
procesos/cuencas.py - Reservoir map update
procesos/embalses.py
Shared runtime
- Shared download and I/O
procesos/comun.py
Published and historical data
- Rules and footnotes
config/config.json - Reservoir coordinates
referencias/embalses_coordenadas.csv - Line chart data
graficos/linea/datos.csv - Line chart metadata
graficos/linea/metadata.json - Basin map data
graficos/cuencas/datos.csv - Basin map metadata
graficos/cuencas/metadata.json - Reservoir map data
graficos/embalses/datos.csv - Reservoir map metadata
graficos/embalses/metadata.json - Line history
historicos/linea.csv - Basin history
historicos/cuencas.csv - Reservoir history
historicos/embalses.csv
External systems
- MITECO bulletin service
- Datawrapper
Other components
- Scheduled or manual run
Connections 24
- Scheduled or manual run → Line chart update: starts
README.md - Scheduled or manual run → Basin map update: starts
README.md - Scheduled or manual run → Reservoir map update: starts
README.md - Line chart update → Shared download and I/O: calls shared
procesos/linea.py - Basin map update → Shared download and I/O: calls shared
procesos/cuencas.py - Reservoir map update → Shared download and I/O: calls shared
procesos/embalses.py - Shared download and I/O → MITECO bulletin service: downloads PDFs
procesos/comun.py - Shared download and I/O → Rules and footnotes: loads rules
procesos/comun.py - Reservoir map update → Reservoir coordinates: joins coordinates
procesos/embalses.py - Line chart update → Line chart data: writes data
README.md - Line chart update → Line chart metadata: writes footnote
README.md - Line chart update → Line history: appends history
README.md - Basin map update → Basin map data: writes data
README.md - Basin map update → Basin map metadata: writes footnote
README.md - Basin map update → Basin history: records result
README.md - Reservoir map update → Reservoir map data: writes data
README.md - Reservoir map update → Reservoir map metadata: writes footnote
README.md - Reservoir map update → Reservoir history: records result
README.md - Datawrapper → Line chart data: reads published CSV
README.md - Datawrapper → Line chart metadata: reads footnote
README.md - Datawrapper → Basin map data: reads published CSV
README.md - Datawrapper → Basin map metadata: reads footnote
README.md - Datawrapper → Reservoir map data: reads published CSV
README.md - Datawrapper → Reservoir map metadata: reads footnote
README.md