randDistrict
The divisions inside a city: a Korean 읍·면·동. It is the legal 동 an address is written with rather than the administrative 동 a community centre serves, and never the 리 below a 읍 or 면.
randLocation with level fixed to 'district'LocationLevel.district"district", handing back the division's name alone rather than the whole location.
javascript
import { randDistrict } from 'randino';
randDistrict({ language: 'ko', count: 3 }); // ['가현동', '겸면', '행주외동']
randDistrict({ startsWith: '역', count: 3 }); // ['역북동', '역동', '역곡동']
randDistrict({ output: 'detail' });
// [{ location: '차황면', language: 'ko', level: 'district',
// country: '대한민국', region: '경상남도', city: '산청군', district: '차황면' }]dart
import 'package:randino/randino.dart';
randDistrict(language: LocationLanguage.ko, count: 3); // [가현동, 겸면, 행주외동]The detail form is randDistrictDetails.
python
from randino import rand_district
rand_district(language="ko", count=3) # ['가현동', '겸면', '행주외동']Only Korean locations have this level. Asking for English returns nothing, and leaving language out draws Korean rather than spending half the draws on a country that has no districts.
javascript
randDistrict({ language: 'en' }); // []dart
randDistrict(language: LocationLanguage.en); // []python
rand_district(language="en") # []Options
| Option | Type | Default | Description |
|---|---|---|---|
language | LocationLanguageOptionLocationLanguage?LocationLanguageOption | 'all'null"all" | Which language, and so which country, the places are from. Left out, it picks one per result and mixes them. |
count | numberintint | 1 | How many results to return. Clamped to 0 … 10000. |
minLengthminLengthmin_length | numberint?int | None | no bound | Minimum length in characters, of the whole string returned. |
maxLengthmaxLengthmax_length | numberint?int | None | no bound | Maximum length in characters. A range nothing fits is answered with the closest length there is. |
startsWithstartsWithstarts_with | stringString?str | —null"" | Keep only results whose first character is this one. |
unique | booleanboolbool | falsefalseFalse | Never return the same result twice. Returns fewer than asked once the list runs out. |
random | () => numberRandom?Callable[[], float] | None | —nullNone | Where the randomness comes from. Defaults to the platform's ordinary generator. |
output | RandOutputRandOutput | 'value'"value" | Strings, or one LocationDetail per result. |
See also
randLocation— the district with every level above it.randCity— the level above the district.