Every notebook in this project reads its configuration from two sources: aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Gema-Villanueva/proyecto-eda-roles-datos/llms.txt
Use this file to discover all available pages before exploring further.
.env file for secrets (API credentials), and a set of pathlib.Path constants defined at the top of each notebook for filesystem navigation. Understanding these two layers makes it straightforward to adapt the project to a different machine, a shared server, or a different working directory.
Environment file (.env)
The project uses python-dotenv to load secrets from a .env file in the project root. The repository ships with .env.example as a committed template — copy it to .env and fill in your real values before running notebook 01.
Notebooks 02, 03, 04, and 05 do not read any environment variables. They work entirely with pre-existing CSV files in
data/clean/ and data/raw/. Only notebook 01 (01_data_collection.ipynb) requires Adzuna credentials to be present in .env.Variables
Your Adzuna application ID. Obtain this by registering a free developer account at developer.adzuna.com. Used exclusively by notebook 01 to authenticate paginated API requests.
Your Adzuna application key (API secret). Retrieved from the same developer dashboard as
ADZUNA_APP_ID. Sent as a query parameter on every Adzuna API call..env.example template
The committed example file shows the expected format:
Loading variables in notebook 01
Notebook 01 loads the.env file using the standard python-dotenv pattern:
load_dotenv() reads the .env file from the current working directory (or any parent directory) and injects each key-value pair into os.environ. The variables are then available via os.getenv() for the remainder of the kernel session.
Path constants
All five notebooks define the same set ofpathlib.Path constants in their first cell. This pattern resolves the project root regardless of whether the notebook is opened from within the notebooks/ subdirectory or from the project root directly.
How the root resolution works
| Condition | Path.cwd() | PROJECT_ROOT resolves to |
|---|---|---|
Notebook opened from notebooks/ | .../proyecto-eda-roles-datos/notebooks | .../proyecto-eda-roles-datos |
| Notebook opened from project root | .../proyecto-eda-roles-datos | .../proyecto-eda-roles-datos |
| Constant | Resolved path |
|---|---|
PROJECT_ROOT | proyecto-eda-roles-datos/ |
DATA_RAW | proyecto-eda-roles-datos/data/raw/ |
DATA_CLEAN | proyecto-eda-roles-datos/data/clean/ |
Extended path constants
Some notebooks define additional constants for EDA outputs and images:These directories are created automatically by the notebooks if they do not exist. No manual
mkdir is required.Notebook-level configuration
Beyond environment variables and paths, each notebook sets a few display and styling options in its setup cell. These are not stored in.env — they are hardcoded constants at the top of each notebook.
pandas display options
seaborn theme
matplotlib defaults
Plotly renderer
fig.write_image() — no additional renderer configuration is needed.
Security checklist
.env is gitignored
Confirm
.gitignore includes .env before pushing to a public repository. The file is excluded by default, but verify after any .gitignore edits.No hardcoded secrets
API credentials must never appear in notebook cells or script files. Always load them via
os.getenv() after calling load_dotenv().Use separate keys per environment
If you deploy this project on a shared server or CI pipeline, create a separate Adzuna API key for that environment and rotate keys regularly.
Rotate compromised keys immediately
If a key is accidentally committed, revoke it immediately in the Adzuna developer dashboard and generate a new one.