|
Occupation Generator 3.0.1
Employment status and occupation by country, age, sex and education for C++23
|
Requires C++23 (e.g.,
-std=c++23for GCC/Clang,/std:c++latestfor MSVC).
API Reference · Usage Guide · Data and Method · Releases
Employment status, education and occupation by country, age and sex. A call draws a status (employed, unemployed, student, retired or inactive), an education level and, for anyone who is not a student, a job with its ISCO-08 group, skills, gear and tags, from labour force statistics for 213 countries and territories.
lite, 320 in full, with skills, gear and tags) is curated. Data and Method says which rows are which.occupation_request with country, age, sex, education and status. No mutable generation defaults; data loading and layers stay on the instance.get_occupation(request, seed) for reproducible results and occupation::seed() for replaying a previous generation. For deterministic sequences, supply seeds from a caller-owned dasmig::core::rng.extend()), checked before they are applied.to_json() on every result, and a signature() recording the seed and the data it came from.DASMIG_OCCUPATION_EMBED to build the lite tier into the program, for WebAssembly and other builds without files.ocg instances with their own data and random engine.occupationgen.hpp is the library released here. Keep core.hpp and the core/ directory (dasmig-core) in the same directory. Add
to the files you want to use it in, and supply the resources folder (or define DASMIG_OCCUPATION_EMBED).
The only generation overloads are get_occupation(request) and get_occupation(request, seed). Use get_occupation({}) for a random country at the default age of 40, or get_occupation({.country = "US"}) to specify only the country. The old no-argument, country-only and seed-only overloads and instance seed() / unseed() controls have been removed.
See the usage guide for everything else.
Tested with:
-std=c++23)-std=c++23)/std:c++latest)| Dependency | Version | Bundled | Purpose |
|---|---|---|---|
| dasmig-core | 1.0 | Yes (core.hpp, core/) | Platform-independent random engine and distributions, data layers, JSON |
| Catch2 | 3.x | Yes (amalgamated) | Unit testing |
| Library | Description |
|---|---|
| address-generator | Postal addresses with real streets by place |
| biodata-generator | Procedural human physical characteristics |
| birth-generator | Demographically plausible birthdays |
| city-generator | Weighted city selection by population |
| country-generator | Weighted country selection by population |
| email-generator | Email addresses in each country's style |
| entity-generator | ECS-based entity generation |
| interest-generator | Religion, hobbies and favourite media by country, age and sex |
| name-generator | Culturally appropriate full names |
| nickname-generator | Gamer-style nicknames |
| persona-generator | Complete characters composed from the other generators |
| phone-generator | Phone numbers valid in each country's numbering plan |
| trait-generator | Personality traits with conflicts, synergies and Big Five axes |
| user-generator | Complete user records: account, username, email, phone and address |
This library is released under the MIT License.