LGA transmission
GET
https://api.ai4mproject.com/v1/transmission/lgasScope: risk_scoresReturns when reported malaria is expected to be highest in the year, for every LGA in one state.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
state |
string | Yes | Two-letter state code, such as KN |
Parameters go in the query string.
Request
Section titled “Request”curl "https://api.ai4mproject.com/v1/transmission/lgas?state=KN" \ -H "Authorization: Bearer $AI4M_API_KEY"kano = client.get_lga_seasons("KN")for lga in kano.lgas: print(lga.lga_code, lga.lga, lga.season.season_start_month, lga.season.season_end_month)const kano = await client.getLgaSeasons("KN");for (const lga of kano.lgas) { console.log(lga.lga_code, lga.lga, lga.season_start_month, lga.season_end_month);}kano, err := client.LGASeasons(ctx, "KN")if err != nil { log.Fatal(err)}for _, lga := range kano.LGAs { fmt.Println(lga.LGACode, lga.LGA, lga.SeasonStartMonth, lga.SeasonEndMonth)}Response
Section titled “Response”Months are numbered 1 (January) to 12. Arrays of twelve values run January to December.
| Field | Type | Description |
|---|---|---|
state_code |
string | The state asked for |
state |
string | Its name |
lgas[].lga_code |
string | Stable LGA identifier. Join on this, not the name |
lgas[].lga |
string | LGA name |
lgas[].peak_month |
integer | The month reported cases are expected to be highest |
lgas[].season_start_month |
integer | First month of the high season |
lgas[].season_end_month |
integer | Last month of the high season |
lgas[].season_months |
integer | Length of the high season in months |
lgas[].high_months |
integer[] | Every month at half the peak or more |
lgas[].seasonal_index |
number[] | Expected level of reported cases in each month, as a share of the peak month |
lgas[].typical_rainfall_mm |
number[] | Usual rainfall in each month, in millimetres |
{ "state_code": "KN", "state": "Kano", "lgas": [ { "lga_code": "NGA.20.1_1", "lga": "Ajingi", "peak_month": 9, "season_start_month": 8, "season_end_month": 10, "season_months": 3, "high_months": [ 8, 9, 10 ], "seasonal_index": [ 0, 0.001, 0.002, 0.004, 0.016, 0.153, 0.351, 0.824, 1, 0.553, 0.052, 0.003 ], "typical_rainfall_mm": [ 0.1, 0.4, 1, 4, 38.3, 87.9, 206.7, 250.8, 138.7, 13.2, 0.8, 0 ] }, { "lga_code": "NGA.20.2_1", "lga": "Albasu", "peak_month": 9, "season_start_month": 8, "season_end_month": 10, "season_months": 3, "high_months": [ 8, 9, 10 ], "seasonal_index": [ 0, 0.001, 0.003, 0.006, 0.029, 0.238, 0.416, 0.8, 1, 0.656, 0.058, 0.004 ], "typical_rainfall_mm": [ 0.3, 0.7, 1.5, 7.6, 62.2, 108.9, 209.2, 261.5, 171.5, 15.2, 1.1, 0.1 ] } ]}The example shows two of Kano’s 44 LGAs. LGAs are returned in alphabetical order.
In the south, where there are two rainy seasons, high_months can include months outside the main season, and the season is carried across a single lower month between them.
Errors
Section titled “Errors”| Code | Status | When |
|---|---|---|
UNKNOWN_STATE |
404 | state is missing or is not a valid state code |
SCOPE_REQUIRED |
403 | The key does not include the scope this endpoint needs |
TRANSMISSION_DATA_UNAVAILABLE |
503 | The transmission data has not been loaded on the server |
Any request can also return 401 for a bad key and 429 when a limit is reached. See Errors.