# PopulationNeighbourhoodValue

not specified in the source contract

Layer keys: `population_neighbourhood`.

## Cost and inputs

`x-request-cost`: 1 request per call via [GET /v1/layer/{layer}](../operations/layer.md).

Dokładnie jeden z parametrów q, id, point (lat i lng razem liczą się jako point). Wszystkie punkty odczytu API i wszystkie narzędzia obsługują te trzy warianty.

## Value schema

| Field | Required | Schema / constraints | Description |
| --- | --- | --- | --- |
| `age_0_14` | yes | `{"minimum": 0, "type": ["integer", "null"], "x-unit": "persons"}` | not specified in the source contract |
| `age_0_14_pct` | yes | `{"maximum": 100, "minimum": 0, "type": ["number", "null"], "x-unit": "percent"}` | not specified in the source contract |
| `age_15_64` | yes | `{"minimum": 0, "type": ["integer", "null"], "x-unit": "persons"}` | not specified in the source contract |
| `age_15_64_pct` | yes | `{"maximum": 100, "minimum": 0, "type": ["number", "null"], "x-unit": "percent"}` | not specified in the source contract |
| `age_65_plus` | yes | `{"minimum": 0, "type": ["integer", "null"], "x-unit": "persons"}` | not specified in the source contract |
| `age_65_plus_pct` | yes | `{"maximum": 100, "minimum": 0, "type": ["number", "null"], "x-unit": "percent"}` | not specified in the source contract |
| `age_population_residual` | yes | `{"minimum": 0, "type": ["integer", "null"], "x-unit": "persons"}` | not specified in the source contract |
| `cell_count` | yes | `{"minimum": 1, "type": "integer", "x-unit": "count"}` | not specified in the source contract |
| `cells_with_data` | yes | `{"minimum": 0, "type": "integer", "x-unit": "count"}` | not specified in the source contract |
| `coverage_pct` | yes | `{"maximum": 100, "minimum": 0, "type": "number", "x-unit": "percent"}` | not specified in the source contract |
| `density_cells` | yes | `{"items": {"additionalProperties": false, "properties": {"density_per_km2": {"minimum": 0, "type": ["integer", "null"], "x-unit": "persons/km2"}, "geometry": {"$ref": "#/$defs/PlacePolygonGeometry"}, "grid_id": {"minLength": 1, "type": "string"}}, "required": ["grid_id", "density_per_km2", "geometry"], "type": "object"}, "maxItems": 800, "type": "array"}` | not specified in the source contract |
| `density_cells_truncated` | yes | `{"type": "boolean"}` | not specified in the source contract |
| `density_per_km2` | yes | `{"minimum": 0, "type": ["number", "null"], "x-unit": "persons/km2"}` | not specified in the source contract |
| `men` | yes | `{"minimum": 0, "type": ["integer", "null"], "x-unit": "persons"}` | not specified in the source contract |
| `men_pct` | yes | `{"maximum": 100, "minimum": 0, "type": ["number", "null"], "x-unit": "percent"}` | not specified in the source contract |
| `population_definition` | yes | `{"const": "residents"}` | not specified in the source contract |
| `radius_m` | yes | `{"const": 5000}` | not specified in the source contract |
| `reference_date` | yes | `{"const": "2021-03-31"}` | not specified in the source contract |
| `retrieved_at` | yes | `{"format": "date-time", "type": "string"}` | not specified in the source contract |
| `sex_population_residual` | yes | `{"minimum": 0, "type": ["integer", "null"], "x-unit": "persons"}` | not specified in the source contract |
| `suppressed` | yes | `{"additionalProperties": false, "properties": {"age": {"type": "boolean"}, "sex": {"type": "boolean"}, "total": {"type": "boolean"}}, "required": ["total", "sex", "age"], "type": "object"}` | not specified in the source contract |
| `total_population` | yes | `{"minimum": 0, "type": ["integer", "null"], "x-unit": "persons"}` | not specified in the source contract |
| `women` | yes | `{"minimum": 0, "type": ["integer", "null"], "x-unit": "persons"}` | not specified in the source contract |
| `women_pct` | yes | `{"maximum": 100, "minimum": 0, "type": ["number", "null"], "x-unit": "percent"}` | not specified in the source contract |

```json
{
  "$ref": "./envelope.json#/$defs/PopulationNeighbourhoodValue"
}
```

## Empty answer: covered_no_data

not specified in the source contract. The contract does not define a complete empty value for this schema.

## Coverage states

Cztery stany zakresu danych dla jednej kategorii w danym miejscu. covered: źródło obejmuje to miejsce i zawiera rekord; value zawiera ten rekord. covered_no_data: źródło obejmuje to miejsce, lecz nie zawiera rekordu; value ma określoną dla danej kategorii pustą wartość (false, 0, [], none), nigdy null; jest to potwierdzony brak rekordu, za który naliczana jest opłata. not_covered: źródło nie obejmuje miejsca albo państwo nie publikuje tych danych w postaci do odczytu maszynowego; value=null, agent nie może wyciągać wniosków, a opłata jest zwracana, gdy zapytanie dotyczy tych danych. not_computed: posiadamy źródło, lecz nie obliczyliśmy jeszcze wyniku dla tego miejsca, np. trwa ładowanie zbioru; value=null, opłata jest zwracana. Każdy stan zawiera uwagę napisaną prostym językiem.

States: `covered` | `covered_no_data` | `not_covered` | `not_computed`.

`LayerAnswer` required fields: `layer`, `coverage`, `value`, `note`, `source`, `as_of`, `layer_version`.

## Billing rule

Koszt żądania. charged: liczba naliczonych wywołań po zwrotach. refunded: liczba wywołań naliczonych, a następnie zwróconych. rule: zastosowana reguła. Płatne są odpowiedzi, potwierdzone braki rekordów (covered_no_data) i niejednoznaczne listy kandydatów. Bezpłatne są błędne dane wejściowe (400), brak uwierzytelnienia (401), odpowiedzi bez zmiany danych (304) i operacje bezpłatne. Zwrot obejmuje pozostałe 4xx, każde 5xx, status not_covered oraz odpowiedź dotyczącą jednej kategorii ze stanem not_covered lub not_computed. W operacjach zbiorczych liczby dotyczą poszczególnych elementów.

Rule values: `charged` | `free_operation` | `free_invalid_input` | `free_unauthorized` | `free_not_modified` | `free_idempotency_replay` | `refunded_client_error` | `refunded_server_error` | `refunded_not_covered` | `refunded_not_computed` | `batch_mixed` | `free_record_reuse`.

## curl example

```sh
curl --silent --show-error --request GET "https://api.landfeed.pl/v1/layer/flood" --get \
  -H "X-Api-Key: ${LANDFEED_API_KEY}" \
  --data-urlencode 'id=141803_2.0001.12/3'
```
