DuckDB 1.1.3 · 2026-10-21 17:55:47 ## CREATE OR REPLACE MACRO wil_lo(x, n) AS CASE WHEN n=0 THEN NULL ELSE ((x/n + 1.96^2/(2*n)) - 1.96*sqrt((x/n)*( | Count | |---| _0.0 s_ ## CREATE OR REPLACE MACRO wil_hi(x, n) AS CASE WHEN n=0 THEN NULL ELSE ((x/n + 1.96^2/(2*n)) + 1.96*sqrt((x/n)*( | Count | |---| _0.0 s_ ## CREATE OR REPLACE TABLE fin AS SELECT *, coalesce(est365 IN ('E1','E2'), FALSE) AS pub_lo, (est365 IS NOT NULL | Count | |---| | 187358 | _0.3 s_ ## F1 U1 con publicidad por año: cota baja (E1+E2, aceptadas) y alta (todas); IC de Wilson 95 % | anio | n | x_lo | pct_lo | lo | hi | dudosas | pct_hi | sin_casar | |---|---|---|---|---|---|---|---|---| | 2023 | 23048 | 18312 | 79.5 | 78.9 | 80 | 1429 | 85.7 | 3307 | | 2024 | 24434 | 20733 | 84.9 | 84.4 | 85.3 | 605 | 87.3 | 3096 | | 2025 | 25845 | 22236 | 86 | 85.6 | 86.5 | 935 | 89.7 | 2674 | | | 73327 | 61281 | 83.6 | 83.3 | 83.8 | 2969 | 87.6 | 9077 | _0.0 s_ ## F2 U1 negociado sin publicidad por año | anio | n | pct_lo | lo | hi | pct_hi | |---|---|---|---|---|---| | 2023 | 1766 | 49.9 | 47.6 | 52.3 | 67.3 | | 2024 | 2120 | 72.6 | 70.7 | 74.5 | 77.4 | | 2025 | 2291 | 76.7 | 74.9 | 78.4 | 83.4 | | | 6177 | 67.7 | 66.5 | 68.8 | 76.7 | _0.0 s_ ## F3 U2 (serie por umbral) con publicidad por año | anio | n | pct_lo | lo | hi | pct_hi | |---|---|---|---|---|---| | 2018 | 7870 | 66.4 | 65.4 | 67.5 | 79.3 | | 2019 | 17480 | 72.2 | 71.5 | 72.8 | 83.8 | | 2020 | 17013 | 70.8 | 70.1 | 71.5 | 81.1 | | 2021 | 21845 | 75.3 | 74.8 | 75.9 | 83.6 | | 2022 | 22716 | 78.2 | 77.6 | 78.7 | 85.8 | | 2023 | 22778 | 79.4 | 78.9 | 79.9 | 85.6 | | 2024 | 24191 | 85 | 84.5 | 85.4 | 87.5 | | 2025 | 25616 | 86 | 85.6 | 86.5 | 89.7 | _0.0 s_ ## F4 U1 con publicidad por tipo de contrato | tipo | n | pct_lo | lo | hi | pct_hi | |---|---|---|---|---|---| | Servicios | 36853 | 82.7 | 82.3 | 83.1 | 86 | | Suministros | 34493 | 84.3 | 84 | 84.7 | 89.2 | | Obras | 1744 | 87.7 | 86 | 89.1 | 92.3 | | Concesion_servicios | 218 | 72.9 | 66.7 | 78.4 | 74.8 | | Concesion_obras | 19 | 78.9 | 56.7 | 91.5 | 78.9 | _0.0 s_ ## F5 U1 con publicidad por procedimiento | proc | n | pct_lo | lo | hi | pct_hi | |---|---|---|---|---|---| | Abierto | 72406 | 83.9 | 83.6 | 84.1 | 87.8 | | Negociado con publicidad | 435 | 43 | 38.4 | 47.7 | 63.9 | | Restringido | 267 | 71.2 | 65.5 | 76.3 | 72.3 | | Licitación con negociación | 198 | 86.9 | 81.5 | 90.9 | 88.4 | | Diálogo competitivo | 18 | 16.7 | 5.8 | 39.2 | 16.7 | | Asociación para la innovación | 3 | 100 | 43.8 | 100 | 100 | _0.0 s_ ## F6 U1 con publicidad por tipo de órgano (y por año) | organo_tipo | anio | n | organos | pct_lo | lo | hi | pct_hi | |---|---|---|---|---|---|---|---| | age | | 10982 | 425 | 86 | 85.4 | 86.7 | 88.5 | | age | 2023 | 3542 | 326 | 85.8 | 84.6 | 86.9 | 90.7 | | age | 2024 | 3749 | 312 | 84.8 | 83.7 | 86 | 85.8 | | age | 2025 | 3691 | 311 | 87.4 | 86.3 | 88.4 | 89.2 | | autonomica | | 7858 | 310 | 77.1 | 76.2 | 78 | 83.4 | | autonomica | 2023 | 2570 | 197 | 75.3 | 73.5 | 76.9 | 81.9 | | autonomica | 2024 | 2550 | 199 | 83.2 | 81.7 | 84.6 | 86.7 | | autonomica | 2025 | 2738 | 206 | 73.2 | 71.5 | 74.9 | 81.8 | | ayuntamiento | | 15036 | 1305 | 80.7 | 80.1 | 81.3 | 82.7 | | ayuntamiento | 2023 | 4456 | 740 | 79.4 | 78.2 | 80.6 | 82.5 | | ayuntamiento | 2024 | 5020 | 851 | 80.2 | 79.1 | 81.3 | 81.3 | | ayuntamiento | 2025 | 5560 | 886 | 82.2 | 81.2 | 83.2 | 84.1 | | empresa_fundacion_consorcio | | 15095 | 606 | 83.7 | 83.1 | 84.3 | 87.3 | | empresa_fundacion_consorcio | 2023 | 4606 | 393 | 73.2 | 71.9 | 74.4 | 81.9 | | empresa_fundacion_consorcio | 2024 | 5036 | 418 | 85.7 | 84.7 | 86.7 | 87.3 | | empresa_fundacion_consorcio | 2025 | 5453 | 451 | 90.7 | 89.9 | 91.5 | 91.8 | | investigacion | | 3741 | 85 | 91.2 | 90.3 | 92.1 | 92.8 | | investigacion | 2023 | 1216 | 69 | 88.2 | 86.2 | 89.9 | 91.1 | | investigacion | 2024 | 1229 | 65 | 91.4 | 89.7 | 92.8 | 92.4 | | investigacion | 2025 | 1296 | 74 | 94 | 92.6 | 95.2 | 94.8 | | local_supramunicipal | | 4095 | 260 | 88.2 | 87.2 | 89.2 | 90 | | local_supramunicipal | 2023 | 1160 | 148 | 85.8 | 83.6 | 87.7 | 87.9 | | local_supramunicipal | 2024 | 1498 | 144 | 88.3 | 86.5 | 89.8 | 89.8 | | local_supramunicipal | 2025 | 1437 | 171 | 90.1 | 88.5 | 91.6 | 91.8 | | otro | | 276 | 40 | 84.4 | 79.7 | 88.2 | 88.8 | | otro | 2023 | 80 | 17 | 76.3 | 65.9 | 84.2 | 87.5 | | otro | 2024 | 105 | 23 | 96.2 | 90.6 | 98.5 | 96.2 | | otro | 2025 | 91 | 20 | 78 | 68.5 | 85.3 | 81.3 | | salud | | 16244 | 199 | 84.6 | 84 | 85.1 | 92.1 | | salud | 2023 | 5418 | 163 | 79.4 | 78.3 | 80.4 | 88.2 | | salud | 2024 | 5247 | 162 | 86.5 | 85.6 | 87.4 | 92.5 | | salud | 2025 | 5579 | 170 | 87.8 | 87 | 88.7 | 95.7 | _0.0 s_ ## órgano-año (U1 con publicidad, n >= 10) con sus pares (mismo tipo de órgano y año) | Count | |---| | 1708 | _0.0 s_ ## F7 órgano-año: cuántos y distribución de la cota baja | anio | organos_anio | unidades | mediana_pct_lo | bajo_50 | ic_alto_bajo_80 | |---|---|---|---|---|---| | 2023 | 541 | 18735 | 92.1 | 77 | 111 | | 2024 | 577 | 19817 | 97.6 | 61 | 83 | | 2025 | 590 | 20756 | 100 | 51 | 71 | | | 1708 | 59308 | 97 | 189 | 265 | _0.0 s_ ## COPY (SELECT * FROM org_anio ORDER BY anio, organo_tipo, organo_clave) TO '/c/interno/organo_anio.csv' (HEADER | Count | |---| | 1708 | _0.0 s_ ## F8 casadas por estrategia en U1 con publicidad | est | n | pct | |---|---|---| | (sin casar) | 9077 | 12.4 | | E1 | 55046 | 75.1 | | E2 | 6235 | 8.5 | | E3 | 930 | 1.3 | | E4 | 1520 | 2.1 | | E5 | 519 | 0.7 | _0.0 s_ ## F9 TED: avisos de 2023-2025 sin contenido en nuestros datos (sin_datos / sin adjudicatario ni importe) | anio | avisos | sin_datos | |---|---|---| | 2023 | 26492 | 145 | | 2024 | 25904 | 2371 | | 2025 | 30277 | 517 | _0.0 s_