{
    "debug": false,
    "$schema": "https://cstm.rivm.nl/regiobeeld/Regiobeeld-app-acc/schema/figure-config.schema.json",
    "identifier": "wmo_verblijf_clienten_kaart",
    "figure": {
        "type": "figure-highcharts-regiobeeld",
        "title": "Cliënten Wmo maatwerk verblijf en opvang, totaal in 2025",
        "subtitle": "Kaart op wijkniveau",
        "credits": "{appConfig.credits.Statline_wmo_86158NED_verblijf}",
        "watch": [
            "regio"
        ],
        "settings": {
            "series": [
                {
                    "name": "Geen gegevens",
                    "color": "{appConfig.colorPalettes.noData}",
                    "showInLegend": true,
                    "data": []
                },
                {
                    "nullColor": "{appConfig.colorPalettes.noData}",
                    "allowPointSelect": true,
                    "data": [
                       {
                          "geo_id": "geo_id",
                          "value": "per_1e4"
                       }
                    ],
                    "joinBy": [
                                "gwb_code",
                                "geo_id"
                          ]
                }
            ],
            "options": {
                "chart": {
                    "type": "map"
                },
                "colorAxis": {
                    "labels": {
                        "overflow":"allow"
                    },
                    "stops": [
                        [0.05,"#CCE5F4"], [0.25,"#99cae9"], [0.5,"#4da3d8"], [0.75,"#00568B"], [0.95,"#003150"]
                    ]
                },
                "legend": {
                    "title": {
                        "text": "Per 10.000 inwoners"
                    }
                },
                "lang": {
                    "noData": "Dit figuur is alleen beschikbaar op wijk niveau, zie tabblad 'wijk'"
                }
            },
            "formatters": {},
            "geojson": {
                "ref": "config/refs/rwb_wfs_geojson_2025.json"
            }
        }
    },
    "dataset": {
         "type": "local-static-default",
         "settings": {
             "src": [
                      "data/statline/wmo_maatwerk_verblijf_wk_20260724/wmo_maatwerk_verblijf_wk_20260724--{gm}.json"
                ],
             "columns": [
                {
                    "label": "Regio",
                    "data": "regio",
                    "show": true
                },
                {
                    "label": "per 10.000 inw",
                    "data": "per_1e4",
                    "show": true,
                    "numberFormat": 0,
                    "align": "right"
                },
                {
                    "label": "Aantal",
                    "data": "aantal",
                    "show": true,
                    "numberFormat": 0,
                    "align": "right"
                }
              ],
             "select": [
                                [
                                    "gwb_id", "geo_id"
                                ],
                                [
                                    "geo_name", "regio"
                                ],
                                [
                                    "subcategorie"
                                ],
                                [
                                    "metric"
                                ],
                                [
                                    "aantal"
                                ],
                                [
                                    "per_1e4"
                                ],
                                [
                                    "hoofdcategorie"
                                ],
                                [
                                    "jaar"
                                ]
                ],
             "where": {
                    "if": [
                        {
                            "condition": ["{gwb}", "WK"],
                            "then": {
                                "and": [
                                    ["jaar", "2025"],
                                    ["metric", "Cliënten"],
                                    ["hoofdcategorie", "verblijf en opvang, totaal"],
                                    ["gwb_id", "{gwb}%", "like"]
                                ]
                            }
                        },
                        {
                            "condition": ["{gwb}", ["GM", "BU"], "in"],
                            "then": {
                                "and": [
                                    ["metric", "bewust_onzin_zodat_er_noData_melding_komt_als_je_niet_wijk_weergeeft"]
                                ]
                            }
                        }
                    ]
             },
             "order": [
                    "geo_name"
                ],
             "join": [
                    {
                        "dataset": {
                            "ref": "config/refs/rwb_wfs_ref_2025.json"
                        },
                        "on": [
                            "geo_id",
                            "geo_id"
                        ]
                    }
             ]
            }
        }
}