count_detections
Get exact counts of DeepPVMapper detections matching filters without downloading rows. Returns matching totals and percentage for how-many questions.
Instructions
Count detections matching a set of filters, exactly, without downloading rows (fast, no row cap). Use this for "how many ..." questions, e.g. "how many installations have an RNB id?" -> has_rnb_id=true; "how many are identified by 2+ sources?" -> quality_filter=true; "how many come from OpenStreetMap?" -> sources_include=[2]. Returns the matching count, the unfiltered registry total and the percentage. Counts are DETECTED systems, not an inventory. Data quality note: this is a detection dataset, not an exhaustive inventory (estimated recall ~0.6). A missing detection does not mean no PV installation exists there. kwp, surface, tilt and azimuth are model estimates, not surveyed values. In this server, quality_filter=true keeps only detections identified by 2 or more sources (see source_encoding in get_data_quality_reference). Call get_data_quality_reference for the full picture before assessing fitness for a specific use case.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dpt | No | French département code, e.g. "33". | |
| insee | No | INSEE commune code. | |
| max_kwp | No | Maximum estimated installed capacity, in kWp. | |
| min_kwp | No | Minimum estimated installed capacity, in kWp. | |
| max_tilt | No | Maximum estimated tilt from horizontal, in degrees. | |
| min_tilt | No | Minimum estimated tilt from horizontal, in degrees. | |
| has_rnb_id | No | true = only detections matched to an RNB building identifier (rnb_id not null); false = only detections without one. | |
| max_azimuth | No | Maximum estimated azimuth, degrees clockwise from true north (180 = south). | |
| max_surface | No | Maximum estimated PV array area, in m². | |
| min_azimuth | No | Minimum estimated azimuth, degrees clockwise from true north (180 = south). | |
| min_surface | No | Minimum estimated PV array area, in m². | |
| max_vintages | No | Maximum number of imagery vintages (e.g. 1 = seen in a single year only). | |
| min_vintages | No | Minimum number of distinct imagery vintages (years) the installation was independently detected in. Use 2+ as a persistence/confidence signal, since a one-off detection in a single vintage is more likely to be a transient artifact. | |
| max_last_seen | No | Upper bound on last_seen imagery year. | |
| min_last_seen | No | Lower bound on last_seen imagery year. | |
| has_frpv_proba | No | true = only detections that have an FRPV comparison (frpv_proba not null); false = only those without one. A null frpv_proba means "no comparison available", not probability 0. | |
| max_first_seen | No | Upper bound on first_seen imagery year. | |
| min_first_seen | No | Earliest imagery year of first detection, lower bound (e.g. 2018). Not an installation date. | |
| min_frpv_proba | No | Minimum frpv_proba. The data contract recommends 0.1 as a precision/recall trade-off. Note: detections with a null frpv_proba (no FRPV comparison available) are excluded when this is set; null does not mean probability 0. | |
| quality_filter | Yes | If true, only include detections identified by 2 OR MORE sources(the `sources` field lists at least two codes, e.g. "0,1" = DeepPVMapper pipeline + FRPV reference, "0,2" = pipeline + OpenStreetMap). Default false: all detections are included, including those found by a single source (typically the automated pipeline alone). | |
| cross_validated | No | Alias of quality_filter, kept for backward compatibility. | |
| sources_include | No | Only include detections present in ALL of these sources. Accepts names or codes, case-insensitive: dpvm/deeppvmapper/kasmi (0), frpv/thebault (1), osm/openstreetmap (2), manual/annotation (3), recall (4). Examples: ["osm"] = detections that are in OpenStreetMap; ["dpvm","frpv"] = present in both DeepPVMapper and FRPV. See get_source_reference for what each source is and where it comes from. | |
| breakdown_rnb_id | Yes | If true, also return how many of the matching detections do / do not have an rnb_id (ignores has_rnb_id for this breakdown). | |
| false_positive_status | No | flagged = false_positive is true; not_flagged = false_positive is false; unrecorded = false_positive is null (no status recorded — NOT a confirmed true positive). |