|
| 1 | +flowchart TB |
| 2 | + %% Node definitions |
| 3 | + gd[("`<b>Source Data</b> |
| 4 | + Google Drive: |
| 5 | + calcofi/data/{dataset}/*.csv`")] |
| 6 | + iw["<b>Ingest Workflow</b> |
| 7 | + workflows: ingest_{dataset}.qmd"] |
| 8 | + dd["<b>Data Definitions</b> |
| 9 | + workflows: /ingest/{dataset}/: |
| 10 | + <ul> |
| 11 | + <li>tbls_redefine.csv</li> |
| 12 | + <li>flds_redefine.csv</li> |
| 13 | + </ul>"] |
| 14 | + db[("<b>Database</b>")] |
| 15 | + api["<b>API Endpoint</b>\n/db_tables"] |
| 16 | + catalog["<b>R Function</b>\ncalcofi4r::cc_db_catalog()"] |
| 17 | + eml["<b>Publish Workflow</b> |
| 18 | + workflows: publish_{dataset}_{portal}.qmd |
| 19 | + with {portal}s: |
| 20 | + <ul> |
| 21 | + <li>erddap</li> |
| 22 | + <li>edi</li> |
| 23 | + <li>obis</li> |
| 24 | + <li>ncei</li> |
| 25 | + </ul>"] |
| 26 | +
|
| 27 | + %% Edge definitions |
| 28 | + gd --> iw |
| 29 | + iw -->|"1. auto-generated"| dd |
| 30 | + dd -->|"2. manual edit"| iw |
| 31 | + iw -->|"3. data"| db |
| 32 | + iw --> comments |
| 33 | + comments -->|"4. metadata"| db |
| 34 | + db --> api |
| 35 | + api --> catalog |
| 36 | + db --> eml |
| 37 | + |
| 38 | + %% Comments subgraph with internal nodes |
| 39 | + subgraph comments["<b>Database Comments</b> |
| 40 | + (stored as text in JSON format to differentiate elements)"] |
| 41 | + direction TB |
| 42 | + h["hideme"]:::hidden |
| 43 | + h~~~tbl |
| 44 | + h~~~fld |
| 45 | + tbl["per <em>Table</em>: |
| 46 | + <ul> |
| 47 | + <li>description</li> |
| 48 | + <li>source (<em>linked</em>)</li> |
| 49 | + <li>source_created (<em>datetime</em>)</li> |
| 50 | + <li>workflow (<em>linked</em>)</li> |
| 51 | + <li>workflow_ingested (<em>datetime</em>)</li> |
| 52 | + </ul>"] |
| 53 | + fld["per <em>Field</em>: |
| 54 | + <ul> |
| 55 | + <li>description</li> |
| 56 | + <li>units (SI)`</li> |
| 57 | + </ul>"] |
| 58 | + end |
| 59 | + |
| 60 | + %% Clickable links |
| 61 | + click gd "https://drive.google.com/drive/folders/1xxdWa4mWkmfkJUQsHxERTp9eBBXBMbV7" "calcofi folder - Google Drive" |
| 62 | + click api "https://api.calcofi.io/db_tables" "API endpoint</b>" |
| 63 | + click catalog "https://calcofi.io/calcofi4r/reference/cc_db_catalog.html" "R package function" |
| 64 | + |
| 65 | + %% Styling |
| 66 | + classDef source fill:#f9f9f9,stroke:#000,stroke-width:2px,color:#000 |
| 67 | + classDef process fill:#a3e0f2,stroke:#000,stroke-width:2px,color:#000 |
| 68 | + classDef eml fill:#F0FDF4,stroke:#22C55E,stroke-width:2px,color:#000,text-align:left |
| 69 | + classDef data fill:#ffbe75,stroke:#000,stroke-width:2px,color:#000 |
| 70 | + classDef api fill:#9ad294,stroke:#000,stroke-width:2px,color:#000 |
| 71 | + classDef meta fill:#c9a6db,stroke:#000,stroke-width:2px,color:#000,text-align:left |
| 72 | + classDef hidden display: none; |
| 73 | + |
| 74 | + class gd source |
| 75 | + class dd,comments,tbl,fld meta |
| 76 | + class iw process |
| 77 | + class db data |
| 78 | + class api,catalog api |
| 79 | + class tbl,fld li |
| 80 | + class eml eml |
0 commit comments