104 Commits

Author SHA1 Message Date
lilleman 976d2e5ac1 Rank understanding the code second, and say why it is not an afterthought
Tests / vet + fmt + tests (pull_request) Successful in 1m25s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
Tests / vet + fmt + tests (push) Successful in 7s
Tests / Gitea release from CHANGELOG.md (push) Successful in 4s
2026-09-20 23:19:53 +02:00
lilleman 343c9fa98a Make being the best fake-data tool, and known for it, the goal the rest serve
Tests / vet + fmt + tests (pull_request) Successful in 1m23s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-20 23:01:30 +02:00
lilleman f206a18027 Gate everything on the comprehension score, and replay the round until it passes
Tests / vet + fmt + tests (pull_request) Successful in 1m24s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-20 22:53:14 +02:00
lilleman 3dc1cf82f1 Make the cost of reading the code a goal, and answer to a reader panel each PR
Tests / vet + fmt + tests (pull_request) Successful in 1m26s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-20 22:45:22 +02:00
lilleman 0d627d2b11 Plan the fence layer's readability first, as eight chunks in order
Tests / vet + fmt + tests (pull_request) Successful in 5s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
Tests / vet + fmt + tests (push) Successful in 5s
Tests / Gitea release from CHANGELOG.md (push) Successful in 5s
2026-09-20 22:11:27 +02:00
lilleman ce8ea550a3 Correct what the readers proved false, and lift the file map out of last place
Tests / vet + fmt + tests (pull_request) Successful in 1m26s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
Tests / vet + fmt + tests (push) Successful in 7s
Tests / Gitea release from CHANGELOG.md (push) Successful in 5s
2026-09-20 21:47:17 +02:00
lilleman 1035f8bb2a Name the register read before claiming none publishes a spelling
Tests / vet + fmt + tests (pull_request) Successful in 6s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
Tests / vet + fmt + tests (push) Successful in 5s
Tests / Gitea release from CHANGELOG.md (push) Successful in 4s
2026-09-20 21:41:00 +02:00
lilleman ce59653ccd Say what selects, name the decision the keyword instances, and cite POSIX's macros
Tests / vet + fmt + tests (pull_request) Successful in 1m24s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
Tests / vet + fmt + tests (push) Successful in 7s
Tests / Gitea release from CHANGELOG.md (push) Successful in 4s
2026-09-20 21:29:55 +02:00
lilleman ea9c1ad436 Name only the checker the keyword answers to, and file the Error near miss
Tests / vet + fmt + tests (pull_request) Successful in 1m26s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-20 21:26:54 +02:00
lilleman e09e92ff03 Re-pin the shipped shape for misc.loglevel's keyword
Tests / vet + fmt + tests (pull_request) Successful in 1m23s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-20 21:21:10 +02:00
lilleman 81cf04ae8b Render the syslog keyword POSIX publishes, keeping RFC 5424's severity beside it 2026-09-20 21:20:44 +02:00
lilleman 5715e516aa Expect the syslog keyword misc.loglevel renders, beside the RFC severity 2026-09-20 21:19:11 +02:00
lilleman 621e6f4548 Drop the loglevel decision's false goal-10 claim
Tests / vet + fmt + tests (pull_request) Successful in 1m24s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-20 20:52:07 +02:00
lilleman 839b7bd164 Cut the importer's rationale, pin the name selection the docs show, and spell the PRI alike
Tests / vet + fmt + tests (pull_request) Successful in 1m30s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-20 20:47:19 +02:00
lilleman d081ec85d0 Re-pin the shipped shape for misc.loglevel
Tests / vet + fmt + tests (pull_request) Successful in 1m28s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-20 20:39:52 +02:00
lilleman 474f73444b Read misc.loglevel from RFC 5424's severity table 2026-09-20 20:39:21 +02:00
lilleman edce645f34 Expect RFC 5424's severities as a table, selectable by code or name 2026-09-20 20:37:24 +02:00
lilleman b581daf0ab Record why misc.tld keys carry the dot, and file the miss it costs
Tests / vet + fmt + tests (pull_request) Successful in 1m28s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
Tests / vet + fmt + tests (push) Successful in 6s
Tests / Gitea release from CHANGELOG.md (push) Successful in 4s
2026-09-20 18:20:16 +02:00
lilleman 815a24c186 Prove every tld row's type and displayed spelling, which 100 draws of 1438 cannot
Tests / vet + fmt + tests (pull_request) Successful in 1m22s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-20 18:18:45 +02:00
lilleman 878cab95e7 Re-pin the shipped shape for misc.tld
Tests / vet + fmt + tests (pull_request) Successful in 1m25s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-20 18:12:44 +02:00
lilleman e7a81459cd Read misc.tld from the IANA Root Zone Database, and file the .eh no root zone holds 2026-09-20 18:12:16 +02:00
lilleman 15af49e618 Expect the IANA root zone as a table, selectable by either label 2026-09-20 18:06:01 +02:00
lilleman b3be1ee137 Record why a register with no frequency draws evenly, and the rule three misses shared
Tests / vet + fmt + tests (pull_request) Successful in 1m24s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
Tests / vet + fmt + tests (push) Successful in 6s
Tests / Gitea release from CHANGELOG.md (push) Successful in 4s
2026-09-20 00:48:50 +02:00
lilleman 5083b79730 Credit RFC 5789 for PATCH, which RFC 9110 does not define
Tests / vet + fmt + tests (pull_request) Successful in 1m21s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-20 00:45:23 +02:00
lilleman b3ead0ca5e Check every method's booleans on every seed, where the old guard checked none 2026-09-20 00:45:23 +02:00
lilleman 78d7e513f9 Give the datatype item the reason that holds, and rewrap a line
Tests / vet + fmt + tests (pull_request) Successful in 1m26s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-20 00:38:20 +02:00
lilleman 4472c8d92b Stop naming what the register's other entries are, and say where the booleans stay text
Tests / vet + fmt + tests (pull_request) Successful in 1m26s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-20 00:36:38 +02:00
lilleman caec22001d Ship the methods a request carries, as booleans a consumer can read
Tests / vet + fmt + tests (pull_request) Successful in 1m24s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-20 00:32:42 +02:00
lilleman e7a906debf Expect the nine core methods, and a Go bool reading safe and idempotent 2026-09-20 00:32:42 +02:00
lilleman df8d15aeb6 Say what the loader does with a repeated name, and name the constant this one mirrors
Tests / vet + fmt + tests (pull_request) Successful in 1m25s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-20 00:25:14 +02:00
lilleman 93d216616b Say what the loader refuses and what this script refuses on its own, and mirror the selector fence
Tests / vet + fmt + tests (pull_request) Successful in 1m24s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-20 00:22:29 +02:00
lilleman c93281b8cc Pin a port whose winner would move if the registry were re-sorted 2026-09-20 00:22:29 +02:00
lilleman f081fa1433 Re-pin the shipped shape for port.service and protocol's name option
Tests / vet + fmt + tests (pull_request) Successful in 1m24s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-20 00:16:59 +02:00
lilleman baed259802 Drop a filter that matched nothing, keep the 79 ports it hid, and exit on a value the registers should not hold 2026-09-20 00:16:59 +02:00
lilleman ec6f0e2edb Pin the port tie-break on a port where it discriminates, and protocol selection by name 2026-09-20 00:16:56 +02:00
lilleman d1fbc96a34 Re-pin the shipped shape for the three IANA network tables
Tests / vet + fmt + tests (pull_request) Successful in 1m24s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-20 00:02:37 +02:00
lilleman 2016a7408c Read misc.httpmethod, misc.protocol and misc.port from their IANA registries 2026-09-20 00:01:57 +02:00
lilleman 9feadf4d15 Expect IANA's method, protocol and port registries as tables 2026-09-20 00:01:52 +02:00
lilleman ad57bf0c54 Add the breadth and inertness goals, name the contributor in the audience, and move the handoff's contents into the repo
Tests / vet + fmt + tests (pull_request) Successful in 1m52s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
Tests / vet + fmt + tests (push) Successful in 6s
Tests / Gitea release from CHANGELOG.md (push) Successful in 4s
2026-09-19 13:30:29 +02:00
lilleman ceb7f81a1f Cut a true claim that does no work, and say what v0.3.0 is for
Tests / vet + fmt + tests (pull_request) Successful in 1m25s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
Tests / vet + fmt + tests (push) Successful in 8s
Tests / Gitea release from CHANGELOG.md (push) Successful in 5s
2026-09-19 01:58:55 +02:00
lilleman daabf8c91f Drop two claims review disproved, and file the questions they were standing in for
Tests / vet + fmt + tests (pull_request) Successful in 1m25s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-19 01:56:43 +02:00
lilleman af20cec9c3 Derive the pop-culture exclusion from goal 10 instead of asserting reasons
Tests / vet + fmt + tests (pull_request) Successful in 1m24s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-19 01:53:31 +02:00
lilleman 2dbfb0a622 Give the cache chown a command that works, record the pop-culture exclusion, and read the plan's breaking unit off the versioning table
Tests / vet + fmt + tests (pull_request) Successful in 1m24s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-19 01:53:01 +02:00
lilleman 3f5f754189 Order the plan as the releases that ship it, and move the repo's own facts out of the handoff
Tests / vet + fmt + tests (pull_request) Successful in 1m25s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-19 01:42:39 +02:00
lilleman d366a80629 Floor every zone weight at the GeoNames cutoff, refuse a table that all falls to it, and name the tzdata a drawn zone needs
Tests / vet + fmt + tests (pull_request) Successful in 1m23s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
Tests / vet + fmt + tests (push) Successful in 8s
Tests / Gitea release from CHANGELOG.md (push) Successful in 5s
2026-09-18 23:40:46 +02:00
lilleman d98571dfb3 Scan every timezone row, which a weighted draw no longer reaches 2026-09-18 23:40:46 +02:00
lilleman 29e471ef0f Weight misc.timezone by the population GeoNames records in each zone, and correct the advice that named the broken path
Tests / vet + fmt + tests (pull_request) Successful in 1m25s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-18 23:33:52 +02:00
lilleman 710b6b0261 Expect misc.timezone weighted so a territory's populous zones win the draw 2026-09-18 23:33:52 +02:00
lilleman 85d4760cde Hedge the zone counts out of going stale, and name a tarball member that is no file
Tests / vet + fmt + tests (pull_request) Successful in 1m24s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-18 23:26:32 +02:00
lilleman 784a2f0c0c Pin Chrome on iOS in place of a Firefox token no shipped row carries 2026-09-18 23:26:32 +02:00
lilleman 2ad00b3569 Refuse an is_independent the script cannot read, name Edge on Android, and correct the claims review found false
Tests / vet + fmt + tests (pull_request) Successful in 1m23s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-18 23:22:55 +02:00
lilleman 8a17fb1548 Pin that a user agent's columns agree with its string, and that a drawn territory and zone agree 2026-09-18 23:22:53 +02:00
lilleman 0910ab7d1a Re-pin the shipped shape for the three misc tables and a territory's zone
Tests / vet + fmt + tests (pull_request) Successful in 1m23s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-18 23:10:37 +02:00
lilleman 604bcb1878 Read misc.timezone from tzdb and misc.useragent from top-user-agents, and give misc.car its own rows file 2026-09-18 23:10:05 +02:00
lilleman 97c4e17671 Expect misc.timezone, car and useragent as tables, and a territory's zone inside it 2026-09-18 23:09:00 +02:00
lilleman 66d11ce1c7 Re-pin the shipped shape for misc.territory and its country column 2026-09-18 23:06:36 +02:00
lilleman b0db82f2f1 Rename misc.country to misc.territory, name each one's sovereign state, and state the four data rules that settle it 2026-09-18 23:02:45 +02:00
lilleman e9d8603611 Expect misc.territory and the sovereign it names, in place of misc.country 2026-09-18 23:02:43 +02:00
lilleman 17d1703806 Match the loader's two-row floor, and record that an extension may name two media types
Tests / vet + fmt + tests (pull_request) Successful in 1m25s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
Tests / vet + fmt + tests (push) Successful in 7s
Tests / Gitea release from CHANGELOG.md (push) Successful in 5s
2026-09-18 22:03:09 +02:00
lilleman ecc0b475ae Name the everyday media type extensions, refuse an emptied table, and cut the false register claim
Tests / vet + fmt + tests (pull_request) Successful in 1m26s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-18 21:55:54 +02:00
lilleman 69d0db9431 Test the everyday media type extensions and the status codes a filter must not drop 2026-09-18 21:54:16 +02:00
lilleman 9beb42f1ca Re-pin the shipped shape for the misc.language.code3 column
Tests / vet + fmt + tests (pull_request) Successful in 1m25s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-18 21:44:54 +02:00
lilleman 8432a7c4ae Read misc.language, httpstatus and mimetype from their registers, and keep a country's currency a column 2026-09-18 21:44:51 +02:00
lilleman 3e1d3914c2 Test the ISO 639, IANA status and media type registers the misc tables should hold 2026-09-18 21:44:48 +02:00
lilleman cddf81e6a5 Name the relative-sigil rejection where the quick start points, and the struct field a null prefix needs
Tests / vet + fmt + tests (pull_request) Successful in 1m23s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
Tests / vet + fmt + tests (push) Successful in 7s
Tests / Gitea release from CHANGELOG.md (push) Failing after 14m17s
2026-09-18 20:44:01 +02:00
lilleman 35dc998b03 Test that a fieldless path names its record and the quoting a shell needs 2026-09-18 20:43:37 +02:00
lilleman 57b2d182c7 Name both quotings when a shell splits a template
Tests / vet + fmt + tests (pull_request) Successful in 1m25s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-18 20:39:54 +02:00
lilleman fb5a5ff38f Test that a split template names both quotings 2026-09-18 20:39:08 +02:00
lilleman c326683ada Put the shipped data before the library, state what a record projects and what the locales do not share
Tests / vet + fmt + tests (pull_request) Successful in 1m27s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-18 20:35:56 +02:00
lilleman 9c719c83a6 Re-pin the shipped shape with the ITIN area column and the nullable prefix 2026-09-18 20:35:56 +02:00
lilleman dd913a17e3 Give an ITIN the columns that rebuild it, and draw a missing title as null 2026-09-18 20:35:56 +02:00
lilleman c8a4ffa764 Export ErrNoColumns, name the cure for a shell-split template and an unquoted record, and name the flag a missing data path came from 2026-09-18 20:35:56 +02:00
lilleman 9db8d35a49 Expect a narrowing fix beside the widening one in a struct tag's range error 2026-09-18 20:35:56 +02:00
lilleman 5fb5e5f4c8 Name the layout without the quotes the user wrote, return a download written on the last attempt, and put the link fences' description back on linkTables
Tests / vet + fmt + tests (pull_request) Successful in 1m24s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-18 20:20:59 +02:00
lilleman c232e65001 Test the double-quoted comma hint and the branch that names it, and match a personnummer's birth number by text 2026-09-18 20:17:46 +02:00
lilleman a851b5f5fd Record why a table owns its selector spelling and which names the import drops, and correct the complexity gate's own note
Tests / vet + fmt + tests (pull_request) Successful in 1m26s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-18 20:03:54 +02:00
lilleman 9497824350 Split the layout, checksum and transform declarations out of builtins.go 2026-09-18 20:03:54 +02:00
lilleman 1a818ff9b4 Re-pin the shipped shape with the Swedish title table 2026-09-18 20:02:25 +02:00
lilleman d8bf86f0c8 Draw the Swedish title from a table too, unsexed 2026-09-18 20:02:08 +02:00
lilleman d5d9c2655e Give every table its path in one pass, name it in every message, read the layout probes through predicates, and leave the shell to the CLI 2026-09-18 20:02:08 +02:00
lilleman 2d08bf4b32 Expect a grammar-only layout error, a bare record spelling and a Swedish title table 2026-09-18 20:01:05 +02:00
lilleman 6b0a2a60a8 Record the audience, the id cardinality, the date ranges and why --list stays a plain path list
Tests / vet + fmt + tests (pull_request) Successful in 1m21s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-18 19:55:50 +02:00
lilleman 7eb891dd80 Re-pin the shipped shape with the US title table 2026-09-18 19:52:50 +02:00
lilleman b6e1927468 Draw a US title inside the drawn sex, and name the Swedish prefix field title 2026-09-18 19:52:50 +02:00
lilleman 93e17c1770 Name a runnable layout, path and record in the errors that reject one, and let a date span one day 2026-09-18 19:52:50 +02:00
lilleman 9d63943237 Expect the pluralized argument count 2026-09-18 19:52:50 +02:00
lilleman bb43345d63 Tests for runnable layout and row-ambiguity errors, a one-day date span, sexed US titles and the record a fieldless category needs 2026-09-18 19:52:00 +02:00
lilleman c9c756e2c4 Document the clock-only fence and the samordningsnummer day, and restore two-space continuations
Tests / vet + fmt + tests (pull_request) Successful in 1m26s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-18 18:39:04 +02:00
lilleman 98938e6126 Drop the SSA placeholder names and lowercase da, del and dos in Swedish surnames 2026-09-18 18:39:04 +02:00
lilleman 396ae3bcd2 Refuse a clock-only layout in date() naming time(), and name the fix for a name repeating inside a parent 2026-09-18 18:39:04 +02:00
lilleman 86eb55d564 Test that date() refuses a layout naming no date field, and bench the personnummer by name 2026-09-18 18:39:04 +02:00
lilleman 0c6ab0937a Re-pin the shipped shape with the birth-number table and the US prefix
Tests / vet + fmt + tests (pull_request) Successful in 1m22s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-18 18:27:32 +02:00
lilleman 02eb95b94b Move the birth number into its own table under sex, drop the sexed US titles, and split the import helper by content 2026-09-18 18:27:11 +02:00
lilleman 7d50f43d0b Scope the layout quote outside selectors and prove parent-keyed names in their own function 2026-09-18 18:26:41 +02:00
lilleman 2dcc31fa63 Test that a quote inside a selector is a name's text, not a layout's quote 2026-09-18 18:26:41 +02:00
lilleman 33c441f85a Name the quoted spelling when an unquoted layout holding a comma splits into extra args
Tests / vet + fmt + tests (pull_request) Successful in 1m23s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
2026-09-18 18:18:30 +02:00
lilleman 63f4bf7c0a Test that an unquoted layout holding a comma is refused naming its quoted spelling 2026-09-18 18:18:04 +02:00
lilleman 7e25c6de44 Document date() and time(), the name tables, the personal ids and their sources 2026-09-18 18:13:54 +02:00
lilleman 7a394ee2f2 Re-pin the shipped shape with the name tables, the personal ids and the date builtins 2026-09-18 18:12:45 +02:00
lilleman a136be6059 Weighted first and last names from SCB, the SSA and the Census under a sex table, personnummer, samordningsnummer, SSN and ITIN in their valid ranges, and date, time and datetime over date() 2026-09-18 18:10:59 +02:00
lilleman 289d5edc31 Add date() and time() with a quoted layout, and let a table with a parent carry a name without a key 2026-09-18 18:05:47 +02:00
lilleman 7ff817d5ae Tests for date() and time(), a named table keyed by its parent, and weighted names and valid ids in both locales 2026-09-18 18:05:47 +02:00
lilleman b6219bf76a Rebuild the US tree with ZCTAs ranked among incorporated places
Tests / vet + fmt + tests (pull_request) Successful in 1m19s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped
Tests / vet + fmt + tests (push) Successful in 7s
Tests / Gitea release from CHANGELOG.md (push) Successful in 5s
2026-09-18 01:42:09 +02:00
lilleman e5711cbdb4 Rank a ZCTA's parts among incorporated places only, drop numbered loops and highways, and say which places ship no address 2026-09-18 01:42:09 +02:00
116 changed files with 34036 additions and 2476 deletions
+18 -2
View File
@@ -1,11 +1,27 @@
# Rules # Rules
- Go runs only through `docker compose run --rm <test|vet|fmt|build>`; the merge gate is `docker build .` plus CI's changelog check. - Go runs only through `docker compose run --rm <test|vet|fmt|build|cyclo>`; the merge gate is `docker build .` plus CI's changelog check.
- Tests first, in their own commit; the implementation follows in the next. A re-pin of seeded output or of `testdata/shipped_shape.txt` is its own commit. - Tests first, in their own commit; the implementation follows in the next. A re-pin of seeded output or of `testdata/shipped_shape.txt` is its own commit.
- A change under `data/` or to the shape pin adds its `CHANGELOG.md` entry under `Unreleased` in the same PR, and so does a change to a flag, an exit code, an exported name, a fence, a builtin or the lowest Go; what is major is the README's Versioning table. - A change under `data/` or to the shape pin adds its `CHANGELOG.md` entry under `Unreleased` in the same PR, and so does a change to a flag, an exit code, an exported name, a fence, a builtin or the lowest Go; what is major is the README's Versioning table.
- One-line commit messages: no ticket prefix, no repo name, no authorship trailers. - One-line commit messages: no ticket prefix, no repo name, no authorship trailers.
- Merges are fast-forward only, which `tea pr merge` cannot spell — every style it
offers fails with "is it still open?", as does a merge whose required checks are
still pending, so read the checks before believing the style is the problem. Use
`tea api /repos/{owner}/{repo}/pulls/<n>/merge -f Do=fast-forward-only`.
- Gitea queues Actions runs that `/repos/{owner}/{repo}/actions/tasks` does not
list, so an empty task list says nothing about whether CI ran; read
`/repos/{owner}/{repo}/commits/<sha>/status`.
- README goal 2 is gated at 7.0 on the `comprehension-panel` skill, and below it
nothing else merges — no feature, no category, no data — bar a security fix and a
dependency bump. `todo.md` carries the round: the nine-seat findings run at depth 1,
a PR per item it names, then the run again, until the score passes. At or above 7.0
every pull request scores with the four-seat run and answers it in one run. No merge
lowers the last score.
- Hard tabs. No comment by default; delete a restatement, a rationale, history, or a file preamble. - Hard tabs. No comment by default; delete a restatement, a rationale, history, or a file preamble.
- One spelling per result: reject the other at `New`, and let the error name the spelling to use. - One spelling per result: reject the other at `New`, and let the error name the spelling to use.
- A standing choice a reader would relitigate goes under Decisions in the README, not in a comment. - A standing choice a reader would relitigate goes under Decisions in the README, not in a comment.
- Prose naming a source states what that source states: read the register's own field
before paraphrasing it, and name the register you read before claiming none
publishes a spelling.
- A README example is a `json` block that loads and renders as a category; `readme_test.go` runs every one. - A README example is a `json` block that loads and renders as a category; `readme_test.go` runs every one.
- Cyclomatic complexity is gated at 14: the table-shaped dispatches (`eachToken`, `calc.factor`, `walkPath`) sit at 13–14 and stay whole; anything else that reaches 14 is decomposed. - Cyclomatic complexity is gated at 14: the table-shaped dispatches (`linkParent`, `compileTemplate`, `renderEdges`) sit at it and stay whole; a function that would pass it is decomposed.
+66 -8
View File
@@ -11,24 +11,82 @@ replacement, and each removed path, column or flag.
- First release: the CLI, the library and the shipped data set. - First release: the CLI, the library and the shipped data set.
- Table categories: a category JSON naming a `rows` TSV beside it, with the options - Table categories: a category JSON naming a `rows` TSV beside it, with the options
`key`, `name`, `weight` and `parent`; a path selects a row by key or name, `key`, `name`, `weight` and `parent`; a path selects a row by key or name,
`misc.country[SE]`, and descends to a linked table by name; linked tables draw `misc.territory[SE]`, and descends to a linked table by name; linked tables draw
consistently within one render and draw group. `rows` is an option, so no consistently within one render and draw group. `rows` is an option, so no
template may carry a field of that name. Refused at `New`: a `name` without a template may carry a field of that name. A `name` without a `key` resolves
`key`, a name spelling another row's key, a table named like a column of any inside the table's `parent`. Refused at `New`: a `name` without a `key` or a
`parent`, a name repeating inside one parent row, a name spelling another row's key, a table named like a column of any
table above it, a table whose format or cell references its own family, and, table above it, a table whose format or cell references its own family, and,
within one render and draw group, a path drawing a table another path selects a within one render and draw group, a path drawing a table another path selects a
row of, or two paths pinning different rows of one table. row of, or two paths pinning different rows of one table.
- `New` refuses a root choice of templates sharing one format and one set of string - `New` refuses a root choice of templates sharing one format and one set of string
fields, naming the rows TSV to write instead. fields, naming the rows TSV to write instead.
- `misc.country`, `misc.currency`, `misc.language`, `misc.httpstatus` and - `misc.territory`, `misc.currency`, `misc.language`, `misc.httpstatus` and
`misc.mimetype` are tables. `misc.country` is every ISO 3166 country that has a `misc.mimetype` are tables. `misc.territory` is every ISO 3166-1 territory that has
capital, a currency and a TLD, with the columns `calling-code`, `capital`, a capital, a currency and a TLD, with the columns `calling-code`, `capital`,
`currency`, `flag`, `languages`, `numeric` and `tld` added; `misc.currency` the `country`, `currency`, `flag`, `languages`, `numeric` and `tld` added, `country`
holding the alpha-2 code of the sovereign state it belongs to and its own where it
is one; `misc.currency` the
current ISO 4217 currencies with a minor unit, with `decimals` and `numeric` current ISO 4217 currencies with a minor unit, with `decimals` and `numeric`
added, and its symbols from CLDR. `DATA-LICENSES.md` lists each source. added, and its symbols from CLDR; `misc.language` every ISO 639-2 entry carrying a
639-1 code, with a `code3` column holding its 639-2/T code; `misc.httpstatus` each
code the IANA registry lists with a plain reason phrase; and `misc.mimetype` each
type mime-db records as IANA-registered and gives a filename extension.
`DATA-LICENSES.md` lists each source.
- `misc.timezone`, `misc.car` and `misc.useragent` are tables too. `misc.timezone`
is every zone tzdb `zone.tab` gives a shipped territory, with `offset` holding the
zone's standard UTC offset and `territory` linking to `misc.territory`, so
`misc.territory[SE].timezone` draws `Europe/Stockholm`; zones of a territory
`misc.territory` does not ship, Antarctica's among them, and the constant `UTC`
are gone; spell that one as the text `"UTC"`. A `weight` column carries the
population GeoNames records in each zone, so a draw favours the zones people live
in. `misc.useragent` is the top-user-agents desktop and mobile lists with `browser`,
`device` and `os` columns. `misc.car` keeps its makes and models in a `make` and a
`model` column.
- `misc.httpmethod`, `misc.protocol` and `misc.port` are IANA's registries as tables.
`misc.httpmethod` is the eight methods RFC 9110 defines and PATCH, carrying
`safe` and `idempotent` as `true` or `false`; `misc.protocol` the keyword, its
`number` and its `name`, selectable by either; `misc.port` renders a TCP port number,
with the IANA `service` name beside it, keeping the first service the registry
describes for a port so a number selects one row.
- `misc.tld` is the IANA root zone as a table: every delegated TLD keyed with its
leading dot, `.se` and `.xn--p1ai`, the register's `type` beside it, and a `unicode`
column holding the form the register displays, so `misc.tld[.рф]` selects the row
`.xn--p1ai` renders. A delegation the register marks "Not assigned" does not ship.
- `misc.loglevel` is the eight syslog severities: the `keyword` a configuration writes,
`err` and `info`, keyed by the numerical `code` a PRI encodes and selectable by
either, with the `severity` RFC 5424 spells beside it.
- `geo.SE` and `geo.US`: five linked tables per country, `region`, `municipality`, - `geo.SE` and `geo.US`: five linked tables per country, `region`, `municipality`,
`locality`, `postal-code` and `street`, weighted by population and address counts `locality`, `postal-code` and `street`, weighted by population and address counts
and built from SCB, GeoNames, Trafikverket NVDB and the US Census Bureau, and an and built from SCB, GeoNames, Trafikverket NVDB and the US Census Bureau, and an
`address` record over one consistent draw of them. `sv_SE.address` and `address` record over one consistent draw of them. `sv_SE.address` and
`en_US.address` read those records, so `en_US.address.street` no longer carries `en_US.address` read those records, so `en_US.address.street` no longer carries
`name` and `suffix`, and a locale folder loads only beside `geo`. `name` and `suffix`, and a locale folder loads only beside `geo`.
- `{date(from,to,'layout')}` and `{time('layout')}`: a second between two days, or
within one, in a single-quoted Go layout, drawn in UTC; `from` may equal `to`.
`sv_SE.date`, `en_US.date`, `sv_SE.time` and `en_US.time` render through them, so
`date.year`, `date.month`, `date.day`, `time.hour`, `time.minute`, `time.minute.t`,
`time.sec` and `time.ampm` are no longer paths — a part of a date is now its own
`{date(…,'2006')}`. `misc.datetime` is an RFC 3339 instant.
- `sex`, `first-name` and `last-name` tables in `sv_SE` and `en_US`, weighted by
bearers from SCB, the SSA and the Census Bureau; `first-name` links to `sex`, and a
name both sexes carry is a row under each. `person` reads them, so its columns are
`first`, `last`, `prefix` and `sex`; `person.femalefirst` and `person.malefirst` are
no longer paths — draw `sex[f].first-name` and `sex[m].first-name` instead.
`en_US.title` links to `sex` as well, so `en_US.person.prefix` draws `Mr` or `Ms`
without contradicting the record's `sex`; `sv_SE.title` is an unsexed table of the
same shape.
- `sv_SE.personnummer` and `sv_SE.samordningsnummer`, Skatteverket's test series
from a `sv_SE.birth-number` table under `sex`, in place of `sv_SE.ssn`, whose
`ssn.mmdd`, `ssn.mmdd.m` and `ssn.mmdd.d` go with it. `en_US.ssn` now draws the
ranges the SSA assigns and carries the columns `area`, `group` and `serial`, so
`--format csv en_US.ssn` writes a header where it used to fail; `en_US.itin` is new
and carries the same three. `person.prefix` is null where a person has no title,
where it used to be an empty string, so `--format sql` writes `NULL` and a `string`
struct field reading it becomes `*string`.
- `ErrNoColumns` is exported, so a caller can tell the one record fence a path can
answer from the rest.
- An error names a spelling that runs: a layout is named single-quoted and free of
its own quotes, a row of a table with no key is named as the path that selects it,
`sv_SE.sex[f].first-name[Kim]`, and a category with no columns names the record
that gives it one.
+16 -5
View File
@@ -11,10 +11,21 @@ Every shipped dataset, its source, its licence and the attribution it asks for.
| `geo/SE/street.tsv` | [Trafikverket NVDB](https://www.trafikverket.se/) Gatunamn, through the open API | CC0 1.0 | none required | `data-import/geo-se.py` | | `geo/SE/street.tsv` | [Trafikverket NVDB](https://www.trafikverket.se/) Gatunamn, through the open API | CC0 1.0 | none required | `data-import/geo-se.py` |
| `geo/US/region.tsv`, `municipality.tsv`, `locality.tsv` | [Census Bureau](https://www.census.gov/) Gazetteer 2026 and population estimates 2025 | [public domain](https://www.usa.gov/government-works) | none required | `data-import/geo-us.py` | | `geo/US/region.tsv`, `municipality.tsv`, `locality.tsv` | [Census Bureau](https://www.census.gov/) Gazetteer 2026 and population estimates 2025 | [public domain](https://www.usa.gov/government-works) | none required | `data-import/geo-us.py` |
| `geo/US/postal-code.tsv`, `street.tsv` | Census Bureau ZCTA to place relationships 2020 and TIGER/Line 2025 address ranges and feature names | public domain | none required | `data-import/geo-us.py` | | `geo/US/postal-code.tsv`, `street.tsv` | Census Bureau ZCTA to place relationships 2020 and TIGER/Line 2025 address ranges and feature names | public domain | none required | `data-import/geo-us.py` |
| `misc/country.tsv` | [datasets/country-codes](https://github.com/datasets/country-codes) | [PDDL 1.0](https://opendatacommons.org/licenses/pddl/1-0/) | none required | `data-import/country.py` | | `sv_SE/first-name.tsv`, `last-name.tsv` | [SCB](https://www.scb.se/) names with at least two bearers, 31 December 2022 | CC0 1.0 | "Källa: SCB" | `data-import/names-se.py` |
| `en_US/first-name.tsv` | [SSA](https://www.ssa.gov/oact/babynames/) baby names, births 1930 to 2020, through [hackerb9/ssa-baby-names](https://github.com/hackerb9/ssa-baby-names) | public domain | none required | `data-import/names-us.py` |
| `en_US/last-name.tsv` | Census Bureau surnames occurring 100 or more times, 2010 | public domain | none required | `data-import/names-us.py` |
| `sv_SE/sex.tsv`, `sv_SE/birth-number.tsv`, `sv_SE/title.tsv`, `en_US/sex.tsv`, `en_US/title.tsv`, `misc/car.tsv` | curated; Skatteverket's test birth numbers are facts, and `car.tsv` waits for an international source (goal 12) | — | — | — |
| `misc/currency.tsv` | [datasets/currency-codes](https://github.com/datasets/currency-codes); symbols from [Unicode CLDR](https://github.com/unicode-org/cldr) `en.xml` and `root.xml` | PDDL 1.0; [Unicode License v3](https://www.unicode.org/license.txt) | CLDR: "Copyright © 1991-2025 Unicode, Inc. Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the United States and other countries." | `data-import/currency.py` | | `misc/currency.tsv` | [datasets/currency-codes](https://github.com/datasets/currency-codes); symbols from [Unicode CLDR](https://github.com/unicode-org/cldr) `en.xml` and `root.xml` | PDDL 1.0; [Unicode License v3](https://www.unicode.org/license.txt) | CLDR: "Copyright © 1991-2025 Unicode, Inc. Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the United States and other countries." | `data-import/currency.py` |
| `misc/httpstatus.tsv` | curated (IANA HTTP status codes are facts) | — | — | — | | `misc/httpmethod.tsv` | [IANA HTTP Method Registry](https://www.iana.org/assignments/http-methods/) | [public domain](https://www.iana.org/help/licensing-terms) | none required | `data-import/httpmethod.py` |
| `misc/language.tsv` | curated (ISO 639-1 codes are facts) | — | — | — | | `misc/httpstatus.tsv` | [IANA HTTP Status Code Registry](https://www.iana.org/assignments/http-status-codes/) | [public domain](https://www.iana.org/help/licensing-terms) | none required | `data-import/httpstatus.py` |
| `misc/mimetype.tsv` | curated (IANA media types are facts) | — | — | — | | `misc/language.tsv` | [datasets/language-codes](https://github.com/datasets/language-codes), the [Library of Congress](https://www.loc.gov/standards/iso639-2/) ISO 639-2 register | [PDDL 1.0](https://opendatacommons.org/licenses/pddl/1-0/) | none required | `data-import/language.py` |
| `misc/loglevel.tsv` | [RFC 5424](https://www.rfc-editor.org/rfc/rfc5424.txt) Table 2, the syslog message severities; keywords from the [POSIX](https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/syslog.h.html) `<syslog.h>` severity macros | facts | none required | `data-import/loglevel.py` |
| `misc/mimetype.tsv` | [mime-db](https://github.com/jshttp/mime-db), the IANA media type registry with filename extensions | [MIT](https://github.com/jshttp/mime-db/blob/master/LICENSE) | "Copyright (c) 2014 Jonathan Ong, Copyright (c) 2015-2022 Douglas Christopher Wilson" | `data-import/mimetype.py` |
| `misc/port.tsv` | [IANA Service Name and Transport Protocol Port Number Registry](https://www.iana.org/assignments/service-names-port-numbers/) | [public domain](https://www.iana.org/help/licensing-terms) | none required | `data-import/port.py` |
| `misc/protocol.tsv` | [IANA Protocol Numbers](https://www.iana.org/assignments/protocol-numbers/) | [public domain](https://www.iana.org/help/licensing-terms) | none required | `data-import/protocol.py` |
| `misc/territory.tsv` | [datasets/country-codes](https://github.com/datasets/country-codes) | [PDDL 1.0](https://opendatacommons.org/licenses/pddl/1-0/) | none required | `data-import/territory.py` |
| `misc/timezone.tsv` | [IANA tzdb](https://www.iana.org/time-zones) 2026d `zone.tab` and the standard offset of each zone; weights from [GeoNames](https://www.geonames.org/) `cities15000` populations | [public domain](https://data.iana.org/time-zones/tzdb/LICENSE); [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) | "Populations from GeoNames, www.geonames.org" | `data-import/timezone.py` |
| `misc/tld.tsv` | [IANA Root Zone Database](https://www.iana.org/domains/root/db), checked against the root zone's [TLD list](https://data.iana.org/TLD/tlds-alpha-by-domain.txt) | [public domain](https://www.iana.org/help/licensing-terms) | none required | `data-import/tld.py` |
| `misc/useragent.tsv` | [top-user-agents](https://github.com/microlinkhq/top-user-agents) desktop and mobile lists | [MIT](https://github.com/microlinkhq/top-user-agents/blob/master/LICENSE.md) | "Copyright © 2020 Kiko Beats" | `data-import/useragent.py` |
Every other category is hand-written JSON under [`data/`](data), MIT like the code. Every other category is hand-written under [`data/`](data), MIT like the code.
+393 -116
View File
@@ -17,11 +17,12 @@ fejkdata sv_SE.person.last # Eriksson
fejkdata --seed 42 sv_SE.address # the same address every run fejkdata --seed 42 sv_SE.address # the same address every run
fejkdata -n 3 --separator ', ' sv_SE.word # nät, barn, sol fejkdata -n 3 --separator ', ' sv_SE.word # nät, barn, sol
fejkdata --list # every path the data offers fejkdata --list # every path the data offers
fejkdata 'misc.country[SE].capital' # Stockholm — a table's row, selected by key or name fejkdata 'misc.territory[SE].capital' # Stockholm — a table's row, selected by key or name
fejkdata 'geo.SE.locality[Lund].street' # Fjelievägen — a linked table, drawn inside the row fejkdata 'geo.SE.locality[Lund].street' # Fjelievägen — a linked table, drawn inside the row
fejkdata --data-path ./mydata sv_SE.word # layer a directory over the shipped data fejkdata --data-path ./mydata sv_SE.word # layer a directory over the shipped data
fejkdata --no-shipped-data -d ./mydata --list # only your data fejkdata --no-shipped-data -d ./mydata --list # only your data
fejkdata 'name: {/sv_SE.person.last}' # name: <a surname> — an inline template fejkdata 'name: {/sv_SE.person.last}' # name: <a surname> — an inline template
fejkdata "{date(1990-01-01,2010-12-31,'2006-01-02')}" # 2003-11-27 — the argument in "…", the layout in '…'
fejkdata '{"format":"name: {x}","x":["bosse","lina"]}' # name: bosse or name: lina fejkdata '{"format":"name: {x}","x":["bosse","lina"]}' # name: bosse or name: lina
``` ```
@@ -32,11 +33,9 @@ a JSON object, array or string, or that carries a `{` token, is instead an
**inline template**: a format string or a JSON value compiled and rendered on the **inline template**: a format string or a JSON value compiled and rendered on the
spot. Its tokens reach the data by reference from the root — spot. Its tokens reach the data by reference from the root —
`{/sv_SE.person.last}`, so shipped and `--data-path` categories are alike `{/sv_SE.person.last}`, so shipped and `--data-path` categories are alike
available. An inline template sits in no folder, so the folder-relative `{.name}` available. A path never contains a brace or a quote, and a bracket only as a selector
and `{..name}` are rejected naming the root spelling, and one reference alone — after a name, so the two spellings cannot collide; which spellings an inline template
`{/sv_SE.person}` — is the path written as a template, rejected naming the path, as is rejects, and what each names instead, is under [Decisions](#decisions).
a path written `/sv_SE.person`. A path never contains a brace or a quote, and a
bracket only as a selector after a name, so the two cannot collide (see [Decisions](#decisions)).
| Flag | | | Flag | |
|------|--| |------|--|
@@ -114,6 +113,12 @@ the template itself, which composes the format into one string rather than
projecting columns — ask for more records with `--repeat`. A `repeat` on a column projecting columns — ask for more records with `--repeat`. A `repeat` on a column
is fine. is fine.
Columns are written in name order, whatever order the fields appear in. A category
whose fields are the parts of one value — `sv_SE.price`, `sv_SE.version`, `misc.uuid` —
projects those parts rather than the value, so for one column holding what `Fake`
renders, write `{"format":"","price":"{/sv_SE.price}"}` as a fieldless category asks
for.
A column carrying a newline keeps it inside the quoted CSV field or the SQL string A column carrying a newline keeps it inside the quoted CSV field or the SQL string
literal, so a row can span physical lines: read the stream with a CSV or SQL literal, so a row can span physical lines: read the stream with a CSV or SQL
parser rather than splitting it on newlines. parser rather than splitting it on newlines.
@@ -141,6 +146,119 @@ a value two fields share in its own category and reference that. A field hold, t
operand ties fields together within one column as always (see operand ties fields together within one column as always (see
[Correlated fields](#correlated-fields) and [Decisions](#decisions)). [Correlated fields](#correlated-fields) and [Decisions](#decisions)).
## Data
The shipped set under [`data/`](data) — one folder per locale (`en_US`, `sv_SE`)
plus a locale-neutral `misc` folder — is embedded, so the CLI and the library
work with no data on disk. A directory is a namespace: each JSON file is a
category named after the file, each subdirectory a dot-path segment, so
`mydata/sv_SE/person.json` is `sv_SE.person` and replaces the shipped one.
Sources merge in order; matching folders combine, any other clash is won by the
last loaded. Names may not use `.`, `|`, `(`, `{`, `}`, `[`, `]`, `"` or `/`, nor be
`-`, which a struct tag reserves; dot-prefixed entries are skipped, so a data directory can also be a checkout.
Each locale carries `address`, `color`, `company`, `date`, `email`, `first-name`,
`ip`, `last-name`, `person`, `phone`, `price`, `sentence`, `sex`, `time`, `url`,
`username`, `version` and `word`, formatted per locale; `sv_SE` adds
`personnummer` and `samordningsnummer`, `en_US` adds `ssn` and `itin`. `misc`
carries `car`, `coordinate`, `creditcard` (Luhn-valid), `currency` (ISO 4217),
`datetime` (RFC 3339), `emoji`, `httpmethod`, `httpstatus`, `language` (ISO 639-1,
with its 639-2/T code), `loglevel` (syslog severity), `mac`, `mimetype`, `objectid`,
`port`, `protocol`, `territory` (ISO 3166-1), `timezone` (IANA), `tld` (IANA root
zone), `useragent` and `uuid` (v4). Many carry sub-fields — `misc.currency.symbol`,
`misc.territory.alpha2`, `misc.httpstatus.code` — which `--list` shows. `car`,
`currency`, `httpmethod`, `httpstatus`, `language`, `loglevel`, `mimetype`, `port`,
`protocol`, `territory`, `timezone`, `tld` and `useragent` are [tables](#table), so
`misc.territory[SE].capital` and `misc.currency[Euro].symbol` select a row; `car` and
`useragent` carry no key or name, so they are drawn from rather than selected in.
`misc.httpmethod`, `misc.protocol` and `misc.port` are IANA's registries.
`misc.httpmethod` is the eight methods RFC 9110 defines and PATCH; the register's
other entries, WebDAV and DeltaV among them, do not ship. Its `safe` and
`idempotent` are `true` or `false`, so a Go `bool` reads them, though `--format json`
and `sql` write them as text, a table column carrying no datatype. `misc.protocol`
carries a `number` and a `name`, the keyword itself where the register spells none out,
and selects by either spelling.
`misc.port` is the TCP assignments, rendering the number a port field holds with the
IANA `service` beside it, and selecting by number alone. A draw spans the whole
register, so pin `misc.port[443]` where a fixture needs a port a reader recognises;
it stops at 49150, IANA assigning nothing above, so an ephemeral source port is
`{int(49152,65535)}`.
`misc.tld` is the root zone's delegated TLDs, keyed with the leading dot
`misc.territory.tld` already carries, `.se`. Its `type` is the register's —
`country-code`, `generic`, `generic-restricted`, `infrastructure` or `sponsored` — and
its `unicode` the form the register displays, `.рф` for `.xn--p1ai` and the key itself
for an ASCII one, which selects the row too, so `misc.tld[.рф]` renders `.xn--p1ai`. A
draw spans the whole zone, `.arpa` and `.zuerich` alike, so pin `misc.tld[.com]` where
a fixture needs one a reader recognises.
`misc.loglevel` is the eight syslog severities, rendering the keyword a configuration
writes, `err` and `info`, keyed by the numerical code a PRI encodes and selectable by
either, so `misc.loglevel[3]` and `misc.loglevel[err]` are one row.
`misc.loglevel.severity` is the name RFC 5424 spells, `Error` beside `err`; it
selects nothing, the code and the keyword do.
[`DATA-LICENSES.md`](DATA-LICENSES.md) names each table's source and licence.
`misc.timezone` is every zone tzdb gives a shipped territory, from one apiece for most
of them to dozens for the largest, weighted by the population GeoNames records in each,
so `misc.territory[US].timezone` draws `America/New_York` far more often than
`America/Nome`. It links to `misc.territory`, so `misc.territory[SE].timezone` is
`Europe/Stockholm` and a drawn territory and zone agree. Its `offset` is the zone's
*standard* offset, so do not pair it with a drawn `misc.datetime`: in a zone that
observes DST it is the wrong one half the year, which is what storing a zone name
avoids. A zone tzdb named recently — `Europe/Kyiv`, `America/Ciudad_Juarez` — is
rejected outright by a consumer resolving it against older tzdata, so where the
consumer validates the zone, pin one rather than draw it. There is no `UTC` row, tzdb
giving that name no territory — spell it as the text `"UTC"`. `misc.useragent` carries
`browser`, `device` and `os` beside the string, and `misc.car` a `make` and a `model`,
until an international source replaces them.
ISO 3166-1 codes territories, not sovereign states, so that is what the table is
called: Greenland and Åland have codes of their own, and `misc.territory.country`
names the state each belongs to — `DK` for Greenland, `FI` for Åland, and its own
code for a sovereign one, or for one the register names no state for.
`sex`, `first-name` and `last-name` are tables weighted by bearers, from SCB, the
SSA and the Census Bureau. `first-name` links to `sex`, so `sv_SE.sex[f].first-name`
draws a woman's name, and a name both sexes carry is a row under each, so
`en_US.sex[m].first-name[Taylor]` names the one a `first-name[Taylor]` alone cannot.
`person` reads one draw of the three, so its `first` and `sex` columns agree, and so
does a `personnummer` in the same render: its birth number, `sv_SE.birth-number`
under `sex`, is Skatteverket's test series, 238 for a woman and 239 for a man, which no
real person is ever given. `en_US.title` links to `sex` too, so a person's prefix
never contradicts it.
A person of a chosen sex is assembled from the tables — `sex[f].first-name` beside
`last-name` — while a shipped `personnummer` agrees with the sex its own render
*drew*, not with one a path selects. That test series is also small: a personnummer
is one of about 70,000 values, a day in 1930–2025 against the two birth numbers, so a
fixture past a few hundred rows repeats one and a `UNIQUE` column needs a category of
your own. `sv_SE.date` and `en_US.date` are uniform over 1970-01-01 to 2029-12-31,
`misc.datetime` over 2000-01-01 to 2029-12-31. What the two locales do not share:
`en_US.address` carries a `region` column the Swedish one has no use for, and
`sv_SE.title` has no `parent`, so it is selected as `sv_SE.title[dr]` rather than
inside a sex.
A `geo` folder holds one tree per country under its alpha-2 code: five
[linked tables](#linked-tables) named alike, and an `address` record over one
consistent draw of them, which the locale's `address` reads.
| Table | `geo.SE` | `geo.US` | Weight |
|-------|----------|----------|--------|
| `region` | län, by code or name | state, by USPS abbreviation or name; `code` is the FIPS code | population |
| `municipality` | kommun, by code or name | county, by FIPS code or name | population |
| `locality` | postort, by name | incorporated place of 25,000 people or more with a postal code of its own, by GEOID or name; Hawaii has none | tätort population, the kommun's where the postort names it, else 200; place population |
| `postal-code` | postnummer with street delivery, by code | ZCTA, by code | one; address ranges |
| `street` | gatunamn, the ten with most road segments per postort | street name, the ten with most address ranges per place | segments; address ranges |
`geo.SE.region[Skåne län].municipality` draws a kommun in Skåne,
`geo.SE.locality[Lund].street` a street in Lund, and
`geo.US.region[IL].locality[Springfield]` settles which Springfield. A region row
carries its `timezone`, the state's predominant zone, and a locality its `lat` and
`lon`. What ports across countries is the five table names, the `name` column,
selection by name, and the `address` record's columns `street`, `street-number`,
`postal-code` and `locality`; every other column is the country's own, `code` on a
Swedish region but `abbr` on a US one.
## Library ## Library
```sh ```sh
@@ -152,7 +270,7 @@ f, err := fejkdata.New(fejkdata.WithSeed(42))
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }
v, err := f.Fake("sv_SE.address") // "Kungsvägen 68\n379 17 Stockholm" v, err := f.Fake("sv_SE.address") // "Järvedsvägen 43\n891 77 Järved"
paths := f.List() // every path Fake accepts, sorted paths := f.List() // every path Fake accepts, sorted
v, err = f.FakeTemplate("name: {/sv_SE.person.last}") // compile + render in one call v, err = f.FakeTemplate("name: {/sv_SE.person.last}") // compile + render in one call
t, err := f.NewTemplate(`{"format":"name: {x}","x":["bosse","lina"]}`) // compile once t, err := f.NewTemplate(`{"format":"name: {x}","x":["bosse","lina"]}`) // compile once
@@ -206,49 +324,6 @@ A `*Generator` is safe for concurrent use; a seeded sequence is reproducible onl
when drawn from one goroutine. Changing how a value is composed shifts the seeded when drawn from one goroutine. Changing how a value is composed shifts the seeded
stream for that value and everything drawn after it. stream for that value and everything drawn after it.
## Data
The shipped set under [`data/`](data) — one folder per locale (`en_US`, `sv_SE`)
plus a locale-neutral `misc` folder — is embedded, so the CLI and the library
work with no data on disk. A directory is a namespace: each JSON file is a
category named after the file, each subdirectory a dot-path segment, so
`mydata/sv_SE/person.json` is `sv_SE.person` and replaces the shipped one.
Sources merge in order; matching folders combine, any other clash is won by the
last loaded. Names may not use `.`, `|`, `(`, `{`, `}`, `[`, `]`, `"` or `/`, nor be
`-`, which a struct tag reserves; dot-prefixed entries are skipped, so a data directory can also be a checkout.
Each locale carries `address`, `color`, `company`, `date`, `email`, `ip`,
`person`, `phone`, `price`, `sentence`, `ssn`, `time`, `url`, `username`,
`version` and `word`, formatted per locale. `misc` carries `car`, `coordinate`,
`country` (ISO 3166), `creditcard` (Luhn-valid), `currency` (ISO 4217), `emoji`,
`httpstatus`, `language` (ISO 639), `mac`, `mimetype`, `objectid`, `timezone`
(IANA), `useragent` and `uuid` (v4). Many carry sub-fields — `misc.currency.symbol`,
`misc.country.alpha2`, `misc.httpstatus.code` — which `--list` shows. `country`,
`currency`, `httpstatus`, `language` and `mimetype` are [tables](#table), so
`misc.country[SE].capital` and `misc.currency[Euro].symbol` select a row;
[`DATA-LICENSES.md`](DATA-LICENSES.md) names each table's source and licence.
A `geo` folder holds one tree per country under its alpha-2 code: five
[linked tables](#linked-tables) named alike, and an `address` record over one
consistent draw of them, which the locale's `address` reads.
| Table | `geo.SE` | `geo.US` | Weight |
|-------|----------|----------|--------|
| `region` | län, by code or name | state, by USPS abbreviation or name; `code` is the FIPS code | population |
| `municipality` | kommun, by code or name | county, by FIPS code or name | population |
| `locality` | postort, by name | incorporated place of 25,000 people or more, by GEOID or name; Hawaii has none | tätort population, the kommun's where the postort names it, else 200; place population |
| `postal-code` | postnummer with street delivery, by code | ZCTA, by code | one; address ranges |
| `street` | gatunamn, the ten with most road segments per postort | street name, the ten with most address ranges per place | segments; address ranges |
`geo.SE.region[Skåne län].municipality` draws a kommun in Skåne,
`geo.SE.locality[Lund].street` a street in Lund, and
`geo.US.region[IL].locality[Springfield]` settles which Springfield. A region row
carries its `timezone`, the state's predominant zone, and a locality its `lat` and
`lon`. What ports across countries is the five table names, the `name` column,
selection by name, and the `address` record's columns `street`, `street-number`,
`postal-code` and `locality`; every other column is the country's own, `code` on a
Swedish region but `abbr` on a US one.
## Data format ## Data format
Every value is a **node**, nestable without limit: Every value is a **node**, nestable without limit:
@@ -407,7 +482,9 @@ cell token, and refuses a TSV no category names, a key that is empty or repeats,
weight that is not a positive number, and a key or name holding `[`, `]`, `{`, `}`, weight that is not a positive number, and a key or name holding `[`, `]`, `{`, `}`,
`"` or `|`, which a selector cannot spell; the rows are indexed on the first draw that `"` or `|`, which a selector cannot spell; the rows are indexed on the first draw that
selects one. A `name` needs a `key`, since a name naming several rows is reported by selects one. A `name` needs a `key`, since a name naming several rows is reported by
their keys, and a name spelling another row's key is refused, since the key would their keys, or a `parent`, inside whose row a name names one row, so `first-name[Kim]`
is settled by the `sex` selected before it and a name repeating inside one parent row
is refused; a name spelling another row's key is refused, since the key would
select first and the name never. The table's options are its own — `rows`, `key`, select first and the name never. The table's options are its own — `rows`, `key`,
`name`, `weight` and `parent` — so a column may be named `name`, as one usually is. `name`, `weight` and `parent` — so a column may be named `name`, as one usually is.
@@ -417,11 +494,11 @@ inline template has no file beside it, so there it stays a choice.
### Row selection ### Row selection
`[key]` or `[name]` after a table's name selects one row: `misc.country[SE]` and `[key]` or `[name]` after a table's name selects one row: `misc.territory[SE]` and
`misc.country[Sweden]` name one row, and `misc.country[SE].capital` reads its column. `misc.territory[Sweden]` name one row, and `misc.territory[SE].capital` reads its column.
A name naming several rows is an error listing their keys, unless a row selected A name naming several rows is an error listing their keys, unless a row selected
before it settles which ([Linked tables](#linked-tables)). A selector is part of the path, so it works before it settles which ([Linked tables](#linked-tables)). A selector is part of the path, so it works
wherever a path does: `Fake`, `FakeRecord`, a `{/misc.country[SE].capital}` reference wherever a path does: `Fake`, `FakeRecord`, a `{/misc.territory[SE].capital}` reference
and a struct tag. A dot inside the brackets belongs to the key or name, so and a struct tag. A dot inside the brackets belongs to the key or name, so
`city[St. Louis]` selects it. A path starts with a name, and `[` still opens a JSON `city[St. Louis]` selects it. A path starts with a name, and `[` still opens a JSON
array at the start of a CLI argument, so `'[SE]'` alone names nothing. array at the start of a CLI argument, so `'[SE]'` alone names nothing.
@@ -505,21 +582,34 @@ stays reproducible.
| `{ulid()}` | sample | ULID, 26 Crockford base32 chars | | `{ulid()}` | sample | ULID, 26 Crockford base32 chars |
| `{nanoid(n)}` | sample | URL-safe Nano ID, `n` chars | | `{nanoid(n)}` | sample | URL-safe Nano ID, `n` chars |
| `{iban(CC)}` | sample | length- and mod-97-valid IBAN for BE, DE, DK, ES, FI, NO or SE | | `{iban(CC)}` | sample | length- and mod-97-valid IBAN for BE, DE, DK, ES, FI, NO or SE |
| `{date(from,to,'layout')}` | sample | a second between two `YYYY-MM-DD` days, both included, in a quoted Go layout: `'2006-01-02'`, `'January 2, 2006'`, `'060102'`, `'2006-01-02T15:04:05Z'` |
| `{time('layout')}` | sample | a second within a day: `'15:04'`, `'3:04 PM'` |
| `{seq()}`, `{seq(name)}` | counter | next integer from 1 in this generator; `name` selects an independent counter | | `{seq()}`, `{seq(name)}` | counter | next integer from 1 in this generator; `name` selects an independent counter |
| `{calc(expr)}`, `{calc(expr,dp)}` | computation | an arithmetic expression over sibling fields ([Computation](#computation)) | | `{calc(expr)}`, `{calc(expr,dp)}` | computation | an arithmetic expression over sibling fields ([Computation](#computation)) |
| `{lowercase(x)}`, `{uppercase(x)}`, `{ascii(x)}` | transform | a field's value rewritten ([Transforms](#transforms)) | | `{lowercase(x)}`, `{uppercase(x)}`, `{ascii(x)}` | transform | a field's value rewritten ([Transforms](#transforms)) |
A derivation reads what is to its left, so place it after its payload; the A derivation reads what is to its left, so place it after its payload; the
buffer is per expansion, so a nested template keeps fixed parts out of the sum. A buffer is per expansion, so a nested template keeps fixed parts out of the sum. A
Swedish personnummer is a Luhn checksum over the nine digits before it: Swedish personnummer is a Luhn checksum over the nine digits before it, six of
them a birthdate:
```json ```json
{ "format": "{century}{core}", "century": ["19", "20"], { "format": "{date(1930-01-01,2010-12-31,'060102')}-{birth}{luhn()}", "birth": ["238", "239"] }
"core": { "format": "{digits(2)}{mmdd}-{digits(3)}{luhn()}", "mmdd": ["0115", "0704", "1218"] } }
``` ```
Renders e.g. `19811218-9876`. `{seq()}` spans `Fake` calls and `repeat`, resets Renders e.g. `811218-2389`. A layout is Go's: the reference time `Mon Jan 2
with a new generator, and is the natural primary key for the SQL example above. 15:04:05 MST 2006` spelled as the output should look, quoted, since a layout may
carry the comma that separates arguments, with English names. Every second
between the two days is reachable, so a layout with a clock draws the time too, and
`from` may equal `to`, which is that one day. The instant is UTC, so a zone in the
layout prints `UTC` or `Z`.
The quotes delimit a layout outside a selector only, so `[O'Fallon]` in an
argument stays a name. Rejected at `New`: a bound that is no calendar date, or not
before the other; an unquoted layout, naming the single-quoted one; a layout naming no field, which is
text, as is one day in a layout with no clock; for `date` a layout naming no date
field, naming `time`; and for `time` a layout naming a date field, naming `date`. `{seq()}` spans `Fake`
calls and `repeat`, resets with a new generator, and is the natural primary key for
the SQL example above.
### Computation ### Computation
@@ -573,9 +663,9 @@ without naming `sv_SE`:
Renders e.g. `Hej, Pat Smith!`. A reference path into a category is held like a Renders e.g. `Hej, Pat Smith!`. A reference path into a category is held like a
[correlated](#correlated-fields) path, but for the whole render — one `Fake`, or one [correlated](#correlated-fields) path, but for the whole render — one `Fake`, or one
record — rather than one format: `{.person.femalefirst} {.person.last}` name one record — rather than one format: `{.person.first} {.person.last}` name one
person, as do the same two references in sibling fields or a nested template, and person, as do the same two references in sibling fields or a nested template, and
`{lowercase(.person.femalefirst)}` reads that same draw. Each `repeat` iteration is `{lowercase(.person.first)}` reads that same draw. Each `repeat` iteration is
a render of its own, in no group, so it draws anew, and a [draw group](#draw-group) holds a a render of its own, in no group, so it draws anew, and a [draw group](#draw-group) holds a
draw apart. A bare reference names no field and makes its own picks each time — draw apart. A bare reference names no field and makes its own picks each time —
`{/misc.uuid} {/misc.uuid}` is two draws — while the reference paths inside what it `{/misc.uuid} {/misc.uuid}` is two draws — while the reference paths inside what it
@@ -594,8 +684,8 @@ its groups by name; the unnamed group spans them all.
```json ```json
{ "format": "{payer} pays {payee}; signed {signature}", { "format": "{payer} pays {payee}; signed {signature}",
"payer": { "format": "{/sv_SE.person.femalefirst} {/sv_SE.person.last}", "drawGroup": "payer" }, "payer": { "format": "{/sv_SE.person.first} {/sv_SE.person.last}", "drawGroup": "payer" },
"payee": "{/sv_SE.person.femalefirst} {/sv_SE.person.last}", "payee": "{/sv_SE.person.first} {/sv_SE.person.last}",
"signature": { "format": "{/sv_SE.person.last}", "drawGroup": "payer" } } "signature": { "format": "{/sv_SE.person.last}", "drawGroup": "payer" } }
``` ```
@@ -672,7 +762,7 @@ a minor only adds, and a major is the only release that changes what exists.
| Surface | Major | Minor | | Surface | Major | Minor |
|---------|-------|-------| |---------|-------|-------|
| Shipped data | remove or rename a path; change a category's format; remove a value, or change a weight or a repeat; add a reference from one shipped category into another; change a table's key, name, weight or parent column, or remove a row | a path outside a record's columns, a locale, a value in a list, a row | | Shipped data | remove or rename a path; change a category's format; remove a value, or change a weight or a repeat; add a reference from one shipped category into another; change a table's key, name, weight or parent column, or remove a row | a path outside a record's columns, a locale, a value in a list, a row |
| Records | remove, rename, retype or add a column; let a column be null | a record, as a new category | | Records (a table is one) | remove, rename, retype or add a column; let a column be null | a record, as a new category |
| Data format | a fence: a spelling `New` rejects that it accepted; a template option, since it reserves a field name | a builtin | | Data format | a fence: a spelling `New` rejects that it accepted; a template option, since it reserves a field name | a builtin |
| CLI | remove or rename a flag, or change its default; change what an exit code means; change the framing a `--format` writes (header, quoting, statement shape), the `--list` layout, or what an error names | a flag, a format | | CLI | remove or rename a flag, or change its default; change what an exit code means; change the framing a `--format` writes (header, quoting, statement shape), the `--list` layout, or what an error names | a flag, a format |
| Library | change or remove an exported name; raise the lowest supported Go | an exported name, a `With…` option | | Library | change or remove an exported name; raise the lowest supported Go | an exported name, a `With…` option |
@@ -697,30 +787,71 @@ datatype and nullability, and each table's key, name, weight and parent columns;
changes it or `data/` adds its `CHANGELOG.md` entry, which CI checks. A removed, changes it or `data/` adds its `CHANGELOG.md` entry, which CI checks. A removed,
renamed or retyped line is a major. renamed or retyped line is a major.
## Audience
App developers writing tests and fixtures, in Go and at a shell:
- a **bulk fixture author**, thousands of rows into CSV or SQL
- a **Go test author**, filling a struct with `FakeStruct`
- a **hand fixture author**, one value at a shell
- a **validator-facing author**, who needs a value a real checker accepts
and a **contributor**, who reads [`todo.md`](todo.md), [`AGENTS.md`](AGENTS.md) and
the Development section below, and who ships a register the four above then draw from.
## Goals ## Goals
1. **Valid by construction** — every value passes the check its real consumer 1. **The best fake-data tool available, and used because it is** — a developer
choosing a seed-data library or CLI, in any language, should find this the one
worth switching to, and every goal below it is what that costs. Merit is only
half the goal: once the grammar, the data and the CLI are complete and stable,
it ships where those developers install from and is announced where they read.
2. **Understanding the code is part of the product** — it is a compiler with static
fences behind a small API, it will grow, and the people who extend it will not be
the people who wrote it. So reading cost is judged alongside behaviour: reaching
the unit behind a symptom without asking a person, changing one piece without
holding the rest, names that tell the truth, and a file that stands with no second
document open beside it. A simulated reader panel scores those four, the score is a
ratchet no release lowers, and [`AGENTS.md`](AGENTS.md) says what each pull request
owes it.
3. **Valid by construction** — every value passes the check its real consumer
applies; facts that belong together come from one draw, within a value and applies; facts that belong together come from one draw, within a value and
across categories. across categories.
2. **Text means what it says** — a format renders as written; only `{…}` varies, 4. **Text means what it says** — a format renders as written; only `{…}` varies,
random characters included (`{digits(3)}`). One spelling per result; the wrong random characters included (`{digits(3)}`). One spelling per result; the wrong
one is a load error naming the right one. one is a load error naming the right one.
3. **Every mistake is a load error** — `New` rejects the data and `NewTemplate` 5. **Every mistake is a load error** — `New` rejects the data and `NewTemplate`
the inline template; on a loaded generator `Fake` fails only for an unknown the inline template; on a loaded generator `Fake` fails only for an unknown
path, `FakeStruct` only for a non-struct argument or a type its tags do not path, `FakeStruct` only for a non-struct argument or a type its tags do not
describe, with the same error every call, and `Template.Fake` cannot fail at all. describe, with the same error every call, and `Template.Fake` cannot fail at all.
4. **Zero to a value in one command** — `go install`, then `fejkdata sv_SE.person`: 6. **Zero to a value in one command** — `go install`, then `fejkdata sv_SE.person`:
no checkout, no flag. Flags are GNU-form (`--seed 42`, `-n 3`) in any position; no checkout, no flag. Flags are GNU-form (`--seed 42`, `-n 3`) in any position;
the first custom template needs no escape and no option. the first custom template needs no escape and no option.
5. **Data lives in JSON** — a builtin only for what data can't express. 7. **Data lives in JSON** — a builtin only for what data can't express.
6. **Reproducible** — seed in, same stream out; no builtin reads a clock. 8. **Reproducible** — seed in, same stream out; no builtin reads a clock.
7. **Zero dependencies** — standard library only. 9. **Zero dependencies** — standard library only.
8. **Docs index the grammar** — every syntax feature is a heading; every example 10. **Docs index the grammar** — every syntax feature is a heading; every example
runs under test and shows its output; a rule is stated once. runs under test and shows its output; a rule is stated once.
9. **Fast enough to be free** — a value renders in about a microsecond and `New` 11. **Fast enough to be free** — a value renders in about a microsecond and `New`
parses and validates the whole set once upfront, so generating fixtures stays parses and validates the whole set once upfront, so generating fixtures stays
noise against a test's own runtime. noise against a test's own runtime.
12. **Data is sourced, or on its way there** — a shipped fact, a name, place,
code, id or classification, is read from a register or open dataset by a
[`data-import/`](data-import) script wherever one exists to read; where none
does yet a small hand-written set ships and [`todo.md`](todo.md) carries the
step that replaces it. Only non-factual copy stays authored. A sourced table
holds the rows its source holds: none is added by hand, and one is dropped
only by a rule the script states.
13. **Breadth follows what most systems store** — a category is added in proportion
to how many real schemas hold it: names, addresses, phones, ids, money and
timestamps before anything domain-specific, and a catalogue serving one niche
waits behind everything serving many.
14. **Realism is the default, inertness is selectable** — where a value could reach
something real, a domain anyone may register or an account a bank could issue,
the realistic breadth ships *and* so does the subset that provably reaches
nothing, each on its own path. A fixture that looks nothing like production
tests nothing; the caller who needs a value that can touch nothing asks for it
by name.
## Decisions ## Decisions
- **Options and fields share one namespace.** `format`, `weight`, `repeat`, - **Options and fields share one namespace.** `format`, `weight`, `repeat`,
@@ -728,8 +859,7 @@ renamed or retyped line is a major.
key, or prefixing options, would tax every template to guard against a key, or prefixing options, would tax every template to guard against a
misspelt option. misspelt option.
- **`{a|b}` stays beside nested choices.** `[[…], […]]` picks the same way, but - **`{a|b}` stays beside nested choices.** `[[…], […]]` picks the same way, but
its arms are anonymous; `{femalefirst|malefirst}` keeps `person.femalefirst` its arms are anonymous; `{female|male}` keeps `person.female` addressable.
addressable.
- **Flags follow getopt_long.** `--name value` and `--name=value` both work; a - **Flags follow getopt_long.** `--name value` and `--name=value` both work; a
short flag's value attaches or follows (`-s42`, `-s 42`) and short flags bundle short flag's value attaches or follows (`-s42`, `-s 42`) and short flags bundle
(`-hn 3`), as every shell user expects. A single-dash long flag is rejected (`-hn 3`), as every shell user expects. A single-dash long flag is rejected
@@ -747,7 +877,9 @@ renamed or retyped line is a major.
library's own advice reachable: the error for an object holding only a format library's own advice reachable: the error for an object holding only a format
names `"…"`, and that spelling has to work where it is printed. An argument or struct names `"…"`, and that spelling has to work where it is printed. An argument or struct
tag of one reference alone, `{/users}`, is refused naming the path `users`: both tag of one reference alone, `{/users}`, is refused naming the path `users`: both
render the same text, and only the path names a record. `IsTemplate` exports the render the same text, and only the path names a record. A folder-relative `{.name}`
or `{..name}` is refused naming `{/name}`, since an inline template sits in no
folder. `IsTemplate` exports the
rule, so the CLI, struct tags and any other caller read one. rule, so the CLI, struct tags and any other caller read one.
- **An inline template skips the cycle fence.** `New` proves the loaded tree - **An inline template skips the cycle fence.** `New` proves the loaded tree
acyclic, an inline node is a finite tree of its own, and nothing in the tree can acyclic, an inline node is a finite tree of its own, and nothing in the tree can
@@ -972,8 +1104,7 @@ renamed or retyped line is a major.
A table is a category with a TSV beside its file, so only a root choice has the A table is a category with a TSV beside its file, so only a root choice has the
spelling the fence names; a nested choice of same-shaped templates and an inline spelling the fence names; a nested choice of same-shaped templates and an inline
one keep loading. Fields must all be strings because a cell is a string node: a one keep loading. Fields must all be strings because a cell is a string node: a
choice whose items carry a nested choice, as `misc.car` does, is not one table but choice whose items carry a nested choice is not one table but two linked ones.
two linked ones, which a later conversion writes.
- **A table is a record of string columns.** Its columns are the CSV header and the - **A table is a record of string columns.** Its columns are the CSV header and the
`INSERT` column list, fixed by the TSV header, so a table is a record by `INSERT` column list, fixed by the TSV header, so a table is a record by
construction; every column is a string until a typed column option earns its place. construction; every column is a string until a typed column option earns its place.
@@ -1035,14 +1166,164 @@ renamed or retyped line is a major.
holding most of its land inside places.** `I- 55 Bus` and `US Hwy 1` carry the holding most of its land inside places.** `I- 55 Bus` and `US Hwy 1` carry the
most address ranges in many places and would head every address, so the import most address ranges in many places and would head every address, so the import
drops names spelled as a route. A ZCTA goes to the place its largest in-place part drops names spelled as a route. A ZCTA goes to the place its largest in-place part
lies in, and ships only when that place does; counting the land outside every lies in, census-designated places left out since they never ship, and ships only
place too would drop a quarter of the places, whose codes straddle unincorporated when that place does, so a few dozen places whose every code lies mostly in a
land, for a postal city the USPS mostly names the same way. bigger neighbour ship no address; counting the land outside every place too would
drop a quarter of the places, whose codes straddle unincorporated land, for a
postal city the USPS mostly names the same way.
- **`--list` stays a plain list of paths.** It is what a script reads, so every line
has to be a path that `Fake` takes; a marker for the tables a `[selector]` follows,
or a legend above them, would make the output something to parse before use.
`--help` names the selector spelling instead, and the Table section teaches it.
- **A layout is always quoted.** A layout may carry the comma that separates
arguments, `'January 2, 2006'`, and one spelling for every layout beats a rule
about which ones need the quotes, so the bare spelling is refused naming the
quoted one. The layout is Go's reference time because the library renders with
it and a Go caller already knows it; its names are English, and a locale's own
month and weekday names are data.
- **A title is a table under `sex`.** A prefix drawn apart would put `Mr` on a record
whose `sex` column says `female`, which is the disagreement the record exists to
prevent; the tables this set already has are what a title needs, so `en_US.title`
links to `sex` as `first-name` does. Swedish has no everyday sexed honorific, so
`sv_SE.title` is a table as well but carries no `parent`. Its weight column is
`share`, not the `count` a name table carries, because the values are a curated
proportion rather than bearers anyone counted.
- **A table owns the spelling of a selector on it.** A reference reaches a table by a
path that carries no selector — `sv_SE.person.first` reads `first-name` through
`sex` — so the walk that resolved a name cannot say where a reader would type one.
The table's own location can, which is why it keeps its path, and why an ambiguity
error names `sv_SE.sex[f].first-name[Kim]` rather than the table's own name.
- **No builtin reads the clock, so a date is bounded by days, never by an age.**
An `age(min,max)` would make a seeded fixture change with the day it runs on,
which is what a seed exists to prevent; a birthdate for someone 20 to 60 is
`date(1966-01-01,2006-12-31,…)`, re-pinned as any fixture is.
- **A name column without a key resolves inside its parent.** A given name both
sexes carry is a row under each, so `name` cannot be the key; the parent's row
tells the two apart, `sex[f].first-name[Kim]`, the ambiguity error spells each
row inside its parent, and a name repeating inside one parent row is refused at
load, since nothing could then select it.
- **`misc` is what every locale shares.** A category whose facts differ by country
belongs in that country's locale, read from the register that country's own
records use; `misc` takes only sources that are international. NHTSA vPIC and
Mobility Sweden's registrations are national, so they build `en_US.car` and
`sv_SE.car`; `misc.car` waits for an international source rather than take one
of theirs.
- **A register's canonical spelling loses to the one its domain writes.** Where a
source offers several spellings of one fact, the shipped one is what records in
that domain carry. `misc.timezone` reads `zone.tab` and not the `zone1970.tab`
that supersedes it, because the latter keeps one zone per set of countries that
have agreed since 1970: it spells Sweden `Europe/Berlin`, and no Swedish system
writes that. For the same reason `misc.language` takes the ISO 639-2 register's
first synonym over CLDR, which says "Chinese, Mandarin" for `zh`.
- **`misc.territory` is the spine, and a `misc` table naming a territory links to
it.** Where every territory row has a child the column is a `parent`, and the
import drops the child rows whose territory the set does not ship — 17 of
`misc.timezone`'s, Antarctica's ten among them. Agreement across a record is
worth more than the last rows of a table. Where no such link can hold the fact
stays a column. Layer your own `misc.territory` over the shipped one and you
must layer `misc.timezone` too, or the link fails at load naming the row.
- **A table whose register publishes no frequency draws evenly.** `misc.httpmethod`,
`misc.port`, `misc.httpstatus`, `misc.mimetype` and `misc.tld` weigh every row alike,
so GET is a ninth of the methods drawn. Goal 10 keeps an authored fact out of a
sourced table, and no register publishes how often a method, a port or a TLD is used,
so a weight here would be invented. Where one exists it is read, as `misc.timezone`
reads GeoNames populations and `sv_SE.first-name` SCB bearers.
- **`misc.port` selects by number, and carries no `name`.** 29 of its services sit on
more than one port, `http-alt` on three, so `misc.port[http-alt]` could name no one
row. The number is what a port field holds anyway, and `misc.port[443].service`
reads the other way.
- **`misc.car` is one flat table, not a make linked to its models.** A row is a make
and a model drawn together, so no render pairs a Volvo with a RAV4. Two linked
tables would reach the same pairs and add a selector nothing asks for; a make alone
is `misc.car.make`.
- **`misc.territory` names its sovereign in a column, and there is no `misc.country`
table.** ISO 3166-1 codes territories, so `territory` is the honest name, and
`is_independent` in the register gives each one's state. A second table of the 195
sovereigns would hold a `DK` row beside the territory `DK` row, both carrying
Denmark's capital, currency, flag and TLD — two owners for one fact, drifting at
the next import. Splitting the columns to avoid that is worse: put `capital` on
the territory alone and a country row can no longer name Copenhagen. The column
cannot be a `parent`, since a table never reaches its own family; a test proves
every value names a row instead. A territory the register records no state for
stands alone, which is `EH` alone, and naming one for it would be a claim
fejkdata has no business making.
- **`misc.loglevel` is a table keyed by the code, rendering POSIX's keyword.** A flat
list of names carries neither the code a PRI encodes nor a selector reaching it, and
goal 3 draws the two as one fact. The canonical spelling losing to the one its domain
writes, above, settles the rest: a configuration writes `info`, so RFC 5424's
`Informational` stays the `severity` column, and the code and the keyword hold the
two selector slots.
- **`misc.tld` keys carry the leading dot, where other tables key on a bare code.**
The register spells a TLD `.se` and `misc.territory.tld` already ships it so, which a
bare key would make two spellings of one fact; `{/misc.tld}` also composes onto a
host with no separator. `misc.tld[se]` misses for it, which `todo.md` carries.
- **`misc.tld` is a table of its own, and `misc.territory.tld` stays a column.** A
`parent` demands a child for every parent row, so linking them would drop every root
zone row naming no territory, which is most of them, and goal 12 holds a sourced
table whole. The loader refuses the link outright anyway: `tld` is a column of
`misc.territory`, and a table may not be named like a column of its ancestor.
- **`misc.territory` carries a currency code, it does not link to `misc.currency`.**
A `parent` demands a child for every parent row, and ISO 4217 registers codes no
country's row can name: the funds codes (Mvdol, WIR Euro, US Dollar (Next day)),
and VED beside VES, both Venezuela's, of which a country row names one. Linking
would trade the register for the link, and `misc.territory.currency` already pairs a
country with its currency in one draw.
- **An extension may name two media types.** `.xml`, `.rtf`, `.sub`, `.mpp` and `.ac`
each name two rows of `misc.mimetype`. Separating them would mean dropping a
registered type, or naming one by an extension that is not its own — `.mpt` is
Project's template, not its document. Selecting such a name is an error listing
both keys; select by type instead.
- **The Swedish ids draw Skatteverket's test series.** A Luhn-valid personnummer
over a random birth number may be a living person's; 238 and 239 after any date
are blocked from assignment, so the shipped `personnummer` and
`samordningsnummer` use those. They sit in a `birth-number` table under `sex`
rather than as a column of it: the render's shared draw of the family is what
makes the number and the name agree on sex, and `sex` stays one shape across
locales instead of collecting every sex-keyed id fact. A samordningsnummer's
day, the birthday plus 60, is drawn from 61 to 88, valid in every month, rather
than computed from the date drawn.
- **The US given names come from a mirror of the SSA file.** ssa.gov refuses a
client outside the US, so `names-us.py` reads a GitHub copy that ends at 2020,
which a count over the births since 1930 barely feels; `--names` takes the
official zip. The SSA's placeholder rows are top-1000 entries that name nobody, so
the import drops them by name rather than by a rank a regeneration would move.
- **`List` advertises direct descents only.** `region.municipality.locality` is - **`List` advertises direct descents only.** `region.municipality.locality` is
listed, and `region.locality` resolves too but is not: the set of every descent listed, and `region.locality` resolves too but is not: the set of every descent
through a chain of five tables is every subsequence of it, and the direct chain is through a chain of five tables is every subsequence of it, and the direct chain is
the one a reader can predict from the tables' parents. the one a reader can predict from the tables' parents.
## Layout
```
fejkdata.go Generator, New, options, the embedded data set, List
node.go the node model and JSON -> node compilation
table.go tables: the rows TSV, its options and links, row selection and draws
path.go the dotted-path walk with its selectors, and proving a path resolves
render.go Fake and the recursive renderer (choices, format strings, expansions)
record.go records: Record, the JSON/CSV/SQL serializers, and their entry points
struct.go structs: FakeStruct, fake tags, and a field's Go type as its column's datatype
inline.go inline templates: Template, NewTemplate, FakeTemplate, IsTemplate, and their compile and link
template.go the {token} grammar: scanning, tokens, operands, validation, compiling a format
hold.go the hold: one draw per expansion for paths and operands, and its fences
draw.go one reference draw per render and group: draw sets, the group option, and its fence
family.go a family of linked tables: the rows a render pins, and the fence over paths into one family
reference.go reference sigils, and binding references across the tree
graph.go the render graph: edges, cycles, the repeat bound, tree walks
builtins.go the {name()} function registry and its implementations
layout.go date and time layouts: the instants one is proved against, and the two samples
checksum.go the check characters a derivation appends, and the IBAN they sit inside
transform.go the builtins that rewrite an operand's value, and the ASCII folding
calc.go the {calc()} arithmetic evaluator: parser, eval, validation
datatype.go column datatypes: DataType, where datatype and null may sit, a column's datatype
value.go the value proof: what a typed column or calc operand holds, checked at load
data.go data loading: fs.FS folders/files -> namespace tree, multi-source merge
cmd/fejkdata/ the fejkdata CLI
data/ shipped data (JSON, and a TSV per table), embedded at build: locale folders, geo, misc
data-import/ the scripts that rebuild each sourced table (see DATA-LICENSES.md)
release-tooling/ the release CI publishes from the changelog heading
testdata/ the pinned shipped shape (see Versioning)
```
## Development ## Development
Everything runs in Docker — **no local tooling beyond Docker is needed**. Everything runs in Docker — **no local tooling beyond Docker is needed**.
@@ -1065,6 +1346,15 @@ docker compose run --rm --user "$(id -u):$(id -g)" fmt # gofmt -w .
docker compose run --rm --user "$(id -u):$(id -g)" tidy # go mod tidy docker compose run --rm --user "$(id -u):$(id -g)" tidy # go mod tidy
``` ```
A `--user` command answering `permission denied` on `/cache` has met root-owned
files in the `gocache` volume: Docker creates the volume root-owned, and every
command here that omits `--user` writes into it as root. Hand it back, and again
whenever it recurs:
```sh
docker compose run --rm --user root --entrypoint chown test -R "$(id -u):$(id -g)" /cache
```
Every pull request runs `docker build .` against both the latest and the lowest Every pull request runs `docker build .` against both the latest and the lowest
supported Go, and must pass before it can be merged — unless it changes none of supported Go, and must pass before it can be merged — unless it changes none of
the files the build and its tests read, nor the workflow itself, in which case the files the build and its tests read, nor the workflow itself, in which case
@@ -1088,16 +1378,32 @@ REPIN=1 docker compose run --rm --user "$(id -u):$(id -g)" test
A shipped table built from a source is rebuilt by its script under A shipped table built from a source is rebuilt by its script under
[`data-import/`](data-import), one command per dataset, fetching the source named in [`data-import/`](data-import), one command per dataset, fetching the source named in
[`DATA-LICENSES.md`](DATA-LICENSES.md). Downloads are cached under [`DATA-LICENSES.md`](DATA-LICENSES.md). Downloads are cached under
`data-import/cache/`, so delete it to fetch afresh; `geo-us.py` fetches two `data-import/cache/`, which is ignored by version control and grows past a
TIGER/Line files per county it ships, a few hundred megabytes, and `geo-se.py` needs gigabyte, so pass `--cache DIR` to reuse a copy you already have and delete it to
fetch afresh; `geo-us.py` fetches two
TIGER/Line files per county it ships, a few hundred megabytes, `geo-se.py` needs
a Trafikverket API key, free at [data.trafikverket.se](https://data.trafikverket.se/), a Trafikverket API key, free at [data.trafikverket.se](https://data.trafikverket.se/),
in `TRAFIKVERKET_API_KEY` or a `--key-file`: in `TRAFIKVERKET_API_KEY` or a `--key-file`, and the Census host behind `geo-us.py`
and `names-us.py` rejects a client for a while after a burst, so `--surnames` takes
a copy of the surname file:
```sh ```sh
docker compose run --rm --user "$(id -u):$(id -g)" data-import data-import/country.py
docker compose run --rm --user "$(id -u):$(id -g)" data-import data-import/currency.py docker compose run --rm --user "$(id -u):$(id -g)" data-import data-import/currency.py
docker compose run --rm --user "$(id -u):$(id -g)" data-import data-import/geo-us.py
docker compose run --rm --user "$(id -u):$(id -g)" -e TRAFIKVERKET_API_KEY data-import data-import/geo-se.py docker compose run --rm --user "$(id -u):$(id -g)" -e TRAFIKVERKET_API_KEY data-import data-import/geo-se.py
docker compose run --rm --user "$(id -u):$(id -g)" data-import data-import/geo-us.py
docker compose run --rm --user "$(id -u):$(id -g)" data-import data-import/httpmethod.py
docker compose run --rm --user "$(id -u):$(id -g)" data-import data-import/httpstatus.py
docker compose run --rm --user "$(id -u):$(id -g)" data-import data-import/language.py
docker compose run --rm --user "$(id -u):$(id -g)" data-import data-import/loglevel.py
docker compose run --rm --user "$(id -u):$(id -g)" data-import data-import/mimetype.py
docker compose run --rm --user "$(id -u):$(id -g)" data-import data-import/names-se.py
docker compose run --rm --user "$(id -u):$(id -g)" data-import data-import/names-us.py
docker compose run --rm --user "$(id -u):$(id -g)" data-import data-import/port.py
docker compose run --rm --user "$(id -u):$(id -g)" data-import data-import/protocol.py
docker compose run --rm --user "$(id -u):$(id -g)" data-import data-import/territory.py
docker compose run --rm --user "$(id -u):$(id -g)" data-import data-import/timezone.py
docker compose run --rm --user "$(id -u):$(id -g)" data-import data-import/tld.py
docker compose run --rm --user "$(id -u):$(id -g)" data-import data-import/useragent.py
``` ```
To release, head `CHANGELOG.md` with the version's section in place of `Unreleased` To release, head `CHANGELOG.md` with the version's section in place of `Unreleased`
@@ -1105,35 +1411,6 @@ and merge: once `main` passes the gate, CI tags that commit `vX.Y.Z` and publish
the Gitea release with the section as its body. A top heading of `[Unreleased]` the Gitea release with the section as its body. A top heading of `[Unreleased]`
publishes nothing. publishes nothing.
## Layout
```
fejkdata.go Generator, New, options, the embedded data set, List
node.go the node model and JSON -> node compilation
table.go tables: the rows TSV, its options and links, row selection and draws
path.go the dotted-path walk with its selectors, and proving a path resolves
render.go Fake and the recursive renderer (choices, format strings, expansions)
record.go records: Record, the JSON/CSV/SQL serializers, and their entry points
struct.go structs: FakeStruct, fake tags, and a field's Go type as its column's datatype
inline.go inline templates: Template, NewTemplate, FakeTemplate, IsTemplate, and their compile and link
template.go the {token} grammar: scanning, tokens, operands, validation, compiling a format
hold.go the hold: one draw per expansion for paths and operands, and its fences
draw.go one reference draw per render and group: draw sets, the group option, and its fence
family.go a family of linked tables: the rows a render pins, and the fence over paths into one family
reference.go reference sigils, and binding references across the tree
graph.go the render graph: edges, cycles, the repeat bound, tree walks
builtins.go the {name()} function registry and its implementations
calc.go the {calc()} arithmetic evaluator: parser, eval, validation
datatype.go column datatypes: DataType, where datatype and null may sit, a column's datatype
value.go the value proof: what a typed column or calc operand holds, checked at load
data.go data loading: fs.FS folders/files -> namespace tree, multi-source merge
cmd/fejkdata/ the fejkdata CLI
data/ shipped data (JSON, and a TSV per table), embedded at build: locale folders, geo, misc
data-import/ the scripts that rebuild each sourced table (see DATA-LICENSES.md)
release-tooling/ the release CI publishes from the changelog heading
testdata/ the pinned shipped shape (see Versioning)
```
## License ## License
MIT — see [LICENSE](LICENSE). Forked from [github.com/Timewave-AB/fakes](https://github.com/Timewave-AB/fakes). MIT — see [LICENSE](LICENSE). Forked from [github.com/Timewave-AB/fakes](https://github.com/Timewave-AB/fakes).
+1 -1
View File
@@ -30,7 +30,7 @@ func BenchmarkPerson(b *testing.B) { benchPath(b, "data", "sv_SE.person") }
func BenchmarkAddress(b *testing.B) { benchPath(b, "data", "sv_SE.address") } func BenchmarkAddress(b *testing.B) { benchPath(b, "data", "sv_SE.address") }
func BenchmarkWord(b *testing.B) { benchPath(b, "data", "sv_SE.word") } func BenchmarkWord(b *testing.B) { benchPath(b, "data", "sv_SE.word") }
func BenchmarkCreditcard(b *testing.B) { benchPath(b, "data", "misc.creditcard") } func BenchmarkCreditcard(b *testing.B) { benchPath(b, "data", "misc.creditcard") }
func BenchmarkSSN(b *testing.B) { benchPath(b, "data", "sv_SE.ssn") } func BenchmarkPersonnummer(b *testing.B) { benchPath(b, "data", "sv_SE.personnummer") }
func BenchmarkUUIDv7(b *testing.B) { benchPath(b, "data", "misc.uuid") } func BenchmarkUUIDv7(b *testing.B) { benchPath(b, "data", "misc.uuid") }
func tmpData(b *testing.B, name, body string) string { func tmpData(b *testing.B, name, body string) string {
+3 -193
View File
@@ -7,7 +7,6 @@ import (
"math" "math"
"strconv" "strconv"
"strings" "strings"
"unicode"
) )
// maxLen caps sample output lengths (hex, nanoid, base64, digits, upper, lower) // maxLen caps sample output lengths (hex, nanoid, base64, digits, upper, lower)
@@ -60,6 +59,8 @@ var builtins = map[string]builtin{
cc := a[0] cc := a[0]
return func(s *session, _ string, _ []string) string { return iban(s, cc) } return func(s *session, _ string, _ []string) string { return iban(s, cc) }
}}, }},
"date": {arity: -1, check: dateArgs, prep: datePrep},
"time": {arity: -1, check: timeArg, prep: timePrep},
"calc": {arity: -1, check: checkCalc, prep: calcPrep, operands: calcOperands}, "calc": {arity: -1, check: checkCalc, prep: calcPrep, operands: calcOperands},
"lowercase": {arity: 1, check: transformArg, prep: transformPrep(strings.ToLower), operands: transformOperand}, "lowercase": {arity: 1, check: transformArg, prep: transformPrep(strings.ToLower), operands: transformOperand},
"uppercase": {arity: 1, check: transformArg, prep: transformPrep(strings.ToUpper), operands: transformOperand}, "uppercase": {arity: 1, check: transformArg, prep: transformPrep(strings.ToUpper), operands: transformOperand},
@@ -88,13 +89,11 @@ func derive(f func(emitted string) string) func([]string) callFn {
return func(_ *session, emitted string, _ []string) string { return f(emitted) } return func(_ *session, emitted string, _ []string) string { return f(emitted) }
} }
} }
func sample(f func(rng) string) func([]string) callFn { func sample(f func(rng) string) func([]string) callFn {
return func([]string) callFn { return func([]string) callFn {
return func(s *session, _ string, _ []string) string { return f(s) } return func(s *session, _ string, _ []string) string { return f(s) }
} }
} }
func chars(alphabet string) func([]string) callFn { func chars(alphabet string) func([]string) callFn {
return func(a []string) callFn { return func(a []string) callFn {
n := atoi(a[0]) n := atoi(a[0])
@@ -113,96 +112,6 @@ func formatFloat(v float64, dp int) string {
return s return s
} }
// transforms are the builtins that rewrite one operand's value; they nest, so
// {lowercase(ascii(x))} folds then lowers.
var transforms = map[string]func(string) string{
"ascii": asciiFold,
"lowercase": strings.ToLower,
"uppercase": strings.ToUpper,
}
// unwrapTransform peels nested transform calls off an operand arg, returning the
// field it finally names and the transforms to apply, innermost last.
func unwrapTransform(arg string) (leaf string, chain []func(string) string, err error) {
for {
name, args, isCall := funcCall(arg)
if !isCall {
return arg, chain, nil
}
fn, isTransform := transforms[name]
if !isTransform {
return "", nil, fmt.Errorf("%s(%s) is not a transform, so it cannot be an operand", name, strings.Join(args, ","))
}
if len(args) != 1 {
return "", nil, fmt.Errorf("%s takes 1 arg, got %d", name, len(args))
}
chain = append(chain, fn)
arg = args[0]
}
}
func transformArg(fields map[string]node, a []string) error {
leaf, _, err := unwrapTransform(a[0])
if err != nil {
return err
}
if isRef(leaf) {
_, _, err := refShape(leaf)
return err
}
return checkArm(leaf, fields, false)
}
func transformOperand(a []string) []string {
leaf, _, err := unwrapTransform(a[0])
if err != nil {
return nil
}
return []string{leaf}
}
func transformPrep(outer func(string) string) func([]string) callFn {
return func(a []string) callFn {
_, chain, err := unwrapTransform(a[0])
if err != nil {
panic(fmt.Sprintf("fejkdata: transform arg %q reached prep unvalidated: %v", a[0], err))
}
return func(_ *session, _ string, operands []string) string {
v := operands[0]
for i := len(chain) - 1; i >= 0; i-- {
v = chain[i](v)
}
return outer(v)
}
}
}
// asciiFolds maps the Latin letters with diacritics or ligatures to ASCII.
var asciiFolds = map[rune]string{
'À': "A", 'Á': "A", 'Â': "A", 'Ã': "A", 'Ä': "A", 'Å': "A", 'Æ': "AE", 'Ç': "C",
'È': "E", 'É': "E", 'Ê': "E", 'Ë': "E", 'Ì': "I", 'Í': "I", 'Î': "I", 'Ï': "I",
'Ð': "D", 'Ñ': "N", 'Ò': "O", 'Ó': "O", 'Ô': "O", 'Õ': "O", 'Ö': "O", 'Ø': "O",
'Ù': "U", 'Ú': "U", 'Û': "U", 'Ü': "U", 'Ý': "Y", 'Þ': "Th", 'ß': "ss", 'Œ': "OE",
'à': "a", 'á': "a", 'â': "a", 'ã': "a", 'ä': "a", 'å': "a", 'æ': "ae", 'ç': "c",
'è': "e", 'é': "e", 'ê': "e", 'ë': "e", 'ì': "i", 'í': "i", 'î': "i", 'ï': "i",
'ð': "d", 'ñ': "n", 'ò': "o", 'ó': "o", 'ô': "o", 'õ': "o", 'ö': "o", 'ø': "o",
'ù': "u", 'ú': "u", 'û': "u", 'ü': "u", 'ý': "y", 'þ': "th", 'ÿ': "y", 'œ': "oe",
}
// asciiFold rewrites s to ASCII: folded Latin letters stay, any other non-ASCII
// rune is dropped.
func asciiFold(s string) string {
var b strings.Builder
for _, r := range s {
if r <= unicode.MaxASCII {
b.WriteRune(r)
} else {
b.WriteString(asciiFolds[r])
}
}
return b.String()
}
// atoi parses an arg a builtin's check already validated. It panics rather than // atoi parses an arg a builtin's check already validated. It panics rather than
// returning zero, so a check that stops covering its own args is a stack trace and // returning zero, so a check that stops covering its own args is a stack trace and
// not a silently wrong length, range or decimal count. // not a silently wrong length, range or decimal count.
@@ -222,7 +131,6 @@ func atof(s string) float64 {
} }
return f return f
} }
func randBytes(r rng, n int) []byte { func randBytes(r rng, n int) []byte {
b := make([]byte, n) b := make([]byte, n)
for i := range b { for i := range b {
@@ -230,7 +138,6 @@ func randBytes(r rng, n int) []byte {
} }
return b return b
} }
func randChars(r rng, n int, alphabet string) string { func randChars(r rng, n int, alphabet string) string {
b := make([]byte, n) b := make([]byte, n)
for i := range b { for i := range b {
@@ -253,7 +160,6 @@ func plainInt(s string) (int, error) {
} }
return n, nil return n, nil
} }
func posIntArg(_ map[string]node, a []string) error { func posIntArg(_ map[string]node, a []string) error {
n, err := plainInt(a[0]) n, err := plainInt(a[0])
if errors.Is(err, strconv.ErrRange) { if errors.Is(err, strconv.ErrRange) {
@@ -270,7 +176,6 @@ func posIntArg(_ map[string]node, a []string) error {
} }
return nil return nil
} }
func intRangeArgs(_ map[string]node, a []string) error { func intRangeArgs(_ map[string]node, a []string) error {
lo, err := plainInt(a[0]) lo, err := plainInt(a[0])
if err != nil { if err != nil {
@@ -291,7 +196,6 @@ func intRangeArgs(_ map[string]node, a []string) error {
} }
return nil return nil
} }
func floatArgs(_ map[string]node, a []string) error { func floatArgs(_ map[string]node, a []string) error {
lo, e1 := strconv.ParseFloat(a[0], 64) lo, e1 := strconv.ParseFloat(a[0], 64)
hi, e2 := strconv.ParseFloat(a[1], 64) hi, e2 := strconv.ParseFloat(a[1], 64)
@@ -319,10 +223,9 @@ func floatArgs(_ map[string]node, a []string) error {
} }
return nil return nil
} }
func seqArg(_ map[string]node, a []string) error { func seqArg(_ map[string]node, a []string) error {
if len(a) > 1 { if len(a) > 1 {
return fmt.Errorf("seq takes at most one name, got %d args", len(a)) return fmt.Errorf("seq takes at most one name, got %d", len(a))
} }
if len(a) == 1 && a[0] == "" { if len(a) == 1 && a[0] == "" {
return fmt.Errorf("seq name must not be empty") return fmt.Errorf("seq name must not be empty")
@@ -373,96 +276,3 @@ func ulid(r rng) string {
} }
return string(out) return string(out)
} }
// luhnCheck returns the Luhn check digit (0-9) over the digits of s; non-digit
// runes are skipped. Doubling runs from the rightmost digit, so the result is
// correct whatever the payload length.
func luhnCheck(s string) int {
sum, double := 0, true
for i := len(s) - 1; i >= 0; i-- {
c := s[i]
if c < '0' || c > '9' {
continue
}
d := int(c - '0')
if double {
if d *= 2; d > 9 {
d -= 9
}
}
double = !double
sum += d
}
return (10 - sum%10) % 10
}
// mod11Check returns the weighted mod-11 check character over the digits of s
// (weights 2..7 cycling from the right). A would-be value of 10 emits 'X', as in
// ISBN-10 / ISO 7064; non-digits are skipped.
func mod11Check(s string) string {
sum, w := 0, 2
for i := len(s) - 1; i >= 0; i-- {
c := s[i]
if c < '0' || c > '9' {
continue
}
sum += int(c-'0') * w
if w++; w > 7 {
w = 2
}
}
if chk := (11 - sum%11) % 11; chk != 10 {
return string(rune('0' + chk))
}
return "X"
}
// eanCheck returns the EAN-13 / UPC-A / ISBN-13 / GTIN check digit over the
// digits of s: weights 3 and 1 alternating from the rightmost digit, mod 10.
func eanCheck(s string) string {
sum, w := 0, 3
for i := len(s) - 1; i >= 0; i-- {
c := s[i]
if c < '0' || c > '9' {
continue
}
sum += int(c-'0') * w
w = 4 - w // 3 <-> 1
}
return string(rune('0' + (10-sum%10)%10))
}
// ibanLen maps a supported country code to the full IBAN length. The check digits
// sit between the country code and the BBAN, so — unlike luhn/ean — iban can't be
// a left-to-right derivation; it generates the whole value instead.
var ibanLen = map[string]int{"BE": 16, "DE": 22, "DK": 18, "ES": 24, "FI": 18, "NO": 15, "SE": 24}
func ibanArg(_ map[string]node, a []string) error {
if _, ok := ibanLen[a[0]]; !ok {
return fmt.Errorf("iban(%q): unsupported country code", a[0])
}
return nil
}
// iban generates a structurally valid IBAN for cc: a numeric BBAN of the right
// length, then mod-97 check digits. Real bank/branch structure isn't modelled —
// the result passes length and checksum validation, which is what fake data needs.
func iban(r rng, cc string) string {
bban := make([]byte, ibanLen[cc]-4)
for i := range bban {
bban[i] = byte('0' + r.IntN(10))
}
rem := 0
feed := func(d int) { rem = (rem*10 + d) % 97 }
for _, c := range bban {
feed(int(c - '0'))
}
for i := 0; i < len(cc); i++ { // letters A-Z -> 10..35, fed as two digits
v := int(cc[i]-'A') + 10
feed(v / 10)
feed(v % 10)
}
feed(0)
feed(0)
return fmt.Sprintf("%s%02d%s", cc, 98-rem, bban)
}
+135
View File
@@ -4,7 +4,9 @@ import (
"encoding/base64" "encoding/base64"
"regexp" "regexp"
"strconv" "strconv"
"strings"
"testing" "testing"
"time"
) )
func TestBuiltinIDGenerators(t *testing.T) { func TestBuiltinIDGenerators(t *testing.T) {
@@ -41,6 +43,7 @@ func TestBuiltinSamplesReproducible(t *testing.T) {
`"{uuid()}"`, `"{ulid()}"`, `"{uuid()}"`, `"{ulid()}"`,
`"{nanoid(12)}"`, `"{int(1,1000000)}"`, `"{nanoid(12)}"`, `"{int(1,1000000)}"`,
`"{float(0,1,6)}"`, `"{base64(12)}"`, `"{iban(SE)}"`, `"{float(0,1,6)}"`, `"{base64(12)}"`, `"{iban(SE)}"`,
`"{date(2000-01-01,2020-12-31,'2006-01-02 15:04:05')}"`, `"{time('15:04:05')}"`,
} { } {
if a, b := mustRender(t, engine(7), tmpl), mustRender(t, engine(7), tmpl); a != b { if a, b := mustRender(t, engine(7), tmpl), mustRender(t, engine(7), tmpl); a != b {
t.Fatalf("%s not reproducible: %q != %q", tmpl, a, b) t.Fatalf("%s not reproducible: %q != %q", tmpl, a, b)
@@ -233,3 +236,135 @@ func TestClassBuiltinArgs(t *testing.T) {
} }
} }
} }
// TestBuiltinDateAndTime pins the two clock-free samples: date draws a second in
// [from 00:00:00, to 23:59:59], both days reachable, and renders it in the quoted Go
// layout, commas and English names included; time draws a second within one day.
func TestBuiltinDateAndTime(t *testing.T) {
f := engine(1)
seen := map[string]bool{}
for i := 0; i < 500; i++ {
got := mustRender(t, f, `"{date(1990-01-01,1990-12-31,'2006-01-02')}"`)
if d, err := time.Parse("2006-01-02", got); err != nil || d.Year() != 1990 {
t.Fatalf("date = %q, want a 1990 calendar date (err %v)", got, err)
}
seen[got] = true
}
if len(seen) < 200 {
t.Fatalf("date drew %d distinct days of 365 in 500, want a uniform spread", len(seen))
}
lo, hi := false, false
for i := 0; i < 200; i++ {
got := mustRender(t, f, `"{date(2020-02-28,2020-02-29,'2006-01-02')}"`)
if got != "2020-02-28" && got != "2020-02-29" {
t.Fatalf("date(2020-02-28,2020-02-29) = %q, out of range", got)
}
lo, hi = lo || got == "2020-02-28", hi || got == "2020-02-29"
}
if !lo || !hi {
t.Fatalf("date never hit a bound: lo=%v hi=%v (bounds must be inclusive)", lo, hi)
}
if got := mustRender(t, f, `"{date(2020-07-04,2020-07-05,'January 2, 2006')}"`); got != "July 4, 2020" && got != "July 5, 2020" {
t.Fatalf("date with a comma in its layout = %q", got)
}
rfc := regexp.MustCompile(`^2021-\d\d-\d\dT\d\d:\d\d:\d\dZ$`)
clock := regexp.MustCompile(`^([01]\d|2[0-3]):[0-5]\d$`)
ampm := regexp.MustCompile(`^(1[0-2]|[1-9]):[0-5]\d (AM|PM)$`)
seconds := map[string]bool{}
for i := 0; i < 300; i++ {
got := mustRender(t, f, `"{date(2021-01-01,2021-12-31,'2006-01-02T15:04:05Z07:00')}"`)
if !rfc.MatchString(got) {
t.Fatalf("date in an RFC 3339 layout = %q, want %s", got, rfc)
}
seconds[got[17:19]] = true
if got := mustRender(t, f, `"{time('15:04')}"`); !clock.MatchString(got) {
t.Fatalf("time('15:04') = %q, want %s", got, clock)
}
if got := mustRender(t, f, `"{time('3:04 PM')}"`); !ampm.MatchString(got) {
t.Fatalf("time('3:04 PM') = %q, want %s", got, ampm)
}
got = mustRender(t, f, `"{date(1950-01-01,2000-12-31,'060102')}-238{luhn()}"`)
if d := digitsOnly(got); len(d) != 10 || !luhnValid(d) {
t.Fatalf("a personnummer over date() = %q, want ten Luhn-valid digits", got)
}
}
if len(seconds) < 30 {
t.Fatalf("date drew %d distinct seconds in 300, want the whole day, not midnight", len(seconds))
}
}
// TestBuiltinDateArgs pins the New-time checks: bounds are calendar dates in order,
// the layout is quoted, names a field, and for time names no date field.
func TestBuiltinDateArgs(t *testing.T) {
for tmpl, want := range map[string]string{
`"{date(1990-13-01,1990-12-31,'2006-01-02')}"`: "1990-13-01",
`"{date(1990-12-31,1990-01-01,'2006-01-02')}"`: "is after",
`"{date(1990-01-01,1990-01-01,'2006-01-02')}"`: "write it as text",
`"{date(1990-01-01,1990-12-31,2006-01-02)}"`: "'2006-01-02'",
`"{date(1990-01-01,1990-12-31,'January 2, 2006)}"`: "'",
`"{date(1990-01-01,1990-12-31,\"January 2, 2006\")}"`: "quoted: 'January 2, 2006'",
`"{date(1990-01-01,1990-12-31,'x')}"`: "text",
`"{date(1990-01-01,1990-12-31,'')}"`: "text",
`"{date(1990-01-01,1990-12-31)}"`: "3 arguments",
`"{date(1990-01-01,1990-12-31,January 2, 2006)}"`: "'January 2, 2006'",
`"{time(3:04 PM, Mon)}"`: "'3:04 PM, Mon'",
`"{time(15:04)}"`: "'15:04'",
`"{time('2006-01-02 15:04')}"`: "date(",
`"{time('x')}"`: "text",
`"{date(1990-01-01,1990-12-31,'15:04')}"`: "time('15:04')",
} {
_, err := compile(parse(t, tmpl))
if err == nil || !strings.Contains(err.Error(), want) {
t.Errorf("compile(%s) = %v, want an error mentioning %q", tmpl, err, want)
}
}
}
// TestBuiltinLayoutErrorsNameARunnableSpelling pins the two layout errors a user
// can follow: a double-quoted layout is named single-quoted, without its own
// quotes carried into the suggestion, whether it split on a comma or not.
func TestBuiltinLayoutErrorsNameARunnableSpelling(t *testing.T) {
_, err := compile(parse(t, `"{date(1990-01-01,1990-12-31,\"2006-01-02\")}"`))
if err == nil || !strings.Contains(err.Error(), "write '2006-01-02'") {
t.Fatalf("a double-quoted layout = %v, want it named single-quoted", err)
}
if strings.Contains(err.Error(), `'"`) {
t.Errorf("%v names a layout that renders its own quotes", err)
}
if !strings.Contains(err.Error(), "is double-quoted") {
t.Errorf("%v does not say which quotes were wrong", err)
}
_, err = compile(parse(t, `"{time(15:04)}"`))
if err == nil || !strings.Contains(err.Error(), "write '15:04'") {
t.Fatalf("a bare layout = %v, want it named quoted", err)
}
// The comma hint belongs to a layout that split, not to a call given extra args.
_, err = compile(parse(t, `"{time(0,12,'15:04')}"`))
if err == nil || !strings.Contains(err.Error(), "takes 1 argument, got 3") {
t.Fatalf("time with three args = %v, want the count named in the singular", err)
}
if strings.Contains(err.Error(), "holding a comma") {
t.Errorf("%v offers the comma hint though the layout is already quoted", err)
}
}
// TestBuiltinDateSpansOneDay pins that from == to is a day: with a clock layout it
// draws every second of it, and without one it could only emit one value.
func TestBuiltinDateSpansOneDay(t *testing.T) {
f := engine(1)
seen := map[string]bool{}
for i := 0; i < 500; i++ {
got := mustRender(t, f, `"{date(2026-01-01,2026-01-01,'2006-01-02 15:04:05')}"`)
if !strings.HasPrefix(got, "2026-01-01 ") {
t.Fatalf("date over one day = %q, out of range", got)
}
seen[got] = true
}
if len(seen) < 400 {
t.Fatalf("date over one day drew %d distinct seconds in 500, want the whole day", len(seen))
}
_, err := compile(parse(t, `"{date(2026-01-01,2026-01-01,'2006-01-02')}"`))
if err == nil || !strings.Contains(err.Error(), "write it as text") {
t.Fatalf("one day in a date-only layout = %v, want it named a constant", err)
}
}
+96
View File
@@ -0,0 +1,96 @@
package fejkdata
import "fmt"
// luhnCheck returns the Luhn check digit (0-9) over the digits of s; non-digit
// runes are skipped. Doubling runs from the rightmost digit, so the result is
// correct whatever the payload length.
func luhnCheck(s string) int {
sum, double := 0, true
for i := len(s) - 1; i >= 0; i-- {
c := s[i]
if c < '0' || c > '9' {
continue
}
d := int(c - '0')
if double {
if d *= 2; d > 9 {
d -= 9
}
}
double = !double
sum += d
}
return (10 - sum%10) % 10
}
// mod11Check returns the weighted mod-11 check character over the digits of s
// (weights 2..7 cycling from the right). A would-be value of 10 emits 'X', as in
// ISBN-10 / ISO 7064; non-digits are skipped.
func mod11Check(s string) string {
sum, w := 0, 2
for i := len(s) - 1; i >= 0; i-- {
c := s[i]
if c < '0' || c > '9' {
continue
}
sum += int(c-'0') * w
if w++; w > 7 {
w = 2
}
}
if chk := (11 - sum%11) % 11; chk != 10 {
return string(rune('0' + chk))
}
return "X"
}
// eanCheck returns the EAN-13 / UPC-A / ISBN-13 / GTIN check digit over the
// digits of s: weights 3 and 1 alternating from the rightmost digit, mod 10.
func eanCheck(s string) string {
sum, w := 0, 3
for i := len(s) - 1; i >= 0; i-- {
c := s[i]
if c < '0' || c > '9' {
continue
}
sum += int(c-'0') * w
w = 4 - w // 3 <-> 1
}
return string(rune('0' + (10-sum%10)%10))
}
// ibanLen maps a supported country code to the full IBAN length. The check digits
// sit between the country code and the BBAN, so — unlike luhn/ean — iban can't be
// a left-to-right derivation; it generates the whole value instead.
var ibanLen = map[string]int{"BE": 16, "DE": 22, "DK": 18, "ES": 24, "FI": 18, "NO": 15, "SE": 24}
func ibanArg(_ map[string]node, a []string) error {
if _, ok := ibanLen[a[0]]; !ok {
return fmt.Errorf("iban(%q): unsupported country code", a[0])
}
return nil
}
// iban generates a structurally valid IBAN for cc: a numeric BBAN of the right
// length, then mod-97 check digits. Real bank/branch structure isn't modelled —
// the result passes length and checksum validation, which is what fake data needs.
func iban(r rng, cc string) string {
bban := make([]byte, ibanLen[cc]-4)
for i := range bban {
bban[i] = byte('0' + r.IntN(10))
}
rem := 0
feed := func(d int) { rem = (rem*10 + d) % 97 }
for _, c := range bban {
feed(int(c - '0'))
}
for i := 0; i < len(cc); i++ { // letters A-Z -> 10..35, fed as two digits
v := int(cc[i]-'A') + 10
feed(v / 10)
feed(v % 10)
}
feed(0)
feed(0)
return fmt.Sprintf("%s%02d%s", cc, 98-rem, bban)
}
+19 -2
View File
@@ -24,10 +24,13 @@ import (
const usage = `Usage: fejkdata [flags] <path|template> const usage = `Usage: fejkdata [flags] <path|template>
<path> a category, or a dotted path into one (person, person.last); <path> a category, or a dotted path into one (person, person.last);
a table's row by key or name: 'misc.country[SE]', 'misc.country[Sweden].tld' a table's row by key or name: 'misc.territory[SE]', 'misc.territory[Sweden].tld'
<template> a format string or JSON value to render inline, e.g. <template> a format string or JSON value to render inline, e.g.
'name: {/sv_SE.person.last}' or '{"format":"{x}","x":["bosse","lina"]}' 'name: {/sv_SE.person.last}' or '{"format":"{x}","x":["bosse","lina"]}'
A layout inside a template is single-quoted, so quote the whole argument with " to
keep it: "{date(1990-01-01,2010-12-31,'2006-01-02')}".
An argument containing a { token, or a JSON object, array or string, is a An argument containing a { token, or a JSON object, array or string, is a
template; any other argument is a path (a path never contains a brace or a quote, template; any other argument is a path (a path never contains a brace or a quote,
and a bracket only as a [selector] after a table's name). Templates reach the and a bracket only as a [selector] after a table's name). Templates reach the
@@ -279,7 +282,7 @@ func (in invocation) check() (argKind, error) {
return argPath, nil return argPath, nil
} }
if len(in.paths) != 1 { if len(in.paths) != 1 {
return argPath, fmt.Errorf("expected one path or template, got %d", len(in.paths)) return argPath, fmt.Errorf("expected one path or template, got %d%s", len(in.paths), templateSplit(in.paths))
} }
return classify(in.paths[0]) return classify(in.paths[0])
} }
@@ -475,11 +478,25 @@ func run(args []string, stdout, stderr io.Writer) int {
return misuse(stderr, te.error) return misuse(stderr, te.error)
} }
fmt.Fprintln(stderr, err) fmt.Fprintln(stderr, err)
if errors.Is(err, fejkdata.ErrNoColumns) {
fmt.Fprintln(stderr, "wrap that JSON in single quotes, which keep a shell from expanding its braces")
}
return 1 return 1
} }
return 0 return 0
} }
// templateSplit names the cure for a template a shell split on its spaces, which is
// what several arguments carrying a token mean.
func templateSplit(paths []string) string {
for _, p := range paths {
if strings.Contains(p, "{") {
return `; a template's spaces split the argument, so wrap the whole argument in "…", or in '…' where it carries double quotes`
}
}
return ""
}
func misuse(stderr io.Writer, err error) int { func misuse(stderr io.Writer, err error) int {
// A library error already names the program, so the prefix is not doubled. // A library error already names the program, so the prefix is not doubled.
fmt.Fprintf(stderr, "fejkdata: %s\ntry 'fejkdata --help'\n", strings.TrimPrefix(err.Error(), "fejkdata: ")) fmt.Fprintf(stderr, "fejkdata: %s\ntry 'fejkdata --help'\n", strings.TrimPrefix(err.Error(), "fejkdata: "))
+28 -2
View File
@@ -223,6 +223,14 @@ func TestRunMisuse(t *testing.T) {
t.Errorf("run(%v) stdout = %q, want nothing", args, out) t.Errorf("run(%v) stdout = %q, want nothing", args, out)
} }
} }
// A template a shell split names both quotings, since which one cures it turns
// on whether the argument carries a double-quoted JSON.
_, _, errb := runOut("{date(1990-01-01,2010-12-31,", "January", "2,", "2006)}")
for _, want := range []string{`wrap the whole argument in "…"`, `or in '…'`} {
if !strings.Contains(errb, want) {
t.Errorf("a split template stderr = %q, want it to name %s", errb, want)
}
}
} }
func TestRunMultipleDataPaths(t *testing.T) { func TestRunMultipleDataPaths(t *testing.T) {
@@ -344,8 +352,8 @@ func TestRunSelectsATableRow(t *testing.T) {
if code, _, errb := runOut("--no-shipped-data", "-d", dir, "[Skåne län]"); code != 2 || !strings.Contains(errb, "JSON") { if code, _, errb := runOut("--no-shipped-data", "-d", dir, "[Skåne län]"); code != 2 || !strings.Contains(errb, "JSON") {
t.Fatalf("[Skåne län] = %d, stderr=%q, want misuse: a leading bracket that is no JSON names nothing", code, errb) t.Fatalf("[Skåne län] = %d, stderr=%q, want misuse: a leading bracket that is no JSON names nothing", code, errb)
} }
if code, out, _ := runOut("--seed", "1", "--format", "csv", "misc.country[SE]"); code != 0 || !strings.HasPrefix(out, "alpha2,") || !strings.Contains(out, "\nSE,SWE,") { if code, out, _ := runOut("--seed", "1", "--format", "csv", "misc.territory[SE]"); code != 0 || !strings.HasPrefix(out, "alpha2,") || !strings.Contains(out, "\nSE,SWE,") {
t.Fatalf("--format csv misc.country[SE] = %d, %q", code, out) t.Fatalf("--format csv misc.territory[SE] = %d, %q", code, out)
} }
} }
@@ -613,3 +621,21 @@ func TestRunNumbersFollowTheShell(t *testing.T) {
t.Errorf("run(--seed 007 --repeat +3) = %d, %q, stderr %q; want the same as --seed 7 --repeat 3 %q", code, got, errb, want) t.Errorf("run(--seed 007 --repeat +3) = %d, %q, stderr %q; want the same as --seed 7 --repeat 3 %q", code, got, errb, want)
} }
} }
// TestRunRecordOfAFieldlessPath pins the way out of asking a category of one value
// for columns: the record to write, and the quoting a shell needs to take it. The
// argument is well-formed and only the data cannot serve it, so the code is 1.
func TestRunRecordOfAFieldlessPath(t *testing.T) {
code, out, errb := runOut("--format", "csv", "sv_SE.personnummer")
if code != 1 {
t.Fatalf("run(--format csv sv_SE.personnummer) = %d, want 1", code)
}
for _, want := range []string{`{"format":"","personnummer":"{/sv_SE.personnummer}"}`, "single quotes"} {
if !strings.Contains(errb, want) {
t.Errorf("stderr = %q, want it to name %s", errb, want)
}
}
if out != "" {
t.Errorf("stdout = %q, want nothing", out)
}
}
+3 -2
View File
@@ -11,6 +11,7 @@ import io
import xml.etree.ElementTree as ET import xml.etree.ElementTree as ET
from pathlib import Path from pathlib import Path
import source
import tsv import tsv
SOURCE = "https://raw.githubusercontent.com/datasets/currency-codes/main/data/codes-all.csv" SOURCE = "https://raw.githubusercontent.com/datasets/currency-codes/main/data/codes-all.csv"
@@ -58,8 +59,8 @@ def main():
p.add_argument("--symbols", nargs="+", default=SYMBOLS) p.add_argument("--symbols", nargs="+", default=SYMBOLS)
p.add_argument("--out", default=str(OUT)) p.add_argument("--out", default=str(OUT))
a = p.parse_args() a = p.parse_args()
symbol = symbols(tsv.fetch(s, a.cache, Path(s).name).decode("utf-8") for s in a.symbols) symbol = symbols(source.fetch(s, a.cache, Path(s).name).decode("utf-8") for s in a.symbols)
table = rows(tsv.fetch(a.source, a.cache, "codes-all.csv").decode("utf-8"), symbol) table = rows(source.fetch(a.source, a.cache, "codes-all.csv").decode("utf-8"), symbol)
tsv.write(a.out, COLUMNS, sorted(table, key=lambda r: r["code"])) tsv.write(a.out, COLUMNS, sorted(table, key=lambda r: r["code"]))
+6 -18
View File
@@ -13,11 +13,12 @@ import os
import re import re
import sys import sys
import urllib.request import urllib.request
import xml.etree.ElementTree as ET
import zipfile import zipfile
from pathlib import Path from pathlib import Path
import source
import tsv import tsv
import xlsx
CODES = "https://www.scb.se/contentassets/7a89e48960f741e08918e489ea36354a/kommunlankod-2026.xlsx" CODES = "https://www.scb.se/contentassets/7a89e48960f741e08918e489ea36354a/kommunlankod-2026.xlsx"
POPULATION = "https://api.scb.se/OV0104/v1/doris/sv/ssd/START/BE/BE0101/BE0101A/BefolkningNy" POPULATION = "https://api.scb.se/OV0104/v1/doris/sv/ssd/START/BE/BE0101/BE0101A/BefolkningNy"
@@ -38,24 +39,11 @@ CACHE = Path(__file__).resolve().parent / "cache"
TIMEZONE = "Europe/Stockholm" TIMEZONE = "Europe/Stockholm"
ONE_POSITION = {"Stockholm", "Göteborg", "Malmö"} ONE_POSITION = {"Stockholm", "Göteborg", "Malmö"}
UNMATCHED_POPULATION = 200 UNMATCHED_POPULATION = 200
XLSX_NS = {"m": "http://schemas.openxmlformats.org/spreadsheetml/2006/main"}
def xlsx_rows(data):
z = zipfile.ZipFile(io.BytesIO(data))
strings = ["".join(t.text or "" for t in si.iter("{%s}t" % XLSX_NS["m"])) for si in ET.fromstring(z.read("xl/sharedStrings.xml")).findall("m:si", XLSX_NS)]
sheet = ET.fromstring(z.read("xl/worksheets/sheet1.xml"))
for row in sheet.findall(".//m:row", XLSX_NS):
cells = []
for c in row.findall("m:c", XLSX_NS):
v = c.find("m:v", XLSX_NS)
cells.append("" if v is None else strings[int(v.text)] if c.get("t") == "s" else v.text)
yield cells
def scb_codes(cache): def scb_codes(cache):
regions, municipalities = {}, {} regions, municipalities = {}, {}
for cells in xlsx_rows(tsv.fetch(CODES, cache, "kommunlankod.xlsx", magic=b"PK")): for cells in xlsx.rows(source.fetch(CODES, cache, "kommunlankod.xlsx", magic=b"PK")):
if len(cells) < 2 or not re.fullmatch(r"\d{2}|\d{4}", cells[0]): if len(cells) < 2 or not re.fullmatch(r"\d{2}|\d{4}", cells[0]):
continue continue
(regions if len(cells[0]) == 2 else municipalities)[cells[0]] = cells[1].strip() (regions if len(cells[0]) == 2 else municipalities)[cells[0]] = cells[1].strip()
@@ -64,12 +52,12 @@ def scb_codes(cache):
def scb_population(cache): def scb_population(cache):
body = json.dumps(POPULATION_QUERY).encode() body = json.dumps(POPULATION_QUERY).encode()
data = tsv.fetch(POPULATION, cache, "befolkning.json", data=body, headers={"Content-Type": "application/json"}) data = source.fetch(POPULATION, cache, "befolkning.json", data=body, headers={"Content-Type": "application/json"})
return {row["key"][0]: row["values"][0] for row in json.loads(data.decode("utf-8-sig"))["data"]} return {row["key"][0]: row["values"][0] for row in json.loads(data.decode("utf-8-sig"))["data"]}
def scb_tatorter(cache): def scb_tatorter(cache):
text = tsv.fetch(TATORTER, cache, "tatorter.csv").decode("utf-8") text = source.fetch(TATORTER, cache, "tatorter.csv").decode("utf-8")
by_name = collections.defaultdict(list) by_name = collections.defaultdict(list)
for r in csv.DictReader(io.StringIO(text)): for r in csv.DictReader(io.StringIO(text)):
by_name[r["tatort"]].append((r["kommun"], int(r["bef"]))) by_name[r["tatort"]].append((r["kommun"], int(r["bef"])))
@@ -77,7 +65,7 @@ def scb_tatorter(cache):
def geonames(cache): def geonames(cache):
z = zipfile.ZipFile(io.BytesIO(tsv.fetch(POSTAL_CODES, cache, "SE.zip", magic=b"PK"))) z = zipfile.ZipFile(io.BytesIO(source.fetch(POSTAL_CODES, cache, "SE.zip", magic=b"PK")))
rows = [] rows = []
for line in z.read("SE.txt").decode("utf-8").splitlines(): for line in z.read("SE.txt").decode("utf-8").splitlines():
f = line.split("\t") f = line.split("\t")
+8 -7
View File
@@ -14,6 +14,7 @@ import sys
import zipfile import zipfile
from pathlib import Path from pathlib import Path
import source
import tsv import tsv
GAZETTEER = "https://www2.census.gov/geo/docs/maps-data/data/gazetteer/2026_Gazetteer/2026_Gaz_{}_national.zip" GAZETTEER = "https://www2.census.gov/geo/docs/maps-data/data/gazetteer/2026_Gazetteer/2026_Gaz_{}_national.zip"
@@ -27,7 +28,7 @@ OUT = Path(__file__).resolve().parent.parent / "data" / "geo" / "US"
CACHE = Path(__file__).resolve().parent / "cache" CACHE = Path(__file__).resolve().parent / "cache"
ESTIMATE = "POPESTIMATE2025" ESTIMATE = "POPESTIMATE2025"
CDP = "57" CDP = "57"
HIGHWAY = re.compile(r"\b(I- |Hwy |Rte |Route |Rd )\d") HIGHWAY = re.compile(r"\b(I- |Hwy |Highway |Loop |Rte |Route |Rd )\d")
SUFFIX = re.compile(r" (city and borough|city|town|village|borough|municipality|comunidad|zona urbana|metropolitan government|metro government|consolidated government|unified government|urban county|corporation|plantation)( \(balance\))?$") SUFFIX = re.compile(r" (city and borough|city|town|village|borough|municipality|comunidad|zona urbana|metropolitan government|metro government|consolidated government|unified government|urban county|corporation|plantation)( \(balance\))?$")
# Places whose Census name is a merged government's; the postal city is what an address carries. # Places whose Census name is a merged government's; the postal city is what an address carries.
NAMES = {"1303440": "Athens", "1304204": "Augusta", "1349008": "Macon", "2148006": "Louisville", "3011397": "Butte", "4732742": "Hartsville", "4752006": "Nashville"} NAMES = {"1303440": "Athens", "1304204": "Augusta", "1349008": "Macon", "2148006": "Louisville", "3011397": "Butte", "4732742": "Hartsville", "4752006": "Nashville"}
@@ -56,14 +57,14 @@ def text(data):
def gazetteer(cache, kind): def gazetteer(cache, kind):
z = zipfile.ZipFile(io.BytesIO(tsv.fetch(GAZETTEER.format(kind), cache, f"gaz_{kind}.zip", magic=b"PK"))) z = zipfile.ZipFile(io.BytesIO(source.fetch(GAZETTEER.format(kind), cache, f"gaz_{kind}.zip", magic=b"PK")))
rows = text(z.read(z.namelist()[0])).splitlines() rows = text(z.read(z.namelist()[0])).splitlines()
header = [h.strip() for h in rows[0].split("|")] header = [h.strip() for h in rows[0].split("|")]
return [dict(zip(header, (c.strip() for c in row.split("|")))) for row in rows[1:]] return [dict(zip(header, (c.strip() for c in row.split("|")))) for row in rows[1:]]
def csv_rows(cache, url, name): def csv_rows(cache, url, name):
return list(csv.DictReader(io.StringIO(text(tsv.fetch(url, cache, name))))) return list(csv.DictReader(io.StringIO(text(source.fetch(url, cache, name)))))
def dbf_rows(data, wanted): def dbf_rows(data, wanted):
@@ -89,7 +90,7 @@ def dbf_rows(data, wanted):
def tiger_zip(cache, kind, county): def tiger_zip(cache, kind, county):
return tsv.fetch(TIGER.format(kind.upper(), county, kind), cache, f"tl_{county}_{kind}.zip", magic=b"PK") return source.fetch(TIGER.format(kind.upper(), county, kind), cache, f"tl_{county}_{kind}.zip", magic=b"PK")
def tiger(cache, kind, county, wanted): def tiger(cache, kind, county, wanted):
@@ -128,10 +129,10 @@ def localities(cache, min_population, counties):
def postal_codes(cache, localities): def postal_codes(cache, localities):
"""Each ZCTA whose largest part inside any place lies in a shipped place.""" """Each ZCTA whose largest part inside an incorporated place lies in a shipped place."""
parts = {} parts = {}
for r in csv.DictReader(io.StringIO(text(tsv.fetch(ZCTA_PLACE, cache, "zcta-place.txt"))), delimiter="|"): for r in csv.DictReader(io.StringIO(text(source.fetch(ZCTA_PLACE, cache, "zcta-place.txt"))), delimiter="|"):
if r["GEOID_ZCTA5_20"] and r["GEOID_PLACE_20"]: if r["GEOID_ZCTA5_20"] and r["GEOID_PLACE_20"] and not r["NAMELSAD_PLACE_20"].endswith(" CDP"):
parts.setdefault(r["GEOID_ZCTA5_20"], []).append((int(r["AREALAND_PART"]), r["GEOID_PLACE_20"])) parts.setdefault(r["GEOID_ZCTA5_20"], []).append((int(r["AREALAND_PART"]), r["GEOID_PLACE_20"]))
largest = {zcta: max(p)[1] for zcta, p in parts.items()} largest = {zcta: max(p)[1] for zcta, p in parts.items()}
return {zcta: place for zcta, place in largest.items() if place in localities} return {zcta: place for zcta, place in largest.items() if place in localities}
+59
View File
@@ -0,0 +1,59 @@
#!/usr/bin/env python3
"""Rebuild data/misc/httpmethod.tsv from the IANA HTTP Method Registry.
data-import/httpmethod.py [--source URL_OR_FILE] [--cache DIR] [--out FILE]
A method ships when the register cites RFC 9110 section 9.3 or RFC 5789 for it, which
is the eight HTTP defines and PATCH; the register's other entries do not. The
register's `yes` and `no` ship as `true` and `false`, which a consumer's boolean reads.
"""
import argparse
import csv
import io
import re
import sys
from pathlib import Path
import source
import tsv
SOURCE = "https://www.iana.org/assignments/http-methods/methods.csv"
OUT = Path(__file__).resolve().parent.parent / "data" / "misc" / "httpmethod.tsv"
CACHE = Path(__file__).resolve().parent / "cache"
COLUMNS = ["idempotent", "method", "safe"]
CORE = re.compile(r"\[RFC9110, Section 9\.3\.|\[RFC5789, Section 2\]")
BOOLEAN = {"yes": "true", "no": "false"}
SELECTOR = '[]{}"|' # mirrors inSelector in table.go
EXPECTED = 9
def rows(text):
for r in csv.DictReader(io.StringIO(text)):
method = (r["Method Name"] or "").strip()
if not CORE.search(r["Reference"] or ""):
continue
if set(method) & set(SELECTOR):
sys.exit(f"{method}: a method holding one of {SELECTOR} is one a selector cannot spell")
answers = {}
for column in ("Safe", "Idempotent"):
answer = (r[column] or "").strip()
if answer not in BOOLEAN:
sys.exit(f"{method}: {column} {answer!r} is neither yes nor no")
answers[column] = BOOLEAN[answer]
yield {"idempotent": answers["Idempotent"], "method": method, "safe": answers["Safe"]}
def main():
p = argparse.ArgumentParser(description=__doc__.splitlines()[0])
p.add_argument("--cache", default=str(CACHE))
p.add_argument("--source", default=SOURCE)
p.add_argument("--out", default=str(OUT))
a = p.parse_args()
table = sorted(rows(source.fetch(a.source, a.cache, "http-methods.csv").decode("utf-8")), key=lambda r: r["method"])
if len(table) != EXPECTED:
sys.exit(f"{len(table)} methods cite RFC 9110 section 9.3 or RFC 5789, not {EXPECTED}; the register's Reference column has moved")
tsv.write(a.out, COLUMNS, table)
if __name__ == "__main__":
main()
+40
View File
@@ -0,0 +1,40 @@
#!/usr/bin/env python3
"""Rebuild data/misc/httpstatus.tsv from the IANA HTTP Status Code Registry.
data-import/httpstatus.py [--source URL_OR_FILE] [--cache DIR] [--out FILE]
What ships is the codes in use: a range, an unassigned code and a qualified reason are all skipped.
"""
import argparse
import csv
import io
from pathlib import Path
import source
import tsv
SOURCE = "https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv"
OUT = Path(__file__).resolve().parent.parent / "data" / "misc" / "httpstatus.tsv"
CACHE = Path(__file__).resolve().parent / "cache"
COLUMNS = ["code", "reason"]
def rows(text):
for r in csv.DictReader(io.StringIO(text)):
code, reason = r["Value"].strip(), r["Description"].strip()
if code.isdigit() and reason and "(" not in reason and reason != "Unassigned":
yield {"code": code, "reason": reason}
def main():
p = argparse.ArgumentParser(description=__doc__.splitlines()[0])
p.add_argument("--cache", default=str(CACHE))
p.add_argument("--source", default=SOURCE)
p.add_argument("--out", default=str(OUT))
a = p.parse_args()
table = rows(source.fetch(a.source, a.cache, "http-status-codes-1.csv").decode("utf-8"))
tsv.write(a.out, COLUMNS, sorted(table, key=lambda r: int(r["code"])))
if __name__ == "__main__":
main()
+45
View File
@@ -0,0 +1,45 @@
#!/usr/bin/env python3
"""Rebuild data/misc/language.tsv from datasets/language-codes (PDDL), the LoC ISO 639-2 register.
data-import/language.py [--source URL_OR_FILE] [--cache DIR] [--out FILE]
Only the 639-2 entries carrying a 639-1 code ship, since the alpha-2 code is the key.
"""
import argparse
import csv
import io
import re
from pathlib import Path
import source
import tsv
SOURCE = "https://raw.githubusercontent.com/datasets/language-codes/main/data/language-codes-full.csv"
OUT = Path(__file__).resolve().parent.parent / "data" / "misc" / "language.tsv"
CACHE = Path(__file__).resolve().parent / "cache"
COLUMNS = ["code", "code3", "name"]
def name(english):
"""The register lists every synonym; the first, without its qualifier, is the one a selector spells."""
return re.sub(r"\s*\([^)]*\)", "", english.split(";")[0]).strip()
def rows(text):
for r in csv.DictReader(io.StringIO(text)):
if r["alpha2"]:
yield {"code": r["alpha2"], "code3": r["alpha3-t"] or r["alpha3-b"], "name": name(r["English"])}
def main():
p = argparse.ArgumentParser(description=__doc__.splitlines()[0])
p.add_argument("--cache", default=str(CACHE))
p.add_argument("--source", default=SOURCE)
p.add_argument("--out", default=str(OUT))
a = p.parse_args()
table = rows(source.fetch(a.source, a.cache, "language-codes-full.csv").decode("utf-8"))
tsv.write(a.out, COLUMNS, sorted(table, key=lambda r: r["code"]))
if __name__ == "__main__":
main()
+68
View File
@@ -0,0 +1,68 @@
#!/usr/bin/env python3
"""Rebuild data/misc/loglevel.tsv from RFC 5424 and POSIX <syslog.h>.
data-import/loglevel.py [--source URL_OR_FILE] [--posix URL_OR_FILE] [--cache DIR] [--out FILE]
Every severity in Table 2 ships, paired to POSIX's keywords by the order each source
lists them, which holds only because a keyword prefixes the severity RFC 5424 numbers
alike.
"""
import argparse
import html
import re
import sys
from pathlib import Path
import source
import tsv
SOURCE = "https://www.rfc-editor.org/rfc/rfc5424.txt"
POSIX = "https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/syslog.h.html"
OUT = Path(__file__).resolve().parent.parent / "data" / "misc" / "loglevel.tsv"
CACHE = Path(__file__).resolve().parent / "cache"
COLUMNS = ["code", "keyword", "severity"]
TABLE = re.compile(r"Table 1\.\s+Syslog Message Facilities(.*?)Table 2\.\s+Syslog Message Severities", re.S)
ROW = re.compile(r"^ +(\d) +([A-Z][a-z]+): ", re.M)
SECTION = re.compile(r"severity level portion of the.*?macros:(.*?)The following shall be declared as functions", re.S)
MACRO = re.compile(r"\bLOG_([A-Z]+)\b")
EXPECTED = 8
def severities(text):
table = TABLE.search(text)
if not table:
sys.exit("the RFC holds no text between the facility and the severity caption; its tables have moved")
return ROW.findall(table.group(1))
def keywords(page):
section = SECTION.search(html.unescape(re.sub(r"<[^>]+>", "", page)))
if not section:
sys.exit("POSIX spells no severity list between its own caption and the function declarations; the page has moved")
return [m.lower() for m in MACRO.findall(section.group(1))]
def main():
p = argparse.ArgumentParser(description=__doc__.splitlines()[0])
p.add_argument("--cache", default=str(CACHE))
p.add_argument("--source", default=SOURCE)
p.add_argument("--posix", default=POSIX)
p.add_argument("--out", default=str(OUT))
a = p.parse_args()
table = sorted(severities(source.fetch(a.source, a.cache, "rfc5424.txt").decode("utf-8")))
codes = [code for code, _ in table]
if codes != [str(i) for i in range(EXPECTED)]:
sys.exit(f"the severity table numbers {codes}, not 0 through {EXPECTED - 1}")
words = keywords(source.fetch(a.posix, a.cache, "posix-syslog.h.html").decode("utf-8"))
if len(words) != EXPECTED:
sys.exit(f"POSIX lists {len(words)} severity macros, not {EXPECTED}: {words}")
rows = []
for (code, severity), keyword in zip(table, words):
if not severity.lower().startswith(keyword):
sys.exit(f"severity {code} is {severity} in the RFC and {keyword} in POSIX, which is no prefix of it")
rows.append({"code": code, "keyword": keyword, "severity": severity})
tsv.write(a.out, COLUMNS, rows)
if __name__ == "__main__":
main()
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/env python3
"""Rebuild data/misc/mimetype.tsv from mime-db (MIT), the IANA media type registry with extensions.
data-import/mimetype.py [--source URL_OR_FILE] [--cache DIR] [--out FILE]
Only types mime-db records as IANA-registered, with a filename extension, ship.
"""
import argparse
import json
from pathlib import Path
import source
import tsv
SOURCE = "https://raw.githubusercontent.com/jshttp/mime-db/master/db.json"
OUT = Path(__file__).resolve().parent.parent / "data" / "misc" / "mimetype.tsv"
CACHE = Path(__file__).resolve().parent / "cache"
COLUMNS = ["ext", "type"]
FIXUPS = {"application/mp4": "mp4s", "audio/mpeg": "mp3", "audio/ogg": "ogg", "video/quicktime": "mov"}
def rows(db):
for mimetype, entry in db.items():
if entry.get("source") == "iana" and entry.get("extensions"):
yield {"ext": "." + FIXUPS.get(mimetype, entry["extensions"][0]), "type": mimetype}
def main():
p = argparse.ArgumentParser(description=__doc__.splitlines()[0])
p.add_argument("--cache", default=str(CACHE))
p.add_argument("--source", default=SOURCE)
p.add_argument("--out", default=str(OUT))
a = p.parse_args()
table = rows(json.loads(source.fetch(a.source, a.cache, "mime-db.json").decode("utf-8")))
tsv.write(a.out, COLUMNS, sorted(table, key=lambda r: r["type"]))
if __name__ == "__main__":
main()
+54
View File
@@ -0,0 +1,54 @@
#!/usr/bin/env python3
"""Rebuild data/sv_SE/first-name.tsv and last-name.tsv from SCB's whole-population name counts (CC0, "Källa: SCB").
data-import/names-se.py [--source URL_OR_FILE] [--first N] [--last N] [--cache DIR] [--out DIR]
A tilltalsnamn goes under each sex that carries it, so a name both sexes carry has two rows.
"""
import argparse
import re
from pathlib import Path
import source
import tsv
import xlsx
SOURCE = "https://www.scb.se/contentassets/9fe7dbb460994c72b835163dbc491ef9/namn-med-minst-tva-barare-31-december-2022.xlsx"
OUT = Path(__file__).resolve().parent.parent / "data" / "sv_SE"
CACHE = Path(__file__).resolve().parent / "cache"
SHEETS = {"f": "Tilltalsnamn kvinnor", "m": "Tilltalsnamn män"}
SURNAMES = "Efternamn"
NAME = re.compile(r"^[^\W\d_]{2,}([ '-][^\W\d_]{2,})*$")
PARTICLES = {"af", "av", "da", "de", "del", "den", "der", "di", "dos", "du", "la", "le", "van", "von"}
def cased(name):
"""SCB's uppercase name as it is written: each part capitalised, a particle before another part lowercased."""
parts = name.lower().split(" ")
return " ".join(w if w in PARTICLES and len(parts) > 1 else w.title() for w in parts)
def counted(rows, top):
"""The top names of a sheet by bearers, initials and single letters dropped."""
names = [(cells[0], int(cells[1])) for cells in rows if len(cells) >= 2 and cells[1].isdigit() and NAME.match(cells[0])]
return sorted(names, key=lambda n: (-n[1], n[0]))[:top]
def main():
p = argparse.ArgumentParser(description=__doc__.splitlines()[0])
p.add_argument("--cache", default=str(CACHE))
p.add_argument("--first", type=int, default=2000, help="names per sex")
p.add_argument("--last", type=int, default=5000)
p.add_argument("--out", default=str(OUT))
p.add_argument("--source", default=SOURCE)
a = p.parse_args()
data = source.fetch(a.source, a.cache, "scb-namn-2022.xlsx", magic=b"PK")
first = [{"name": cased(n), "sex": sex, "count": c} for sex, sheet in SHEETS.items() for n, c in counted(xlsx.rows(data, sheet), a.first)]
last = [{"name": cased(n), "count": c} for n, c in counted(xlsx.rows(data, SURNAMES), a.last)]
out = Path(a.out)
tsv.write(out / "first-name.tsv", ["name", "sex", "count"], sorted(first, key=lambda r: (r["name"], r["sex"])))
tsv.write(out / "last-name.tsv", ["name", "count"], sorted(last, key=lambda r: r["name"]))
if __name__ == "__main__":
main()
+79
View File
@@ -0,0 +1,79 @@
#!/usr/bin/env python3
"""Rebuild data/en_US/first-name.tsv and last-name.tsv from SSA baby names and the Census 2010 surnames (public domain).
data-import/names-us.py [--names URL_OR_FILE] [--surnames URL_OR_FILE] [--from-year YEAR] [--first N] [--last N] [--cache DIR] [--out DIR]
A given name is counted over the births of --from-year and later, under each sex it was given to, so a
name both sexes carry has two rows. --names takes SSA's names.zip or a merged name,sex,count,year file;
--surnames takes the Census names.zip or its Names_2010Census.csv.
"""
import argparse
import collections
import csv
import io
import re
import zipfile
from pathlib import Path
import source
import tsv
NAMES = "https://raw.githubusercontent.com/hackerb9/ssa-baby-names/master/alldata.txt"
SURNAMES = "https://www2.census.gov/topics/genealogy/2010surnames/names.zip"
OUT = Path(__file__).resolve().parent.parent / "data" / "en_US"
CACHE = Path(__file__).resolve().parent / "cache"
MC = re.compile(r"^Mc([a-z])")
PLACEHOLDERS = {"Baby", "Female", "Infant", "Male", "Notnamed", "Unknown", "Unnamed"}
def csv_or_zip_rows(data, member):
"""The rows of a CSV, or of every member of a zip named like member, name,sex,count[,year]."""
if data.startswith(b"PK"):
z = zipfile.ZipFile(io.BytesIO(data))
for n in sorted(z.namelist()):
if re.fullmatch(member, n):
year = re.sub(r"\D", "", n)
for r in csv.reader(io.StringIO(z.read(n).decode("utf-8-sig"))):
yield r + [year] if year else r
return
yield from csv.reader(io.StringIO(data.decode("utf-8-sig")))
def given(data, from_year):
counts = collections.Counter()
for r in csv_or_zip_rows(data, r"yob\d{4}\.txt"):
if len(r) >= 4 and r[3].isdigit() and int(r[3]) >= from_year and r[0] not in PLACEHOLDERS:
counts[(r[0], r[1].lower())] += int(r[2])
return counts
def surname(name):
"""A Census uppercase surname as it is written: capitalised, and Mc before a capital."""
return MC.sub(lambda m: "Mc" + m.group(1).upper(), name.title())
def main():
p = argparse.ArgumentParser(description=__doc__.splitlines()[0])
p.add_argument("--cache", default=str(CACHE))
p.add_argument("--first", type=int, default=2000, help="names per sex")
p.add_argument("--from-year", type=int, default=1930)
p.add_argument("--last", type=int, default=5000)
p.add_argument("--names", default=NAMES)
p.add_argument("--out", default=str(OUT))
p.add_argument("--surnames", default=SURNAMES)
a = p.parse_args()
counts = given(source.fetch(a.names, a.cache, "ssa-names.txt"), a.from_year)
first = []
for sex in ("f", "m"):
top = sorted(((n, c) for (n, s), c in counts.items() if s == sex), key=lambda n: (-n[1], n[0]))[:a.first]
first += [{"name": n, "sex": sex, "count": c} for n, c in top]
rows = csv_or_zip_rows(source.fetch(a.surnames, a.cache, "census-surnames-2010.zip"), r"Names_2010Census\.csv")
last = [{"name": surname(r[0]), "count": int(r[2])} for r in rows if len(r) >= 3 and r[2].isdigit() and r[0].isalpha()]
last = sorted(last, key=lambda r: (-r["count"], r["name"]))[:a.last]
out = Path(a.out)
tsv.write(out / "first-name.tsv", ["name", "sex", "count"], sorted(first, key=lambda r: (r["name"], r["sex"])))
tsv.write(out / "last-name.tsv", ["name", "count"], sorted(last, key=lambda r: r["name"]))
if __name__ == "__main__":
main()
+55
View File
@@ -0,0 +1,55 @@
#!/usr/bin/env python3
"""Rebuild data/misc/port.tsv from the IANA Service Name and Transport Protocol Port Number Registry.
data-import/port.py [--source URL_OR_FILE] [--cache DIR] [--out FILE]
A row needs a service name and a numeric TCP port. A port the registry lists more than
once keeps the first service it describes, or the first of them where it describes none,
so a number selects one row.
"""
import argparse
import csv
import io
import sys
from pathlib import Path
import source
import tsv
SOURCE = "https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.csv"
OUT = Path(__file__).resolve().parent.parent / "data" / "misc" / "port.tsv"
CACHE = Path(__file__).resolve().parent / "cache"
COLUMNS = ["number", "service"]
FLOOR = 4000
def rows(text):
best, described = {}, set()
for r in csv.DictReader(io.StringIO(text)):
service, number = (r["Service Name"] or "").strip(), (r["Port Number"] or "").strip()
transport, description = (r["Transport Protocol"] or "").strip(), (r["Description"] or "").strip()
if transport != "tcp" or not service or not number.isdigit():
continue
if not 1 <= int(number) <= 65535:
sys.exit(f"{service}: port {number} is outside 1-65535")
if number not in best or (description and number not in described):
best[number] = {"number": number, "service": service}
if description:
described.add(number)
return sorted(best.values(), key=lambda r: int(r["number"]))
def main():
p = argparse.ArgumentParser(description=__doc__.splitlines()[0])
p.add_argument("--cache", default=str(CACHE))
p.add_argument("--source", default=SOURCE)
p.add_argument("--out", default=str(OUT))
a = p.parse_args()
table = rows(source.fetch(a.source, a.cache, "service-names-port-numbers.csv").decode("utf-8"))
if len(table) < FLOOR:
sys.exit(f"only {len(table)} ports named a TCP service; the registry's columns have moved")
tsv.write(a.out, COLUMNS, table)
if __name__ == "__main__":
main()
+67
View File
@@ -0,0 +1,67 @@
#!/usr/bin/env python3
"""Rebuild data/misc/protocol.tsv from the IANA Protocol Numbers registry.
data-import/protocol.py [--source URL_OR_FILE] [--cache DIR] [--out FILE]
A row needs a number and a keyword, which drops the seven numbers assigned to a class of
protocols rather than to one; a keyword the registry reserves or marks deprecated goes
too. Where the registry names no protocol beside the keyword, the keyword is the name.
"""
import argparse
import csv
import io
import sys
from pathlib import Path
import source
import tsv
SOURCE = "https://www.iana.org/assignments/protocol-numbers/protocol-numbers-1.csv"
OUT = Path(__file__).resolve().parent.parent / "data" / "misc" / "protocol.tsv"
CACHE = Path(__file__).resolve().parent / "cache"
COLUMNS = ["keyword", "name", "number"]
SKIP = ("Reserved", "deprecated")
SELECTOR = '[]{}"|' # mirrors inSelector in table.go
def rows(text):
for r in csv.DictReader(io.StringIO(text)):
number, keyword = (r["Decimal"] or "").strip(), (r["Keyword"] or "").strip()
if not number.isdigit() or not keyword or any(s in keyword for s in SKIP):
continue
if not 0 <= int(number) <= 255:
sys.exit(f"{keyword}: protocol number {number} is outside 0-255")
yield {"keyword": keyword, "name": " ".join((r["Protocol"] or "").split()) or keyword, "number": number}
def refuse_an_unselectable_row(table):
"""What the loader refuses at New, and a name that names two rows rather than one."""
keywords, names = {}, {}
for r in table:
for column in ("keyword", "name"):
if set(r[column]) & set(SELECTOR):
sys.exit(f"{r['keyword']}: {column} {r[column]!r} holds one of {SELECTOR}, which a selector cannot spell")
if r["keyword"] in keywords:
sys.exit(f"{r['keyword']}: repeats the keyword of protocol {keywords[r['keyword']]}")
keywords[r["keyword"]] = r["number"]
for r in table:
if r["name"] != r["keyword"] and r["name"] in keywords:
sys.exit(f"{r['keyword']}: name {r['name']!r} is another protocol's keyword")
if r["name"] in names:
sys.exit(f"{r['keyword']}: name {r['name']!r} repeats {names[r['name']]}'s, so it selects neither")
names[r["name"]] = r["keyword"]
def main():
p = argparse.ArgumentParser(description=__doc__.splitlines()[0])
p.add_argument("--cache", default=str(CACHE))
p.add_argument("--source", default=SOURCE)
p.add_argument("--out", default=str(OUT))
a = p.parse_args()
table = sorted(rows(source.fetch(a.source, a.cache, "protocol-numbers-1.csv").decode("utf-8")), key=lambda r: int(r["number"]))
refuse_an_unselectable_row(table)
tsv.write(a.out, COLUMNS, table)
if __name__ == "__main__":
main()
+29
View File
@@ -0,0 +1,29 @@
"""A source fetched once into the cache."""
import re
import sys
import time
import urllib.request
from pathlib import Path
def fetch(source, cache, name, magic=b"", data=None, headers=None):
"""The bytes of a URL, downloaded into cache/name once, or of a local file."""
if not re.match(r"^https?://", source):
return Path(source).read_bytes()
path = Path(cache) / name
if path.exists():
return path.read_bytes()
for attempt in range(1, 6):
req = urllib.request.Request(source, data=data, headers={"User-Agent": "fejkdata data-import", **(headers or {})})
try:
with urllib.request.urlopen(req, timeout=600) as r:
body = r.read()
except OSError:
body = b""
if body and body.startswith(magic) and b"Request Rejected" not in body[:512]:
path.parent.mkdir(parents=True, exist_ok=True)
path.write_bytes(body)
return body
if attempt < 5:
time.sleep(10 * attempt)
sys.exit(f"{source}: no valid download in 5 attempts")
@@ -1,20 +1,24 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
"""Rebuild data/misc/country.tsv from datasets/country-codes (PDDL). """Rebuild data/misc/territory.tsv from datasets/country-codes (PDDL).
data-import/country.py [--source URL_OR_FILE] [--cache DIR] [--out FILE] data-import/territory.py [--source URL_OR_FILE] [--cache DIR] [--out FILE]
""" """
import argparse import argparse
import csv import csv
import io import io
import re import re
import sys
from pathlib import Path from pathlib import Path
import source
import tsv import tsv
SOURCE = "https://raw.githubusercontent.com/datasets/country-codes/main/data/country-codes.csv" SOURCE = "https://raw.githubusercontent.com/datasets/country-codes/main/data/country-codes.csv"
OUT = Path(__file__).resolve().parent.parent / "data" / "misc" / "country.tsv" OUT = Path(__file__).resolve().parent.parent / "data" / "misc" / "territory.tsv"
CACHE = Path(__file__).resolve().parent / "cache" CACHE = Path(__file__).resolve().parent / "cache"
COLUMNS = ["alpha2", "alpha3", "calling-code", "capital", "currency", "flag", "languages", "name", "numeric", "tld"] COLUMNS = ["alpha2", "alpha3", "calling-code", "capital", "country", "currency", "flag", "languages", "name", "numeric", "tld"]
SOVEREIGN = re.compile(r"^(?:Part of|Territor(?:y|ies) of|Crown dependency of|Commonwealth of|Associated with) ([A-Z]{2})$")
STANDALONE = {"In contention", "International"}
# Gaps in the source, keyed by alpha2. # Gaps in the source, keyed by alpha2.
FIXUPS = {"TR": {"currency": "TRY"}} FIXUPS = {"TR": {"currency": "TRY"}}
@@ -32,6 +36,16 @@ def languages(field):
return ",".join(p for p in field.split(",") if p) return ",".join(p for p in field.split(",") if p)
def country(alpha2, independent):
"""The sovereign state the register records; a territory it records none for stands alone."""
m = SOVEREIGN.match(independent)
if m:
return m.group(1)
if independent == "Yes" or independent in STANDALONE:
return alpha2
sys.exit(f"{alpha2}: is_independent {independent!r} names no sovereign this script can read")
def rows(text): def rows(text):
for r in csv.DictReader(io.StringIO(text)): for r in csv.DictReader(io.StringIO(text)):
alpha2 = r["ISO3166-1-Alpha-2"] alpha2 = r["ISO3166-1-Alpha-2"]
@@ -40,6 +54,7 @@ def rows(text):
"alpha3": r["ISO3166-1-Alpha-3"], "alpha3": r["ISO3166-1-Alpha-3"],
"calling-code": calling_code(r["Dial"]), "calling-code": calling_code(r["Dial"]),
"capital": r["Capital"], "capital": r["Capital"],
"country": country(alpha2, r["is_independent"]),
"currency": r["ISO4217-currency_alphabetic_code"].split(",")[0], "currency": r["ISO4217-currency_alphabetic_code"].split(",")[0],
"flag": flag(alpha2), "flag": flag(alpha2),
"languages": languages(r["Languages"]), "languages": languages(r["Languages"]),
@@ -58,8 +73,12 @@ def main():
p.add_argument("--source", default=SOURCE) p.add_argument("--source", default=SOURCE)
p.add_argument("--out", default=str(OUT)) p.add_argument("--out", default=str(OUT))
a = p.parse_args() a = p.parse_args()
table = rows(tsv.fetch(a.source, a.cache, "country-codes.csv").decode("utf-8")) table = sorted(rows(source.fetch(a.source, a.cache, "country-codes.csv").decode("utf-8")), key=lambda r: r["alpha2"])
tsv.write(a.out, COLUMNS, sorted(table, key=lambda r: r["alpha2"])) shipped = {r["alpha2"] for r in table}
for r in table:
if r["country"] not in shipped:
sys.exit(f"{r['alpha2']}: country {r['country']} is no shipped territory; a sovereign the set drops leaves its territories unreadable")
tsv.write(a.out, COLUMNS, table)
if __name__ == "__main__": if __name__ == "__main__":
+138
View File
@@ -0,0 +1,138 @@
#!/usr/bin/env python3
"""Rebuild data/misc/timezone.tsv from the IANA tzdb tarball (public domain) and GeoNames (CC BY 4.0).
data-import/timezone.py [--source URL_OR_FILE] [--cities URL_OR_FILE] [--cache DIR] [--out FILE] [--territories FILE]
The offset is the zone's standard offset, the first field of its Zone rule's last
continuation line, with a Link resolved to its target. The weight is the population
GeoNames records in the zone's cities of 15,000 or more, never below that threshold,
so a drawn zone is one people live in.
"""
import argparse
import csv
import io
import re
import sys
import tarfile
import zipfile
from pathlib import Path
import source
import tsv
SOURCE = "https://data.iana.org/time-zones/tzdata-latest.tar.gz"
CITIES = "https://download.geonames.org/export/dump/cities15000.zip"
OUT = Path(__file__).resolve().parent.parent / "data" / "misc" / "timezone.tsv"
TERRITORIES = Path(__file__).resolve().parent.parent / "data" / "misc" / "territory.tsv"
CACHE = Path(__file__).resolve().parent / "cache"
COLUMNS = ["offset", "territory", "weight", "zone"]
REGIONS = ["africa", "antarctica", "asia", "australasia", "backward", "etcetera", "europe", "northamerica", "southamerica"]
# GeoNames' own cutoff, so a zone it records no city in weighs less than one would.
FLOOR = 15000
def member(tar, name):
try:
f = tar.extractfile(name)
except KeyError:
f = None
if f is None:
sys.exit(f"{name}: the tarball no longer holds it as a file; the tzdb layout has moved")
return f.read().decode("utf-8")
def offsets(tar):
"""Every zone's standard offset, and every link's target."""
std, links = {}, {}
for name in REGIONS:
zone = None
for raw in member(tar, name).splitlines():
line = raw.split("#")[0].rstrip()
if not line.strip():
continue
if line.startswith("Zone"):
f = line.split()
zone, std[f[1]] = f[1], f[2]
elif line.startswith("Link"):
f = line.split()
links[f[2]], zone = f[1], None
elif line[0] in " \t" and zone:
std[zone] = line.split()[0]
else:
zone = None
return std, links
def resolve(zone, std, links):
for _ in range(10):
if zone in std:
return std[zone]
if zone not in links:
return None
zone = links[zone]
return None
def utc_offset(raw):
"""±HH:MM from a tzdb STDOFF field, which writes the minutes and seconds only when it has them."""
m = re.match(r"^(-)?(\d{1,2})(?::(\d{2})(?::(\d{2}))?)?$", raw)
if not m or (m.group(4) or "00") != "00":
return None
return f"{'-' if m.group(1) else '+'}{int(m.group(2)):02d}:{m.group(3) or '00'}"
def population(body):
"""The population GeoNames records per timezone, summed over its cities."""
with zipfile.ZipFile(io.BytesIO(body)) as z:
text = z.read("cities15000.txt").decode("utf-8")
per = {}
for city in csv.reader(io.StringIO(text), delimiter="\t", quoting=csv.QUOTE_NONE):
if len(city) > 17 and city[17] and city[14].isdigit():
per[city[17]] = per.get(city[17], 0) + int(city[14])
return per
def rows(tar, territories, pop):
std, links = offsets(tar)
for line in member(tar, "zone.tab").splitlines():
if line.startswith("#") or not line.strip():
continue
fields = line.split("\t")
if len(fields) < 3:
sys.exit(f"zone.tab: {line!r} has {len(fields)} fields; a row names a territory, a location and a zone")
territory, zone = fields[0], fields[2]
if territory not in territories:
continue
raw = resolve(zone, std, links)
if raw is None:
sys.exit(f"{zone}: the tarball gives it no Zone rule and no Link to one")
offset = utc_offset(raw)
if offset is None:
sys.exit(f"{zone}: standard offset {raw!r} is not a ±HH:MM the table can spell")
yield {"offset": offset, "territory": territory, "weight": max(pop.get(zone, 0), FLOOR), "zone": zone}
def main():
p = argparse.ArgumentParser(description=__doc__.splitlines()[0])
p.add_argument("--cache", default=str(CACHE))
p.add_argument("--source", default=SOURCE)
p.add_argument("--out", default=str(OUT))
p.add_argument("--cities", default=CITIES)
p.add_argument("--territories", default=str(TERRITORIES))
a = p.parse_args()
shipped = {r["alpha2"] for r in csv.DictReader(io.StringIO(Path(a.territories).read_text(encoding="utf-8")), delimiter="\t")}
pop = population(source.fetch(a.cities, a.cache, "cities15000.zip", magic=b"PK"))
body = source.fetch(a.source, a.cache, "tzdata-latest.tar.gz", magic=b"\x1f\x8b")
with tarfile.open(fileobj=io.BytesIO(body)) as tar:
table = sorted(rows(tar, shipped, pop), key=lambda r: r["zone"])
print(f"tzdb {tar.extractfile('version').read().decode('utf-8').strip()}", file=sys.stderr)
linked = {r["territory"] for r in table}
if missing := shipped - linked:
sys.exit(f"no zone for {sorted(missing)}; a parent row without a child is a load error")
if (floored := sum(1 for r in table if r["weight"] == FLOOR)) > len(table) // 2:
sys.exit(f"{floored} of {len(table)} zones fell to the floor; GeoNames' population or timezone column has moved")
tsv.write(a.out, COLUMNS, table)
if __name__ == "__main__":
main()
+68
View File
@@ -0,0 +1,68 @@
#!/usr/bin/env python3
"""Rebuild data/misc/tld.tsv from the IANA Root Zone Database.
data-import/tld.py [--source URL_OR_FILE] [--zone URL_OR_FILE] [--cache DIR] [--out FILE]
A TLD ships when the database names a manager for it; one it marks "Not assigned" is a
delegation the root zone no longer holds, and the zone file is fetched to prove the two
agree. The key is the A-label the root zone holds; `unicode` is the form the database
displays, less the bidi marks it wraps a right-to-left label in, and proved to punycode
back to the key.
"""
import argparse
import html
import re
import sys
from pathlib import Path
import source
import tsv
SOURCE = "https://www.iana.org/domains/root/db"
ZONE = "https://data.iana.org/TLD/tlds-alpha-by-domain.txt"
OUT = Path(__file__).resolve().parent.parent / "data" / "misc" / "tld.tsv"
CACHE = Path(__file__).resolve().parent / "cache"
COLUMNS = ["tld", "type", "unicode"]
TYPES = ("country-code", "generic", "generic-restricted", "infrastructure", "sponsored")
BIDI = {0x200E: None, 0x200F: None}
ROW = re.compile(r'<a href="/domains/root/db/([^"]+)\.html">([^<]+)</a>.*?</td>\s*<td>([^<]*)</td>\s*<td>(.*?)</td>', re.S)
def rows(page):
for a_label, shown, kind, manager in ROW.findall(page):
if "Not assigned" in manager:
continue
kind = kind.strip()
if kind not in TYPES:
sys.exit(f"{a_label}: the database types it {kind!r}, which is none of {TYPES}")
yield {"tld": "." + a_label, "type": kind, "unicode": html.unescape(shown).strip().translate(BIDI)}
def prove_each_unicode_form_is_its_key(table):
"""The displayed form is the key's own spelling, which punycode encodes back to."""
for r in table:
label = r["unicode"][1:]
encoded = label if label.isascii() else "xn--" + label.encode("punycode").decode("ascii")
if "." + encoded != r["tld"]:
sys.exit(f"{r['tld']}: the database displays {r['unicode']!r}, which is no spelling of it")
def main():
p = argparse.ArgumentParser(description=__doc__.splitlines()[0])
p.add_argument("--cache", default=str(CACHE))
p.add_argument("--source", default=SOURCE)
p.add_argument("--zone", default=ZONE)
p.add_argument("--out", default=str(OUT))
a = p.parse_args()
table = sorted(rows(source.fetch(a.source, a.cache, "root-db.html").decode("utf-8")), key=lambda r: r["tld"])
prove_each_unicode_form_is_its_key(table)
listing = source.fetch(a.zone, a.cache, "tlds-alpha-by-domain.txt").decode("utf-8")
delegated = {"." + line.strip().lower() for line in listing.splitlines() if line.strip() and not line.startswith("#")}
shipped = {r["tld"] for r in table}
if len(table) != len(delegated) or shipped != delegated:
sys.exit(f"the database assigns {len(table)} rows where the root zone holds {len(delegated)} TLDs: {sorted(shipped ^ delegated)[:10]}")
tsv.write(a.out, COLUMNS, table)
if __name__ == "__main__":
main()
+4 -26
View File
@@ -1,40 +1,18 @@
"""A source fetched once into the cache, and a table written as the loader admits it.""" """A table written as the loader admits it."""
import re import re
import sys import sys
import time
import urllib.request
from pathlib import Path from pathlib import Path
def fetch(source, cache, name, magic=b"", data=None, headers=None):
"""The bytes of a URL, downloaded into cache/name once, or of a local file."""
if not re.match(r"^https?://", source):
return Path(source).read_bytes()
path = Path(cache) / name
for attempt in range(1, 6):
if path.exists():
return path.read_bytes()
req = urllib.request.Request(source, data=data, headers={"User-Agent": "fejkdata data-import", **(headers or {})})
try:
with urllib.request.urlopen(req, timeout=600) as r:
body = r.read()
except OSError:
body = b""
if body and body.startswith(magic) and b"Request Rejected" not in body[:512]:
path.parent.mkdir(parents=True, exist_ok=True)
path.write_bytes(body)
elif attempt < 5:
time.sleep(10 * attempt)
sys.exit(f"{source}: no valid download in 5 attempts")
def write(path, columns, rows): def write(path, columns, rows):
"""Write the rows as a TSV; every cell must be non-empty and free of tabs, newlines and braces.""" """Write the rows as a TSV; the table needs two rows, and every cell must be non-empty and free of tabs, newlines and braces."""
lines = ["\t".join(columns)] lines = ["\t".join(columns)]
for row in rows: for row in rows:
cells = [str(row[c]) for c in columns] cells = [str(row[c]) for c in columns]
if not all(cells) or any(re.search(r"[\t\n{}]", c) for c in cells): if not all(cells) or any(re.search(r"[\t\n{}]", c) for c in cells):
raise ValueError(f"{path}: a cell is empty or holds a tab, newline or brace: {row}") raise ValueError(f"{path}: a cell is empty or holds a tab, newline or brace: {row}")
lines.append("\t".join(cells)) lines.append("\t".join(cells))
if len(lines) < 3:
raise ValueError(f"{path}: has {len(lines) - 1} rows below its header; a table is at least two rows")
Path(path).write_text("\n".join(lines) + "\n", encoding="utf-8") Path(path).write_text("\n".join(lines) + "\n", encoding="utf-8")
print(f"{path}: {len(lines) - 1} rows", file=sys.stderr) print(f"{path}: {len(lines) - 1} rows", file=sys.stderr)
+64
View File
@@ -0,0 +1,64 @@
#!/usr/bin/env python3
"""Rebuild data/misc/useragent.tsv from microlinkhq/top-user-agents (MIT).
data-import/useragent.py [--source URL] [--cache DIR] [--out FILE]
The desktop and mobile lists partition the whole, so `device` is read rather than
parsed. A row ships when the string names a browser and an operating system both.
"""
import argparse
import json
import re
import sys
from pathlib import Path
import source
import tsv
SOURCE = "https://raw.githubusercontent.com/microlinkhq/top-user-agents/master/src"
OUT = Path(__file__).resolve().parent.parent / "data" / "misc" / "useragent.tsv"
CACHE = Path(__file__).resolve().parent / "cache"
COLUMNS = ["browser", "device", "os", "ua"]
# First match wins: a Chromium fork this list does not name ships as Chrome.
BROWSERS = [("Edge", r"Edg(A|iOS)?/"), ("Opera", r"OPR/"), ("Samsung Internet", r"SamsungBrowser/"),
("Chrome", r"(Chrome|CriOS)/"), ("Firefox", r"(Firefox|FxiOS)/"), ("Safari", r"Version/[\d.]+ .*Safari")]
SYSTEMS = [("iOS", r"iPhone|iPad|CPU OS "), ("Android", r"Android"), ("ChromeOS", r"CrOS"),
("Windows", r"Windows NT"), ("macOS", r"Macintosh|Mac OS X"), ("Linux", r"X11.*Linux|Ubuntu")]
def named(table, ua):
for name, pattern in table:
if re.search(pattern, ua):
return name
return ""
def rows(desktop, mobile):
seen, kept = set(), []
for device, uas in (("desktop", desktop), ("mobile", mobile)):
for ua in uas:
browser, os = named(BROWSERS, ua), named(SYSTEMS, ua)
if not browser or not os:
print(f"dropped, naming no {'browser' if not browser else 'operating system'}: {ua}", file=sys.stderr)
continue
if ua in seen:
sys.exit(f"{ua}: listed twice, which would draw it twice as often")
seen.add(ua)
kept.append({"browser": browser, "device": device, "os": os, "ua": ua})
if len(kept) < 0.8 * (len(desktop) + len(mobile)):
sys.exit(f"only {len(kept)} of {len(desktop) + len(mobile)} strings named both; the tokens have moved")
return kept
def main():
p = argparse.ArgumentParser(description=__doc__.splitlines()[0])
p.add_argument("--cache", default=str(CACHE))
p.add_argument("--source", default=SOURCE)
p.add_argument("--out", default=str(OUT))
a = p.parse_args()
lists = [json.loads(source.fetch(f"{a.source}/{n}.json", a.cache, f"top-user-agents-{n}.json")) for n in ("desktop", "mobile")]
tsv.write(a.out, COLUMNS, sorted(rows(*lists), key=lambda r: (r["browser"], r["os"], r["ua"])))
if __name__ == "__main__":
main()
+21
View File
@@ -0,0 +1,21 @@
"""The rows of an xlsx sheet."""
import io
import xml.etree.ElementTree as ET
import zipfile
NS = {"m": "http://schemas.openxmlformats.org/spreadsheetml/2006/main", "r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships"}
def rows(data, sheet=None):
"""The rows of an xlsx sheet named sheet, the first sheet by default, each a list of cell texts."""
z = zipfile.ZipFile(io.BytesIO(data))
strings = ["".join(t.text or "" for t in si.iter("{%s}t" % NS["m"])) for si in ET.fromstring(z.read("xl/sharedStrings.xml")).findall("m:si", NS)]
rels = {r.get("Id"): r.get("Target") for r in ET.fromstring(z.read("xl/_rels/workbook.xml.rels"))}
sheets = {s.get("name"): rels[s.get("{%s}id" % NS["r"])] for s in ET.fromstring(z.read("xl/workbook.xml")).iter("{%s}sheet" % NS["m"])}
target = sheets[sheet] if sheet else next(iter(sheets.values()))
for row in ET.fromstring(z.read("xl/" + target)).findall(".//m:row", NS):
cells = []
for c in row.findall("m:c", NS):
v = c.find("m:v", NS)
cells.append("" if v is None else strings[int(v.text)] if c.get("t") == "s" else v.text)
yield cells
+2 -1
View File
@@ -43,7 +43,7 @@ func loadData(sources []dataSource) (map[string]node, error) {
} }
info, err := os.Stat(src.path) info, err := os.Stat(src.path)
if err != nil { if err != nil {
return nil, err return nil, fmt.Errorf("data path %s: %w", src.path, err)
} }
if !info.IsDir() { if !info.IsDir() {
return nil, fmt.Errorf("%s is not a directory", src.path) return nil, fmt.Errorf("%s is not a directory", src.path)
@@ -62,6 +62,7 @@ func loadData(sources []dataSource) (map[string]node, error) {
if len(root) == 0 { if len(root) == 0 {
return nil, fmt.Errorf("no .json data found") return nil, fmt.Errorf("no .json data found")
} }
setTablePaths(root)
if err := linkTables(root); err != nil { if err := linkTables(root); err != nil {
return nil, err return nil, err
} }
+1 -13
View File
@@ -1,13 +1 @@
{ "{date(1970-01-01,2029-12-31,'01/02/2006')}"
"format": "{month}/{day}/{year}",
"month": ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"],
"day": ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28"],
"year": [
"197{digits(1)}",
"198{digits(1)}",
{ "format": "199{digits(1)}", "weight": 2 },
{ "format": "200{digits(1)}", "weight": 3 },
{ "format": "201{digits(1)}", "weight": 3 },
{ "format": "202{digits(1)}", "weight": 2 }
]
}
+1
View File
@@ -0,0 +1 @@
{ "format": "{name}", "rows": "first-name.tsv", "name": "name", "parent": "sex", "weight": "count" }
File diff suppressed because it is too large Load Diff
+16
View File
@@ -0,0 +1,16 @@
{
"format": "{area}-{group}-{serial}",
"area": "9{digits(2)}",
"group": [
{ "format": "{int(50,65)}", "weight": 16 },
{ "format": "{int(70,88)}", "weight": 19 },
{ "format": "{int(90,92)}", "weight": 3 },
{ "format": "{int(94,99)}", "weight": 6 }
],
"serial": [
{ "format": "000{int(1,9)}", "weight": 9 },
{ "format": "00{int(10,99)}", "weight": 90 },
{ "format": "0{int(100,999)}", "weight": 900 },
{ "format": "{int(1000,9999)}", "weight": 9000 }
]
}
+1
View File
@@ -0,0 +1 @@
{ "format": "{name}", "rows": "last-name.tsv", "key": "name", "weight": "count" }
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -1,7 +1,7 @@
{ {
"format": "{prefix}{femalefirst|malefirst} {last}", "format": "{prefix}{first} {last}",
"femalefirst": ["Abigail", "Addison", "Amelia", "Aria", "Aubrey", "Audrey", "Aurora", "Ava", "Bella", "Brooklyn", "Camila", "Caroline", "Charlotte", "Chloe", "Claire", "Eleanor", "Elizabeth", "Ella", "Ellie", "Emily", "Emma", "Evelyn", "Gianna", "Grace", "Hannah", "Harper", "Hazel", "Isabella", "Layla", "Leah", "Lillian", "Lily", "Lucy", "Luna", "Madison", "Maya", "Mia", "Mila", "Naomi", "Natalie", "Nora", "Olivia", "Paisley", "Penelope", "Riley", "Savannah", "Scarlett", "Sofia", "Sophia", "Stella", "Victoria", "Violet", "Zoe"], "first": "{.first-name.name}",
"malefirst": ["Aiden", "Alexander", "Andrew", "Anthony", "Asher", "Benjamin", "Caleb", "Carter", "Charles", "Christopher", "Daniel", "David", "Dylan", "Elijah", "Ethan", "Ezra", "Gabriel", "Grayson", "Henry", "Isaac", "Jack", "Jackson", "Jacob", "James", "Jayden", "John", "Joseph", "Joshua", "Julian", "Levi", "Liam", "Lincoln", "Logan", "Lucas", "Luke", "Mason", "Mateo", "Matthew", "Michael", "Nathan", "Noah", "Oliver", "Owen", "Samuel", "Sebastian", "Theodore", "Thomas", "William", "Wyatt"], "last": "{.last-name.name}",
"last": ["Adams", "Allen", "Anderson", "Bailey", "Baker", "Bell", "Bennett", "Brooks", "Brown", "Campbell", "Carter", "Clark", "Collins", "Cook", "Cooper", "Cox", "Davis", "Edwards", "Evans", "Flores", "Foster", "Garcia", "Gonzalez", "Gray", "Green", "Hall", "Harris", "Hayes", "Hernandez", "Hill", "Howard", "Hughes", "Jackson", "James", "Jenkins", "Johnson", "Jones", "Kelly", "King", "Lee", "Lewis", "Long", "Lopez", "Martin", "Martinez", "Miller", "Mitchell", "Moore", "Morgan", "Morris", "Murphy", "Nelson", "Parker", "Perez", "Perry", "Peterson", "Phillips", "Powell", "Price", "Ramirez", "Reed", "Richardson", "Rivera", "Roberts", "Robinson", "Rodriguez", "Rogers", "Ross", "Russell", "Sanchez", "Sanders", "Scott", "Smith", "Stewart", "Sullivan", "Taylor", "Thomas", "Thompson", "Torres", "Turner", "Walker", "Ward", "Watson", "White", "Williams", "Wilson", "Wood", "Wright", "Young"], "prefix": [null, { "format": "{.title.name} ", "weight": 0.1 }],
"prefix": ["", { "format": "{title} ", "title": ["Dr", "Miss", "Mr", "Mrs", "Ms", "Mx", "Prof"], "weight": 0.1 }] "sex": "{.sex.name}"
} }
+1
View File
@@ -0,0 +1 @@
{ "format": "{name}", "rows": "sex.tsv", "key": "code", "name": "name" }
+3
View File
@@ -0,0 +1,3 @@
code name
f female
m male
1 code name
2 f female
3 m male
+19 -1
View File
@@ -1 +1,19 @@
"{int(100,999)}-{digits(2)}-{digits(4)}" {
"format": "{area}-{group}-{serial}",
"area": [
{ "format": "00{int(1,9)}", "weight": 9 },
{ "format": "0{int(10,99)}", "weight": 90 },
{ "format": "{int(100,665)}", "weight": 566 },
{ "format": "{int(667,899)}", "weight": 233 }
],
"group": [
{ "format": "0{int(1,9)}", "weight": 9 },
{ "format": "{int(10,99)}", "weight": 90 }
],
"serial": [
{ "format": "000{int(1,9)}", "weight": 9 },
{ "format": "00{int(10,99)}", "weight": 90 },
{ "format": "0{int(100,999)}", "weight": 900 },
{ "format": "{int(1000,9999)}", "weight": 9000 }
]
}
+1 -6
View File
@@ -1,6 +1 @@
{ "{time('3:04 PM')}"
"format": "{hour}:{minute} {ampm}",
"hour": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
"minute": { "format": "{t}{digits(1)}", "t": ["0", "1", "2", "3", "4", "5"] },
"ampm": ["AM", "PM"]
}
+1
View File
@@ -0,0 +1 @@
{ "format": "{name}", "rows": "title.tsv", "name": "name", "parent": "sex", "weight": "share" }
+11
View File
@@ -0,0 +1,11 @@
name sex share
Dr f 6
Dr m 6
Miss f 4
Mr m 60
Mrs f 22
Ms f 30
Mx f 1
Mx m 1
Prof f 3
Prof m 3
1 name sex share
2 Dr f 6
3 Dr m 6
4 Miss f 4
5 Mr m 60
6 Mrs f 22
7 Ms f 30
8 Mx f 1
9 Mx m 1
10 Prof f 3
11 Prof m 3
+7 -2
View File
@@ -224,7 +224,7 @@ code name municipality population lat lon
0648914 Monterey Park 06037 57457 34.04838 -118.133165 0648914 Monterey Park 06037 57457 34.04838 -118.133165
0649138 Moorpark 06111 35023 34.285942 -118.87704 0649138 Moorpark 06111 35023 34.285942 -118.87704
0649270 Moreno Valley 06065 214263 33.923253 -117.205685 0649270 Moreno Valley 06065 214263 33.923253 -117.205685
0649582 Mountain House 06077 25315 37.779716 -121.537195 0649278 Morgan Hill 06085 45625 37.132495 -121.641891
0649670 Mountain View 06085 85438 37.399686 -122.079269 0649670 Mountain View 06085 85438 37.399686 -122.079269
0650076 Murrieta 06065 114124 33.573214 -117.191007 0650076 Murrieta 06065 114124 33.573214 -117.191007
0650258 Napa 06055 76562 38.297118 -122.301008 0650258 Napa 06055 76562 38.297118 -122.301008
@@ -287,6 +287,7 @@ code name municipality population lat lon
0666070 San Dimas 06037 32978 34.107957 -117.808529 0666070 San Dimas 06037 32978 34.107957 -117.808529
0667000 San Francisco 06075 826079 37.727239 -123.032229 0667000 San Francisco 06075 826079 37.727239 -123.032229
0667042 San Gabriel 06037 38186 34.094636 -118.098469 0667042 San Gabriel 06037 38186 34.094636 -118.098469
0667056 Sanger 06019 27228 36.700864 -119.55773
0667112 San Jacinto 06065 56014 33.798864 -116.995914 0667112 San Jacinto 06065 56014 33.798864 -116.995914
0668000 San Jose 06085 989814 37.296011 -121.814552 0668000 San Jose 06085 989814 37.296011 -121.814552
0668028 San Juan Capistrano 06059 35119 33.500889 -117.654388 0668028 San Juan Capistrano 06059 35119 33.500889 -117.654388
@@ -495,6 +496,7 @@ code name municipality population lat lon
1276500 West Melbourne 12009 31285 28.050398 -80.658327 1276500 West Melbourne 12009 31285 28.050398 -80.658327
1276582 Weston 12011 69588 26.100076 -80.401266 1276582 Weston 12011 69588 26.100076 -80.401266
1276600 West Palm Beach 12099 127189 26.745114 -80.127038 1276600 West Palm Beach 12099 127189 26.745114 -80.127038
1278250 Winter Garden 12095 48063 28.541217 -81.597043
1278275 Winter Haven 12105 62313 28.045836 -81.732743 1278275 Winter Haven 12105 62313 28.045836 -81.732743
1278300 Winter Park 12095 30444 28.59663 -81.345748 1278300 Winter Park 12095 30444 28.59663 -81.345748
1278325 Winter Springs 12117 39585 28.695481 -81.272086 1278325 Winter Springs 12117 39585 28.695481 -81.272086
@@ -521,7 +523,6 @@ code name municipality population lat lon
1343192 Kennesaw 13067 37970 34.031195 -84.621287 1343192 Kennesaw 13067 37970 34.031195 -84.621287
1344340 LaGrange 13285 34730 33.02698 -85.038261 1344340 LaGrange 13285 34730 33.02698 -85.038261
1345488 Lawrenceville 13135 32822 33.952875 -83.992231 1345488 Lawrenceville 13135 32822 33.952875 -83.992231
1348288 Mableton 13067 78820 33.812998 -84.576946
1348624 McDonough 13151 33395 33.439611 -84.148899 1348624 McDonough 13151 33395 33.439611 -84.148899
1349008 Macon 13021 157556 32.808995 -83.694051 1349008 Macon 13021 157556 32.808995 -83.694051
1349756 Marietta 13067 63574 33.953561 -84.542463 1349756 Marietta 13067 63574 33.953561 -84.542463
@@ -757,6 +758,7 @@ code name municipality population lat lon
2338740 Lewiston 23001 38866 44.089325 -70.172051 2338740 Lewiston 23001 38866 44.089325 -70.172051
2360545 Portland 23005 69911 43.633157 -70.185305 2360545 Portland 23005 69911 43.633157 -70.185305
2371990 South Portland 23005 27007 43.631402 -70.285989 2371990 South Portland 23005 27007 43.631402 -70.285989
2401600 Annapolis 24003 40634 38.97216 -76.505334
2404000 Baltimore 24510 569997 39.300061 -76.610518 2404000 Baltimore 24510 569997 39.300061 -76.610518
2408775 Bowie 24033 58383 38.954703 -76.738834 2408775 Bowie 24033 58383 38.954703 -76.738834
2418750 College Park 24033 35418 38.996692 -76.936407 2418750 College Park 24033 35418 38.996692 -76.936407
@@ -1037,6 +1039,7 @@ code name municipality population lat lon
3643335 Long Beach 36059 34918 40.585835 -73.665403 3643335 Long Beach 36059 34918 40.585835 -73.665403
3647042 Middletown 36071 30098 41.444922 -74.423573 3647042 Middletown 36071 30098 41.444922 -74.423573
3649121 Mount Vernon 36119 72304 40.913105 -73.829317 3649121 Mount Vernon 36119 72304 40.913105 -73.829317
3650034 Newburgh 36071 28059 41.503249 -74.01964
3650617 New Rochelle 36119 85864 40.923243 -73.779344 3650617 New Rochelle 36119 85864 40.923243 -73.779344
3651000 New York 36047 8584629 40.662712 -73.938677 3651000 New York 36047 8584629 40.662712 -73.938677
3651055 Niagara Falls 36063 47255 43.092841 -79.014743 3651055 Niagara Falls 36063 47255 43.092841 -79.014743
@@ -1472,6 +1475,7 @@ code name municipality population lat lon
5114968 Charlottesville 51540 44388 38.037658 -78.485381 5114968 Charlottesville 51540 44388 38.037658 -78.485381
5116000 Chesapeake 51550 255332 36.679376 -76.301788 5116000 Chesapeake 51550 255332 36.679376 -76.301788
5121344 Danville 51590 41647 36.581754 -79.408258 5121344 Danville 51590 41647 36.581754 -79.408258
5126496 Fairfax 51600 26772 38.853183 -77.299025
5129744 Fredericksburg 51630 30393 38.299272 -77.486658 5129744 Fredericksburg 51630 30393 38.299272 -77.486658
5135000 Hampton 51650 137315 37.047961 -76.297293 5135000 Hampton 51650 137315 37.047961 -76.297293
5135624 Harrisonburg 51660 50839 38.436255 -78.873303 5135624 Harrisonburg 51660 50839 38.436255 -78.873303
@@ -1510,6 +1514,7 @@ code name municipality population lat lon
5338038 Lakewood 53053 62755 47.164092 -122.528106 5338038 Lakewood 53053 62755 47.164092 -122.528106
5340245 Longview 53015 38362 46.145707 -122.964299 5340245 Longview 53015 38362 46.145707 -122.964299
5340840 Lynnwood 53061 42132 47.828979 -122.300672 5340840 Lynnwood 53061 42132 47.828979 -122.300672
5343150 Maple Valley 53033 28482 47.367147 -122.034815
5343955 Marysville 53061 77686 48.080214 -122.154312 5343955 Marysville 53061 77686 48.080214 -122.154312
5345005 Mercer Island 53033 25422 47.564004 -122.231214 5345005 Mercer Island 53033 25422 47.564004 -122.231214
5347245 Moses Lake 53025 27469 47.12785 -119.276384 5347245 Moses Lake 53025 27469 47.12785 -119.276384
1 code name municipality population lat lon
224 0648914 Monterey Park 06037 57457 34.04838 -118.133165
225 0649138 Moorpark 06111 35023 34.285942 -118.87704
226 0649270 Moreno Valley 06065 214263 33.923253 -117.205685
227 0649582 0649278 Mountain House Morgan Hill 06077 06085 25315 45625 37.779716 37.132495 -121.537195 -121.641891
228 0649670 Mountain View 06085 85438 37.399686 -122.079269
229 0650076 Murrieta 06065 114124 33.573214 -117.191007
230 0650258 Napa 06055 76562 38.297118 -122.301008
287 0666070 San Dimas 06037 32978 34.107957 -117.808529
288 0667000 San Francisco 06075 826079 37.727239 -123.032229
289 0667042 San Gabriel 06037 38186 34.094636 -118.098469
290 0667056 Sanger 06019 27228 36.700864 -119.55773
291 0667112 San Jacinto 06065 56014 33.798864 -116.995914
292 0668000 San Jose 06085 989814 37.296011 -121.814552
293 0668028 San Juan Capistrano 06059 35119 33.500889 -117.654388
496 1276500 West Melbourne 12009 31285 28.050398 -80.658327
497 1276582 Weston 12011 69588 26.100076 -80.401266
498 1276600 West Palm Beach 12099 127189 26.745114 -80.127038
499 1278250 Winter Garden 12095 48063 28.541217 -81.597043
500 1278275 Winter Haven 12105 62313 28.045836 -81.732743
501 1278300 Winter Park 12095 30444 28.59663 -81.345748
502 1278325 Winter Springs 12117 39585 28.695481 -81.272086
523 1343192 Kennesaw 13067 37970 34.031195 -84.621287
524 1344340 LaGrange 13285 34730 33.02698 -85.038261
525 1345488 Lawrenceville 13135 32822 33.952875 -83.992231
1348288 Mableton 13067 78820 33.812998 -84.576946
526 1348624 McDonough 13151 33395 33.439611 -84.148899
527 1349008 Macon 13021 157556 32.808995 -83.694051
528 1349756 Marietta 13067 63574 33.953561 -84.542463
758 2338740 Lewiston 23001 38866 44.089325 -70.172051
759 2360545 Portland 23005 69911 43.633157 -70.185305
760 2371990 South Portland 23005 27007 43.631402 -70.285989
761 2401600 Annapolis 24003 40634 38.97216 -76.505334
762 2404000 Baltimore 24510 569997 39.300061 -76.610518
763 2408775 Bowie 24033 58383 38.954703 -76.738834
764 2418750 College Park 24033 35418 38.996692 -76.936407
1039 3643335 Long Beach 36059 34918 40.585835 -73.665403
1040 3647042 Middletown 36071 30098 41.444922 -74.423573
1041 3649121 Mount Vernon 36119 72304 40.913105 -73.829317
1042 3650034 Newburgh 36071 28059 41.503249 -74.01964
1043 3650617 New Rochelle 36119 85864 40.923243 -73.779344
1044 3651000 New York 36047 8584629 40.662712 -73.938677
1045 3651055 Niagara Falls 36063 47255 43.092841 -79.014743
1475 5114968 Charlottesville 51540 44388 38.037658 -78.485381
1476 5116000 Chesapeake 51550 255332 36.679376 -76.301788
1477 5121344 Danville 51590 41647 36.581754 -79.408258
1478 5126496 Fairfax 51600 26772 38.853183 -77.299025
1479 5129744 Fredericksburg 51630 30393 38.299272 -77.486658
1480 5135000 Hampton 51650 137315 37.047961 -76.297293
1481 5135624 Harrisonburg 51660 50839 38.436255 -78.873303
1514 5338038 Lakewood 53053 62755 47.164092 -122.528106
1515 5340245 Longview 53015 38362 46.145707 -122.964299
1516 5340840 Lynnwood 53061 42132 47.828979 -122.300672
1517 5343150 Maple Valley 53033 28482 47.367147 -122.034815
1518 5343955 Marysville 53061 77686 48.080214 -122.154312
1519 5345005 Mercer Island 53033 25422 47.564004 -122.231214
1520 5347245 Moses Lake 53025 27469 47.12785 -119.276384
+2
View File
@@ -255,6 +255,7 @@ code name region population
23001 Androscoggin County ME 116487 23001 Androscoggin County ME 116487
23005 Cumberland County ME 317222 23005 Cumberland County ME 317222
23019 Penobscot County ME 157967 23019 Penobscot County ME 157967
24003 Anne Arundel County MD 603380
24021 Frederick County MD 302883 24021 Frederick County MD 302883
24031 Montgomery County MD 1074582 24031 Montgomery County MD 1074582
24033 Prince George's County MD 970374 24033 Prince George's County MD 970374
@@ -601,6 +602,7 @@ code name region population
51540 Charlottesville city VA 44388 51540 Charlottesville city VA 44388
51550 Chesapeake city VA 255332 51550 Chesapeake city VA 255332
51590 Danville city VA 41647 51590 Danville city VA 41647
51600 Fairfax city VA 26772
51630 Fredericksburg city VA 30393 51630 Fredericksburg city VA 30393
51650 Hampton city VA 137315 51650 Hampton city VA 137315
51660 Harrisonburg city VA 50839 51660 Harrisonburg city VA 50839
1 code name region population
255 23001 Androscoggin County ME 116487
256 23005 Cumberland County ME 317222
257 23019 Penobscot County ME 157967
258 24003 Anne Arundel County MD 603380
259 24021 Frederick County MD 302883
260 24031 Montgomery County MD 1074582
261 24033 Prince George's County MD 970374
602 51540 Charlottesville city VA 44388
603 51550 Chesapeake city VA 255332
604 51590 Danville city VA 41647
605 51600 Fairfax city VA 26772
606 51630 Fredericksburg city VA 30393
607 51650 Hampton city VA 137315
608 51660 Harrisonburg city VA 50839
File diff suppressed because it is too large Load Diff
+1443 -1393
View File
File diff suppressed because it is too large Load Diff
+1 -10
View File
@@ -1,10 +1 @@
[ { "format": "{make} {model}", "rows": "car.tsv" }
{ "format": "{maker} {model}", "maker": "BMW", "model": ["3 Series", "5 Series", "X3", "X5"] },
{ "format": "{maker} {model}", "maker": "Ford", "model": ["Fiesta", "Focus", "Mustang", "Explorer"] },
{ "format": "{maker} {model}", "maker": "Honda", "model": ["Civic", "Accord", "CR-V", "Jazz"] },
{ "format": "{maker} {model}", "maker": "Mercedes-Benz", "model": ["A-Class", "C-Class", "E-Class", "GLC"] },
{ "format": "{maker} {model}", "maker": "Tesla", "model": ["Model 3", "Model S", "Model X", "Model Y"] },
{ "format": "{maker} {model}", "maker": "Toyota", "model": ["Corolla", "Camry", "RAV4", "Yaris"] },
{ "format": "{maker} {model}", "maker": "Volkswagen", "model": ["Golf", "Passat", "Polo", "Tiguan"] },
{ "format": "{maker} {model}", "maker": "Volvo", "model": ["XC40", "XC60", "XC90", "V60"] }
]
+33
View File
@@ -0,0 +1,33 @@
make model
BMW 3 Series
BMW 5 Series
BMW X3
BMW X5
Ford Explorer
Ford Fiesta
Ford Focus
Ford Mustang
Honda Accord
Honda CR-V
Honda Civic
Honda Jazz
Mercedes-Benz A-Class
Mercedes-Benz C-Class
Mercedes-Benz E-Class
Mercedes-Benz GLC
Tesla Model 3
Tesla Model S
Tesla Model X
Tesla Model Y
Toyota Camry
Toyota Corolla
Toyota RAV4
Toyota Yaris
Volkswagen Golf
Volkswagen Passat
Volkswagen Polo
Volkswagen Tiguan
Volvo V60
Volvo XC40
Volvo XC60
Volvo XC90
1 make model
2 BMW 3 Series
3 BMW 5 Series
4 BMW X3
5 BMW X5
6 Ford Explorer
7 Ford Fiesta
8 Ford Focus
9 Ford Mustang
10 Honda Accord
11 Honda CR-V
12 Honda Civic
13 Honda Jazz
14 Mercedes-Benz A-Class
15 Mercedes-Benz C-Class
16 Mercedes-Benz E-Class
17 Mercedes-Benz GLC
18 Tesla Model 3
19 Tesla Model S
20 Tesla Model X
21 Tesla Model Y
22 Toyota Camry
23 Toyota Corolla
24 Toyota RAV4
25 Toyota Yaris
26 Volkswagen Golf
27 Volkswagen Passat
28 Volkswagen Polo
29 Volkswagen Tiguan
30 Volvo V60
31 Volvo XC40
32 Volvo XC60
33 Volvo XC90
-1
View File
@@ -1 +0,0 @@
{ "format": "{name}", "rows": "country.tsv", "key": "alpha2", "name": "name" }
-242
View File
@@ -1,242 +0,0 @@
alpha2 alpha3 calling-code capital currency flag languages name numeric tld
AD AND 376 Andorra la Vella EUR 🇦🇩 ca Andorra 020 .ad
AE ARE 971 Abu Dhabi AED 🇦🇪 ar-AE,fa,en,hi,ur United Arab Emirates 784 .ae
AF AFG 93 Kabul AFN 🇦🇫 fa-AF,ps,uz-AF,tk Afghanistan 004 .af
AG ATG 1-268 St. John's XCD 🇦🇬 en-AG Antigua & Barbuda 028 .ag
AI AIA 1-264 The Valley XCD 🇦🇮 en-AI Anguilla 660 .ai
AL ALB 355 Tirana ALL 🇦🇱 sq,el Albania 008 .al
AM ARM 374 Yerevan AMD 🇦🇲 hy Armenia 051 .am
AO AGO 244 Luanda AOA 🇦🇴 pt-AO Angola 024 .ao
AR ARG 54 Buenos Aires ARS 🇦🇷 es-AR,en,it,de,fr,gn Argentina 032 .ar
AS ASM 1-684 Pago Pago USD 🇦🇸 en-AS,sm,to American Samoa 016 .as
AT AUT 43 Vienna EUR 🇦🇹 de-AT,hr,hu,sl Austria 040 .at
AU AUS 61 Canberra AUD 🇦🇺 en-AU Australia 036 .au
AW ABW 297 Oranjestad AWG 🇦🇼 nl-AW,pap,es,en Aruba 533 .aw
AX ALA 358 Mariehamn EUR 🇦🇽 sv-AX Åland Islands 248 .ax
AZ AZE 994 Baku AZN 🇦🇿 az,ru,hy Azerbaijan 031 .az
BA BIH 387 Sarajevo BAM 🇧🇦 bs,hr-BA,sr-BA Bosnia 070 .ba
BB BRB 1-246 Bridgetown BBD 🇧🇧 en-BB Barbados 052 .bb
BD BGD 880 Dhaka BDT 🇧🇩 bn-BD,en Bangladesh 050 .bd
BE BEL 32 Brussels EUR 🇧🇪 nl-BE,fr-BE,de-BE Belgium 056 .be
BF BFA 226 Ouagadougou XOF 🇧🇫 fr-BF,mos Burkina Faso 854 .bf
BG BGR 359 Sofia EUR 🇧🇬 bg,tr-BG,rom Bulgaria 100 .bg
BH BHR 973 Manama BHD 🇧🇭 ar-BH,en,fa,ur Bahrain 048 .bh
BI BDI 257 Gitega BIF 🇧🇮 fr-BI,rn Burundi 108 .bi
BJ BEN 229 Porto-Novo XOF 🇧🇯 fr-BJ Benin 204 .bj
BL BLM 590 Gustavia EUR 🇧🇱 fr St. Barthélemy 652 .gp
BM BMU 1-441 Hamilton BMD 🇧🇲 en-BM,pt Bermuda 060 .bm
BN BRN 673 Bandar Seri Begawan BND 🇧🇳 ms-BN,en-BN Brunei 096 .bn
BO BOL 591 Sucre BOB 🇧🇴 es-BO,qu,ay Bolivia 068 .bo
BR BRA 55 Brasilia BRL 🇧🇷 pt-BR,es,en,fr Brazil 076 .br
BS BHS 1-242 Nassau BSD 🇧🇸 en-BS Bahamas 044 .bs
BT BTN 975 Thimphu INR 🇧🇹 dz Bhutan 064 .bt
BW BWA 267 Gaborone BWP 🇧🇼 en-BW,tn-BW Botswana 072 .bw
BY BLR 375 Minsk BYN 🇧🇾 be,ru Belarus 112 .by
BZ BLZ 501 Belmopan BZD 🇧🇿 en-BZ,es Belize 084 .bz
CA CAN 1 Ottawa CAD 🇨🇦 en-CA,fr-CA,iu Canada 124 .ca
CC CCK 61 West Island AUD 🇨🇨 ms-CC,en Cocos Islands 166 .cc
CD COD 243 Kinshasa CDF 🇨🇩 fr-CD,ln,ktu,kg,sw,lua Congo - Kinshasa 180 .cd
CF CAF 236 Bangui XAF 🇨🇫 fr-CF,sg,ln,kg Central African Republic 140 .cf
CG COG 242 Brazzaville XAF 🇨🇬 fr-CG,kg,ln-CG Congo - Brazzaville 178 .cg
CH CHE 41 Bern CHF 🇨🇭 de-CH,fr-CH,it-CH,rm Switzerland 756 .ch
CI CIV 225 Yamoussoukro XOF 🇨🇮 fr-CI Côte d’Ivoire 384 .ci
CK COK 682 Avarua NZD 🇨🇰 en-CK,mi Cook Islands 184 .ck
CL CHL 56 Santiago CLP 🇨🇱 es-CL Chile 152 .cl
CM CMR 237 Yaounde XAF 🇨🇲 en-CM,fr-CM Cameroon 120 .cm
CN CHN 86 Beijing CNY 🇨🇳 zh-CN,yue,wuu,dta,ug,za China 156 .cn
CO COL 57 Bogota COP 🇨🇴 es-CO Colombia 170 .co
CR CRI 506 San Jose CRC 🇨🇷 es-CR,en Costa Rica 188 .cr
CU CUB 53 Havana CUP 🇨🇺 es-CU,pap Cuba 192 .cu
CV CPV 238 Praia CVE 🇨🇻 pt-CV Cape Verde 132 .cv
CW CUW 599 Willemstad XCG 🇨🇼 nl,pap Curaçao 531 .cw
CX CXR 61 Flying Fish Cove AUD 🇨🇽 en,zh,ms-CX Christmas Island 162 .cx
CY CYP 357 Nicosia EUR 🇨🇾 el-CY,tr-CY,en Cyprus 196 .cy
CZ CZE 420 Prague CZK 🇨🇿 cs,sk Czechia 203 .cz
DE DEU 49 Berlin EUR 🇩🇪 de Germany 276 .de
DJ DJI 253 Djibouti DJF 🇩🇯 fr-DJ,ar,so-DJ,aa Djibouti 262 .dj
DK DNK 45 Copenhagen DKK 🇩🇰 da-DK,en,fo,de-DK Denmark 208 .dk
DM DMA 1-767 Roseau XCD 🇩🇲 en-DM Dominica 212 .dm
DO DOM 1-809 Santo Domingo DOP 🇩🇴 es-DO Dominican Republic 214 .do
DZ DZA 213 Algiers DZD 🇩🇿 ar-DZ Algeria 012 .dz
EC ECU 593 Quito USD 🇪🇨 es-EC Ecuador 218 .ec
EE EST 372 Tallinn EUR 🇪🇪 et,ru Estonia 233 .ee
EG EGY 20 Cairo EGP 🇪🇬 ar-EG,en,fr Egypt 818 .eg
EH ESH 212 El-Aaiun MAD 🇪🇭 ar,mey Western Sahara 732 .eh
ER ERI 291 Asmara ERN 🇪🇷 aa-ER,ar,tig,kun,ti-ER Eritrea 232 .er
ES ESP 34 Madrid EUR 🇪🇸 es-ES,ca,gl,eu,oc Spain 724 .es
ET ETH 251 Addis Ababa ETB 🇪🇹 am,en-ET,om-ET,ti-ET,so-ET,sid Ethiopia 231 .et
FI FIN 358 Helsinki EUR 🇫🇮 fi-FI,sv-FI,smn Finland 246 .fi
FJ FJI 679 Suva FJD 🇫🇯 en-FJ,fj Fiji 242 .fj
FK FLK 500 Stanley FKP 🇫🇰 en-FK Falkland Islands 238 .fk
FM FSM 691 Palikir USD 🇫🇲 en-FM,chk,pon,yap,kos,uli,woe,nkr,kpg Micronesia 583 .fm
FO FRO 298 Torshavn DKK 🇫🇴 fo,da-FO Faroe Islands 234 .fo
FR FRA 33 Paris EUR 🇫🇷 fr-FR,frp,br,co,ca,eu,oc France 250 .fr
GA GAB 241 Libreville XAF 🇬🇦 fr-GA Gabon 266 .ga
GB GBR 44 London GBP 🇬🇧 en-GB,cy-GB,gd UK 826 .uk
GD GRD 1-473 St. George's XCD 🇬🇩 en-GD Grenada 308 .gd
GE GEO 995 Tbilisi GEL 🇬🇪 ka,ru,hy,az Georgia 268 .ge
GF GUF 594 Cayenne EUR 🇬🇫 fr-GF French Guiana 254 .gf
GG GGY 44 St Peter Port GBP 🇬🇬 en,nrf Guernsey 831 .gg
GH GHA 233 Accra GHS 🇬🇭 en-GH,ak,ee,tw Ghana 288 .gh
GI GIB 350 Gibraltar GIP 🇬🇮 en-GI,es,it,pt Gibraltar 292 .gi
GL GRL 299 Nuuk DKK 🇬🇱 kl,da-GL,en Greenland 304 .gl
GM GMB 220 Banjul GMD 🇬🇲 en-GM,mnk,wof,wo,ff Gambia 270 .gm
GN GIN 224 Conakry GNF 🇬🇳 fr-GN Guinea 324 .gn
GP GLP 590 Basse-Terre EUR 🇬🇵 fr-GP Guadeloupe 312 .gp
GQ GNQ 240 Ciudad de la Paz XAF 🇬🇶 es-GQ,fr,pt Equatorial Guinea 226 .gq
GR GRC 30 Athens EUR 🇬🇷 el-GR,en,fr Greece 300 .gr
GT GTM 502 Guatemala City GTQ 🇬🇹 es-GT Guatemala 320 .gt
GU GUM 1-671 Hagatna USD 🇬🇺 en-GU,ch-GU Guam 316 .gu
GW GNB 245 Bissau XOF 🇬🇼 pt-GW,pov Guinea-Bissau 624 .gw
GY GUY 592 Georgetown GYD 🇬🇾 en-GY Guyana 328 .gy
HK HKG 852 Hong Kong HKD 🇭🇰 zh-HK,yue,zh,en Hong Kong 344 .hk
HN HND 504 Tegucigalpa HNL 🇭🇳 es-HN,cab,miq Honduras 340 .hn
HR HRV 385 Zagreb EUR 🇭🇷 hr-HR,sr Croatia 191 .hr
HT HTI 509 Port-au-Prince HTG 🇭🇹 ht,fr-HT Haiti 332 .ht
HU HUN 36 Budapest HUF 🇭🇺 hu-HU Hungary 348 .hu
ID IDN 62 Jakarta IDR 🇮🇩 id,en,nl,jv Indonesia 360 .id
IE IRL 353 Dublin EUR 🇮🇪 en-IE,ga-IE Ireland 372 .ie
IL ISR 972 Jerusalem ILS 🇮🇱 he,ar-IL,en-IL Israel 376 .il
IM IMN 44 Douglas GBP 🇮🇲 en,gv Isle of Man 833 .im
IN IND 91 New Delhi INR 🇮🇳 en-IN,hi,bn,te,mr,ta,ur,gu,kn,ml,or,pa,as,bh,sat,ks,ne,sd,kok,doi,mni,sit,sa,fr,lus,inc India 356 .in
IO IOT 246 Diego Garcia USD 🇮🇴 en-IO British Indian Ocean Territory 086 .io
IQ IRQ 964 Baghdad IQD 🇮🇶 ar-IQ,ku,hy Iraq 368 .iq
IR IRN 98 Tehran IRR 🇮🇷 fa-IR,ku Iran 364 .ir
IS ISL 354 Reykjavik ISK 🇮🇸 is,en,de,da,sv,no Iceland 352 .is
IT ITA 39 Rome EUR 🇮🇹 it-IT,de-IT,fr-IT,sc,ca,co,sl Italy 380 .it
JE JEY 44 Saint Helier GBP 🇯🇪 en,fr,nrf Jersey 832 .je
JM JAM 1-876 Kingston JMD 🇯🇲 en-JM Jamaica 388 .jm
JO JOR 962 Amman JOD 🇯🇴 ar-JO,en Jordan 400 .jo
JP JPN 81 Tokyo JPY 🇯🇵 ja Japan 392 .jp
KE KEN 254 Nairobi KES 🇰🇪 en-KE,sw-KE Kenya 404 .ke
KG KGZ 996 Bishkek KGS 🇰🇬 ky,uz,ru Kyrgyzstan 417 .kg
KH KHM 855 Phnom Penh KHR 🇰🇭 km,fr,en Cambodia 116 .kh
KI KIR 686 Tarawa AUD 🇰🇮 en-KI,gil Kiribati 296 .ki
KM COM 269 Moroni KMF 🇰🇲 ar,fr-KM Comoros 174 .km
KN KNA 1-869 Basseterre XCD 🇰🇳 en-KN St. Kitts & Nevis 659 .kn
KP PRK 850 Pyongyang KPW 🇰🇵 ko-KP North Korea 408 .kp
KR KOR 82 Seoul KRW 🇰🇷 ko-KR,en South Korea 410 .kr
KW KWT 965 Kuwait City KWD 🇰🇼 ar-KW,en Kuwait 414 .kw
KY CYM 1-345 George Town KYD 🇰🇾 en-KY Cayman Islands 136 .ky
KZ KAZ 7 Nur-Sultan KZT 🇰🇿 kk,ru Kazakhstan 398 .kz
LA LAO 856 Vientiane LAK 🇱🇦 lo,fr,en Laos 418 .la
LB LBN 961 Beirut LBP 🇱🇧 ar-LB,fr-LB,en,hy Lebanon 422 .lb
LC LCA 1-758 Castries XCD 🇱🇨 en-LC St. Lucia 662 .lc
LI LIE 423 Vaduz CHF 🇱🇮 de-LI Liechtenstein 438 .li
LK LKA 94 Colombo LKR 🇱🇰 si,ta,en Sri Lanka 144 .lk
LR LBR 231 Monrovia LRD 🇱🇷 en-LR Liberia 430 .lr
LS LSO 266 Maseru LSL 🇱🇸 en-LS,st,zu,xh Lesotho 426 .ls
LT LTU 370 Vilnius EUR 🇱🇹 lt,ru,pl Lithuania 440 .lt
LU LUX 352 Luxembourg EUR 🇱🇺 lb,de-LU,fr-LU Luxembourg 442 .lu
LV LVA 371 Riga EUR 🇱🇻 lv,ru,lt Latvia 428 .lv
LY LBY 218 Tripoli LYD 🇱🇾 ar-LY,it,en Libya 434 .ly
MA MAR 212 Rabat MAD 🇲🇦 ar-MA,ber,fr Morocco 504 .ma
MC MCO 377 Monaco EUR 🇲🇨 fr-MC,en,it Monaco 492 .mc
MD MDA 373 Chisinau MDL 🇲🇩 ro,ru,gag,tr Moldova 498 .md
ME MNE 382 Podgorica EUR 🇲🇪 sr,hu,bs,sq,hr,rom Montenegro 499 .me
MF MAF 590 Marigot EUR 🇲🇫 fr St. Martin 663 .gp
MG MDG 261 Antananarivo MGA 🇲🇬 fr-MG,mg Madagascar 450 .mg
MH MHL 692 Majuro USD 🇲🇭 mh,en-MH Marshall Islands 584 .mh
MK MKD 389 Skopje MKD 🇲🇰 mk,sq,tr,rmm,sr North Macedonia 807 .mk
ML MLI 223 Bamako XOF 🇲🇱 fr-ML,bm Mali 466 .ml
MM MMR 95 Nay Pyi Taw MMK 🇲🇲 my Myanmar 104 .mm
MN MNG 976 Ulaanbaatar MNT 🇲🇳 mn,ru Mongolia 496 .mn
MO MAC 853 Macao MOP 🇲🇴 zh,zh-MO,pt Macao 446 .mo
MP MNP 1-670 Saipan USD 🇲🇵 fil,tl,zh,ch-MP,en-MP Northern Mariana Islands 580 .mp
MQ MTQ 596 Fort-de-France EUR 🇲🇶 fr-MQ Martinique 474 .mq
MR MRT 222 Nouakchott MRU 🇲🇷 ar-MR,fuc,snk,fr,mey,wo Mauritania 478 .mr
MS MSR 1-664 Plymouth XCD 🇲🇸 en-MS Montserrat 500 .ms
MT MLT 356 Valletta EUR 🇲🇹 mt,en-MT Malta 470 .mt
MU MUS 230 Port Louis MUR 🇲🇺 en-MU,bho,fr Mauritius 480 .mu
MV MDV 960 Male MVR 🇲🇻 dv,en Maldives 462 .mv
MW MWI 265 Lilongwe MWK 🇲🇼 ny,yao,tum,swk Malawi 454 .mw
MX MEX 52 Mexico City MXN 🇲🇽 es-MX Mexico 484 .mx
MY MYS 60 Kuala Lumpur MYR 🇲🇾 ms-MY,en,zh,ta,te,ml,pa,th Malaysia 458 .my
MZ MOZ 258 Maputo MZN 🇲🇿 pt-MZ,vmw Mozambique 508 .mz
NA NAM 264 Windhoek NAD 🇳🇦 en-NA,af,de,hz,naq Namibia 516 .na
NC NCL 687 Noumea XPF 🇳🇨 fr-NC New Caledonia 540 .nc
NE NER 227 Niamey XOF 🇳🇪 fr-NE,ha,kr,dje Niger 562 .ne
NF NFK 672 Kingston AUD 🇳🇫 en-NF Norfolk Island 574 .nf
NG NGA 234 Abuja NGN 🇳🇬 en-NG,ha,yo,ig,ff Nigeria 566 .ng
NI NIC 505 Managua NIO 🇳🇮 es-NI,en Nicaragua 558 .ni
NL NLD 31 Amsterdam EUR 🇳🇱 nl-NL,fy-NL Netherlands 528 .nl
NO NOR 47 Oslo NOK 🇳🇴 no,nb,nn,se,fi Norway 578 .no
NP NPL 977 Kathmandu NPR 🇳🇵 ne,en Nepal 524 .np
NR NRU 674 Yaren AUD 🇳🇷 na,en-NR Nauru 520 .nr
NU NIU 683 Alofi NZD 🇳🇺 niu,en-NU Niue 570 .nu
NZ NZL 64 Wellington NZD 🇳🇿 en-NZ,mi New Zealand 554 .nz
OM OMN 968 Muscat OMR 🇴🇲 ar-OM,en,bal,ur Oman 512 .om
PA PAN 507 Panama City PAB 🇵🇦 es-PA,en Panama 591 .pa
PE PER 51 Lima PEN 🇵🇪 es-PE,qu,ay Peru 604 .pe
PF PYF 689 Papeete XPF 🇵🇫 fr-PF,ty French Polynesia 258 .pf
PG PNG 675 Port Moresby PGK 🇵🇬 en-PG,ho,meu,tpi Papua New Guinea 598 .pg
PH PHL 63 Manila PHP 🇵🇭 tl,en-PH,fil,ceb,ilo,hil,war,pam,bik,bcl,pag,mrw,tsg,mdh,cbk,krj,sgd,msb,akl,ibg,yka,mta,abx Philippines 608 .ph
PK PAK 92 Islamabad PKR 🇵🇰 ur-PK,en-PK,pa,sd,ps,brh Pakistan 586 .pk
PL POL 48 Warsaw PLN 🇵🇱 pl Poland 616 .pl
PM SPM 508 Saint-Pierre EUR 🇵🇲 fr-PM St. Pierre & Miquelon 666 .pm
PN PCN 870 Adamstown NZD 🇵🇳 en-PN Pitcairn 612 .pn
PR PRI 1 San Juan USD 🇵🇷 en-PR,es-PR Puerto Rico 630 .pr
PT PRT 351 Lisbon EUR 🇵🇹 pt-PT,mwl Portugal 620 .pt
PW PLW 680 Melekeok USD 🇵🇼 pau,sov,en-PW,tox,ja,fil,zh Palau 585 .pw
PY PRY 595 Asuncion PYG 🇵🇾 es-PY,gn Paraguay 600 .py
QA QAT 974 Doha QAR 🇶🇦 ar-QA,es Qatar 634 .qa
RE REU 262 Saint-Denis EUR 🇷🇪 fr-RE Réunion 638 .re
RO ROU 40 Bucharest RON 🇷🇴 ro,hu,rom Romania 642 .ro
RS SRB 381 Belgrade RSD 🇷🇸 sr,hu,bs,rom Serbia 688 .rs
RU RUS 7 Moscow RUB 🇷🇺 ru,tt,xal,cau,ady,kv,ce,tyv,cv,udm,tut,mns,bua,myv,mdf,chm,ba,inh,kbd,krc,av,sah,nog Russia 643 .ru
RW RWA 250 Kigali RWF 🇷🇼 rw,en-RW,fr-RW,sw Rwanda 646 .rw
SA SAU 966 Riyadh SAR 🇸🇦 ar-SA Saudi Arabia 682 .sa
SB SLB 677 Honiara SBD 🇸🇧 en-SB,tpi Solomon Islands 090 .sb
SC SYC 248 Victoria SCR 🇸🇨 en-SC,fr-SC Seychelles 690 .sc
SD SDN 249 Khartoum SDG 🇸🇩 ar-SD,en,fia Sudan 729 .sd
SE SWE 46 Stockholm SEK 🇸🇪 sv-SE,se,sma,fi-SE Sweden 752 .se
SG SGP 65 Singapore SGD 🇸🇬 cmn,en-SG,ms-SG,ta-SG,zh-SG Singapore 702 .sg
SH SHN 290 Jamestown SHP 🇸🇭 en-SH St. Helena 654 .sh
SI SVN 386 Ljubljana EUR 🇸🇮 sl,sh Slovenia 705 .si
SJ SJM 47 Longyearbyen NOK 🇸🇯 no,ru Svalbard & Jan Mayen 744 .sj
SK SVK 421 Bratislava EUR 🇸🇰 sk,hu Slovakia 703 .sk
SL SLE 232 Freetown SLE 🇸🇱 en-SL,men,tem Sierra Leone 694 .sl
SM SMR 378 San Marino EUR 🇸🇲 it-SM San Marino 674 .sm
SN SEN 221 Dakar XOF 🇸🇳 fr-SN,wo,fuc,mnk Senegal 686 .sn
SO SOM 252 Mogadishu SOS 🇸🇴 so-SO,ar-SO,it,en-SO Somalia 706 .so
SR SUR 597 Paramaribo SRD 🇸🇷 nl-SR,en,srn,hns,jv Suriname 740 .sr
SS SSD 211 Juba SSP 🇸🇸 en South Sudan 728 .ss
ST STP 239 Sao Tome STN 🇸🇹 pt-ST São Tomé & Príncipe 678 .st
SV SLV 503 San Salvador SVC 🇸🇻 es-SV El Salvador 222 .sv
SX SXM 1-721 Philipsburg XCG 🇸🇽 nl,en Sint Maarten 534 .sx
SY SYR 963 Damascus SYP 🇸🇾 ar-SY,ku,hy,arc,fr,en Syria 760 .sy
SZ SWZ 268 Mbabane SZL 🇸🇿 en-SZ,ss-SZ Eswatini 748 .sz
TC TCA 1-649 Cockburn Town USD 🇹🇨 en-TC Turks & Caicos Islands 796 .tc
TD TCD 235 N'Djamena XAF 🇹🇩 fr-TD,ar-TD,sre Chad 148 .td
TF ATF 262 Port-aux-Francais EUR 🇹🇫 fr French Southern Territories 260 .tf
TG TGO 228 Lome XOF 🇹🇬 fr-TG,ee,hna,kbp,dag,ha Togo 768 .tg
TH THA 66 Bangkok THB 🇹🇭 th,en Thailand 764 .th
TJ TJK 992 Dushanbe TJS 🇹🇯 tg,ru Tajikistan 762 .tj
TL TLS 670 Dili USD 🇹🇱 tet,pt-TL,id,en Timor-Leste 626 .tl
TM TKM 993 Ashgabat TMT 🇹🇲 tk,ru,uz Turkmenistan 795 .tm
TN TUN 216 Tunis TND 🇹🇳 ar-TN,fr Tunisia 788 .tn
TO TON 676 Nuku'alofa TOP 🇹🇴 to,en-TO Tonga 776 .to
TR TUR 90 Ankara TRY 🇹🇷 tr-TR,ku,diq,az,av Türkiye 792 .tr
TT TTO 1-868 Port of Spain TTD 🇹🇹 en-TT,hns,fr,es,zh Trinidad & Tobago 780 .tt
TV TUV 688 Funafuti AUD 🇹🇻 tvl,en,sm,gil Tuvalu 798 .tv
TW TWN 886 Taipei TWD 🇹🇼 zh-TW,zh,nan,hak Taiwan 158 .tw
TZ TZA 255 Dodoma TZS 🇹🇿 sw-TZ,en,ar Tanzania 834 .tz
UA UKR 380 Kyiv UAH 🇺🇦 uk,ru-UA,rom,pl,hu Ukraine 804 .ua
UG UGA 256 Kampala UGX 🇺🇬 en-UG,lg,sw,ar Uganda 800 .ug
US USA 1 Washington USD 🇺🇸 en-US,es-US,haw,fr US 840 .us
UY URY 598 Montevideo UYU 🇺🇾 es-UY Uruguay 858 .uy
UZ UZB 998 Tashkent UZS 🇺🇿 uz,ru,tg Uzbekistan 860 .uz
VA VAT 39 Vatican City EUR 🇻🇦 la,it,fr Vatican City 336 .va
VC VCT 1-784 Kingstown XCD 🇻🇨 en-VC,fr St. Vincent & Grenadines 670 .vc
VE VEN 58 Caracas VES 🇻🇪 es-VE Venezuela 862 .ve
VG VGB 1-284 Road Town USD 🇻🇬 en-VG British Virgin Islands 092 .vg
VI VIR 1-340 Charlotte Amalie USD 🇻🇮 en-VI U.S. Virgin Islands 850 .vi
VN VNM 84 Hanoi VND 🇻🇳 vi,en,fr,zh,km Vietnam 704 .vn
VU VUT 678 Port Vila VUV 🇻🇺 bi,en-VU,fr-VU Vanuatu 548 .vu
WF WLF 681 Mata Utu XPF 🇼🇫 wls,fud,fr-WF Wallis & Futuna 876 .wf
WS WSM 685 Apia WST 🇼🇸 sm,en-WS Samoa 882 .ws
YE YEM 967 Sanaa YER 🇾🇪 ar-YE Yemen 887 .ye
YT MYT 262 Mamoudzou EUR 🇾🇹 fr-YT Mayotte 175 .yt
ZA ZAF 27 Pretoria ZAR 🇿🇦 zu,xh,af,nso,en-ZA,tn,st,ts,ss,ve,nr South Africa 710 .za
ZM ZMB 260 Lusaka ZMW 🇿🇲 en-ZM,bem,loz,lun,lue,ny,toi Zambia 894 .zm
ZW ZWE 263 Harare ZWG 🇿🇼 en-ZW,sn,nr,nd Zimbabwe 716 .zw
1 alpha2 alpha3 calling-code capital currency flag languages name numeric tld
2 AD AND 376 Andorra la Vella EUR 🇦🇩 ca Andorra 020 .ad
3 AE ARE 971 Abu Dhabi AED 🇦🇪 ar-AE,fa,en,hi,ur United Arab Emirates 784 .ae
4 AF AFG 93 Kabul AFN 🇦🇫 fa-AF,ps,uz-AF,tk Afghanistan 004 .af
5 AG ATG 1-268 St. John's XCD 🇦🇬 en-AG Antigua & Barbuda 028 .ag
6 AI AIA 1-264 The Valley XCD 🇦🇮 en-AI Anguilla 660 .ai
7 AL ALB 355 Tirana ALL 🇦🇱 sq,el Albania 008 .al
8 AM ARM 374 Yerevan AMD 🇦🇲 hy Armenia 051 .am
9 AO AGO 244 Luanda AOA 🇦🇴 pt-AO Angola 024 .ao
10 AR ARG 54 Buenos Aires ARS 🇦🇷 es-AR,en,it,de,fr,gn Argentina 032 .ar
11 AS ASM 1-684 Pago Pago USD 🇦🇸 en-AS,sm,to American Samoa 016 .as
12 AT AUT 43 Vienna EUR 🇦🇹 de-AT,hr,hu,sl Austria 040 .at
13 AU AUS 61 Canberra AUD 🇦🇺 en-AU Australia 036 .au
14 AW ABW 297 Oranjestad AWG 🇦🇼 nl-AW,pap,es,en Aruba 533 .aw
15 AX ALA 358 Mariehamn EUR 🇦🇽 sv-AX Åland Islands 248 .ax
16 AZ AZE 994 Baku AZN 🇦🇿 az,ru,hy Azerbaijan 031 .az
17 BA BIH 387 Sarajevo BAM 🇧🇦 bs,hr-BA,sr-BA Bosnia 070 .ba
18 BB BRB 1-246 Bridgetown BBD 🇧🇧 en-BB Barbados 052 .bb
19 BD BGD 880 Dhaka BDT 🇧🇩 bn-BD,en Bangladesh 050 .bd
20 BE BEL 32 Brussels EUR 🇧🇪 nl-BE,fr-BE,de-BE Belgium 056 .be
21 BF BFA 226 Ouagadougou XOF 🇧🇫 fr-BF,mos Burkina Faso 854 .bf
22 BG BGR 359 Sofia EUR 🇧🇬 bg,tr-BG,rom Bulgaria 100 .bg
23 BH BHR 973 Manama BHD 🇧🇭 ar-BH,en,fa,ur Bahrain 048 .bh
24 BI BDI 257 Gitega BIF 🇧🇮 fr-BI,rn Burundi 108 .bi
25 BJ BEN 229 Porto-Novo XOF 🇧🇯 fr-BJ Benin 204 .bj
26 BL BLM 590 Gustavia EUR 🇧🇱 fr St. Barthélemy 652 .gp
27 BM BMU 1-441 Hamilton BMD 🇧🇲 en-BM,pt Bermuda 060 .bm
28 BN BRN 673 Bandar Seri Begawan BND 🇧🇳 ms-BN,en-BN Brunei 096 .bn
29 BO BOL 591 Sucre BOB 🇧🇴 es-BO,qu,ay Bolivia 068 .bo
30 BR BRA 55 Brasilia BRL 🇧🇷 pt-BR,es,en,fr Brazil 076 .br
31 BS BHS 1-242 Nassau BSD 🇧🇸 en-BS Bahamas 044 .bs
32 BT BTN 975 Thimphu INR 🇧🇹 dz Bhutan 064 .bt
33 BW BWA 267 Gaborone BWP 🇧🇼 en-BW,tn-BW Botswana 072 .bw
34 BY BLR 375 Minsk BYN 🇧🇾 be,ru Belarus 112 .by
35 BZ BLZ 501 Belmopan BZD 🇧🇿 en-BZ,es Belize 084 .bz
36 CA CAN 1 Ottawa CAD 🇨🇦 en-CA,fr-CA,iu Canada 124 .ca
37 CC CCK 61 West Island AUD 🇨🇨 ms-CC,en Cocos Islands 166 .cc
38 CD COD 243 Kinshasa CDF 🇨🇩 fr-CD,ln,ktu,kg,sw,lua Congo - Kinshasa 180 .cd
39 CF CAF 236 Bangui XAF 🇨🇫 fr-CF,sg,ln,kg Central African Republic 140 .cf
40 CG COG 242 Brazzaville XAF 🇨🇬 fr-CG,kg,ln-CG Congo - Brazzaville 178 .cg
41 CH CHE 41 Bern CHF 🇨🇭 de-CH,fr-CH,it-CH,rm Switzerland 756 .ch
42 CI CIV 225 Yamoussoukro XOF 🇨🇮 fr-CI Côte d’Ivoire 384 .ci
43 CK COK 682 Avarua NZD 🇨🇰 en-CK,mi Cook Islands 184 .ck
44 CL CHL 56 Santiago CLP 🇨🇱 es-CL Chile 152 .cl
45 CM CMR 237 Yaounde XAF 🇨🇲 en-CM,fr-CM Cameroon 120 .cm
46 CN CHN 86 Beijing CNY 🇨🇳 zh-CN,yue,wuu,dta,ug,za China 156 .cn
47 CO COL 57 Bogota COP 🇨🇴 es-CO Colombia 170 .co
48 CR CRI 506 San Jose CRC 🇨🇷 es-CR,en Costa Rica 188 .cr
49 CU CUB 53 Havana CUP 🇨🇺 es-CU,pap Cuba 192 .cu
50 CV CPV 238 Praia CVE 🇨🇻 pt-CV Cape Verde 132 .cv
51 CW CUW 599 Willemstad XCG 🇨🇼 nl,pap Curaçao 531 .cw
52 CX CXR 61 Flying Fish Cove AUD 🇨🇽 en,zh,ms-CX Christmas Island 162 .cx
53 CY CYP 357 Nicosia EUR 🇨🇾 el-CY,tr-CY,en Cyprus 196 .cy
54 CZ CZE 420 Prague CZK 🇨🇿 cs,sk Czechia 203 .cz
55 DE DEU 49 Berlin EUR 🇩🇪 de Germany 276 .de
56 DJ DJI 253 Djibouti DJF 🇩🇯 fr-DJ,ar,so-DJ,aa Djibouti 262 .dj
57 DK DNK 45 Copenhagen DKK 🇩🇰 da-DK,en,fo,de-DK Denmark 208 .dk
58 DM DMA 1-767 Roseau XCD 🇩🇲 en-DM Dominica 212 .dm
59 DO DOM 1-809 Santo Domingo DOP 🇩🇴 es-DO Dominican Republic 214 .do
60 DZ DZA 213 Algiers DZD 🇩🇿 ar-DZ Algeria 012 .dz
61 EC ECU 593 Quito USD 🇪🇨 es-EC Ecuador 218 .ec
62 EE EST 372 Tallinn EUR 🇪🇪 et,ru Estonia 233 .ee
63 EG EGY 20 Cairo EGP 🇪🇬 ar-EG,en,fr Egypt 818 .eg
64 EH ESH 212 El-Aaiun MAD 🇪🇭 ar,mey Western Sahara 732 .eh
65 ER ERI 291 Asmara ERN 🇪🇷 aa-ER,ar,tig,kun,ti-ER Eritrea 232 .er
66 ES ESP 34 Madrid EUR 🇪🇸 es-ES,ca,gl,eu,oc Spain 724 .es
67 ET ETH 251 Addis Ababa ETB 🇪🇹 am,en-ET,om-ET,ti-ET,so-ET,sid Ethiopia 231 .et
68 FI FIN 358 Helsinki EUR 🇫🇮 fi-FI,sv-FI,smn Finland 246 .fi
69 FJ FJI 679 Suva FJD 🇫🇯 en-FJ,fj Fiji 242 .fj
70 FK FLK 500 Stanley FKP 🇫🇰 en-FK Falkland Islands 238 .fk
71 FM FSM 691 Palikir USD 🇫🇲 en-FM,chk,pon,yap,kos,uli,woe,nkr,kpg Micronesia 583 .fm
72 FO FRO 298 Torshavn DKK 🇫🇴 fo,da-FO Faroe Islands 234 .fo
73 FR FRA 33 Paris EUR 🇫🇷 fr-FR,frp,br,co,ca,eu,oc France 250 .fr
74 GA GAB 241 Libreville XAF 🇬🇦 fr-GA Gabon 266 .ga
75 GB GBR 44 London GBP 🇬🇧 en-GB,cy-GB,gd UK 826 .uk
76 GD GRD 1-473 St. George's XCD 🇬🇩 en-GD Grenada 308 .gd
77 GE GEO 995 Tbilisi GEL 🇬🇪 ka,ru,hy,az Georgia 268 .ge
78 GF GUF 594 Cayenne EUR 🇬🇫 fr-GF French Guiana 254 .gf
79 GG GGY 44 St Peter Port GBP 🇬🇬 en,nrf Guernsey 831 .gg
80 GH GHA 233 Accra GHS 🇬🇭 en-GH,ak,ee,tw Ghana 288 .gh
81 GI GIB 350 Gibraltar GIP 🇬🇮 en-GI,es,it,pt Gibraltar 292 .gi
82 GL GRL 299 Nuuk DKK 🇬🇱 kl,da-GL,en Greenland 304 .gl
83 GM GMB 220 Banjul GMD 🇬🇲 en-GM,mnk,wof,wo,ff Gambia 270 .gm
84 GN GIN 224 Conakry GNF 🇬🇳 fr-GN Guinea 324 .gn
85 GP GLP 590 Basse-Terre EUR 🇬🇵 fr-GP Guadeloupe 312 .gp
86 GQ GNQ 240 Ciudad de la Paz XAF 🇬🇶 es-GQ,fr,pt Equatorial Guinea 226 .gq
87 GR GRC 30 Athens EUR 🇬🇷 el-GR,en,fr Greece 300 .gr
88 GT GTM 502 Guatemala City GTQ 🇬🇹 es-GT Guatemala 320 .gt
89 GU GUM 1-671 Hagatna USD 🇬🇺 en-GU,ch-GU Guam 316 .gu
90 GW GNB 245 Bissau XOF 🇬🇼 pt-GW,pov Guinea-Bissau 624 .gw
91 GY GUY 592 Georgetown GYD 🇬🇾 en-GY Guyana 328 .gy
92 HK HKG 852 Hong Kong HKD 🇭🇰 zh-HK,yue,zh,en Hong Kong 344 .hk
93 HN HND 504 Tegucigalpa HNL 🇭🇳 es-HN,cab,miq Honduras 340 .hn
94 HR HRV 385 Zagreb EUR 🇭🇷 hr-HR,sr Croatia 191 .hr
95 HT HTI 509 Port-au-Prince HTG 🇭🇹 ht,fr-HT Haiti 332 .ht
96 HU HUN 36 Budapest HUF 🇭🇺 hu-HU Hungary 348 .hu
97 ID IDN 62 Jakarta IDR 🇮🇩 id,en,nl,jv Indonesia 360 .id
98 IE IRL 353 Dublin EUR 🇮🇪 en-IE,ga-IE Ireland 372 .ie
99 IL ISR 972 Jerusalem ILS 🇮🇱 he,ar-IL,en-IL Israel 376 .il
100 IM IMN 44 Douglas GBP 🇮🇲 en,gv Isle of Man 833 .im
101 IN IND 91 New Delhi INR 🇮🇳 en-IN,hi,bn,te,mr,ta,ur,gu,kn,ml,or,pa,as,bh,sat,ks,ne,sd,kok,doi,mni,sit,sa,fr,lus,inc India 356 .in
102 IO IOT 246 Diego Garcia USD 🇮🇴 en-IO British Indian Ocean Territory 086 .io
103 IQ IRQ 964 Baghdad IQD 🇮🇶 ar-IQ,ku,hy Iraq 368 .iq
104 IR IRN 98 Tehran IRR 🇮🇷 fa-IR,ku Iran 364 .ir
105 IS ISL 354 Reykjavik ISK 🇮🇸 is,en,de,da,sv,no Iceland 352 .is
106 IT ITA 39 Rome EUR 🇮🇹 it-IT,de-IT,fr-IT,sc,ca,co,sl Italy 380 .it
107 JE JEY 44 Saint Helier GBP 🇯🇪 en,fr,nrf Jersey 832 .je
108 JM JAM 1-876 Kingston JMD 🇯🇲 en-JM Jamaica 388 .jm
109 JO JOR 962 Amman JOD 🇯🇴 ar-JO,en Jordan 400 .jo
110 JP JPN 81 Tokyo JPY 🇯🇵 ja Japan 392 .jp
111 KE KEN 254 Nairobi KES 🇰🇪 en-KE,sw-KE Kenya 404 .ke
112 KG KGZ 996 Bishkek KGS 🇰🇬 ky,uz,ru Kyrgyzstan 417 .kg
113 KH KHM 855 Phnom Penh KHR 🇰🇭 km,fr,en Cambodia 116 .kh
114 KI KIR 686 Tarawa AUD 🇰🇮 en-KI,gil Kiribati 296 .ki
115 KM COM 269 Moroni KMF 🇰🇲 ar,fr-KM Comoros 174 .km
116 KN KNA 1-869 Basseterre XCD 🇰🇳 en-KN St. Kitts & Nevis 659 .kn
117 KP PRK 850 Pyongyang KPW 🇰🇵 ko-KP North Korea 408 .kp
118 KR KOR 82 Seoul KRW 🇰🇷 ko-KR,en South Korea 410 .kr
119 KW KWT 965 Kuwait City KWD 🇰🇼 ar-KW,en Kuwait 414 .kw
120 KY CYM 1-345 George Town KYD 🇰🇾 en-KY Cayman Islands 136 .ky
121 KZ KAZ 7 Nur-Sultan KZT 🇰🇿 kk,ru Kazakhstan 398 .kz
122 LA LAO 856 Vientiane LAK 🇱🇦 lo,fr,en Laos 418 .la
123 LB LBN 961 Beirut LBP 🇱🇧 ar-LB,fr-LB,en,hy Lebanon 422 .lb
124 LC LCA 1-758 Castries XCD 🇱🇨 en-LC St. Lucia 662 .lc
125 LI LIE 423 Vaduz CHF 🇱🇮 de-LI Liechtenstein 438 .li
126 LK LKA 94 Colombo LKR 🇱🇰 si,ta,en Sri Lanka 144 .lk
127 LR LBR 231 Monrovia LRD 🇱🇷 en-LR Liberia 430 .lr
128 LS LSO 266 Maseru LSL 🇱🇸 en-LS,st,zu,xh Lesotho 426 .ls
129 LT LTU 370 Vilnius EUR 🇱🇹 lt,ru,pl Lithuania 440 .lt
130 LU LUX 352 Luxembourg EUR 🇱🇺 lb,de-LU,fr-LU Luxembourg 442 .lu
131 LV LVA 371 Riga EUR 🇱🇻 lv,ru,lt Latvia 428 .lv
132 LY LBY 218 Tripoli LYD 🇱🇾 ar-LY,it,en Libya 434 .ly
133 MA MAR 212 Rabat MAD 🇲🇦 ar-MA,ber,fr Morocco 504 .ma
134 MC MCO 377 Monaco EUR 🇲🇨 fr-MC,en,it Monaco 492 .mc
135 MD MDA 373 Chisinau MDL 🇲🇩 ro,ru,gag,tr Moldova 498 .md
136 ME MNE 382 Podgorica EUR 🇲🇪 sr,hu,bs,sq,hr,rom Montenegro 499 .me
137 MF MAF 590 Marigot EUR 🇲🇫 fr St. Martin 663 .gp
138 MG MDG 261 Antananarivo MGA 🇲🇬 fr-MG,mg Madagascar 450 .mg
139 MH MHL 692 Majuro USD 🇲🇭 mh,en-MH Marshall Islands 584 .mh
140 MK MKD 389 Skopje MKD 🇲🇰 mk,sq,tr,rmm,sr North Macedonia 807 .mk
141 ML MLI 223 Bamako XOF 🇲🇱 fr-ML,bm Mali 466 .ml
142 MM MMR 95 Nay Pyi Taw MMK 🇲🇲 my Myanmar 104 .mm
143 MN MNG 976 Ulaanbaatar MNT 🇲🇳 mn,ru Mongolia 496 .mn
144 MO MAC 853 Macao MOP 🇲🇴 zh,zh-MO,pt Macao 446 .mo
145 MP MNP 1-670 Saipan USD 🇲🇵 fil,tl,zh,ch-MP,en-MP Northern Mariana Islands 580 .mp
146 MQ MTQ 596 Fort-de-France EUR 🇲🇶 fr-MQ Martinique 474 .mq
147 MR MRT 222 Nouakchott MRU 🇲🇷 ar-MR,fuc,snk,fr,mey,wo Mauritania 478 .mr
148 MS MSR 1-664 Plymouth XCD 🇲🇸 en-MS Montserrat 500 .ms
149 MT MLT 356 Valletta EUR 🇲🇹 mt,en-MT Malta 470 .mt
150 MU MUS 230 Port Louis MUR 🇲🇺 en-MU,bho,fr Mauritius 480 .mu
151 MV MDV 960 Male MVR 🇲🇻 dv,en Maldives 462 .mv
152 MW MWI 265 Lilongwe MWK 🇲🇼 ny,yao,tum,swk Malawi 454 .mw
153 MX MEX 52 Mexico City MXN 🇲🇽 es-MX Mexico 484 .mx
154 MY MYS 60 Kuala Lumpur MYR 🇲🇾 ms-MY,en,zh,ta,te,ml,pa,th Malaysia 458 .my
155 MZ MOZ 258 Maputo MZN 🇲🇿 pt-MZ,vmw Mozambique 508 .mz
156 NA NAM 264 Windhoek NAD 🇳🇦 en-NA,af,de,hz,naq Namibia 516 .na
157 NC NCL 687 Noumea XPF 🇳🇨 fr-NC New Caledonia 540 .nc
158 NE NER 227 Niamey XOF 🇳🇪 fr-NE,ha,kr,dje Niger 562 .ne
159 NF NFK 672 Kingston AUD 🇳🇫 en-NF Norfolk Island 574 .nf
160 NG NGA 234 Abuja NGN 🇳🇬 en-NG,ha,yo,ig,ff Nigeria 566 .ng
161 NI NIC 505 Managua NIO 🇳🇮 es-NI,en Nicaragua 558 .ni
162 NL NLD 31 Amsterdam EUR 🇳🇱 nl-NL,fy-NL Netherlands 528 .nl
163 NO NOR 47 Oslo NOK 🇳🇴 no,nb,nn,se,fi Norway 578 .no
164 NP NPL 977 Kathmandu NPR 🇳🇵 ne,en Nepal 524 .np
165 NR NRU 674 Yaren AUD 🇳🇷 na,en-NR Nauru 520 .nr
166 NU NIU 683 Alofi NZD 🇳🇺 niu,en-NU Niue 570 .nu
167 NZ NZL 64 Wellington NZD 🇳🇿 en-NZ,mi New Zealand 554 .nz
168 OM OMN 968 Muscat OMR 🇴🇲 ar-OM,en,bal,ur Oman 512 .om
169 PA PAN 507 Panama City PAB 🇵🇦 es-PA,en Panama 591 .pa
170 PE PER 51 Lima PEN 🇵🇪 es-PE,qu,ay Peru 604 .pe
171 PF PYF 689 Papeete XPF 🇵🇫 fr-PF,ty French Polynesia 258 .pf
172 PG PNG 675 Port Moresby PGK 🇵🇬 en-PG,ho,meu,tpi Papua New Guinea 598 .pg
173 PH PHL 63 Manila PHP 🇵🇭 tl,en-PH,fil,ceb,ilo,hil,war,pam,bik,bcl,pag,mrw,tsg,mdh,cbk,krj,sgd,msb,akl,ibg,yka,mta,abx Philippines 608 .ph
174 PK PAK 92 Islamabad PKR 🇵🇰 ur-PK,en-PK,pa,sd,ps,brh Pakistan 586 .pk
175 PL POL 48 Warsaw PLN 🇵🇱 pl Poland 616 .pl
176 PM SPM 508 Saint-Pierre EUR 🇵🇲 fr-PM St. Pierre & Miquelon 666 .pm
177 PN PCN 870 Adamstown NZD 🇵🇳 en-PN Pitcairn 612 .pn
178 PR PRI 1 San Juan USD 🇵🇷 en-PR,es-PR Puerto Rico 630 .pr
179 PT PRT 351 Lisbon EUR 🇵🇹 pt-PT,mwl Portugal 620 .pt
180 PW PLW 680 Melekeok USD 🇵🇼 pau,sov,en-PW,tox,ja,fil,zh Palau 585 .pw
181 PY PRY 595 Asuncion PYG 🇵🇾 es-PY,gn Paraguay 600 .py
182 QA QAT 974 Doha QAR 🇶🇦 ar-QA,es Qatar 634 .qa
183 RE REU 262 Saint-Denis EUR 🇷🇪 fr-RE Réunion 638 .re
184 RO ROU 40 Bucharest RON 🇷🇴 ro,hu,rom Romania 642 .ro
185 RS SRB 381 Belgrade RSD 🇷🇸 sr,hu,bs,rom Serbia 688 .rs
186 RU RUS 7 Moscow RUB 🇷🇺 ru,tt,xal,cau,ady,kv,ce,tyv,cv,udm,tut,mns,bua,myv,mdf,chm,ba,inh,kbd,krc,av,sah,nog Russia 643 .ru
187 RW RWA 250 Kigali RWF 🇷🇼 rw,en-RW,fr-RW,sw Rwanda 646 .rw
188 SA SAU 966 Riyadh SAR 🇸🇦 ar-SA Saudi Arabia 682 .sa
189 SB SLB 677 Honiara SBD 🇸🇧 en-SB,tpi Solomon Islands 090 .sb
190 SC SYC 248 Victoria SCR 🇸🇨 en-SC,fr-SC Seychelles 690 .sc
191 SD SDN 249 Khartoum SDG 🇸🇩 ar-SD,en,fia Sudan 729 .sd
192 SE SWE 46 Stockholm SEK 🇸🇪 sv-SE,se,sma,fi-SE Sweden 752 .se
193 SG SGP 65 Singapore SGD 🇸🇬 cmn,en-SG,ms-SG,ta-SG,zh-SG Singapore 702 .sg
194 SH SHN 290 Jamestown SHP 🇸🇭 en-SH St. Helena 654 .sh
195 SI SVN 386 Ljubljana EUR 🇸🇮 sl,sh Slovenia 705 .si
196 SJ SJM 47 Longyearbyen NOK 🇸🇯 no,ru Svalbard & Jan Mayen 744 .sj
197 SK SVK 421 Bratislava EUR 🇸🇰 sk,hu Slovakia 703 .sk
198 SL SLE 232 Freetown SLE 🇸🇱 en-SL,men,tem Sierra Leone 694 .sl
199 SM SMR 378 San Marino EUR 🇸🇲 it-SM San Marino 674 .sm
200 SN SEN 221 Dakar XOF 🇸🇳 fr-SN,wo,fuc,mnk Senegal 686 .sn
201 SO SOM 252 Mogadishu SOS 🇸🇴 so-SO,ar-SO,it,en-SO Somalia 706 .so
202 SR SUR 597 Paramaribo SRD 🇸🇷 nl-SR,en,srn,hns,jv Suriname 740 .sr
203 SS SSD 211 Juba SSP 🇸🇸 en South Sudan 728 .ss
204 ST STP 239 Sao Tome STN 🇸🇹 pt-ST São Tomé & Príncipe 678 .st
205 SV SLV 503 San Salvador SVC 🇸🇻 es-SV El Salvador 222 .sv
206 SX SXM 1-721 Philipsburg XCG 🇸🇽 nl,en Sint Maarten 534 .sx
207 SY SYR 963 Damascus SYP 🇸🇾 ar-SY,ku,hy,arc,fr,en Syria 760 .sy
208 SZ SWZ 268 Mbabane SZL 🇸🇿 en-SZ,ss-SZ Eswatini 748 .sz
209 TC TCA 1-649 Cockburn Town USD 🇹🇨 en-TC Turks & Caicos Islands 796 .tc
210 TD TCD 235 N'Djamena XAF 🇹🇩 fr-TD,ar-TD,sre Chad 148 .td
211 TF ATF 262 Port-aux-Francais EUR 🇹🇫 fr French Southern Territories 260 .tf
212 TG TGO 228 Lome XOF 🇹🇬 fr-TG,ee,hna,kbp,dag,ha Togo 768 .tg
213 TH THA 66 Bangkok THB 🇹🇭 th,en Thailand 764 .th
214 TJ TJK 992 Dushanbe TJS 🇹🇯 tg,ru Tajikistan 762 .tj
215 TL TLS 670 Dili USD 🇹🇱 tet,pt-TL,id,en Timor-Leste 626 .tl
216 TM TKM 993 Ashgabat TMT 🇹🇲 tk,ru,uz Turkmenistan 795 .tm
217 TN TUN 216 Tunis TND 🇹🇳 ar-TN,fr Tunisia 788 .tn
218 TO TON 676 Nuku'alofa TOP 🇹🇴 to,en-TO Tonga 776 .to
219 TR TUR 90 Ankara TRY 🇹🇷 tr-TR,ku,diq,az,av Türkiye 792 .tr
220 TT TTO 1-868 Port of Spain TTD 🇹🇹 en-TT,hns,fr,es,zh Trinidad & Tobago 780 .tt
221 TV TUV 688 Funafuti AUD 🇹🇻 tvl,en,sm,gil Tuvalu 798 .tv
222 TW TWN 886 Taipei TWD 🇹🇼 zh-TW,zh,nan,hak Taiwan 158 .tw
223 TZ TZA 255 Dodoma TZS 🇹🇿 sw-TZ,en,ar Tanzania 834 .tz
224 UA UKR 380 Kyiv UAH 🇺🇦 uk,ru-UA,rom,pl,hu Ukraine 804 .ua
225 UG UGA 256 Kampala UGX 🇺🇬 en-UG,lg,sw,ar Uganda 800 .ug
226 US USA 1 Washington USD 🇺🇸 en-US,es-US,haw,fr US 840 .us
227 UY URY 598 Montevideo UYU 🇺🇾 es-UY Uruguay 858 .uy
228 UZ UZB 998 Tashkent UZS 🇺🇿 uz,ru,tg Uzbekistan 860 .uz
229 VA VAT 39 Vatican City EUR 🇻🇦 la,it,fr Vatican City 336 .va
230 VC VCT 1-784 Kingstown XCD 🇻🇨 en-VC,fr St. Vincent & Grenadines 670 .vc
231 VE VEN 58 Caracas VES 🇻🇪 es-VE Venezuela 862 .ve
232 VG VGB 1-284 Road Town USD 🇻🇬 en-VG British Virgin Islands 092 .vg
233 VI VIR 1-340 Charlotte Amalie USD 🇻🇮 en-VI U.S. Virgin Islands 850 .vi
234 VN VNM 84 Hanoi VND 🇻🇳 vi,en,fr,zh,km Vietnam 704 .vn
235 VU VUT 678 Port Vila VUV 🇻🇺 bi,en-VU,fr-VU Vanuatu 548 .vu
236 WF WLF 681 Mata Utu XPF 🇼🇫 wls,fud,fr-WF Wallis & Futuna 876 .wf
237 WS WSM 685 Apia WST 🇼🇸 sm,en-WS Samoa 882 .ws
238 YE YEM 967 Sanaa YER 🇾🇪 ar-YE Yemen 887 .ye
239 YT MYT 262 Mamoudzou EUR 🇾🇹 fr-YT Mayotte 175 .yt
240 ZA ZAF 27 Pretoria ZAR 🇿🇦 zu,xh,af,nso,en-ZA,tn,st,ts,ss,ve,nr South Africa 710 .za
241 ZM ZMB 260 Lusaka ZMW 🇿🇲 en-ZM,bem,loz,lun,lue,ny,toi Zambia 894 .zm
242 ZW ZWE 263 Harare ZWG 🇿🇼 en-ZW,sn,nr,nd Zimbabwe 716 .zw
+1
View File
@@ -0,0 +1 @@
"{date(2000-01-01,2029-12-31,'2006-01-02T15:04:05Z')}"
+1
View File
@@ -0,0 +1 @@
{ "format": "{method}", "rows": "httpmethod.tsv", "key": "method" }
+10
View File
@@ -0,0 +1,10 @@
idempotent method safe
false CONNECT false
true DELETE false
true GET true
true HEAD true
true OPTIONS true
false PATCH false
false POST false
true PUT false
true TRACE true
1 idempotent method safe
2 false CONNECT false
3 true DELETE false
4 true GET true
5 true HEAD true
6 true OPTIONS true
7 false PATCH false
8 false POST false
9 true PUT false
10 true TRACE true
+45 -1
View File
@@ -1,17 +1,61 @@
code reason code reason
100 Continue
101 Switching Protocols
102 Processing
103 Early Hints
200 OK 200 OK
201 Created 201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content 204 No Content
205 Reset Content
206 Partial Content
207 Multi-Status
208 Already Reported
226 IM Used
300 Multiple Choices
301 Moved Permanently 301 Moved Permanently
302 Found 302 Found
303 See Other
304 Not Modified 304 Not Modified
305 Use Proxy
307 Temporary Redirect
308 Permanent Redirect
400 Bad Request 400 Bad Request
401 Unauthorized 401 Unauthorized
402 Payment Required
403 Forbidden 403 Forbidden
404 Not Found 404 Not Found
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Timeout
409 Conflict 409 Conflict
422 Unprocessable Entity 410 Gone
411 Length Required
412 Precondition Failed
413 Content Too Large
414 URI Too Long
415 Unsupported Media Type
416 Range Not Satisfiable
417 Expectation Failed
421 Misdirected Request
422 Unprocessable Content
423 Locked
424 Failed Dependency
425 Too Early
426 Upgrade Required
428 Precondition Required
429 Too Many Requests 429 Too Many Requests
431 Request Header Fields Too Large
451 Unavailable For Legal Reasons
500 Internal Server Error 500 Internal Server Error
501 Not Implemented
502 Bad Gateway 502 Bad Gateway
503 Service Unavailable 503 Service Unavailable
504 Gateway Timeout
505 HTTP Version Not Supported
506 Variant Also Negotiates
507 Insufficient Storage
508 Loop Detected
511 Network Authentication Required
1 code reason
2 100 Continue
3 101 Switching Protocols
4 102 Processing
5 103 Early Hints
6 200 OK
7 201 Created
8 202 Accepted
9 203 Non-Authoritative Information
10 204 No Content
11 205 Reset Content
12 206 Partial Content
13 207 Multi-Status
14 208 Already Reported
15 226 IM Used
16 300 Multiple Choices
17 301 Moved Permanently
18 302 Found
19 303 See Other
20 304 Not Modified
21 305 Use Proxy
22 307 Temporary Redirect
23 308 Permanent Redirect
24 400 Bad Request
25 401 Unauthorized
26 402 Payment Required
27 403 Forbidden
28 404 Not Found
29 405 Method Not Allowed
30 406 Not Acceptable
31 407 Proxy Authentication Required
32 408 Request Timeout
33 409 Conflict
34 422 410 Unprocessable Entity Gone
35 411 Length Required
36 412 Precondition Failed
37 413 Content Too Large
38 414 URI Too Long
39 415 Unsupported Media Type
40 416 Range Not Satisfiable
41 417 Expectation Failed
42 421 Misdirected Request
43 422 Unprocessable Content
44 423 Locked
45 424 Failed Dependency
46 425 Too Early
47 426 Upgrade Required
48 428 Precondition Required
49 429 Too Many Requests
50 431 Request Header Fields Too Large
51 451 Unavailable For Legal Reasons
52 500 Internal Server Error
53 501 Not Implemented
54 502 Bad Gateway
55 503 Service Unavailable
56 504 Gateway Timeout
57 505 HTTP Version Not Supported
58 506 Variant Also Negotiates
59 507 Insufficient Storage
60 508 Loop Detected
61 511 Network Authentication Required
+184 -17
View File
@@ -1,17 +1,184 @@
code name code code3 name
ar Arabic aa aar Afar
zh Chinese ab abk Abkhazian
da Danish ae ave Avestan
nl Dutch af afr Afrikaans
en English ak aka Akan
fi Finnish am amh Amharic
fr French an arg Aragonese
de German ar ara Arabic
it Italian as asm Assamese
ja Japanese av ava Avaric
no Norwegian ay aym Aymara
pl Polish az aze Azerbaijani
pt Portuguese ba bak Bashkir
ru Russian be bel Belarusian
es Spanish bg bul Bulgarian
sv Swedish bi bis Bislama
bm bam Bambara
bn ben Bengali
bo bod Tibetan
br bre Breton
bs bos Bosnian
ca cat Catalan
ce che Chechen
ch cha Chamorro
co cos Corsican
cr cre Cree
cs ces Czech
cu chu Church Slavic
cv chv Chuvash
cy cym Welsh
da dan Danish
de deu German
dv div Divehi
dz dzo Dzongkha
ee ewe Ewe
el ell Modern Greek
en eng English
eo epo Esperanto
es spa Spanish
et est Estonian
eu eus Basque
fa fas Persian
ff ful Fulah
fi fin Finnish
fj fij Fijian
fo fao Faroese
fr fra French
fy fry Western Frisian
ga gle Irish
gd gla Gaelic
gl glg Galician
gn grn Guarani
gu guj Gujarati
gv glv Manx
ha hau Hausa
he heb Hebrew
hi hin Hindi
ho hmo Hiri Motu
hr hrv Croatian
ht hat Haitian
hu hun Hungarian
hy hye Armenian
hz her Herero
ia ina Interlingua
id ind Indonesian
ie ile Interlingue
ig ibo Igbo
ii iii Sichuan Yi
ik ipk Inupiaq
io ido Ido
is isl Icelandic
it ita Italian
iu iku Inuktitut
ja jpn Japanese
jv jav Javanese
ka kat Georgian
kg kon Kongo
ki kik Kikuyu
kj kua Kuanyama
kk kaz Kazakh
kl kal Kalaallisut
km khm Central Khmer
kn kan Kannada
ko kor Korean
kr kau Kanuri
ks kas Kashmiri
ku kur Kurdish
kv kom Komi
kw cor Cornish
ky kir Kirghiz
la lat Latin
lb ltz Luxembourgish
lg lug Ganda
li lim Limburgan
ln lin Lingala
lo lao Lao
lt lit Lithuanian
lu lub Luba-Katanga
lv lav Latvian
mg mlg Malagasy
mh mah Marshallese
mi mri Maori
mk mkd Macedonian
ml mal Malayalam
mn mon Mongolian
mr mar Marathi
ms msa Malay
mt mlt Maltese
my mya Burmese
na nau Nauru
nb nob Norwegian Bokmål
nd nde North Ndebele
ne nep Nepali
ng ndo Ndonga
nl nld Dutch
nn nno Norwegian Nynorsk
no nor Norwegian
nr nbl South Ndebele
nv nav Navajo
ny nya Chichewa
oc oci Occitan
oj oji Ojibwa
om orm Oromo
or ori Oriya
os oss Ossetian
pa pan Panjabi
pi pli Pali
pl pol Polish
ps pus Pushto
pt por Portuguese
qu que Quechua
rm roh Romansh
rn run Rundi
ro ron Romanian
ru rus Russian
rw kin Kinyarwanda
sa san Sanskrit
sc srd Sardinian
sd snd Sindhi
se sme Northern Sami
sg sag Sango
si sin Sinhala
sk slk Slovak
sl slv Slovenian
sm smo Samoan
sn sna Shona
so som Somali
sq sqi Albanian
sr srp Serbian
ss ssw Swati
st sot Sotho, Southern
su sun Sundanese
sv swe Swedish
sw swa Swahili
ta tam Tamil
te tel Telugu
tg tgk Tajik
th tha Thai
ti tir Tigrinya
tk tuk Turkmen
tl tgl Tagalog
tn tsn Tswana
to ton Tonga
tr tur Turkish
ts tso Tsonga
tt tat Tatar
tw twi Twi
ty tah Tahitian
ug uig Uighur
uk ukr Ukrainian
ur urd Urdu
uz uzb Uzbek
ve ven Venda
vi vie Vietnamese
vo vol Volapük
wa wln Walloon
wo wol Wolof
xh xho Xhosa
yi yid Yiddish
yo yor Yoruba
za zha Zhuang
zh zho Chinese
zu zul Zulu
1 code code3 name
2 ar aa aar Arabic Afar
3 zh ab abk Chinese Abkhazian
4 da ae ave Danish Avestan
5 nl af afr Dutch Afrikaans
6 en ak aka English Akan
7 fi am amh Finnish Amharic
8 fr an arg French Aragonese
9 de ar ara German Arabic
10 it as asm Italian Assamese
11 ja av ava Japanese Avaric
12 no ay aym Norwegian Aymara
13 pl az aze Polish Azerbaijani
14 pt ba bak Portuguese Bashkir
15 ru be bel Russian Belarusian
16 es bg bul Spanish Bulgarian
17 sv bi bis Swedish Bislama
18 bm bam Bambara
19 bn ben Bengali
20 bo bod Tibetan
21 br bre Breton
22 bs bos Bosnian
23 ca cat Catalan
24 ce che Chechen
25 ch cha Chamorro
26 co cos Corsican
27 cr cre Cree
28 cs ces Czech
29 cu chu Church Slavic
30 cv chv Chuvash
31 cy cym Welsh
32 da dan Danish
33 de deu German
34 dv div Divehi
35 dz dzo Dzongkha
36 ee ewe Ewe
37 el ell Modern Greek
38 en eng English
39 eo epo Esperanto
40 es spa Spanish
41 et est Estonian
42 eu eus Basque
43 fa fas Persian
44 ff ful Fulah
45 fi fin Finnish
46 fj fij Fijian
47 fo fao Faroese
48 fr fra French
49 fy fry Western Frisian
50 ga gle Irish
51 gd gla Gaelic
52 gl glg Galician
53 gn grn Guarani
54 gu guj Gujarati
55 gv glv Manx
56 ha hau Hausa
57 he heb Hebrew
58 hi hin Hindi
59 ho hmo Hiri Motu
60 hr hrv Croatian
61 ht hat Haitian
62 hu hun Hungarian
63 hy hye Armenian
64 hz her Herero
65 ia ina Interlingua
66 id ind Indonesian
67 ie ile Interlingue
68 ig ibo Igbo
69 ii iii Sichuan Yi
70 ik ipk Inupiaq
71 io ido Ido
72 is isl Icelandic
73 it ita Italian
74 iu iku Inuktitut
75 ja jpn Japanese
76 jv jav Javanese
77 ka kat Georgian
78 kg kon Kongo
79 ki kik Kikuyu
80 kj kua Kuanyama
81 kk kaz Kazakh
82 kl kal Kalaallisut
83 km khm Central Khmer
84 kn kan Kannada
85 ko kor Korean
86 kr kau Kanuri
87 ks kas Kashmiri
88 ku kur Kurdish
89 kv kom Komi
90 kw cor Cornish
91 ky kir Kirghiz
92 la lat Latin
93 lb ltz Luxembourgish
94 lg lug Ganda
95 li lim Limburgan
96 ln lin Lingala
97 lo lao Lao
98 lt lit Lithuanian
99 lu lub Luba-Katanga
100 lv lav Latvian
101 mg mlg Malagasy
102 mh mah Marshallese
103 mi mri Maori
104 mk mkd Macedonian
105 ml mal Malayalam
106 mn mon Mongolian
107 mr mar Marathi
108 ms msa Malay
109 mt mlt Maltese
110 my mya Burmese
111 na nau Nauru
112 nb nob Norwegian Bokmål
113 nd nde North Ndebele
114 ne nep Nepali
115 ng ndo Ndonga
116 nl nld Dutch
117 nn nno Norwegian Nynorsk
118 no nor Norwegian
119 nr nbl South Ndebele
120 nv nav Navajo
121 ny nya Chichewa
122 oc oci Occitan
123 oj oji Ojibwa
124 om orm Oromo
125 or ori Oriya
126 os oss Ossetian
127 pa pan Panjabi
128 pi pli Pali
129 pl pol Polish
130 ps pus Pushto
131 pt por Portuguese
132 qu que Quechua
133 rm roh Romansh
134 rn run Rundi
135 ro ron Romanian
136 ru rus Russian
137 rw kin Kinyarwanda
138 sa san Sanskrit
139 sc srd Sardinian
140 sd snd Sindhi
141 se sme Northern Sami
142 sg sag Sango
143 si sin Sinhala
144 sk slk Slovak
145 sl slv Slovenian
146 sm smo Samoan
147 sn sna Shona
148 so som Somali
149 sq sqi Albanian
150 sr srp Serbian
151 ss ssw Swati
152 st sot Sotho, Southern
153 su sun Sundanese
154 sv swe Swedish
155 sw swa Swahili
156 ta tam Tamil
157 te tel Telugu
158 tg tgk Tajik
159 th tha Thai
160 ti tir Tigrinya
161 tk tuk Turkmen
162 tl tgl Tagalog
163 tn tsn Tswana
164 to ton Tonga
165 tr tur Turkish
166 ts tso Tsonga
167 tt tat Tatar
168 tw twi Twi
169 ty tah Tahitian
170 ug uig Uighur
171 uk ukr Ukrainian
172 ur urd Urdu
173 uz uzb Uzbek
174 ve ven Venda
175 vi vie Vietnamese
176 vo vol Volapük
177 wa wln Walloon
178 wo wol Wolof
179 xh xho Xhosa
180 yi yid Yiddish
181 yo yor Yoruba
182 za zha Zhuang
183 zh zho Chinese
184 zu zul Zulu
+1
View File
@@ -0,0 +1 @@
{ "format": "{keyword}", "rows": "loglevel.tsv", "key": "code", "name": "keyword" }
+9
View File
@@ -0,0 +1,9 @@
code keyword severity
0 emerg Emergency
1 alert Alert
2 crit Critical
3 err Error
4 warning Warning
5 notice Notice
6 info Informational
7 debug Debug
1 code keyword severity
2 0 emerg Emergency
3 1 alert Alert
4 2 crit Critical
5 3 err Error
6 4 warning Warning
7 5 notice Notice
8 6 info Informational
9 7 debug Debug
+686
View File
@@ -1,16 +1,702 @@
ext type ext type
.ez application/andrew-inset
.atom application/atom+xml
.atomcat application/atomcat+xml
.atomdeleted application/atomdeleted+xml
.atomsvc application/atomsvc+xml
.dwd application/atsc-dwd+xml
.held application/atsc-held+xml
.rsat application/atsc-rsat+xml
.aml application/automationml-aml+xml
.amlx application/automationml-amlx+zip
.xcs application/calendar+xml
.ccxml application/ccxml+xml
.cdfx application/cdfx+xml
.cdmia application/cdmi-capability
.cdmic application/cdmi-container
.cdmid application/cdmi-domain
.cdmio application/cdmi-object
.cdmiq application/cdmi-queue
.cpl application/cpl+xml
.cwl application/cwl
.mpd application/dash+xml
.mpp application/dash-patch+xml
.davmount application/davmount+xml
.dcm application/dicom
.dssc application/dssc+der
.xdssc application/dssc+xml
.emma application/emma+xml
.emotionml application/emotionml+xml
.epub application/epub+zip
.exi application/exi
.exp application/express
.fdf application/fdf
.fdt application/fdt+xml
.pfr application/font-tdpfr
.geojson application/geo+json
.gml application/gml+xml
.gz application/gzip .gz application/gzip
.stk application/hyperstudio
.ink application/inkml+xml
.ipfix application/ipfix
.its application/its+xml
.jar application/java-archive
.json application/json .json application/json
.kbl application/kbl+xml
.jsonld application/ld+json
.lgr application/lgr+xml
.lostxml application/lost+xml
.hqx application/mac-binhex40
.mads application/mads+xml
.webmanifest application/manifest+json
.mrc application/marc
.mrcx application/marcxml+xml
.ma application/mathematica
.mathml application/mathml+xml
.mbox application/mbox
.mpf application/media-policy-dataset+xml
.mscml application/mediaservercontrol+xml
.meta4 application/metalink4+xml
.mets application/mets+xml
.maei application/mmt-aei+xml
.musd application/mmt-usd+xml
.mods application/mods+xml
.m21 application/mp21
.mp4s application/mp4
.doc application/msword
.mxf application/mxf
.nq application/n-quads
.nt application/n-triples
.cjs application/node
.bin application/octet-stream
.oda application/oda
.opf application/oebps-package+xml
.ogx application/ogg
.oxps application/oxps
.relo application/p2p-overlay+xml
.xer application/patch-ops-error+xml
.pdf application/pdf .pdf application/pdf
.pgp application/pgp-encrypted
.asc application/pgp-keys
.sig application/pgp-signature
.p10 application/pkcs10
.p7m application/pkcs7-mime
.p7s application/pkcs7-signature
.p8 application/pkcs8
.ac application/pkix-attr-cert
.cer application/pkix-cert
.crl application/pkix-crl
.pkipath application/pkix-pkipath
.pki application/pkixcmp
.pls application/pls+xml
.ai application/postscript
.provx application/provenance+xml
.cww application/prs.cww
.xsf application/prs.xsf+xml
.pskcxml application/pskc+xml
.rdf application/rdf+xml
.rif application/reginfo+xml
.rnc application/relax-ng-compact-syntax
.rl application/resource-lists+xml
.rld application/resource-lists-diff+xml
.rs application/rls-services+xml
.rapd application/route-apd+xml
.sls application/route-s-tsid+xml
.rusd application/route-usd+xml
.gbr application/rpki-ghostbusters
.mft application/rpki-manifest
.roa application/rpki-roa
.rtf application/rtf
.sbml application/sbml+xml
.scq application/scvp-cv-request
.scs application/scvp-cv-response
.spq application/scvp-vp-request
.spp application/scvp-vp-response
.sdp application/sdp
.senmlx application/senml+xml
.sensmlx application/sensml+xml
.setpay application/set-payment-initiation
.setreg application/set-registration-initiation
.shf application/shf+xml
.siv application/sieve
.smi application/smil+xml
.rq application/sparql-query
.srx application/sparql-results+xml
.sql application/sql
.gram application/srgs
.grxml application/srgs+xml
.sru application/sru+xml
.ssml application/ssml+xml
.swidtag application/swid+xml
.tei application/tei+xml
.tfi application/thraud+xml
.tsd application/timestamped-data
.toml application/toml
.trig application/trig
.ttml application/ttml+xml
.rsheet application/urc-ressheet+xml
.td application/urc-targetdesc+xml
.vec application/vec+xml
.1km application/vnd.1000minds.decision-model+xml
.plb application/vnd.3gpp.pic-bw-large
.psb application/vnd.3gpp.pic-bw-small
.pvb application/vnd.3gpp.pic-bw-var
.tcap application/vnd.3gpp2.tcap
.pwn application/vnd.3m.post-it-notes
.aso application/vnd.accpac.simply.aso
.imp application/vnd.accpac.simply.imp
.acu application/vnd.acucobol
.atc application/vnd.acucorp
.fcdt application/vnd.adobe.formscentral.fcdt
.fxp application/vnd.adobe.fxp
.xdp application/vnd.adobe.xdp+xml
.age application/vnd.age
.ahead application/vnd.ahead.space
.azf application/vnd.airzip.filesecure.azf
.azs application/vnd.airzip.filesecure.azs
.acc application/vnd.americandynamics.acc
.ami application/vnd.amiga.ami
.cii application/vnd.anser-web-certificate-issue-initiation
.atx application/vnd.antix.game-component
.parquet application/vnd.apache.parquet
.mpkg application/vnd.apple.installer+xml
.key application/vnd.apple.keynote
.m3u8 application/vnd.apple.mpegurl
.numbers application/vnd.apple.numbers
.pages application/vnd.apple.pages
.swi application/vnd.aristanetworks.swi
.iota application/vnd.astraea-software.iota
.aep application/vnd.audiograph
.bmml application/vnd.balsamiq.bmml+xml
.mpm application/vnd.blueice.multipass
.bmi application/vnd.bmi
.rep application/vnd.businessobjects
.cdxml application/vnd.chemdraw+xml
.mmd application/vnd.chipnuts.karaoke-mmd
.cdy application/vnd.cinderella
.csl application/vnd.citationstyles.style+xml
.cla application/vnd.claymore
.rp9 application/vnd.cloanto.rp9
.c4g application/vnd.clonk.c4group
.c11amc application/vnd.cluetrust.cartomobile-config
.c11amz application/vnd.cluetrust.cartomobile-config-pkg
.csp application/vnd.commonspace
.cdbcmsg application/vnd.contact.cmsg
.cmc application/vnd.cosmocaller
.clkx application/vnd.crick.clicker
.clkk application/vnd.crick.clicker.keyboard
.clkp application/vnd.crick.clicker.palette
.clkt application/vnd.crick.clicker.template
.clkw application/vnd.crick.clicker.wordbank
.wbs application/vnd.criticaltools.wbs+xml
.pml application/vnd.ctc-posml
.ppd application/vnd.cups-ppd
.dart application/vnd.dart
.rdz application/vnd.data-vision.rdz
.dbf application/vnd.dbf
.dcmp application/vnd.dcmp+xml
.uvf application/vnd.dece.data
.uvt application/vnd.dece.ttml+xml
.uvx application/vnd.dece.unspecified
.uvz application/vnd.dece.zip
.fe_launch application/vnd.denovo.fcselayout-link
.dna application/vnd.dna
.dpg application/vnd.dpgraph
.dfac application/vnd.dreamfactory
.ait application/vnd.dvb.ait
.svc application/vnd.dvb.service
.geo application/vnd.dynageo
.mag application/vnd.ecowin.chart
.nml application/vnd.enliven
.esf application/vnd.epson.esf
.msf application/vnd.epson.msf
.qam application/vnd.epson.quickanime
.slt application/vnd.epson.salt
.ssf application/vnd.epson.ssf
.es3 application/vnd.eszigno3+xml
.ez2 application/vnd.ezpix-album
.ez3 application/vnd.ezpix-package
.mseed application/vnd.fdsn.mseed
.seed application/vnd.fdsn.seed
.gph application/vnd.flographit
.ftc application/vnd.fluxtime.clip
.fm application/vnd.framemaker
.fsc application/vnd.fsc.weblaunch
.oas application/vnd.fujitsu.oasys
.oa2 application/vnd.fujitsu.oasys2
.oa3 application/vnd.fujitsu.oasys3
.fg5 application/vnd.fujitsu.oasysgp
.bh2 application/vnd.fujitsu.oasysprs
.ddd application/vnd.fujixerox.ddd
.xdw application/vnd.fujixerox.docuworks
.xbd application/vnd.fujixerox.docuworks.binder
.fzs application/vnd.fuzzysheet
.txd application/vnd.genomatix.tuxedo
.ggb application/vnd.geogebra.file
.ggs application/vnd.geogebra.slides
.ggt application/vnd.geogebra.tool
.gex application/vnd.geometry-explorer
.gxt application/vnd.geonext
.g2w application/vnd.geoplan
.g3w application/vnd.geospace
.gmx application/vnd.gmx
.kml application/vnd.google-earth.kml+xml
.kmz application/vnd.google-earth.kmz
.xdcf application/vnd.gov.sk.xmldatacontainer+xml
.gqf application/vnd.grafeq
.gac application/vnd.groove-account
.ghf application/vnd.groove-help
.gim application/vnd.groove-identity-message
.grv application/vnd.groove-injector
.gtm application/vnd.groove-tool-message
.tpl application/vnd.groove-tool-template
.vcg application/vnd.groove-vcard
.hal application/vnd.hal+xml
.zmm application/vnd.handheld-entertainment+xml
.hbci application/vnd.hbci
.les application/vnd.hhe.lesson-player
.hpgl application/vnd.hp-hpgl
.hpid application/vnd.hp-hpid
.hps application/vnd.hp-hps
.jlt application/vnd.hp-jlyt
.pcl application/vnd.hp-pcl
.pclxl application/vnd.hp-pclxl
.sfd-hdstx application/vnd.hydrostatix.sof-data
.mpy application/vnd.ibm.minipay
.irm application/vnd.ibm.rights-management
.sc application/vnd.ibm.secure-container
.icc application/vnd.iccprofile
.igl application/vnd.igloader
.ivp application/vnd.immervision-ivp
.ivu application/vnd.immervision-ivu
.igm application/vnd.insors.igm
.xpw application/vnd.intercon.formnet
.i2g application/vnd.intergeo
.qbo application/vnd.intu.qbo
.qfx application/vnd.intu.qfx
.rcprofile application/vnd.ipunplugged.rcprofile
.irp application/vnd.irepository.package+xml
.xpr application/vnd.is-xpr
.fcs application/vnd.isac.fcs
.jam application/vnd.jam
.rms application/vnd.jcp.javame.midlet-rms
.jisp application/vnd.jisp
.joda application/vnd.joost.joda-archive
.ktz application/vnd.kahootz
.karbon application/vnd.kde.karbon
.chrt application/vnd.kde.kchart
.kfo application/vnd.kde.kformula
.flw application/vnd.kde.kivio
.kon application/vnd.kde.kontour
.kpr application/vnd.kde.kpresenter
.ksp application/vnd.kde.kspread
.kwd application/vnd.kde.kword
.htke application/vnd.kenameaapp
.kia application/vnd.kidspiration
.kne application/vnd.kinar
.skp application/vnd.koan
.sse application/vnd.kodak-descriptor
.lasxml application/vnd.las.las+xml
.lbd application/vnd.llamagraphics.life-balance.desktop
.lbe application/vnd.llamagraphics.life-balance.exchange+xml
.123 application/vnd.lotus-1-2-3
.apr application/vnd.lotus-approach
.pre application/vnd.lotus-freelance
.nsf application/vnd.lotus-notes
.org application/vnd.lotus-organizer
.scm application/vnd.lotus-screencam
.lwp application/vnd.lotus-wordpro
.portpkg application/vnd.macports.portpkg
.mvt application/vnd.mapbox-vector-tile
.mcd application/vnd.mcd
.mc1 application/vnd.medcalcdata
.cdkey application/vnd.mediastation.cdkey
.mwf application/vnd.mfer
.mfm application/vnd.mfmp
.flo application/vnd.micrografx.flo
.igx application/vnd.micrografx.igx
.mif application/vnd.mif
.daf application/vnd.mobius.daf
.dis application/vnd.mobius.dis
.mbk application/vnd.mobius.mbk
.mqy application/vnd.mobius.mqy
.msl application/vnd.mobius.msl
.plc application/vnd.mobius.plc
.txf application/vnd.mobius.txf
.mpn application/vnd.mophun.application
.mpc application/vnd.mophun.certificate
.xul application/vnd.mozilla.xul+xml
.cil application/vnd.ms-artgalry
.cab application/vnd.ms-cab-compressed
.xls application/vnd.ms-excel
.xlam application/vnd.ms-excel.addin.macroenabled.12
.xlsb application/vnd.ms-excel.sheet.binary.macroenabled.12
.xlsm application/vnd.ms-excel.sheet.macroenabled.12
.xltm application/vnd.ms-excel.template.macroenabled.12
.eot application/vnd.ms-fontobject
.chm application/vnd.ms-htmlhelp
.ims application/vnd.ms-ims
.lrm application/vnd.ms-lrm
.thmx application/vnd.ms-officetheme
.ppt application/vnd.ms-powerpoint
.ppam application/vnd.ms-powerpoint.addin.macroenabled.12
.pptm application/vnd.ms-powerpoint.presentation.macroenabled.12
.sldm application/vnd.ms-powerpoint.slide.macroenabled.12
.ppsm application/vnd.ms-powerpoint.slideshow.macroenabled.12
.potm application/vnd.ms-powerpoint.template.macroenabled.12
.mpp application/vnd.ms-project
.docm application/vnd.ms-word.document.macroenabled.12
.dotm application/vnd.ms-word.template.macroenabled.12
.wps application/vnd.ms-works
.wpl application/vnd.ms-wpl
.xps application/vnd.ms-xpsdocument
.mseq application/vnd.mseq
.mus application/vnd.musician
.msty application/vnd.muvee.style
.taglet application/vnd.mynfc
.bdo application/vnd.nato.bindingdataobject+xml
.nlu application/vnd.neurolanguage.nlu
.ntf application/vnd.nitf
.nnd application/vnd.noblenet-directory
.nns application/vnd.noblenet-sealer
.nnw application/vnd.noblenet-web
.ac application/vnd.nokia.n-gage.ac+xml
.ngdat application/vnd.nokia.n-gage.data
.rpst application/vnd.nokia.radio-preset
.rpss application/vnd.nokia.radio-presets
.edm application/vnd.novadigm.edm
.edx application/vnd.novadigm.edx
.ext application/vnd.novadigm.ext
.odc application/vnd.oasis.opendocument.chart
.otc application/vnd.oasis.opendocument.chart-template
.odf application/vnd.oasis.opendocument.formula
.odft application/vnd.oasis.opendocument.formula-template
.odg application/vnd.oasis.opendocument.graphics
.otg application/vnd.oasis.opendocument.graphics-template
.odi application/vnd.oasis.opendocument.image
.oti application/vnd.oasis.opendocument.image-template
.odp application/vnd.oasis.opendocument.presentation
.otp application/vnd.oasis.opendocument.presentation-template
.ods application/vnd.oasis.opendocument.spreadsheet
.ots application/vnd.oasis.opendocument.spreadsheet-template
.odt application/vnd.oasis.opendocument.text
.odm application/vnd.oasis.opendocument.text-master
.ott application/vnd.oasis.opendocument.text-template
.oth application/vnd.oasis.opendocument.text-web
.xo application/vnd.olpc-sugar
.dd2 application/vnd.oma.dd2+xml
.obgx application/vnd.openblox.game+xml
.osm application/vnd.openstreetmap.data+xml
.pptx application/vnd.openxmlformats-officedocument.presentationml.presentation
.sldx application/vnd.openxmlformats-officedocument.presentationml.slide
.ppsx application/vnd.openxmlformats-officedocument.presentationml.slideshow
.potx application/vnd.openxmlformats-officedocument.presentationml.template
.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xltx application/vnd.openxmlformats-officedocument.spreadsheetml.template
.docx application/vnd.openxmlformats-officedocument.wordprocessingml.document
.dotx application/vnd.openxmlformats-officedocument.wordprocessingml.template
.mgp application/vnd.osgeo.mapguide.package
.dp application/vnd.osgi.dp
.esa application/vnd.osgi.subsystem
.pdb application/vnd.palm
.paw application/vnd.pawaafile
.str application/vnd.pg.format
.ei6 application/vnd.pg.osasli
.efif application/vnd.picsel
.wg application/vnd.pmi.widget
.plf application/vnd.pocketlearn
.pbd application/vnd.powerbuilder6
.systemverify application/vnd.pp.systemverify+xml
.box application/vnd.previewsystems.box
.mgz application/vnd.proteus.magazine
.qps application/vnd.publishare-delta-tree
.ptid application/vnd.pvi.ptid1
.xhtm application/vnd.pwg-xhtml-print+xml
.qxd application/vnd.quark.quarkxpress
.rar application/vnd.rar
.bed application/vnd.realvnc.bed
.mxl application/vnd.recordare.musicxml
.musicxml application/vnd.recordare.musicxml+xml
.cryptonote application/vnd.rig.cryptonote
.link66 application/vnd.route66.link66+xml
.st application/vnd.sailingtracker.track
.see application/vnd.seemail
.sema application/vnd.sema
.semd application/vnd.semd
.semf application/vnd.semf
.ifm application/vnd.shana.informed.formdata
.itp application/vnd.shana.informed.formtemplate
.iif application/vnd.shana.informed.interchange
.ipk application/vnd.shana.informed.package
.twd application/vnd.simtech-mindmapper
.mmf application/vnd.smaf
.teacher application/vnd.smart.teacher
.fo application/vnd.software602.filler.form+xml
.sdkm application/vnd.solent.sdkm+xml
.dxp application/vnd.spotfire.dxp
.sfs application/vnd.spotfire.sfs
.sqlite application/vnd.sqlite3
.smzip application/vnd.stepmania.package
.sm application/vnd.stepmania.stepchart
.wadl application/vnd.sun.wadl+xml
.sus application/vnd.sus-calendar
.svd application/vnd.svd
.xsm application/vnd.syncml+xml
.bdm application/vnd.syncml.dm+wbxml
.xdm application/vnd.syncml.dm+xml
.ddf application/vnd.syncml.dmddf+xml
.tao application/vnd.tao.intent-module-archive
.pcap application/vnd.tcpdump.pcap
.tmo application/vnd.tmobile-livetv
.tpt application/vnd.trid.tpt
.mxs application/vnd.triscape.mxs
.tra application/vnd.trueapp
.ufd application/vnd.ufdl
.utz application/vnd.uiq.theme
.umj application/vnd.umajin
.unityweb application/vnd.unity
.uoml application/vnd.uoml+xml
.vcx application/vnd.vcx
.vsd application/vnd.visio
.vis application/vnd.visionary
.vsf application/vnd.vsf
.wbxml application/vnd.wap.wbxml
.wmlc application/vnd.wap.wmlc
.wmlsc application/vnd.wap.wmlscriptc
.wtb application/vnd.webturbo
.nbp application/vnd.wolfram.player
.wpd application/vnd.wordperfect
.wqd application/vnd.wqd
.stf application/vnd.wt.stf
.xar application/vnd.xara
.xfdl application/vnd.xfdl
.hvd application/vnd.yamaha.hv-dic
.hvs application/vnd.yamaha.hv-script
.hvp application/vnd.yamaha.hv-voice
.osf application/vnd.yamaha.openscoreformat
.osfpvg application/vnd.yamaha.openscoreformat.osfpvg+xml
.saf application/vnd.yamaha.smaf-audio
.spf application/vnd.yamaha.smaf-phrase
.cmp application/vnd.yellowriver-custom-menu
.zir application/vnd.zul
.zaz application/vnd.zzazz.deck+xml
.vxml application/voicexml+xml
.wasm application/wasm
.wif application/watcherinfo+xml
.wgt application/widget
.wsdl application/wsdl+xml
.wspolicy application/wspolicy+xml
.der application/x-x509-ca-cert
.xav application/xcap-att+xml
.xca application/xcap-caps+xml
.xdf application/xcap-diff+xml
.xel application/xcap-el+xml
.xns application/xcap-ns+xml
.xenc application/xenc+xml
.xfdf application/xfdf
.xhtml application/xhtml+xml
.xlf application/xliff+xml
.xml application/xml .xml application/xml
.dtd application/xml-dtd
.xop application/xop+xml
.xsl application/xslt+xml
.mxml application/xv+xml
.yang application/yang
.yin application/yin+xml
.zip application/zip .zip application/zip
.3gpp audio/3gpp
.adts audio/aac
.amr audio/amr
.au audio/basic
.mka audio/matroska
.mxmf audio/mobile-xmf
.m4a audio/mp4
.mp3 audio/mpeg .mp3 audio/mpeg
.ogg audio/ogg
.uva audio/vnd.dece.audio
.eol audio/vnd.digital-winds
.dra audio/vnd.dra
.dts audio/vnd.dts
.dtshd audio/vnd.dts.hd
.lvp audio/vnd.lucent.voice
.pya audio/vnd.ms-playready.media.pya
.ecelp4800 audio/vnd.nuera.ecelp4800
.ecelp7470 audio/vnd.nuera.ecelp7470
.ecelp9600 audio/vnd.nuera.ecelp9600
.rip audio/vnd.rip
.ttc font/collection
.otf font/otf
.ttf font/ttf
.woff font/woff
.woff2 font/woff2
.exr image/aces
.apng image/apng
.avci image/avci
.avcs image/avcs
.avif image/avif
.bmp image/bmp
.cgm image/cgm
.drle image/dicom-rle
.dpx image/dpx
.emf image/emf
.fits image/fits
.g3 image/g3fax
.gif image/gif .gif image/gif
.heic image/heic
.heics image/heic-sequence
.heif image/heif
.heifs image/heif-sequence
.hej2 image/hej2k
.ief image/ief
.jaii image/jaii
.jais image/jais
.jls image/jls
.jp2 image/jp2
.jpg image/jpeg .jpg image/jpeg
.jph image/jph
.jhc image/jphc
.jpm image/jpm
.jpx image/jpx
.jxl image/jxl
.jxr image/jxr
.jxra image/jxra
.jxrs image/jxrs
.jxs image/jxs
.jxsc image/jxsc
.jxsi image/jxsi
.jxss image/jxss
.ktx image/ktx
.ktx2 image/ktx2
.png image/png .png image/png
.btif image/prs.btif
.pti image/prs.pti
.svg image/svg+xml .svg image/svg+xml
.t38 image/t38
.tif image/tiff
.tfx image/tiff-fx
.psd image/vnd.adobe.photoshop
.azv image/vnd.airzip.accelerator.azv
.facti image/vnd.blockfact.facti
.uvi image/vnd.dece.graphic
.djvu image/vnd.djvu
.sub image/vnd.dvb.subtitle
.dwg image/vnd.dwg
.dxf image/vnd.dxf
.fbs image/vnd.fastbidsheet
.fpx image/vnd.fpx
.fst image/vnd.fst
.mmr image/vnd.fujixerox.edmics-mmr
.rlc image/vnd.fujixerox.edmics-rlc
.ico image/vnd.microsoft.icon
.mdi image/vnd.ms-modi
.npx image/vnd.net-fpx
.b16 image/vnd.pco.b16
.tap image/vnd.tencent.tap
.vtf image/vnd.valve.source.texture
.wbmp image/vnd.wap.wbmp
.xif image/vnd.xiff
.pcx image/vnd.zbrush.pcx
.webp image/webp .webp image/webp
.wmf image/wmf
.disposition-notification message/disposition-notification
.u8msg message/global
.u8dsn message/global-delivery-status
.u8mdn message/global-disposition-notification
.u8hdr message/global-headers
.eml message/rfc822
.wsc message/vnd.wfa.wsc
.3mf model/3mf
.gltf model/gltf+json
.glb model/gltf-binary
.igs model/iges
.jt model/jt
.msh model/mesh
.mtl model/mtl
.obj model/obj
.prc model/prc
.step model/step
.stpx model/step+xml
.stpz model/step+zip
.stpxz model/step-xml+zip
.stl model/stl
.u3d model/u3d
.bary model/vnd.bary
.cld model/vnd.cld
.dae model/vnd.collada+xml
.dwf model/vnd.dwf
.gdl model/vnd.gdl
.gtw model/vnd.gtw
.mts model/vnd.mts
.ogex model/vnd.opengex
.x_b model/vnd.parasolid.transmit.binary
.x_t model/vnd.parasolid.transmit.text
.pyo model/vnd.pytha.pyox
.vds model/vnd.sap.vds
.usda model/vnd.usda
.usdz model/vnd.usdz+zip
.bsp model/vnd.valve.source.compiled-map
.vtu model/vnd.vtu
.wrl model/vrml
.x3db model/x3d+fastinfoset
.x3d model/x3d+xml
.x3dv model/x3d-vrml
.appcache text/cache-manifest
.ics text/calendar
.css text/css
.csv text/csv .csv text/csv
.html text/html .html text/html
.js text/javascript
.md text/markdown
.n3 text/n3
.txt text/plain .txt text/plain
.dsc text/prs.lines.tag
.rtx text/richtext
.rtf text/rtf
.sgml text/sgml
.shex text/shex
.spdx text/spdx
.tsv text/tab-separated-values
.t text/troff
.ttl text/turtle
.uri text/uri-list
.vcard text/vcard
.curl text/vnd.curl
.sub text/vnd.dvb.subtitle
.ged text/vnd.familysearch.gedcom
.fly text/vnd.fly
.flx text/vnd.fmi.flexstor
.gv text/vnd.graphviz
.3dml text/vnd.in3d.3dml
.spot text/vnd.in3d.spot
.jad text/vnd.sun.j2me.app-descriptor
.wml text/vnd.wap.wml
.wmls text/vnd.wap.wmlscript
.vtt text/vtt
.wgsl text/wgsl
.xml text/xml
.3gp video/3gpp
.3g2 video/3gpp2
.h261 video/h261
.h263 video/h263
.h264 video/h264
.m4s video/iso.segment
.jpgv video/jpeg
.mkv video/matroska
.mk3d video/matroska-3d
.mj2 video/mj2
.ts video/mp2t
.mp4 video/mp4 .mp4 video/mp4
.mpeg video/mpeg
.ogv video/ogg
.mov video/quicktime
.uvh video/vnd.dece.hd
.uvm video/vnd.dece.mobile
.uvp video/vnd.dece.pd
.uvs video/vnd.dece.sd
.uvv video/vnd.dece.video
.dvb video/vnd.dvb.file
.fvt video/vnd.fvt
.mxu video/vnd.mpegurl
.pyv video/vnd.ms-playready.media.pyv
.uvu video/vnd.uvvu.mp4
.viv video/vnd.vivo
1 ext type
2 .ez application/andrew-inset
3 .atom application/atom+xml
4 .atomcat application/atomcat+xml
5 .atomdeleted application/atomdeleted+xml
6 .atomsvc application/atomsvc+xml
7 .dwd application/atsc-dwd+xml
8 .held application/atsc-held+xml
9 .rsat application/atsc-rsat+xml
10 .aml application/automationml-aml+xml
11 .amlx application/automationml-amlx+zip
12 .xcs application/calendar+xml
13 .ccxml application/ccxml+xml
14 .cdfx application/cdfx+xml
15 .cdmia application/cdmi-capability
16 .cdmic application/cdmi-container
17 .cdmid application/cdmi-domain
18 .cdmio application/cdmi-object
19 .cdmiq application/cdmi-queue
20 .cpl application/cpl+xml
21 .cwl application/cwl
22 .mpd application/dash+xml
23 .mpp application/dash-patch+xml
24 .davmount application/davmount+xml
25 .dcm application/dicom
26 .dssc application/dssc+der
27 .xdssc application/dssc+xml
28 .emma application/emma+xml
29 .emotionml application/emotionml+xml
30 .epub application/epub+zip
31 .exi application/exi
32 .exp application/express
33 .fdf application/fdf
34 .fdt application/fdt+xml
35 .pfr application/font-tdpfr
36 .geojson application/geo+json
37 .gml application/gml+xml
38 .gz application/gzip
39 .stk application/hyperstudio
40 .ink application/inkml+xml
41 .ipfix application/ipfix
42 .its application/its+xml
43 .jar application/java-archive
44 .json application/json
45 .kbl application/kbl+xml
46 .jsonld application/ld+json
47 .lgr application/lgr+xml
48 .lostxml application/lost+xml
49 .hqx application/mac-binhex40
50 .mads application/mads+xml
51 .webmanifest application/manifest+json
52 .mrc application/marc
53 .mrcx application/marcxml+xml
54 .ma application/mathematica
55 .mathml application/mathml+xml
56 .mbox application/mbox
57 .mpf application/media-policy-dataset+xml
58 .mscml application/mediaservercontrol+xml
59 .meta4 application/metalink4+xml
60 .mets application/mets+xml
61 .maei application/mmt-aei+xml
62 .musd application/mmt-usd+xml
63 .mods application/mods+xml
64 .m21 application/mp21
65 .mp4s application/mp4
66 .doc application/msword
67 .mxf application/mxf
68 .nq application/n-quads
69 .nt application/n-triples
70 .cjs application/node
71 .bin application/octet-stream
72 .oda application/oda
73 .opf application/oebps-package+xml
74 .ogx application/ogg
75 .oxps application/oxps
76 .relo application/p2p-overlay+xml
77 .xer application/patch-ops-error+xml
78 .pdf application/pdf
79 .pgp application/pgp-encrypted
80 .asc application/pgp-keys
81 .sig application/pgp-signature
82 .p10 application/pkcs10
83 .p7m application/pkcs7-mime
84 .p7s application/pkcs7-signature
85 .p8 application/pkcs8
86 .ac application/pkix-attr-cert
87 .cer application/pkix-cert
88 .crl application/pkix-crl
89 .pkipath application/pkix-pkipath
90 .pki application/pkixcmp
91 .pls application/pls+xml
92 .ai application/postscript
93 .provx application/provenance+xml
94 .cww application/prs.cww
95 .xsf application/prs.xsf+xml
96 .pskcxml application/pskc+xml
97 .rdf application/rdf+xml
98 .rif application/reginfo+xml
99 .rnc application/relax-ng-compact-syntax
100 .rl application/resource-lists+xml
101 .rld application/resource-lists-diff+xml
102 .rs application/rls-services+xml
103 .rapd application/route-apd+xml
104 .sls application/route-s-tsid+xml
105 .rusd application/route-usd+xml
106 .gbr application/rpki-ghostbusters
107 .mft application/rpki-manifest
108 .roa application/rpki-roa
109 .rtf application/rtf
110 .sbml application/sbml+xml
111 .scq application/scvp-cv-request
112 .scs application/scvp-cv-response
113 .spq application/scvp-vp-request
114 .spp application/scvp-vp-response
115 .sdp application/sdp
116 .senmlx application/senml+xml
117 .sensmlx application/sensml+xml
118 .setpay application/set-payment-initiation
119 .setreg application/set-registration-initiation
120 .shf application/shf+xml
121 .siv application/sieve
122 .smi application/smil+xml
123 .rq application/sparql-query
124 .srx application/sparql-results+xml
125 .sql application/sql
126 .gram application/srgs
127 .grxml application/srgs+xml
128 .sru application/sru+xml
129 .ssml application/ssml+xml
130 .swidtag application/swid+xml
131 .tei application/tei+xml
132 .tfi application/thraud+xml
133 .tsd application/timestamped-data
134 .toml application/toml
135 .trig application/trig
136 .ttml application/ttml+xml
137 .rsheet application/urc-ressheet+xml
138 .td application/urc-targetdesc+xml
139 .vec application/vec+xml
140 .1km application/vnd.1000minds.decision-model+xml
141 .plb application/vnd.3gpp.pic-bw-large
142 .psb application/vnd.3gpp.pic-bw-small
143 .pvb application/vnd.3gpp.pic-bw-var
144 .tcap application/vnd.3gpp2.tcap
145 .pwn application/vnd.3m.post-it-notes
146 .aso application/vnd.accpac.simply.aso
147 .imp application/vnd.accpac.simply.imp
148 .acu application/vnd.acucobol
149 .atc application/vnd.acucorp
150 .fcdt application/vnd.adobe.formscentral.fcdt
151 .fxp application/vnd.adobe.fxp
152 .xdp application/vnd.adobe.xdp+xml
153 .age application/vnd.age
154 .ahead application/vnd.ahead.space
155 .azf application/vnd.airzip.filesecure.azf
156 .azs application/vnd.airzip.filesecure.azs
157 .acc application/vnd.americandynamics.acc
158 .ami application/vnd.amiga.ami
159 .cii application/vnd.anser-web-certificate-issue-initiation
160 .atx application/vnd.antix.game-component
161 .parquet application/vnd.apache.parquet
162 .mpkg application/vnd.apple.installer+xml
163 .key application/vnd.apple.keynote
164 .m3u8 application/vnd.apple.mpegurl
165 .numbers application/vnd.apple.numbers
166 .pages application/vnd.apple.pages
167 .swi application/vnd.aristanetworks.swi
168 .iota application/vnd.astraea-software.iota
169 .aep application/vnd.audiograph
170 .bmml application/vnd.balsamiq.bmml+xml
171 .mpm application/vnd.blueice.multipass
172 .bmi application/vnd.bmi
173 .rep application/vnd.businessobjects
174 .cdxml application/vnd.chemdraw+xml
175 .mmd application/vnd.chipnuts.karaoke-mmd
176 .cdy application/vnd.cinderella
177 .csl application/vnd.citationstyles.style+xml
178 .cla application/vnd.claymore
179 .rp9 application/vnd.cloanto.rp9
180 .c4g application/vnd.clonk.c4group
181 .c11amc application/vnd.cluetrust.cartomobile-config
182 .c11amz application/vnd.cluetrust.cartomobile-config-pkg
183 .csp application/vnd.commonspace
184 .cdbcmsg application/vnd.contact.cmsg
185 .cmc application/vnd.cosmocaller
186 .clkx application/vnd.crick.clicker
187 .clkk application/vnd.crick.clicker.keyboard
188 .clkp application/vnd.crick.clicker.palette
189 .clkt application/vnd.crick.clicker.template
190 .clkw application/vnd.crick.clicker.wordbank
191 .wbs application/vnd.criticaltools.wbs+xml
192 .pml application/vnd.ctc-posml
193 .ppd application/vnd.cups-ppd
194 .dart application/vnd.dart
195 .rdz application/vnd.data-vision.rdz
196 .dbf application/vnd.dbf
197 .dcmp application/vnd.dcmp+xml
198 .uvf application/vnd.dece.data
199 .uvt application/vnd.dece.ttml+xml
200 .uvx application/vnd.dece.unspecified
201 .uvz application/vnd.dece.zip
202 .fe_launch application/vnd.denovo.fcselayout-link
203 .dna application/vnd.dna
204 .dpg application/vnd.dpgraph
205 .dfac application/vnd.dreamfactory
206 .ait application/vnd.dvb.ait
207 .svc application/vnd.dvb.service
208 .geo application/vnd.dynageo
209 .mag application/vnd.ecowin.chart
210 .nml application/vnd.enliven
211 .esf application/vnd.epson.esf
212 .msf application/vnd.epson.msf
213 .qam application/vnd.epson.quickanime
214 .slt application/vnd.epson.salt
215 .ssf application/vnd.epson.ssf
216 .es3 application/vnd.eszigno3+xml
217 .ez2 application/vnd.ezpix-album
218 .ez3 application/vnd.ezpix-package
219 .mseed application/vnd.fdsn.mseed
220 .seed application/vnd.fdsn.seed
221 .gph application/vnd.flographit
222 .ftc application/vnd.fluxtime.clip
223 .fm application/vnd.framemaker
224 .fsc application/vnd.fsc.weblaunch
225 .oas application/vnd.fujitsu.oasys
226 .oa2 application/vnd.fujitsu.oasys2
227 .oa3 application/vnd.fujitsu.oasys3
228 .fg5 application/vnd.fujitsu.oasysgp
229 .bh2 application/vnd.fujitsu.oasysprs
230 .ddd application/vnd.fujixerox.ddd
231 .xdw application/vnd.fujixerox.docuworks
232 .xbd application/vnd.fujixerox.docuworks.binder
233 .fzs application/vnd.fuzzysheet
234 .txd application/vnd.genomatix.tuxedo
235 .ggb application/vnd.geogebra.file
236 .ggs application/vnd.geogebra.slides
237 .ggt application/vnd.geogebra.tool
238 .gex application/vnd.geometry-explorer
239 .gxt application/vnd.geonext
240 .g2w application/vnd.geoplan
241 .g3w application/vnd.geospace
242 .gmx application/vnd.gmx
243 .kml application/vnd.google-earth.kml+xml
244 .kmz application/vnd.google-earth.kmz
245 .xdcf application/vnd.gov.sk.xmldatacontainer+xml
246 .gqf application/vnd.grafeq
247 .gac application/vnd.groove-account
248 .ghf application/vnd.groove-help
249 .gim application/vnd.groove-identity-message
250 .grv application/vnd.groove-injector
251 .gtm application/vnd.groove-tool-message
252 .tpl application/vnd.groove-tool-template
253 .vcg application/vnd.groove-vcard
254 .hal application/vnd.hal+xml
255 .zmm application/vnd.handheld-entertainment+xml
256 .hbci application/vnd.hbci
257 .les application/vnd.hhe.lesson-player
258 .hpgl application/vnd.hp-hpgl
259 .hpid application/vnd.hp-hpid
260 .hps application/vnd.hp-hps
261 .jlt application/vnd.hp-jlyt
262 .pcl application/vnd.hp-pcl
263 .pclxl application/vnd.hp-pclxl
264 .sfd-hdstx application/vnd.hydrostatix.sof-data
265 .mpy application/vnd.ibm.minipay
266 .irm application/vnd.ibm.rights-management
267 .sc application/vnd.ibm.secure-container
268 .icc application/vnd.iccprofile
269 .igl application/vnd.igloader
270 .ivp application/vnd.immervision-ivp
271 .ivu application/vnd.immervision-ivu
272 .igm application/vnd.insors.igm
273 .xpw application/vnd.intercon.formnet
274 .i2g application/vnd.intergeo
275 .qbo application/vnd.intu.qbo
276 .qfx application/vnd.intu.qfx
277 .rcprofile application/vnd.ipunplugged.rcprofile
278 .irp application/vnd.irepository.package+xml
279 .xpr application/vnd.is-xpr
280 .fcs application/vnd.isac.fcs
281 .jam application/vnd.jam
282 .rms application/vnd.jcp.javame.midlet-rms
283 .jisp application/vnd.jisp
284 .joda application/vnd.joost.joda-archive
285 .ktz application/vnd.kahootz
286 .karbon application/vnd.kde.karbon
287 .chrt application/vnd.kde.kchart
288 .kfo application/vnd.kde.kformula
289 .flw application/vnd.kde.kivio
290 .kon application/vnd.kde.kontour
291 .kpr application/vnd.kde.kpresenter
292 .ksp application/vnd.kde.kspread
293 .kwd application/vnd.kde.kword
294 .htke application/vnd.kenameaapp
295 .kia application/vnd.kidspiration
296 .kne application/vnd.kinar
297 .skp application/vnd.koan
298 .sse application/vnd.kodak-descriptor
299 .lasxml application/vnd.las.las+xml
300 .lbd application/vnd.llamagraphics.life-balance.desktop
301 .lbe application/vnd.llamagraphics.life-balance.exchange+xml
302 .123 application/vnd.lotus-1-2-3
303 .apr application/vnd.lotus-approach
304 .pre application/vnd.lotus-freelance
305 .nsf application/vnd.lotus-notes
306 .org application/vnd.lotus-organizer
307 .scm application/vnd.lotus-screencam
308 .lwp application/vnd.lotus-wordpro
309 .portpkg application/vnd.macports.portpkg
310 .mvt application/vnd.mapbox-vector-tile
311 .mcd application/vnd.mcd
312 .mc1 application/vnd.medcalcdata
313 .cdkey application/vnd.mediastation.cdkey
314 .mwf application/vnd.mfer
315 .mfm application/vnd.mfmp
316 .flo application/vnd.micrografx.flo
317 .igx application/vnd.micrografx.igx
318 .mif application/vnd.mif
319 .daf application/vnd.mobius.daf
320 .dis application/vnd.mobius.dis
321 .mbk application/vnd.mobius.mbk
322 .mqy application/vnd.mobius.mqy
323 .msl application/vnd.mobius.msl
324 .plc application/vnd.mobius.plc
325 .txf application/vnd.mobius.txf
326 .mpn application/vnd.mophun.application
327 .mpc application/vnd.mophun.certificate
328 .xul application/vnd.mozilla.xul+xml
329 .cil application/vnd.ms-artgalry
330 .cab application/vnd.ms-cab-compressed
331 .xls application/vnd.ms-excel
332 .xlam application/vnd.ms-excel.addin.macroenabled.12
333 .xlsb application/vnd.ms-excel.sheet.binary.macroenabled.12
334 .xlsm application/vnd.ms-excel.sheet.macroenabled.12
335 .xltm application/vnd.ms-excel.template.macroenabled.12
336 .eot application/vnd.ms-fontobject
337 .chm application/vnd.ms-htmlhelp
338 .ims application/vnd.ms-ims
339 .lrm application/vnd.ms-lrm
340 .thmx application/vnd.ms-officetheme
341 .ppt application/vnd.ms-powerpoint
342 .ppam application/vnd.ms-powerpoint.addin.macroenabled.12
343 .pptm application/vnd.ms-powerpoint.presentation.macroenabled.12
344 .sldm application/vnd.ms-powerpoint.slide.macroenabled.12
345 .ppsm application/vnd.ms-powerpoint.slideshow.macroenabled.12
346 .potm application/vnd.ms-powerpoint.template.macroenabled.12
347 .mpp application/vnd.ms-project
348 .docm application/vnd.ms-word.document.macroenabled.12
349 .dotm application/vnd.ms-word.template.macroenabled.12
350 .wps application/vnd.ms-works
351 .wpl application/vnd.ms-wpl
352 .xps application/vnd.ms-xpsdocument
353 .mseq application/vnd.mseq
354 .mus application/vnd.musician
355 .msty application/vnd.muvee.style
356 .taglet application/vnd.mynfc
357 .bdo application/vnd.nato.bindingdataobject+xml
358 .nlu application/vnd.neurolanguage.nlu
359 .ntf application/vnd.nitf
360 .nnd application/vnd.noblenet-directory
361 .nns application/vnd.noblenet-sealer
362 .nnw application/vnd.noblenet-web
363 .ac application/vnd.nokia.n-gage.ac+xml
364 .ngdat application/vnd.nokia.n-gage.data
365 .rpst application/vnd.nokia.radio-preset
366 .rpss application/vnd.nokia.radio-presets
367 .edm application/vnd.novadigm.edm
368 .edx application/vnd.novadigm.edx
369 .ext application/vnd.novadigm.ext
370 .odc application/vnd.oasis.opendocument.chart
371 .otc application/vnd.oasis.opendocument.chart-template
372 .odf application/vnd.oasis.opendocument.formula
373 .odft application/vnd.oasis.opendocument.formula-template
374 .odg application/vnd.oasis.opendocument.graphics
375 .otg application/vnd.oasis.opendocument.graphics-template
376 .odi application/vnd.oasis.opendocument.image
377 .oti application/vnd.oasis.opendocument.image-template
378 .odp application/vnd.oasis.opendocument.presentation
379 .otp application/vnd.oasis.opendocument.presentation-template
380 .ods application/vnd.oasis.opendocument.spreadsheet
381 .ots application/vnd.oasis.opendocument.spreadsheet-template
382 .odt application/vnd.oasis.opendocument.text
383 .odm application/vnd.oasis.opendocument.text-master
384 .ott application/vnd.oasis.opendocument.text-template
385 .oth application/vnd.oasis.opendocument.text-web
386 .xo application/vnd.olpc-sugar
387 .dd2 application/vnd.oma.dd2+xml
388 .obgx application/vnd.openblox.game+xml
389 .osm application/vnd.openstreetmap.data+xml
390 .pptx application/vnd.openxmlformats-officedocument.presentationml.presentation
391 .sldx application/vnd.openxmlformats-officedocument.presentationml.slide
392 .ppsx application/vnd.openxmlformats-officedocument.presentationml.slideshow
393 .potx application/vnd.openxmlformats-officedocument.presentationml.template
394 .xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
395 .xltx application/vnd.openxmlformats-officedocument.spreadsheetml.template
396 .docx application/vnd.openxmlformats-officedocument.wordprocessingml.document
397 .dotx application/vnd.openxmlformats-officedocument.wordprocessingml.template
398 .mgp application/vnd.osgeo.mapguide.package
399 .dp application/vnd.osgi.dp
400 .esa application/vnd.osgi.subsystem
401 .pdb application/vnd.palm
402 .paw application/vnd.pawaafile
403 .str application/vnd.pg.format
404 .ei6 application/vnd.pg.osasli
405 .efif application/vnd.picsel
406 .wg application/vnd.pmi.widget
407 .plf application/vnd.pocketlearn
408 .pbd application/vnd.powerbuilder6
409 .systemverify application/vnd.pp.systemverify+xml
410 .box application/vnd.previewsystems.box
411 .mgz application/vnd.proteus.magazine
412 .qps application/vnd.publishare-delta-tree
413 .ptid application/vnd.pvi.ptid1
414 .xhtm application/vnd.pwg-xhtml-print+xml
415 .qxd application/vnd.quark.quarkxpress
416 .rar application/vnd.rar
417 .bed application/vnd.realvnc.bed
418 .mxl application/vnd.recordare.musicxml
419 .musicxml application/vnd.recordare.musicxml+xml
420 .cryptonote application/vnd.rig.cryptonote
421 .link66 application/vnd.route66.link66+xml
422 .st application/vnd.sailingtracker.track
423 .see application/vnd.seemail
424 .sema application/vnd.sema
425 .semd application/vnd.semd
426 .semf application/vnd.semf
427 .ifm application/vnd.shana.informed.formdata
428 .itp application/vnd.shana.informed.formtemplate
429 .iif application/vnd.shana.informed.interchange
430 .ipk application/vnd.shana.informed.package
431 .twd application/vnd.simtech-mindmapper
432 .mmf application/vnd.smaf
433 .teacher application/vnd.smart.teacher
434 .fo application/vnd.software602.filler.form+xml
435 .sdkm application/vnd.solent.sdkm+xml
436 .dxp application/vnd.spotfire.dxp
437 .sfs application/vnd.spotfire.sfs
438 .sqlite application/vnd.sqlite3
439 .smzip application/vnd.stepmania.package
440 .sm application/vnd.stepmania.stepchart
441 .wadl application/vnd.sun.wadl+xml
442 .sus application/vnd.sus-calendar
443 .svd application/vnd.svd
444 .xsm application/vnd.syncml+xml
445 .bdm application/vnd.syncml.dm+wbxml
446 .xdm application/vnd.syncml.dm+xml
447 .ddf application/vnd.syncml.dmddf+xml
448 .tao application/vnd.tao.intent-module-archive
449 .pcap application/vnd.tcpdump.pcap
450 .tmo application/vnd.tmobile-livetv
451 .tpt application/vnd.trid.tpt
452 .mxs application/vnd.triscape.mxs
453 .tra application/vnd.trueapp
454 .ufd application/vnd.ufdl
455 .utz application/vnd.uiq.theme
456 .umj application/vnd.umajin
457 .unityweb application/vnd.unity
458 .uoml application/vnd.uoml+xml
459 .vcx application/vnd.vcx
460 .vsd application/vnd.visio
461 .vis application/vnd.visionary
462 .vsf application/vnd.vsf
463 .wbxml application/vnd.wap.wbxml
464 .wmlc application/vnd.wap.wmlc
465 .wmlsc application/vnd.wap.wmlscriptc
466 .wtb application/vnd.webturbo
467 .nbp application/vnd.wolfram.player
468 .wpd application/vnd.wordperfect
469 .wqd application/vnd.wqd
470 .stf application/vnd.wt.stf
471 .xar application/vnd.xara
472 .xfdl application/vnd.xfdl
473 .hvd application/vnd.yamaha.hv-dic
474 .hvs application/vnd.yamaha.hv-script
475 .hvp application/vnd.yamaha.hv-voice
476 .osf application/vnd.yamaha.openscoreformat
477 .osfpvg application/vnd.yamaha.openscoreformat.osfpvg+xml
478 .saf application/vnd.yamaha.smaf-audio
479 .spf application/vnd.yamaha.smaf-phrase
480 .cmp application/vnd.yellowriver-custom-menu
481 .zir application/vnd.zul
482 .zaz application/vnd.zzazz.deck+xml
483 .vxml application/voicexml+xml
484 .wasm application/wasm
485 .wif application/watcherinfo+xml
486 .wgt application/widget
487 .wsdl application/wsdl+xml
488 .wspolicy application/wspolicy+xml
489 .der application/x-x509-ca-cert
490 .xav application/xcap-att+xml
491 .xca application/xcap-caps+xml
492 .xdf application/xcap-diff+xml
493 .xel application/xcap-el+xml
494 .xns application/xcap-ns+xml
495 .xenc application/xenc+xml
496 .xfdf application/xfdf
497 .xhtml application/xhtml+xml
498 .xlf application/xliff+xml
499 .xml application/xml
500 .dtd application/xml-dtd
501 .xop application/xop+xml
502 .xsl application/xslt+xml
503 .mxml application/xv+xml
504 .yang application/yang
505 .yin application/yin+xml
506 .zip application/zip
507 .3gpp audio/3gpp
508 .adts audio/aac
509 .amr audio/amr
510 .au audio/basic
511 .mka audio/matroska
512 .mxmf audio/mobile-xmf
513 .m4a audio/mp4
514 .mp3 audio/mpeg
515 .ogg audio/ogg
516 .uva audio/vnd.dece.audio
517 .eol audio/vnd.digital-winds
518 .dra audio/vnd.dra
519 .dts audio/vnd.dts
520 .dtshd audio/vnd.dts.hd
521 .lvp audio/vnd.lucent.voice
522 .pya audio/vnd.ms-playready.media.pya
523 .ecelp4800 audio/vnd.nuera.ecelp4800
524 .ecelp7470 audio/vnd.nuera.ecelp7470
525 .ecelp9600 audio/vnd.nuera.ecelp9600
526 .rip audio/vnd.rip
527 .ttc font/collection
528 .otf font/otf
529 .ttf font/ttf
530 .woff font/woff
531 .woff2 font/woff2
532 .exr image/aces
533 .apng image/apng
534 .avci image/avci
535 .avcs image/avcs
536 .avif image/avif
537 .bmp image/bmp
538 .cgm image/cgm
539 .drle image/dicom-rle
540 .dpx image/dpx
541 .emf image/emf
542 .fits image/fits
543 .g3 image/g3fax
544 .gif image/gif
545 .heic image/heic
546 .heics image/heic-sequence
547 .heif image/heif
548 .heifs image/heif-sequence
549 .hej2 image/hej2k
550 .ief image/ief
551 .jaii image/jaii
552 .jais image/jais
553 .jls image/jls
554 .jp2 image/jp2
555 .jpg image/jpeg
556 .jph image/jph
557 .jhc image/jphc
558 .jpm image/jpm
559 .jpx image/jpx
560 .jxl image/jxl
561 .jxr image/jxr
562 .jxra image/jxra
563 .jxrs image/jxrs
564 .jxs image/jxs
565 .jxsc image/jxsc
566 .jxsi image/jxsi
567 .jxss image/jxss
568 .ktx image/ktx
569 .ktx2 image/ktx2
570 .png image/png
571 .btif image/prs.btif
572 .pti image/prs.pti
573 .svg image/svg+xml
574 .t38 image/t38
575 .tif image/tiff
576 .tfx image/tiff-fx
577 .psd image/vnd.adobe.photoshop
578 .azv image/vnd.airzip.accelerator.azv
579 .facti image/vnd.blockfact.facti
580 .uvi image/vnd.dece.graphic
581 .djvu image/vnd.djvu
582 .sub image/vnd.dvb.subtitle
583 .dwg image/vnd.dwg
584 .dxf image/vnd.dxf
585 .fbs image/vnd.fastbidsheet
586 .fpx image/vnd.fpx
587 .fst image/vnd.fst
588 .mmr image/vnd.fujixerox.edmics-mmr
589 .rlc image/vnd.fujixerox.edmics-rlc
590 .ico image/vnd.microsoft.icon
591 .mdi image/vnd.ms-modi
592 .npx image/vnd.net-fpx
593 .b16 image/vnd.pco.b16
594 .tap image/vnd.tencent.tap
595 .vtf image/vnd.valve.source.texture
596 .wbmp image/vnd.wap.wbmp
597 .xif image/vnd.xiff
598 .pcx image/vnd.zbrush.pcx
599 .webp image/webp
600 .wmf image/wmf
601 .disposition-notification message/disposition-notification
602 .u8msg message/global
603 .u8dsn message/global-delivery-status
604 .u8mdn message/global-disposition-notification
605 .u8hdr message/global-headers
606 .eml message/rfc822
607 .wsc message/vnd.wfa.wsc
608 .3mf model/3mf
609 .gltf model/gltf+json
610 .glb model/gltf-binary
611 .igs model/iges
612 .jt model/jt
613 .msh model/mesh
614 .mtl model/mtl
615 .obj model/obj
616 .prc model/prc
617 .step model/step
618 .stpx model/step+xml
619 .stpz model/step+zip
620 .stpxz model/step-xml+zip
621 .stl model/stl
622 .u3d model/u3d
623 .bary model/vnd.bary
624 .cld model/vnd.cld
625 .dae model/vnd.collada+xml
626 .dwf model/vnd.dwf
627 .gdl model/vnd.gdl
628 .gtw model/vnd.gtw
629 .mts model/vnd.mts
630 .ogex model/vnd.opengex
631 .x_b model/vnd.parasolid.transmit.binary
632 .x_t model/vnd.parasolid.transmit.text
633 .pyo model/vnd.pytha.pyox
634 .vds model/vnd.sap.vds
635 .usda model/vnd.usda
636 .usdz model/vnd.usdz+zip
637 .bsp model/vnd.valve.source.compiled-map
638 .vtu model/vnd.vtu
639 .wrl model/vrml
640 .x3db model/x3d+fastinfoset
641 .x3d model/x3d+xml
642 .x3dv model/x3d-vrml
643 .appcache text/cache-manifest
644 .ics text/calendar
645 .css text/css
646 .csv text/csv
647 .html text/html
648 .js text/javascript
649 .md text/markdown
650 .n3 text/n3
651 .txt text/plain
652 .dsc text/prs.lines.tag
653 .rtx text/richtext
654 .rtf text/rtf
655 .sgml text/sgml
656 .shex text/shex
657 .spdx text/spdx
658 .tsv text/tab-separated-values
659 .t text/troff
660 .ttl text/turtle
661 .uri text/uri-list
662 .vcard text/vcard
663 .curl text/vnd.curl
664 .sub text/vnd.dvb.subtitle
665 .ged text/vnd.familysearch.gedcom
666 .fly text/vnd.fly
667 .flx text/vnd.fmi.flexstor
668 .gv text/vnd.graphviz
669 .3dml text/vnd.in3d.3dml
670 .spot text/vnd.in3d.spot
671 .jad text/vnd.sun.j2me.app-descriptor
672 .wml text/vnd.wap.wml
673 .wmls text/vnd.wap.wmlscript
674 .vtt text/vtt
675 .wgsl text/wgsl
676 .xml text/xml
677 .3gp video/3gpp
678 .3g2 video/3gpp2
679 .h261 video/h261
680 .h263 video/h263
681 .h264 video/h264
682 .m4s video/iso.segment
683 .jpgv video/jpeg
684 .mkv video/matroska
685 .mk3d video/matroska-3d
686 .mj2 video/mj2
687 .ts video/mp2t
688 .mp4 video/mp4
689 .mpeg video/mpeg
690 .ogv video/ogg
691 .mov video/quicktime
692 .uvh video/vnd.dece.hd
693 .uvm video/vnd.dece.mobile
694 .uvp video/vnd.dece.pd
695 .uvs video/vnd.dece.sd
696 .uvv video/vnd.dece.video
697 .dvb video/vnd.dvb.file
698 .fvt video/vnd.fvt
699 .mxu video/vnd.mpegurl
700 .pyv video/vnd.ms-playready.media.pyv
701 .uvu video/vnd.uvvu.mp4
702 .viv video/vnd.vivo
+1
View File
@@ -0,0 +1 @@
{ "format": "{number}", "rows": "port.tsv", "key": "number" }
+5890
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -0,0 +1 @@
{ "format": "{keyword}", "rows": "protocol.tsv", "key": "keyword", "name": "name" }
+140
View File
@@ -0,0 +1,140 @@
keyword name number
HOPOPT IPv6 Hop-by-Hop Option 0
ICMP Internet Control Message 1
IGMP Internet Group Management 2
GGP Gateway-to-Gateway 3
IPv4 IPv4 encapsulation 4
ST Stream 5
TCP Transmission Control 6
CBT CBT 7
EGP Exterior Gateway Protocol 8
IGP any private interior gateway (used by Cisco for their IGRP) 9
BBN-RCC-MON BBN RCC Monitoring 10
NVP-II Network Voice Protocol 11
PUP PUP 12
EMCON EMCON 14
XNET Cross Net Debugger 15
CHAOS Chaos 16
UDP User Datagram 17
MUX Multiplexing 18
DCN-MEAS DCN Measurement Subsystems 19
HMP Host Monitoring 20
PRM Packet Radio Measurement 21
XNS-IDP XEROX NS IDP 22
TRUNK-1 Trunk-1 23
TRUNK-2 Trunk-2 24
LEAF-1 Leaf-1 25
LEAF-2 Leaf-2 26
RDP Reliable Data Protocol 27
IRTP Internet Reliable Transaction 28
ISO-TP4 ISO Transport Protocol Class 4 29
NETBLT Bulk Data Transfer Protocol 30
MFE-NSP MFE Network Services Protocol 31
MERIT-INP MERIT Internodal Protocol 32
DCCP Datagram Congestion Control Protocol 33
3PC Third Party Connect Protocol 34
IDPR Inter-Domain Policy Routing Protocol 35
XTP XTP 36
DDP Datagram Delivery Protocol 37
IDPR-CMTP IDPR Control Message Transport Proto 38
TP++ TP++ Transport Protocol 39
IL IL Transport Protocol 40
IPv6 IPv6 encapsulation 41
SDRP Source Demand Routing Protocol 42
IPv6-Route Routing Header for IPv6 43
IPv6-Frag Fragment Header for IPv6 44
IDRP Inter-Domain Routing Protocol 45
RSVP Reservation Protocol 46
GRE Generic Routing Encapsulation 47
DSR Dynamic Source Routing Protocol 48
BNA BNA 49
ESP Encap Security Payload 50
AH Authentication Header 51
I-NLSP Integrated Net Layer Security TUBA 52
NARP NBMA Address Resolution Protocol 54
Min-IPv4 Minimal IPv4 Encapsulation 55
TLSP Transport Layer Security Protocol using Kryptonet key management 56
SKIP SKIP 57
IPv6-ICMP ICMP for IPv6 58
IPv6-NoNxt No Next Header for IPv6 59
IPv6-Opts Destination Options for IPv6 60
CFTP CFTP 62
SAT-EXPAK SATNET and Backroom EXPAK 64
KRYPTOLAN Kryptolan 65
RVD MIT Remote Virtual Disk Protocol 66
IPPC Internet Pluribus Packet Core 67
SAT-MON SATNET Monitoring 69
VISA VISA Protocol 70
IPCV Internet Packet Core Utility 71
CPNX Computer Protocol Network Executive 72
CPHB Computer Protocol Heart Beat 73
WSN Wang Span Network 74
PVP Packet Video Protocol 75
BR-SAT-MON Backroom SATNET Monitoring 76
SUN-ND SUN ND PROTOCOL-Temporary 77
WB-MON WIDEBAND Monitoring 78
WB-EXPAK WIDEBAND EXPAK 79
ISO-IP ISO Internet Protocol 80
VMTP VMTP 81
SECURE-VMTP SECURE-VMTP 82
VINES VINES 83
IPTM Internet Protocol Traffic Manager 84
NSFNET-IGP NSFNET-IGP 85
DGP Dissimilar Gateway Protocol 86
TCF TCF 87
EIGRP EIGRP 88
OSPFIGP OSPFIGP 89
Sprite-RPC Sprite RPC Protocol 90
LARP Locus Address Resolution Protocol 91
MTP Multicast Transport Protocol 92
AX.25 AX.25 Frames 93
IPIP IP-within-IP Encapsulation Protocol 94
SCC-SP Semaphore Communications Sec. Pro. 96
ETHERIP Ethernet-within-IP Encapsulation 97
ENCAP Encapsulation Header 98
GMTP GMTP 100
IFMP Ipsilon Flow Management Protocol 101
PNNI PNNI over IP 102
PIM Protocol Independent Multicast 103
ARIS ARIS 104
SCPS SCPS 105
QNX QNX 106
A/N Active Networks 107
IPComp IP Payload Compression Protocol 108
SNP Sitara Networks Protocol 109
Compaq-Peer Compaq Peer Protocol 110
IPX-in-IP IPX in IP 111
VRRP Virtual Router Redundancy Protocol 112
PGM PGM Reliable Transport Protocol 113
L2TP Layer Two Tunneling Protocol 115
DDX D-II Data Exchange (DDX) 116
IATP Interactive Agent Transfer Protocol 117
STP Schedule Transfer Protocol 118
SRP SpectraLink Radio Protocol 119
UTI UTI 120
SMP Simple Message Protocol 121
PTP Performance Transparency Protocol 123
ISIS over IPv4 ISIS over IPv4 124
FIRE FIRE 125
CRTP Combat Radio Transport Protocol 126
CRUDP Combat Radio User Datagram 127
SSCOPMCE SSCOPMCE 128
IPLT IPLT 129
SPS Secure Packet Shield 130
PIPE Private IP Encapsulation within IP 131
SCTP Stream Control Transmission Protocol 132
FC Fibre Channel 133
RSVP-E2E-IGNORE RSVP-E2E-IGNORE 134
Mobility Header Mobility Header 135
UDPLite UDPLite 136
MPLS-in-IP MPLS-in-IP 137
manet MANET Protocols 138
HIP Host Identity Protocol 139
Shim6 Shim6 Protocol 140
WESP Wrapped Encapsulating Security Payload 141
ROHC Robust Header Compression 142
Ethernet Ethernet 143
AGGFRAG AGGFRAG encapsulation payload for ESP 144
NSH Network Service Header 145
Homa Homa 146
BIT-EMU Bit-stream Emulation 147
1 keyword name number
2 HOPOPT IPv6 Hop-by-Hop Option 0
3 ICMP Internet Control Message 1
4 IGMP Internet Group Management 2
5 GGP Gateway-to-Gateway 3
6 IPv4 IPv4 encapsulation 4
7 ST Stream 5
8 TCP Transmission Control 6
9 CBT CBT 7
10 EGP Exterior Gateway Protocol 8
11 IGP any private interior gateway (used by Cisco for their IGRP) 9
12 BBN-RCC-MON BBN RCC Monitoring 10
13 NVP-II Network Voice Protocol 11
14 PUP PUP 12
15 EMCON EMCON 14
16 XNET Cross Net Debugger 15
17 CHAOS Chaos 16
18 UDP User Datagram 17
19 MUX Multiplexing 18
20 DCN-MEAS DCN Measurement Subsystems 19
21 HMP Host Monitoring 20
22 PRM Packet Radio Measurement 21
23 XNS-IDP XEROX NS IDP 22
24 TRUNK-1 Trunk-1 23
25 TRUNK-2 Trunk-2 24
26 LEAF-1 Leaf-1 25
27 LEAF-2 Leaf-2 26
28 RDP Reliable Data Protocol 27
29 IRTP Internet Reliable Transaction 28
30 ISO-TP4 ISO Transport Protocol Class 4 29
31 NETBLT Bulk Data Transfer Protocol 30
32 MFE-NSP MFE Network Services Protocol 31
33 MERIT-INP MERIT Internodal Protocol 32
34 DCCP Datagram Congestion Control Protocol 33
35 3PC Third Party Connect Protocol 34
36 IDPR Inter-Domain Policy Routing Protocol 35
37 XTP XTP 36
38 DDP Datagram Delivery Protocol 37
39 IDPR-CMTP IDPR Control Message Transport Proto 38
40 TP++ TP++ Transport Protocol 39
41 IL IL Transport Protocol 40
42 IPv6 IPv6 encapsulation 41
43 SDRP Source Demand Routing Protocol 42
44 IPv6-Route Routing Header for IPv6 43
45 IPv6-Frag Fragment Header for IPv6 44
46 IDRP Inter-Domain Routing Protocol 45
47 RSVP Reservation Protocol 46
48 GRE Generic Routing Encapsulation 47
49 DSR Dynamic Source Routing Protocol 48
50 BNA BNA 49
51 ESP Encap Security Payload 50
52 AH Authentication Header 51
53 I-NLSP Integrated Net Layer Security TUBA 52
54 NARP NBMA Address Resolution Protocol 54
55 Min-IPv4 Minimal IPv4 Encapsulation 55
56 TLSP Transport Layer Security Protocol using Kryptonet key management 56
57 SKIP SKIP 57
58 IPv6-ICMP ICMP for IPv6 58
59 IPv6-NoNxt No Next Header for IPv6 59
60 IPv6-Opts Destination Options for IPv6 60
61 CFTP CFTP 62
62 SAT-EXPAK SATNET and Backroom EXPAK 64
63 KRYPTOLAN Kryptolan 65
64 RVD MIT Remote Virtual Disk Protocol 66
65 IPPC Internet Pluribus Packet Core 67
66 SAT-MON SATNET Monitoring 69
67 VISA VISA Protocol 70
68 IPCV Internet Packet Core Utility 71
69 CPNX Computer Protocol Network Executive 72
70 CPHB Computer Protocol Heart Beat 73
71 WSN Wang Span Network 74
72 PVP Packet Video Protocol 75
73 BR-SAT-MON Backroom SATNET Monitoring 76
74 SUN-ND SUN ND PROTOCOL-Temporary 77
75 WB-MON WIDEBAND Monitoring 78
76 WB-EXPAK WIDEBAND EXPAK 79
77 ISO-IP ISO Internet Protocol 80
78 VMTP VMTP 81
79 SECURE-VMTP SECURE-VMTP 82
80 VINES VINES 83
81 IPTM Internet Protocol Traffic Manager 84
82 NSFNET-IGP NSFNET-IGP 85
83 DGP Dissimilar Gateway Protocol 86
84 TCF TCF 87
85 EIGRP EIGRP 88
86 OSPFIGP OSPFIGP 89
87 Sprite-RPC Sprite RPC Protocol 90
88 LARP Locus Address Resolution Protocol 91
89 MTP Multicast Transport Protocol 92
90 AX.25 AX.25 Frames 93
91 IPIP IP-within-IP Encapsulation Protocol 94
92 SCC-SP Semaphore Communications Sec. Pro. 96
93 ETHERIP Ethernet-within-IP Encapsulation 97
94 ENCAP Encapsulation Header 98
95 GMTP GMTP 100
96 IFMP Ipsilon Flow Management Protocol 101
97 PNNI PNNI over IP 102
98 PIM Protocol Independent Multicast 103
99 ARIS ARIS 104
100 SCPS SCPS 105
101 QNX QNX 106
102 A/N Active Networks 107
103 IPComp IP Payload Compression Protocol 108
104 SNP Sitara Networks Protocol 109
105 Compaq-Peer Compaq Peer Protocol 110
106 IPX-in-IP IPX in IP 111
107 VRRP Virtual Router Redundancy Protocol 112
108 PGM PGM Reliable Transport Protocol 113
109 L2TP Layer Two Tunneling Protocol 115
110 DDX D-II Data Exchange (DDX) 116
111 IATP Interactive Agent Transfer Protocol 117
112 STP Schedule Transfer Protocol 118
113 SRP SpectraLink Radio Protocol 119
114 UTI UTI 120
115 SMP Simple Message Protocol 121
116 PTP Performance Transparency Protocol 123
117 ISIS over IPv4 ISIS over IPv4 124
118 FIRE FIRE 125
119 CRTP Combat Radio Transport Protocol 126
120 CRUDP Combat Radio User Datagram 127
121 SSCOPMCE SSCOPMCE 128
122 IPLT IPLT 129
123 SPS Secure Packet Shield 130
124 PIPE Private IP Encapsulation within IP 131
125 SCTP Stream Control Transmission Protocol 132
126 FC Fibre Channel 133
127 RSVP-E2E-IGNORE RSVP-E2E-IGNORE 134
128 Mobility Header Mobility Header 135
129 UDPLite UDPLite 136
130 MPLS-in-IP MPLS-in-IP 137
131 manet MANET Protocols 138
132 HIP Host Identity Protocol 139
133 Shim6 Shim6 Protocol 140
134 WESP Wrapped Encapsulating Security Payload 141
135 ROHC Robust Header Compression 142
136 Ethernet Ethernet 143
137 AGGFRAG AGGFRAG encapsulation payload for ESP 144
138 NSH Network Service Header 145
139 Homa Homa 146
140 BIT-EMU Bit-stream Emulation 147
+1
View File
@@ -0,0 +1 @@
{ "format": "{name}", "rows": "territory.tsv", "key": "alpha2", "name": "name" }
+242
View File
@@ -0,0 +1,242 @@
alpha2 alpha3 calling-code capital country currency flag languages name numeric tld
AD AND 376 Andorra la Vella AD EUR 🇦🇩 ca Andorra 020 .ad
AE ARE 971 Abu Dhabi AE AED 🇦🇪 ar-AE,fa,en,hi,ur United Arab Emirates 784 .ae
AF AFG 93 Kabul AF AFN 🇦🇫 fa-AF,ps,uz-AF,tk Afghanistan 004 .af
AG ATG 1-268 St. John's AG XCD 🇦🇬 en-AG Antigua & Barbuda 028 .ag
AI AIA 1-264 The Valley GB XCD 🇦🇮 en-AI Anguilla 660 .ai
AL ALB 355 Tirana AL ALL 🇦🇱 sq,el Albania 008 .al
AM ARM 374 Yerevan AM AMD 🇦🇲 hy Armenia 051 .am
AO AGO 244 Luanda AO AOA 🇦🇴 pt-AO Angola 024 .ao
AR ARG 54 Buenos Aires AR ARS 🇦🇷 es-AR,en,it,de,fr,gn Argentina 032 .ar
AS ASM 1-684 Pago Pago US USD 🇦🇸 en-AS,sm,to American Samoa 016 .as
AT AUT 43 Vienna AT EUR 🇦🇹 de-AT,hr,hu,sl Austria 040 .at
AU AUS 61 Canberra AU AUD 🇦🇺 en-AU Australia 036 .au
AW ABW 297 Oranjestad NL AWG 🇦🇼 nl-AW,pap,es,en Aruba 533 .aw
AX ALA 358 Mariehamn FI EUR 🇦🇽 sv-AX Åland Islands 248 .ax
AZ AZE 994 Baku AZ AZN 🇦🇿 az,ru,hy Azerbaijan 031 .az
BA BIH 387 Sarajevo BA BAM 🇧🇦 bs,hr-BA,sr-BA Bosnia 070 .ba
BB BRB 1-246 Bridgetown BB BBD 🇧🇧 en-BB Barbados 052 .bb
BD BGD 880 Dhaka BD BDT 🇧🇩 bn-BD,en Bangladesh 050 .bd
BE BEL 32 Brussels BE EUR 🇧🇪 nl-BE,fr-BE,de-BE Belgium 056 .be
BF BFA 226 Ouagadougou BF XOF 🇧🇫 fr-BF,mos Burkina Faso 854 .bf
BG BGR 359 Sofia BG EUR 🇧🇬 bg,tr-BG,rom Bulgaria 100 .bg
BH BHR 973 Manama BH BHD 🇧🇭 ar-BH,en,fa,ur Bahrain 048 .bh
BI BDI 257 Gitega BI BIF 🇧🇮 fr-BI,rn Burundi 108 .bi
BJ BEN 229 Porto-Novo BJ XOF 🇧🇯 fr-BJ Benin 204 .bj
BL BLM 590 Gustavia FR EUR 🇧🇱 fr St. Barthélemy 652 .gp
BM BMU 1-441 Hamilton GB BMD 🇧🇲 en-BM,pt Bermuda 060 .bm
BN BRN 673 Bandar Seri Begawan BN BND 🇧🇳 ms-BN,en-BN Brunei 096 .bn
BO BOL 591 Sucre BO BOB 🇧🇴 es-BO,qu,ay Bolivia 068 .bo
BR BRA 55 Brasilia BR BRL 🇧🇷 pt-BR,es,en,fr Brazil 076 .br
BS BHS 1-242 Nassau BS BSD 🇧🇸 en-BS Bahamas 044 .bs
BT BTN 975 Thimphu BT INR 🇧🇹 dz Bhutan 064 .bt
BW BWA 267 Gaborone BW BWP 🇧🇼 en-BW,tn-BW Botswana 072 .bw
BY BLR 375 Minsk BY BYN 🇧🇾 be,ru Belarus 112 .by
BZ BLZ 501 Belmopan BZ BZD 🇧🇿 en-BZ,es Belize 084 .bz
CA CAN 1 Ottawa CA CAD 🇨🇦 en-CA,fr-CA,iu Canada 124 .ca
CC CCK 61 West Island AU AUD 🇨🇨 ms-CC,en Cocos Islands 166 .cc
CD COD 243 Kinshasa CD CDF 🇨🇩 fr-CD,ln,ktu,kg,sw,lua Congo - Kinshasa 180 .cd
CF CAF 236 Bangui CF XAF 🇨🇫 fr-CF,sg,ln,kg Central African Republic 140 .cf
CG COG 242 Brazzaville CG XAF 🇨🇬 fr-CG,kg,ln-CG Congo - Brazzaville 178 .cg
CH CHE 41 Bern CH CHF 🇨🇭 de-CH,fr-CH,it-CH,rm Switzerland 756 .ch
CI CIV 225 Yamoussoukro CI XOF 🇨🇮 fr-CI Côte d’Ivoire 384 .ci
CK COK 682 Avarua NZ NZD 🇨🇰 en-CK,mi Cook Islands 184 .ck
CL CHL 56 Santiago CL CLP 🇨🇱 es-CL Chile 152 .cl
CM CMR 237 Yaounde CM XAF 🇨🇲 en-CM,fr-CM Cameroon 120 .cm
CN CHN 86 Beijing CN CNY 🇨🇳 zh-CN,yue,wuu,dta,ug,za China 156 .cn
CO COL 57 Bogota CO COP 🇨🇴 es-CO Colombia 170 .co
CR CRI 506 San Jose CR CRC 🇨🇷 es-CR,en Costa Rica 188 .cr
CU CUB 53 Havana CU CUP 🇨🇺 es-CU,pap Cuba 192 .cu
CV CPV 238 Praia CV CVE 🇨🇻 pt-CV Cape Verde 132 .cv
CW CUW 599 Willemstad NL XCG 🇨🇼 nl,pap Curaçao 531 .cw
CX CXR 61 Flying Fish Cove AU AUD 🇨🇽 en,zh,ms-CX Christmas Island 162 .cx
CY CYP 357 Nicosia CY EUR 🇨🇾 el-CY,tr-CY,en Cyprus 196 .cy
CZ CZE 420 Prague CZ CZK 🇨🇿 cs,sk Czechia 203 .cz
DE DEU 49 Berlin DE EUR 🇩🇪 de Germany 276 .de
DJ DJI 253 Djibouti DJ DJF 🇩🇯 fr-DJ,ar,so-DJ,aa Djibouti 262 .dj
DK DNK 45 Copenhagen DK DKK 🇩🇰 da-DK,en,fo,de-DK Denmark 208 .dk
DM DMA 1-767 Roseau DM XCD 🇩🇲 en-DM Dominica 212 .dm
DO DOM 1-809 Santo Domingo DO DOP 🇩🇴 es-DO Dominican Republic 214 .do
DZ DZA 213 Algiers DZ DZD 🇩🇿 ar-DZ Algeria 012 .dz
EC ECU 593 Quito EC USD 🇪🇨 es-EC Ecuador 218 .ec
EE EST 372 Tallinn EE EUR 🇪🇪 et,ru Estonia 233 .ee
EG EGY 20 Cairo EG EGP 🇪🇬 ar-EG,en,fr Egypt 818 .eg
EH ESH 212 El-Aaiun EH MAD 🇪🇭 ar,mey Western Sahara 732 .eh
ER ERI 291 Asmara ER ERN 🇪🇷 aa-ER,ar,tig,kun,ti-ER Eritrea 232 .er
ES ESP 34 Madrid ES EUR 🇪🇸 es-ES,ca,gl,eu,oc Spain 724 .es
ET ETH 251 Addis Ababa ET ETB 🇪🇹 am,en-ET,om-ET,ti-ET,so-ET,sid Ethiopia 231 .et
FI FIN 358 Helsinki FI EUR 🇫🇮 fi-FI,sv-FI,smn Finland 246 .fi
FJ FJI 679 Suva FJ FJD 🇫🇯 en-FJ,fj Fiji 242 .fj
FK FLK 500 Stanley GB FKP 🇫🇰 en-FK Falkland Islands 238 .fk
FM FSM 691 Palikir FM USD 🇫🇲 en-FM,chk,pon,yap,kos,uli,woe,nkr,kpg Micronesia 583 .fm
FO FRO 298 Torshavn DK DKK 🇫🇴 fo,da-FO Faroe Islands 234 .fo
FR FRA 33 Paris FR EUR 🇫🇷 fr-FR,frp,br,co,ca,eu,oc France 250 .fr
GA GAB 241 Libreville GA XAF 🇬🇦 fr-GA Gabon 266 .ga
GB GBR 44 London GB GBP 🇬🇧 en-GB,cy-GB,gd UK 826 .uk
GD GRD 1-473 St. George's GD XCD 🇬🇩 en-GD Grenada 308 .gd
GE GEO 995 Tbilisi GE GEL 🇬🇪 ka,ru,hy,az Georgia 268 .ge
GF GUF 594 Cayenne FR EUR 🇬🇫 fr-GF French Guiana 254 .gf
GG GGY 44 St Peter Port GB GBP 🇬🇬 en,nrf Guernsey 831 .gg
GH GHA 233 Accra GH GHS 🇬🇭 en-GH,ak,ee,tw Ghana 288 .gh
GI GIB 350 Gibraltar GB GIP 🇬🇮 en-GI,es,it,pt Gibraltar 292 .gi
GL GRL 299 Nuuk DK DKK 🇬🇱 kl,da-GL,en Greenland 304 .gl
GM GMB 220 Banjul GM GMD 🇬🇲 en-GM,mnk,wof,wo,ff Gambia 270 .gm
GN GIN 224 Conakry GN GNF 🇬🇳 fr-GN Guinea 324 .gn
GP GLP 590 Basse-Terre FR EUR 🇬🇵 fr-GP Guadeloupe 312 .gp
GQ GNQ 240 Ciudad de la Paz GQ XAF 🇬🇶 es-GQ,fr,pt Equatorial Guinea 226 .gq
GR GRC 30 Athens GR EUR 🇬🇷 el-GR,en,fr Greece 300 .gr
GT GTM 502 Guatemala City GT GTQ 🇬🇹 es-GT Guatemala 320 .gt
GU GUM 1-671 Hagatna US USD 🇬🇺 en-GU,ch-GU Guam 316 .gu
GW GNB 245 Bissau GW XOF 🇬🇼 pt-GW,pov Guinea-Bissau 624 .gw
GY GUY 592 Georgetown GY GYD 🇬🇾 en-GY Guyana 328 .gy
HK HKG 852 Hong Kong CN HKD 🇭🇰 zh-HK,yue,zh,en Hong Kong 344 .hk
HN HND 504 Tegucigalpa HN HNL 🇭🇳 es-HN,cab,miq Honduras 340 .hn
HR HRV 385 Zagreb HR EUR 🇭🇷 hr-HR,sr Croatia 191 .hr
HT HTI 509 Port-au-Prince HT HTG 🇭🇹 ht,fr-HT Haiti 332 .ht
HU HUN 36 Budapest HU HUF 🇭🇺 hu-HU Hungary 348 .hu
ID IDN 62 Jakarta ID IDR 🇮🇩 id,en,nl,jv Indonesia 360 .id
IE IRL 353 Dublin IE EUR 🇮🇪 en-IE,ga-IE Ireland 372 .ie
IL ISR 972 Jerusalem IL ILS 🇮🇱 he,ar-IL,en-IL Israel 376 .il
IM IMN 44 Douglas GB GBP 🇮🇲 en,gv Isle of Man 833 .im
IN IND 91 New Delhi IN INR 🇮🇳 en-IN,hi,bn,te,mr,ta,ur,gu,kn,ml,or,pa,as,bh,sat,ks,ne,sd,kok,doi,mni,sit,sa,fr,lus,inc India 356 .in
IO IOT 246 Diego Garcia GB USD 🇮🇴 en-IO British Indian Ocean Territory 086 .io
IQ IRQ 964 Baghdad IQ IQD 🇮🇶 ar-IQ,ku,hy Iraq 368 .iq
IR IRN 98 Tehran IR IRR 🇮🇷 fa-IR,ku Iran 364 .ir
IS ISL 354 Reykjavik IS ISK 🇮🇸 is,en,de,da,sv,no Iceland 352 .is
IT ITA 39 Rome IT EUR 🇮🇹 it-IT,de-IT,fr-IT,sc,ca,co,sl Italy 380 .it
JE JEY 44 Saint Helier GB GBP 🇯🇪 en,fr,nrf Jersey 832 .je
JM JAM 1-876 Kingston JM JMD 🇯🇲 en-JM Jamaica 388 .jm
JO JOR 962 Amman JO JOD 🇯🇴 ar-JO,en Jordan 400 .jo
JP JPN 81 Tokyo JP JPY 🇯🇵 ja Japan 392 .jp
KE KEN 254 Nairobi KE KES 🇰🇪 en-KE,sw-KE Kenya 404 .ke
KG KGZ 996 Bishkek KG KGS 🇰🇬 ky,uz,ru Kyrgyzstan 417 .kg
KH KHM 855 Phnom Penh KH KHR 🇰🇭 km,fr,en Cambodia 116 .kh
KI KIR 686 Tarawa KI AUD 🇰🇮 en-KI,gil Kiribati 296 .ki
KM COM 269 Moroni KM KMF 🇰🇲 ar,fr-KM Comoros 174 .km
KN KNA 1-869 Basseterre KN XCD 🇰🇳 en-KN St. Kitts & Nevis 659 .kn
KP PRK 850 Pyongyang KP KPW 🇰🇵 ko-KP North Korea 408 .kp
KR KOR 82 Seoul KR KRW 🇰🇷 ko-KR,en South Korea 410 .kr
KW KWT 965 Kuwait City KW KWD 🇰🇼 ar-KW,en Kuwait 414 .kw
KY CYM 1-345 George Town GB KYD 🇰🇾 en-KY Cayman Islands 136 .ky
KZ KAZ 7 Nur-Sultan KZ KZT 🇰🇿 kk,ru Kazakhstan 398 .kz
LA LAO 856 Vientiane LA LAK 🇱🇦 lo,fr,en Laos 418 .la
LB LBN 961 Beirut LB LBP 🇱🇧 ar-LB,fr-LB,en,hy Lebanon 422 .lb
LC LCA 1-758 Castries LC XCD 🇱🇨 en-LC St. Lucia 662 .lc
LI LIE 423 Vaduz LI CHF 🇱🇮 de-LI Liechtenstein 438 .li
LK LKA 94 Colombo LK LKR 🇱🇰 si,ta,en Sri Lanka 144 .lk
LR LBR 231 Monrovia LR LRD 🇱🇷 en-LR Liberia 430 .lr
LS LSO 266 Maseru LS LSL 🇱🇸 en-LS,st,zu,xh Lesotho 426 .ls
LT LTU 370 Vilnius LT EUR 🇱🇹 lt,ru,pl Lithuania 440 .lt
LU LUX 352 Luxembourg LU EUR 🇱🇺 lb,de-LU,fr-LU Luxembourg 442 .lu
LV LVA 371 Riga LV EUR 🇱🇻 lv,ru,lt Latvia 428 .lv
LY LBY 218 Tripoli LY LYD 🇱🇾 ar-LY,it,en Libya 434 .ly
MA MAR 212 Rabat MA MAD 🇲🇦 ar-MA,ber,fr Morocco 504 .ma
MC MCO 377 Monaco MC EUR 🇲🇨 fr-MC,en,it Monaco 492 .mc
MD MDA 373 Chisinau MD MDL 🇲🇩 ro,ru,gag,tr Moldova 498 .md
ME MNE 382 Podgorica ME EUR 🇲🇪 sr,hu,bs,sq,hr,rom Montenegro 499 .me
MF MAF 590 Marigot FR EUR 🇲🇫 fr St. Martin 663 .gp
MG MDG 261 Antananarivo MG MGA 🇲🇬 fr-MG,mg Madagascar 450 .mg
MH MHL 692 Majuro MH USD 🇲🇭 mh,en-MH Marshall Islands 584 .mh
MK MKD 389 Skopje MK MKD 🇲🇰 mk,sq,tr,rmm,sr North Macedonia 807 .mk
ML MLI 223 Bamako ML XOF 🇲🇱 fr-ML,bm Mali 466 .ml
MM MMR 95 Nay Pyi Taw MM MMK 🇲🇲 my Myanmar 104 .mm
MN MNG 976 Ulaanbaatar MN MNT 🇲🇳 mn,ru Mongolia 496 .mn
MO MAC 853 Macao CN MOP 🇲🇴 zh,zh-MO,pt Macao 446 .mo
MP MNP 1-670 Saipan US USD 🇲🇵 fil,tl,zh,ch-MP,en-MP Northern Mariana Islands 580 .mp
MQ MTQ 596 Fort-de-France FR EUR 🇲🇶 fr-MQ Martinique 474 .mq
MR MRT 222 Nouakchott MR MRU 🇲🇷 ar-MR,fuc,snk,fr,mey,wo Mauritania 478 .mr
MS MSR 1-664 Plymouth GB XCD 🇲🇸 en-MS Montserrat 500 .ms
MT MLT 356 Valletta MT EUR 🇲🇹 mt,en-MT Malta 470 .mt
MU MUS 230 Port Louis MU MUR 🇲🇺 en-MU,bho,fr Mauritius 480 .mu
MV MDV 960 Male MV MVR 🇲🇻 dv,en Maldives 462 .mv
MW MWI 265 Lilongwe MW MWK 🇲🇼 ny,yao,tum,swk Malawi 454 .mw
MX MEX 52 Mexico City MX MXN 🇲🇽 es-MX Mexico 484 .mx
MY MYS 60 Kuala Lumpur MY MYR 🇲🇾 ms-MY,en,zh,ta,te,ml,pa,th Malaysia 458 .my
MZ MOZ 258 Maputo MZ MZN 🇲🇿 pt-MZ,vmw Mozambique 508 .mz
NA NAM 264 Windhoek NA NAD 🇳🇦 en-NA,af,de,hz,naq Namibia 516 .na
NC NCL 687 Noumea FR XPF 🇳🇨 fr-NC New Caledonia 540 .nc
NE NER 227 Niamey NE XOF 🇳🇪 fr-NE,ha,kr,dje Niger 562 .ne
NF NFK 672 Kingston AU AUD 🇳🇫 en-NF Norfolk Island 574 .nf
NG NGA 234 Abuja NG NGN 🇳🇬 en-NG,ha,yo,ig,ff Nigeria 566 .ng
NI NIC 505 Managua NI NIO 🇳🇮 es-NI,en Nicaragua 558 .ni
NL NLD 31 Amsterdam NL EUR 🇳🇱 nl-NL,fy-NL Netherlands 528 .nl
NO NOR 47 Oslo NO NOK 🇳🇴 no,nb,nn,se,fi Norway 578 .no
NP NPL 977 Kathmandu NP NPR 🇳🇵 ne,en Nepal 524 .np
NR NRU 674 Yaren NR AUD 🇳🇷 na,en-NR Nauru 520 .nr
NU NIU 683 Alofi NZ NZD 🇳🇺 niu,en-NU Niue 570 .nu
NZ NZL 64 Wellington NZ NZD 🇳🇿 en-NZ,mi New Zealand 554 .nz
OM OMN 968 Muscat OM OMR 🇴🇲 ar-OM,en,bal,ur Oman 512 .om
PA PAN 507 Panama City PA PAB 🇵🇦 es-PA,en Panama 591 .pa
PE PER 51 Lima PE PEN 🇵🇪 es-PE,qu,ay Peru 604 .pe
PF PYF 689 Papeete FR XPF 🇵🇫 fr-PF,ty French Polynesia 258 .pf
PG PNG 675 Port Moresby PG PGK 🇵🇬 en-PG,ho,meu,tpi Papua New Guinea 598 .pg
PH PHL 63 Manila PH PHP 🇵🇭 tl,en-PH,fil,ceb,ilo,hil,war,pam,bik,bcl,pag,mrw,tsg,mdh,cbk,krj,sgd,msb,akl,ibg,yka,mta,abx Philippines 608 .ph
PK PAK 92 Islamabad PK PKR 🇵🇰 ur-PK,en-PK,pa,sd,ps,brh Pakistan 586 .pk
PL POL 48 Warsaw PL PLN 🇵🇱 pl Poland 616 .pl
PM SPM 508 Saint-Pierre FR EUR 🇵🇲 fr-PM St. Pierre & Miquelon 666 .pm
PN PCN 870 Adamstown GB NZD 🇵🇳 en-PN Pitcairn 612 .pn
PR PRI 1 San Juan US USD 🇵🇷 en-PR,es-PR Puerto Rico 630 .pr
PT PRT 351 Lisbon PT EUR 🇵🇹 pt-PT,mwl Portugal 620 .pt
PW PLW 680 Melekeok PW USD 🇵🇼 pau,sov,en-PW,tox,ja,fil,zh Palau 585 .pw
PY PRY 595 Asuncion PY PYG 🇵🇾 es-PY,gn Paraguay 600 .py
QA QAT 974 Doha QA QAR 🇶🇦 ar-QA,es Qatar 634 .qa
RE REU 262 Saint-Denis FR EUR 🇷🇪 fr-RE Réunion 638 .re
RO ROU 40 Bucharest RO RON 🇷🇴 ro,hu,rom Romania 642 .ro
RS SRB 381 Belgrade RS RSD 🇷🇸 sr,hu,bs,rom Serbia 688 .rs
RU RUS 7 Moscow RU RUB 🇷🇺 ru,tt,xal,cau,ady,kv,ce,tyv,cv,udm,tut,mns,bua,myv,mdf,chm,ba,inh,kbd,krc,av,sah,nog Russia 643 .ru
RW RWA 250 Kigali RW RWF 🇷🇼 rw,en-RW,fr-RW,sw Rwanda 646 .rw
SA SAU 966 Riyadh SA SAR 🇸🇦 ar-SA Saudi Arabia 682 .sa
SB SLB 677 Honiara SB SBD 🇸🇧 en-SB,tpi Solomon Islands 090 .sb
SC SYC 248 Victoria SC SCR 🇸🇨 en-SC,fr-SC Seychelles 690 .sc
SD SDN 249 Khartoum SD SDG 🇸🇩 ar-SD,en,fia Sudan 729 .sd
SE SWE 46 Stockholm SE SEK 🇸🇪 sv-SE,se,sma,fi-SE Sweden 752 .se
SG SGP 65 Singapore SG SGD 🇸🇬 cmn,en-SG,ms-SG,ta-SG,zh-SG Singapore 702 .sg
SH SHN 290 Jamestown GB SHP 🇸🇭 en-SH St. Helena 654 .sh
SI SVN 386 Ljubljana SI EUR 🇸🇮 sl,sh Slovenia 705 .si
SJ SJM 47 Longyearbyen NO NOK 🇸🇯 no,ru Svalbard & Jan Mayen 744 .sj
SK SVK 421 Bratislava SK EUR 🇸🇰 sk,hu Slovakia 703 .sk
SL SLE 232 Freetown SL SLE 🇸🇱 en-SL,men,tem Sierra Leone 694 .sl
SM SMR 378 San Marino SM EUR 🇸🇲 it-SM San Marino 674 .sm
SN SEN 221 Dakar SN XOF 🇸🇳 fr-SN,wo,fuc,mnk Senegal 686 .sn
SO SOM 252 Mogadishu SO SOS 🇸🇴 so-SO,ar-SO,it,en-SO Somalia 706 .so
SR SUR 597 Paramaribo SR SRD 🇸🇷 nl-SR,en,srn,hns,jv Suriname 740 .sr
SS SSD 211 Juba SS SSP 🇸🇸 en South Sudan 728 .ss
ST STP 239 Sao Tome ST STN 🇸🇹 pt-ST São Tomé & Príncipe 678 .st
SV SLV 503 San Salvador SV SVC 🇸🇻 es-SV El Salvador 222 .sv
SX SXM 1-721 Philipsburg NL XCG 🇸🇽 nl,en Sint Maarten 534 .sx
SY SYR 963 Damascus SY SYP 🇸🇾 ar-SY,ku,hy,arc,fr,en Syria 760 .sy
SZ SWZ 268 Mbabane SZ SZL 🇸🇿 en-SZ,ss-SZ Eswatini 748 .sz
TC TCA 1-649 Cockburn Town GB USD 🇹🇨 en-TC Turks & Caicos Islands 796 .tc
TD TCD 235 N'Djamena TD XAF 🇹🇩 fr-TD,ar-TD,sre Chad 148 .td
TF ATF 262 Port-aux-Francais FR EUR 🇹🇫 fr French Southern Territories 260 .tf
TG TGO 228 Lome TG XOF 🇹🇬 fr-TG,ee,hna,kbp,dag,ha Togo 768 .tg
TH THA 66 Bangkok TH THB 🇹🇭 th,en Thailand 764 .th
TJ TJK 992 Dushanbe TJ TJS 🇹🇯 tg,ru Tajikistan 762 .tj
TL TLS 670 Dili TL USD 🇹🇱 tet,pt-TL,id,en Timor-Leste 626 .tl
TM TKM 993 Ashgabat TM TMT 🇹🇲 tk,ru,uz Turkmenistan 795 .tm
TN TUN 216 Tunis TN TND 🇹🇳 ar-TN,fr Tunisia 788 .tn
TO TON 676 Nuku'alofa TO TOP 🇹🇴 to,en-TO Tonga 776 .to
TR TUR 90 Ankara TR TRY 🇹🇷 tr-TR,ku,diq,az,av Türkiye 792 .tr
TT TTO 1-868 Port of Spain TT TTD 🇹🇹 en-TT,hns,fr,es,zh Trinidad & Tobago 780 .tt
TV TUV 688 Funafuti TV AUD 🇹🇻 tvl,en,sm,gil Tuvalu 798 .tv
TW TWN 886 Taipei TW TWD 🇹🇼 zh-TW,zh,nan,hak Taiwan 158 .tw
TZ TZA 255 Dodoma TZ TZS 🇹🇿 sw-TZ,en,ar Tanzania 834 .tz
UA UKR 380 Kyiv UA UAH 🇺🇦 uk,ru-UA,rom,pl,hu Ukraine 804 .ua
UG UGA 256 Kampala UG UGX 🇺🇬 en-UG,lg,sw,ar Uganda 800 .ug
US USA 1 Washington US USD 🇺🇸 en-US,es-US,haw,fr US 840 .us
UY URY 598 Montevideo UY UYU 🇺🇾 es-UY Uruguay 858 .uy
UZ UZB 998 Tashkent UZ UZS 🇺🇿 uz,ru,tg Uzbekistan 860 .uz
VA VAT 39 Vatican City VA EUR 🇻🇦 la,it,fr Vatican City 336 .va
VC VCT 1-784 Kingstown VC XCD 🇻🇨 en-VC,fr St. Vincent & Grenadines 670 .vc
VE VEN 58 Caracas VE VES 🇻🇪 es-VE Venezuela 862 .ve
VG VGB 1-284 Road Town GB USD 🇻🇬 en-VG British Virgin Islands 092 .vg
VI VIR 1-340 Charlotte Amalie US USD 🇻🇮 en-VI U.S. Virgin Islands 850 .vi
VN VNM 84 Hanoi VN VND 🇻🇳 vi,en,fr,zh,km Vietnam 704 .vn
VU VUT 678 Port Vila VU VUV 🇻🇺 bi,en-VU,fr-VU Vanuatu 548 .vu
WF WLF 681 Mata Utu FR XPF 🇼🇫 wls,fud,fr-WF Wallis & Futuna 876 .wf
WS WSM 685 Apia WS WST 🇼🇸 sm,en-WS Samoa 882 .ws
YE YEM 967 Sanaa YE YER 🇾🇪 ar-YE Yemen 887 .ye
YT MYT 262 Mamoudzou FR EUR 🇾🇹 fr-YT Mayotte 175 .yt
ZA ZAF 27 Pretoria ZA ZAR 🇿🇦 zu,xh,af,nso,en-ZA,tn,st,ts,ss,ve,nr South Africa 710 .za
ZM ZMB 260 Lusaka ZM ZMW 🇿🇲 en-ZM,bem,loz,lun,lue,ny,toi Zambia 894 .zm
ZW ZWE 263 Harare ZW ZWG 🇿🇼 en-ZW,sn,nr,nd Zimbabwe 716 .zw
1 alpha2 alpha3 calling-code capital country currency flag languages name numeric tld
2 AD AND 376 Andorra la Vella AD EUR 🇦🇩 ca Andorra 020 .ad
3 AE ARE 971 Abu Dhabi AE AED 🇦🇪 ar-AE,fa,en,hi,ur United Arab Emirates 784 .ae
4 AF AFG 93 Kabul AF AFN 🇦🇫 fa-AF,ps,uz-AF,tk Afghanistan 004 .af
5 AG ATG 1-268 St. John's AG XCD 🇦🇬 en-AG Antigua & Barbuda 028 .ag
6 AI AIA 1-264 The Valley GB XCD 🇦🇮 en-AI Anguilla 660 .ai
7 AL ALB 355 Tirana AL ALL 🇦🇱 sq,el Albania 008 .al
8 AM ARM 374 Yerevan AM AMD 🇦🇲 hy Armenia 051 .am
9 AO AGO 244 Luanda AO AOA 🇦🇴 pt-AO Angola 024 .ao
10 AR ARG 54 Buenos Aires AR ARS 🇦🇷 es-AR,en,it,de,fr,gn Argentina 032 .ar
11 AS ASM 1-684 Pago Pago US USD 🇦🇸 en-AS,sm,to American Samoa 016 .as
12 AT AUT 43 Vienna AT EUR 🇦🇹 de-AT,hr,hu,sl Austria 040 .at
13 AU AUS 61 Canberra AU AUD 🇦🇺 en-AU Australia 036 .au
14 AW ABW 297 Oranjestad NL AWG 🇦🇼 nl-AW,pap,es,en Aruba 533 .aw
15 AX ALA 358 Mariehamn FI EUR 🇦🇽 sv-AX Åland Islands 248 .ax
16 AZ AZE 994 Baku AZ AZN 🇦🇿 az,ru,hy Azerbaijan 031 .az
17 BA BIH 387 Sarajevo BA BAM 🇧🇦 bs,hr-BA,sr-BA Bosnia 070 .ba
18 BB BRB 1-246 Bridgetown BB BBD 🇧🇧 en-BB Barbados 052 .bb
19 BD BGD 880 Dhaka BD BDT 🇧🇩 bn-BD,en Bangladesh 050 .bd
20 BE BEL 32 Brussels BE EUR 🇧🇪 nl-BE,fr-BE,de-BE Belgium 056 .be
21 BF BFA 226 Ouagadougou BF XOF 🇧🇫 fr-BF,mos Burkina Faso 854 .bf
22 BG BGR 359 Sofia BG EUR 🇧🇬 bg,tr-BG,rom Bulgaria 100 .bg
23 BH BHR 973 Manama BH BHD 🇧🇭 ar-BH,en,fa,ur Bahrain 048 .bh
24 BI BDI 257 Gitega BI BIF 🇧🇮 fr-BI,rn Burundi 108 .bi
25 BJ BEN 229 Porto-Novo BJ XOF 🇧🇯 fr-BJ Benin 204 .bj
26 BL BLM 590 Gustavia FR EUR 🇧🇱 fr St. Barthélemy 652 .gp
27 BM BMU 1-441 Hamilton GB BMD 🇧🇲 en-BM,pt Bermuda 060 .bm
28 BN BRN 673 Bandar Seri Begawan BN BND 🇧🇳 ms-BN,en-BN Brunei 096 .bn
29 BO BOL 591 Sucre BO BOB 🇧🇴 es-BO,qu,ay Bolivia 068 .bo
30 BR BRA 55 Brasilia BR BRL 🇧🇷 pt-BR,es,en,fr Brazil 076 .br
31 BS BHS 1-242 Nassau BS BSD 🇧🇸 en-BS Bahamas 044 .bs
32 BT BTN 975 Thimphu BT INR 🇧🇹 dz Bhutan 064 .bt
33 BW BWA 267 Gaborone BW BWP 🇧🇼 en-BW,tn-BW Botswana 072 .bw
34 BY BLR 375 Minsk BY BYN 🇧🇾 be,ru Belarus 112 .by
35 BZ BLZ 501 Belmopan BZ BZD 🇧🇿 en-BZ,es Belize 084 .bz
36 CA CAN 1 Ottawa CA CAD 🇨🇦 en-CA,fr-CA,iu Canada 124 .ca
37 CC CCK 61 West Island AU AUD 🇨🇨 ms-CC,en Cocos Islands 166 .cc
38 CD COD 243 Kinshasa CD CDF 🇨🇩 fr-CD,ln,ktu,kg,sw,lua Congo - Kinshasa 180 .cd
39 CF CAF 236 Bangui CF XAF 🇨🇫 fr-CF,sg,ln,kg Central African Republic 140 .cf
40 CG COG 242 Brazzaville CG XAF 🇨🇬 fr-CG,kg,ln-CG Congo - Brazzaville 178 .cg
41 CH CHE 41 Bern CH CHF 🇨🇭 de-CH,fr-CH,it-CH,rm Switzerland 756 .ch
42 CI CIV 225 Yamoussoukro CI XOF 🇨🇮 fr-CI Côte d’Ivoire 384 .ci
43 CK COK 682 Avarua NZ NZD 🇨🇰 en-CK,mi Cook Islands 184 .ck
44 CL CHL 56 Santiago CL CLP 🇨🇱 es-CL Chile 152 .cl
45 CM CMR 237 Yaounde CM XAF 🇨🇲 en-CM,fr-CM Cameroon 120 .cm
46 CN CHN 86 Beijing CN CNY 🇨🇳 zh-CN,yue,wuu,dta,ug,za China 156 .cn
47 CO COL 57 Bogota CO COP 🇨🇴 es-CO Colombia 170 .co
48 CR CRI 506 San Jose CR CRC 🇨🇷 es-CR,en Costa Rica 188 .cr
49 CU CUB 53 Havana CU CUP 🇨🇺 es-CU,pap Cuba 192 .cu
50 CV CPV 238 Praia CV CVE 🇨🇻 pt-CV Cape Verde 132 .cv
51 CW CUW 599 Willemstad NL XCG 🇨🇼 nl,pap Curaçao 531 .cw
52 CX CXR 61 Flying Fish Cove AU AUD 🇨🇽 en,zh,ms-CX Christmas Island 162 .cx
53 CY CYP 357 Nicosia CY EUR 🇨🇾 el-CY,tr-CY,en Cyprus 196 .cy
54 CZ CZE 420 Prague CZ CZK 🇨🇿 cs,sk Czechia 203 .cz
55 DE DEU 49 Berlin DE EUR 🇩🇪 de Germany 276 .de
56 DJ DJI 253 Djibouti DJ DJF 🇩🇯 fr-DJ,ar,so-DJ,aa Djibouti 262 .dj
57 DK DNK 45 Copenhagen DK DKK 🇩🇰 da-DK,en,fo,de-DK Denmark 208 .dk
58 DM DMA 1-767 Roseau DM XCD 🇩🇲 en-DM Dominica 212 .dm
59 DO DOM 1-809 Santo Domingo DO DOP 🇩🇴 es-DO Dominican Republic 214 .do
60 DZ DZA 213 Algiers DZ DZD 🇩🇿 ar-DZ Algeria 012 .dz
61 EC ECU 593 Quito EC USD 🇪🇨 es-EC Ecuador 218 .ec
62 EE EST 372 Tallinn EE EUR 🇪🇪 et,ru Estonia 233 .ee
63 EG EGY 20 Cairo EG EGP 🇪🇬 ar-EG,en,fr Egypt 818 .eg
64 EH ESH 212 El-Aaiun EH MAD 🇪🇭 ar,mey Western Sahara 732 .eh
65 ER ERI 291 Asmara ER ERN 🇪🇷 aa-ER,ar,tig,kun,ti-ER Eritrea 232 .er
66 ES ESP 34 Madrid ES EUR 🇪🇸 es-ES,ca,gl,eu,oc Spain 724 .es
67 ET ETH 251 Addis Ababa ET ETB 🇪🇹 am,en-ET,om-ET,ti-ET,so-ET,sid Ethiopia 231 .et
68 FI FIN 358 Helsinki FI EUR 🇫🇮 fi-FI,sv-FI,smn Finland 246 .fi
69 FJ FJI 679 Suva FJ FJD 🇫🇯 en-FJ,fj Fiji 242 .fj
70 FK FLK 500 Stanley GB FKP 🇫🇰 en-FK Falkland Islands 238 .fk
71 FM FSM 691 Palikir FM USD 🇫🇲 en-FM,chk,pon,yap,kos,uli,woe,nkr,kpg Micronesia 583 .fm
72 FO FRO 298 Torshavn DK DKK 🇫🇴 fo,da-FO Faroe Islands 234 .fo
73 FR FRA 33 Paris FR EUR 🇫🇷 fr-FR,frp,br,co,ca,eu,oc France 250 .fr
74 GA GAB 241 Libreville GA XAF 🇬🇦 fr-GA Gabon 266 .ga
75 GB GBR 44 London GB GBP 🇬🇧 en-GB,cy-GB,gd UK 826 .uk
76 GD GRD 1-473 St. George's GD XCD 🇬🇩 en-GD Grenada 308 .gd
77 GE GEO 995 Tbilisi GE GEL 🇬🇪 ka,ru,hy,az Georgia 268 .ge
78 GF GUF 594 Cayenne FR EUR 🇬🇫 fr-GF French Guiana 254 .gf
79 GG GGY 44 St Peter Port GB GBP 🇬🇬 en,nrf Guernsey 831 .gg
80 GH GHA 233 Accra GH GHS 🇬🇭 en-GH,ak,ee,tw Ghana 288 .gh
81 GI GIB 350 Gibraltar GB GIP 🇬🇮 en-GI,es,it,pt Gibraltar 292 .gi
82 GL GRL 299 Nuuk DK DKK 🇬🇱 kl,da-GL,en Greenland 304 .gl
83 GM GMB 220 Banjul GM GMD 🇬🇲 en-GM,mnk,wof,wo,ff Gambia 270 .gm
84 GN GIN 224 Conakry GN GNF 🇬🇳 fr-GN Guinea 324 .gn
85 GP GLP 590 Basse-Terre FR EUR 🇬🇵 fr-GP Guadeloupe 312 .gp
86 GQ GNQ 240 Ciudad de la Paz GQ XAF 🇬🇶 es-GQ,fr,pt Equatorial Guinea 226 .gq
87 GR GRC 30 Athens GR EUR 🇬🇷 el-GR,en,fr Greece 300 .gr
88 GT GTM 502 Guatemala City GT GTQ 🇬🇹 es-GT Guatemala 320 .gt
89 GU GUM 1-671 Hagatna US USD 🇬🇺 en-GU,ch-GU Guam 316 .gu
90 GW GNB 245 Bissau GW XOF 🇬🇼 pt-GW,pov Guinea-Bissau 624 .gw
91 GY GUY 592 Georgetown GY GYD 🇬🇾 en-GY Guyana 328 .gy
92 HK HKG 852 Hong Kong CN HKD 🇭🇰 zh-HK,yue,zh,en Hong Kong 344 .hk
93 HN HND 504 Tegucigalpa HN HNL 🇭🇳 es-HN,cab,miq Honduras 340 .hn
94 HR HRV 385 Zagreb HR EUR 🇭🇷 hr-HR,sr Croatia 191 .hr
95 HT HTI 509 Port-au-Prince HT HTG 🇭🇹 ht,fr-HT Haiti 332 .ht
96 HU HUN 36 Budapest HU HUF 🇭🇺 hu-HU Hungary 348 .hu
97 ID IDN 62 Jakarta ID IDR 🇮🇩 id,en,nl,jv Indonesia 360 .id
98 IE IRL 353 Dublin IE EUR 🇮🇪 en-IE,ga-IE Ireland 372 .ie
99 IL ISR 972 Jerusalem IL ILS 🇮🇱 he,ar-IL,en-IL Israel 376 .il
100 IM IMN 44 Douglas GB GBP 🇮🇲 en,gv Isle of Man 833 .im
101 IN IND 91 New Delhi IN INR 🇮🇳 en-IN,hi,bn,te,mr,ta,ur,gu,kn,ml,or,pa,as,bh,sat,ks,ne,sd,kok,doi,mni,sit,sa,fr,lus,inc India 356 .in
102 IO IOT 246 Diego Garcia GB USD 🇮🇴 en-IO British Indian Ocean Territory 086 .io
103 IQ IRQ 964 Baghdad IQ IQD 🇮🇶 ar-IQ,ku,hy Iraq 368 .iq
104 IR IRN 98 Tehran IR IRR 🇮🇷 fa-IR,ku Iran 364 .ir
105 IS ISL 354 Reykjavik IS ISK 🇮🇸 is,en,de,da,sv,no Iceland 352 .is
106 IT ITA 39 Rome IT EUR 🇮🇹 it-IT,de-IT,fr-IT,sc,ca,co,sl Italy 380 .it
107 JE JEY 44 Saint Helier GB GBP 🇯🇪 en,fr,nrf Jersey 832 .je
108 JM JAM 1-876 Kingston JM JMD 🇯🇲 en-JM Jamaica 388 .jm
109 JO JOR 962 Amman JO JOD 🇯🇴 ar-JO,en Jordan 400 .jo
110 JP JPN 81 Tokyo JP JPY 🇯🇵 ja Japan 392 .jp
111 KE KEN 254 Nairobi KE KES 🇰🇪 en-KE,sw-KE Kenya 404 .ke
112 KG KGZ 996 Bishkek KG KGS 🇰🇬 ky,uz,ru Kyrgyzstan 417 .kg
113 KH KHM 855 Phnom Penh KH KHR 🇰🇭 km,fr,en Cambodia 116 .kh
114 KI KIR 686 Tarawa KI AUD 🇰🇮 en-KI,gil Kiribati 296 .ki
115 KM COM 269 Moroni KM KMF 🇰🇲 ar,fr-KM Comoros 174 .km
116 KN KNA 1-869 Basseterre KN XCD 🇰🇳 en-KN St. Kitts & Nevis 659 .kn
117 KP PRK 850 Pyongyang KP KPW 🇰🇵 ko-KP North Korea 408 .kp
118 KR KOR 82 Seoul KR KRW 🇰🇷 ko-KR,en South Korea 410 .kr
119 KW KWT 965 Kuwait City KW KWD 🇰🇼 ar-KW,en Kuwait 414 .kw
120 KY CYM 1-345 George Town GB KYD 🇰🇾 en-KY Cayman Islands 136 .ky
121 KZ KAZ 7 Nur-Sultan KZ KZT 🇰🇿 kk,ru Kazakhstan 398 .kz
122 LA LAO 856 Vientiane LA LAK 🇱🇦 lo,fr,en Laos 418 .la
123 LB LBN 961 Beirut LB LBP 🇱🇧 ar-LB,fr-LB,en,hy Lebanon 422 .lb
124 LC LCA 1-758 Castries LC XCD 🇱🇨 en-LC St. Lucia 662 .lc
125 LI LIE 423 Vaduz LI CHF 🇱🇮 de-LI Liechtenstein 438 .li
126 LK LKA 94 Colombo LK LKR 🇱🇰 si,ta,en Sri Lanka 144 .lk
127 LR LBR 231 Monrovia LR LRD 🇱🇷 en-LR Liberia 430 .lr
128 LS LSO 266 Maseru LS LSL 🇱🇸 en-LS,st,zu,xh Lesotho 426 .ls
129 LT LTU 370 Vilnius LT EUR 🇱🇹 lt,ru,pl Lithuania 440 .lt
130 LU LUX 352 Luxembourg LU EUR 🇱🇺 lb,de-LU,fr-LU Luxembourg 442 .lu
131 LV LVA 371 Riga LV EUR 🇱🇻 lv,ru,lt Latvia 428 .lv
132 LY LBY 218 Tripoli LY LYD 🇱🇾 ar-LY,it,en Libya 434 .ly
133 MA MAR 212 Rabat MA MAD 🇲🇦 ar-MA,ber,fr Morocco 504 .ma
134 MC MCO 377 Monaco MC EUR 🇲🇨 fr-MC,en,it Monaco 492 .mc
135 MD MDA 373 Chisinau MD MDL 🇲🇩 ro,ru,gag,tr Moldova 498 .md
136 ME MNE 382 Podgorica ME EUR 🇲🇪 sr,hu,bs,sq,hr,rom Montenegro 499 .me
137 MF MAF 590 Marigot FR EUR 🇲🇫 fr St. Martin 663 .gp
138 MG MDG 261 Antananarivo MG MGA 🇲🇬 fr-MG,mg Madagascar 450 .mg
139 MH MHL 692 Majuro MH USD 🇲🇭 mh,en-MH Marshall Islands 584 .mh
140 MK MKD 389 Skopje MK MKD 🇲🇰 mk,sq,tr,rmm,sr North Macedonia 807 .mk
141 ML MLI 223 Bamako ML XOF 🇲🇱 fr-ML,bm Mali 466 .ml
142 MM MMR 95 Nay Pyi Taw MM MMK 🇲🇲 my Myanmar 104 .mm
143 MN MNG 976 Ulaanbaatar MN MNT 🇲🇳 mn,ru Mongolia 496 .mn
144 MO MAC 853 Macao CN MOP 🇲🇴 zh,zh-MO,pt Macao 446 .mo
145 MP MNP 1-670 Saipan US USD 🇲🇵 fil,tl,zh,ch-MP,en-MP Northern Mariana Islands 580 .mp
146 MQ MTQ 596 Fort-de-France FR EUR 🇲🇶 fr-MQ Martinique 474 .mq
147 MR MRT 222 Nouakchott MR MRU 🇲🇷 ar-MR,fuc,snk,fr,mey,wo Mauritania 478 .mr
148 MS MSR 1-664 Plymouth GB XCD 🇲🇸 en-MS Montserrat 500 .ms
149 MT MLT 356 Valletta MT EUR 🇲🇹 mt,en-MT Malta 470 .mt
150 MU MUS 230 Port Louis MU MUR 🇲🇺 en-MU,bho,fr Mauritius 480 .mu
151 MV MDV 960 Male MV MVR 🇲🇻 dv,en Maldives 462 .mv
152 MW MWI 265 Lilongwe MW MWK 🇲🇼 ny,yao,tum,swk Malawi 454 .mw
153 MX MEX 52 Mexico City MX MXN 🇲🇽 es-MX Mexico 484 .mx
154 MY MYS 60 Kuala Lumpur MY MYR 🇲🇾 ms-MY,en,zh,ta,te,ml,pa,th Malaysia 458 .my
155 MZ MOZ 258 Maputo MZ MZN 🇲🇿 pt-MZ,vmw Mozambique 508 .mz
156 NA NAM 264 Windhoek NA NAD 🇳🇦 en-NA,af,de,hz,naq Namibia 516 .na
157 NC NCL 687 Noumea FR XPF 🇳🇨 fr-NC New Caledonia 540 .nc
158 NE NER 227 Niamey NE XOF 🇳🇪 fr-NE,ha,kr,dje Niger 562 .ne
159 NF NFK 672 Kingston AU AUD 🇳🇫 en-NF Norfolk Island 574 .nf
160 NG NGA 234 Abuja NG NGN 🇳🇬 en-NG,ha,yo,ig,ff Nigeria 566 .ng
161 NI NIC 505 Managua NI NIO 🇳🇮 es-NI,en Nicaragua 558 .ni
162 NL NLD 31 Amsterdam NL EUR 🇳🇱 nl-NL,fy-NL Netherlands 528 .nl
163 NO NOR 47 Oslo NO NOK 🇳🇴 no,nb,nn,se,fi Norway 578 .no
164 NP NPL 977 Kathmandu NP NPR 🇳🇵 ne,en Nepal 524 .np
165 NR NRU 674 Yaren NR AUD 🇳🇷 na,en-NR Nauru 520 .nr
166 NU NIU 683 Alofi NZ NZD 🇳🇺 niu,en-NU Niue 570 .nu
167 NZ NZL 64 Wellington NZ NZD 🇳🇿 en-NZ,mi New Zealand 554 .nz
168 OM OMN 968 Muscat OM OMR 🇴🇲 ar-OM,en,bal,ur Oman 512 .om
169 PA PAN 507 Panama City PA PAB 🇵🇦 es-PA,en Panama 591 .pa
170 PE PER 51 Lima PE PEN 🇵🇪 es-PE,qu,ay Peru 604 .pe
171 PF PYF 689 Papeete FR XPF 🇵🇫 fr-PF,ty French Polynesia 258 .pf
172 PG PNG 675 Port Moresby PG PGK 🇵🇬 en-PG,ho,meu,tpi Papua New Guinea 598 .pg
173 PH PHL 63 Manila PH PHP 🇵🇭 tl,en-PH,fil,ceb,ilo,hil,war,pam,bik,bcl,pag,mrw,tsg,mdh,cbk,krj,sgd,msb,akl,ibg,yka,mta,abx Philippines 608 .ph
174 PK PAK 92 Islamabad PK PKR 🇵🇰 ur-PK,en-PK,pa,sd,ps,brh Pakistan 586 .pk
175 PL POL 48 Warsaw PL PLN 🇵🇱 pl Poland 616 .pl
176 PM SPM 508 Saint-Pierre FR EUR 🇵🇲 fr-PM St. Pierre & Miquelon 666 .pm
177 PN PCN 870 Adamstown GB NZD 🇵🇳 en-PN Pitcairn 612 .pn
178 PR PRI 1 San Juan US USD 🇵🇷 en-PR,es-PR Puerto Rico 630 .pr
179 PT PRT 351 Lisbon PT EUR 🇵🇹 pt-PT,mwl Portugal 620 .pt
180 PW PLW 680 Melekeok PW USD 🇵🇼 pau,sov,en-PW,tox,ja,fil,zh Palau 585 .pw
181 PY PRY 595 Asuncion PY PYG 🇵🇾 es-PY,gn Paraguay 600 .py
182 QA QAT 974 Doha QA QAR 🇶🇦 ar-QA,es Qatar 634 .qa
183 RE REU 262 Saint-Denis FR EUR 🇷🇪 fr-RE Réunion 638 .re
184 RO ROU 40 Bucharest RO RON 🇷🇴 ro,hu,rom Romania 642 .ro
185 RS SRB 381 Belgrade RS RSD 🇷🇸 sr,hu,bs,rom Serbia 688 .rs
186 RU RUS 7 Moscow RU RUB 🇷🇺 ru,tt,xal,cau,ady,kv,ce,tyv,cv,udm,tut,mns,bua,myv,mdf,chm,ba,inh,kbd,krc,av,sah,nog Russia 643 .ru
187 RW RWA 250 Kigali RW RWF 🇷🇼 rw,en-RW,fr-RW,sw Rwanda 646 .rw
188 SA SAU 966 Riyadh SA SAR 🇸🇦 ar-SA Saudi Arabia 682 .sa
189 SB SLB 677 Honiara SB SBD 🇸🇧 en-SB,tpi Solomon Islands 090 .sb
190 SC SYC 248 Victoria SC SCR 🇸🇨 en-SC,fr-SC Seychelles 690 .sc
191 SD SDN 249 Khartoum SD SDG 🇸🇩 ar-SD,en,fia Sudan 729 .sd
192 SE SWE 46 Stockholm SE SEK 🇸🇪 sv-SE,se,sma,fi-SE Sweden 752 .se
193 SG SGP 65 Singapore SG SGD 🇸🇬 cmn,en-SG,ms-SG,ta-SG,zh-SG Singapore 702 .sg
194 SH SHN 290 Jamestown GB SHP 🇸🇭 en-SH St. Helena 654 .sh
195 SI SVN 386 Ljubljana SI EUR 🇸🇮 sl,sh Slovenia 705 .si
196 SJ SJM 47 Longyearbyen NO NOK 🇸🇯 no,ru Svalbard & Jan Mayen 744 .sj
197 SK SVK 421 Bratislava SK EUR 🇸🇰 sk,hu Slovakia 703 .sk
198 SL SLE 232 Freetown SL SLE 🇸🇱 en-SL,men,tem Sierra Leone 694 .sl
199 SM SMR 378 San Marino SM EUR 🇸🇲 it-SM San Marino 674 .sm
200 SN SEN 221 Dakar SN XOF 🇸🇳 fr-SN,wo,fuc,mnk Senegal 686 .sn
201 SO SOM 252 Mogadishu SO SOS 🇸🇴 so-SO,ar-SO,it,en-SO Somalia 706 .so
202 SR SUR 597 Paramaribo SR SRD 🇸🇷 nl-SR,en,srn,hns,jv Suriname 740 .sr
203 SS SSD 211 Juba SS SSP 🇸🇸 en South Sudan 728 .ss
204 ST STP 239 Sao Tome ST STN 🇸🇹 pt-ST São Tomé & Príncipe 678 .st
205 SV SLV 503 San Salvador SV SVC 🇸🇻 es-SV El Salvador 222 .sv
206 SX SXM 1-721 Philipsburg NL XCG 🇸🇽 nl,en Sint Maarten 534 .sx
207 SY SYR 963 Damascus SY SYP 🇸🇾 ar-SY,ku,hy,arc,fr,en Syria 760 .sy
208 SZ SWZ 268 Mbabane SZ SZL 🇸🇿 en-SZ,ss-SZ Eswatini 748 .sz
209 TC TCA 1-649 Cockburn Town GB USD 🇹🇨 en-TC Turks & Caicos Islands 796 .tc
210 TD TCD 235 N'Djamena TD XAF 🇹🇩 fr-TD,ar-TD,sre Chad 148 .td
211 TF ATF 262 Port-aux-Francais FR EUR 🇹🇫 fr French Southern Territories 260 .tf
212 TG TGO 228 Lome TG XOF 🇹🇬 fr-TG,ee,hna,kbp,dag,ha Togo 768 .tg
213 TH THA 66 Bangkok TH THB 🇹🇭 th,en Thailand 764 .th
214 TJ TJK 992 Dushanbe TJ TJS 🇹🇯 tg,ru Tajikistan 762 .tj
215 TL TLS 670 Dili TL USD 🇹🇱 tet,pt-TL,id,en Timor-Leste 626 .tl
216 TM TKM 993 Ashgabat TM TMT 🇹🇲 tk,ru,uz Turkmenistan 795 .tm
217 TN TUN 216 Tunis TN TND 🇹🇳 ar-TN,fr Tunisia 788 .tn
218 TO TON 676 Nuku'alofa TO TOP 🇹🇴 to,en-TO Tonga 776 .to
219 TR TUR 90 Ankara TR TRY 🇹🇷 tr-TR,ku,diq,az,av Türkiye 792 .tr
220 TT TTO 1-868 Port of Spain TT TTD 🇹🇹 en-TT,hns,fr,es,zh Trinidad & Tobago 780 .tt
221 TV TUV 688 Funafuti TV AUD 🇹🇻 tvl,en,sm,gil Tuvalu 798 .tv
222 TW TWN 886 Taipei TW TWD 🇹🇼 zh-TW,zh,nan,hak Taiwan 158 .tw
223 TZ TZA 255 Dodoma TZ TZS 🇹🇿 sw-TZ,en,ar Tanzania 834 .tz
224 UA UKR 380 Kyiv UA UAH 🇺🇦 uk,ru-UA,rom,pl,hu Ukraine 804 .ua
225 UG UGA 256 Kampala UG UGX 🇺🇬 en-UG,lg,sw,ar Uganda 800 .ug
226 US USA 1 Washington US USD 🇺🇸 en-US,es-US,haw,fr US 840 .us
227 UY URY 598 Montevideo UY UYU 🇺🇾 es-UY Uruguay 858 .uy
228 UZ UZB 998 Tashkent UZ UZS 🇺🇿 uz,ru,tg Uzbekistan 860 .uz
229 VA VAT 39 Vatican City VA EUR 🇻🇦 la,it,fr Vatican City 336 .va
230 VC VCT 1-784 Kingstown VC XCD 🇻🇨 en-VC,fr St. Vincent & Grenadines 670 .vc
231 VE VEN 58 Caracas VE VES 🇻🇪 es-VE Venezuela 862 .ve
232 VG VGB 1-284 Road Town GB USD 🇻🇬 en-VG British Virgin Islands 092 .vg
233 VI VIR 1-340 Charlotte Amalie US USD 🇻🇮 en-VI U.S. Virgin Islands 850 .vi
234 VN VNM 84 Hanoi VN VND 🇻🇳 vi,en,fr,zh,km Vietnam 704 .vn
235 VU VUT 678 Port Vila VU VUV 🇻🇺 bi,en-VU,fr-VU Vanuatu 548 .vu
236 WF WLF 681 Mata Utu FR XPF 🇼🇫 wls,fud,fr-WF Wallis & Futuna 876 .wf
237 WS WSM 685 Apia WS WST 🇼🇸 sm,en-WS Samoa 882 .ws
238 YE YEM 967 Sanaa YE YER 🇾🇪 ar-YE Yemen 887 .ye
239 YT MYT 262 Mamoudzou FR EUR 🇾🇹 fr-YT Mayotte 175 .yt
240 ZA ZAF 27 Pretoria ZA ZAR 🇿🇦 zu,xh,af,nso,en-ZA,tn,st,ts,ss,ve,nr South Africa 710 .za
241 ZM ZMB 260 Lusaka ZM ZMW 🇿🇲 en-ZM,bem,loz,lun,lue,ny,toi Zambia 894 .zm
242 ZW ZWE 263 Harare ZW ZWG 🇿🇼 en-ZW,sn,nr,nd Zimbabwe 716 .zw
+1 -1
View File
@@ -1 +1 @@
["UTC", "Africa/Cairo", "Africa/Johannesburg", "America/Chicago", "America/Denver", "America/Los_Angeles", "America/Mexico_City", "America/New_York", "America/Sao_Paulo", "America/Toronto", "Asia/Dubai", "Asia/Hong_Kong", "Asia/Kolkata", "Asia/Shanghai", "Asia/Singapore", "Asia/Tokyo", "Australia/Sydney", "Europe/Amsterdam", "Europe/Berlin", "Europe/London", "Europe/Madrid", "Europe/Moscow", "Europe/Oslo", "Europe/Paris", "Europe/Stockholm", "Europe/Warsaw", "Pacific/Auckland"] { "format": "{zone}", "rows": "timezone.tsv", "key": "zone", "parent": "territory", "weight": "weight" }
+402
View File
@@ -0,0 +1,402 @@
offset territory weight zone
+00:00 CI 17496811 Africa/Abidjan
+00:00 GH 11277813 Africa/Accra
+03:00 ET 18690487 Africa/Addis_Ababa
+01:00 DZ 20111539 Africa/Algiers
+03:00 ER 798575 Africa/Asmara
+00:00 ML 7673493 Africa/Bamako
+01:00 CF 2582076 Africa/Bangui
+00:00 GM 1305981 Africa/Banjul
+00:00 GW 904776 Africa/Bissau
+02:00 MW 3030905 Africa/Blantyre
+01:00 CG 3748808 Africa/Brazzaville
+02:00 BI 1251675 Africa/Bujumbura
+02:00 EG 47242427 Africa/Cairo
+00:00 MA 22808531 Africa/Casablanca
+01:00 ES 85985 Africa/Ceuta
+00:00 GN 6679241 Africa/Conakry
+00:00 SN 10055356 Africa/Dakar
+03:00 TZ 21350525 Africa/Dar_es_Salaam
+03:00 DJ 1316108 Africa/Djibouti
+01:00 CM 8330801 Africa/Douala
+00:00 EH 374107 Africa/El_Aaiun
+00:00 SL 1752243 Africa/Freetown
+02:00 BW 1262880 Africa/Gaborone
+02:00 ZW 4508424 Africa/Harare
+02:00 ZA 47939803 Africa/Johannesburg
+02:00 SS 1679674 Africa/Juba
+03:00 UG 9664318 Africa/Kampala
+02:00 SD 11781926 Africa/Khartoum
+02:00 RW 2910190 Africa/Kigali
+01:00 CD 20651243 Africa/Kinshasa
+01:00 NG 75725576 Africa/Lagos
+01:00 GA 1731692 Africa/Libreville
+00:00 TG 3089219 Africa/Lome
+01:00 AO 23567341 Africa/Luanda
+02:00 CD 16660579 Africa/Lubumbashi
+02:00 ZM 8422414 Africa/Lusaka
+01:00 GQ 355840 Africa/Malabo
+02:00 MZ 8598836 Africa/Maputo
+02:00 LS 739682 Africa/Maseru
+02:00 SZ 191312 Africa/Mbabane
+03:00 SO 6165052 Africa/Mogadishu
+00:00 LR 2127307 Africa/Monrovia
+03:00 KE 16920989 Africa/Nairobi
+01:00 TD 3363418 Africa/Ndjamena
+01:00 NE 3689982 Africa/Niamey
+00:00 MR 2157288 Africa/Nouakchott
+00:00 BF 6125427 Africa/Ouagadougou
+01:00 BJ 4001576 Africa/Porto-Novo
+00:00 ST 53300 Africa/Sao_Tome
+02:00 LY 6105792 Africa/Tripoli
+01:00 TN 7314557 Africa/Tunis
+02:00 NA 983097 Africa/Windhoek
-10:00 US 15000 America/Adak
-09:00 US 366200 America/Anchorage
-04:00 AI 15000 America/Anguilla
-04:00 AG 51737 America/Antigua
-03:00 BR 858988 America/Araguaina
-03:00 AR 11817784 America/Argentina/Buenos_Aires
-03:00 AR 580969 America/Argentina/Catamarca
-03:00 AR 8998034 America/Argentina/Cordoba
-03:00 AR 413866 America/Argentina/Jujuy
-03:00 AR 237745 America/Argentina/La_Rioja
-03:00 AR 695484 America/Argentina/Mendoza
-03:00 AR 241619 America/Argentina/Rio_Gallegos
-03:00 AR 2120781 America/Argentina/Salta
-03:00 AR 518624 America/Argentina/San_Juan
-03:00 AR 266728 America/Argentina/San_Luis
-03:00 AR 788916 America/Argentina/Tucuman
-03:00 AR 109506 America/Argentina/Ushuaia
-04:00 AW 90927 America/Aruba
-03:00 PY 3653883 America/Asuncion
-05:00 CA 15000 America/Atikokan
-03:00 BR 13131907 America/Bahia
-06:00 MX 36253 America/Bahia_Banderas
-04:00 BB 98511 America/Barbados
-03:00 BR 7977349 America/Belem
-06:00 BZ 132559 America/Belize
-04:00 CA 15000 America/Blanc-Sablon
-04:00 BR 550434 America/Boa_Vista
-05:00 CO 37243567 America/Bogota
-07:00 US 748802 America/Boise
-07:00 CA 15000 America/Cambridge_Bay
-04:00 BR 2429053 America/Campo_Grande
-05:00 MX 1328961 America/Cancun
-04:00 VE 28324666 America/Caracas
-03:00 GF 155245 America/Cayenne
-05:00 KY 44705 America/Cayman
-06:00 US 55510713 America/Chicago
-06:00 MX 1533843 America/Chihuahua
-07:00 MX 1512450 America/Ciudad_Juarez
-06:00 CR 1458629 America/Costa_Rica
-03:00 CL 62723 America/Coyhaique
-07:00 CA 15000 America/Creston
-04:00 BR 2960376 America/Cuiaba
-04:00 CW 145838 America/Curacao
+00:00 GL 15000 America/Danmarkshavn
-07:00 CA 15000 America/Dawson
-07:00 CA 21465 America/Dawson_Creek
-07:00 US 9069711 America/Denver
-05:00 US 4344725 America/Detroit
-04:00 DM 16571 America/Dominica
-06:00 CA 3518059 America/Edmonton
-05:00 BR 142900 America/Eirunepe
-06:00 SV 2571611 America/El_Salvador
-07:00 CA 15000 America/Fort_Nelson
-03:00 BR 21824546 America/Fortaleza
-04:00 CA 122883 America/Glace_Bay
-04:00 CA 15000 America/Goose_Bay
-05:00 TC 27489 America/Grand_Turk
-04:00 GD 15000 America/Grenada
-04:00 GP 250260 America/Guadeloupe
-06:00 GT 7302205 America/Guatemala
-05:00 EC 11564603 America/Guayaquil
-04:00 GY 314746 America/Guyana
-04:00 CA 843888 America/Halifax
-05:00 CU 11972822 America/Havana
-07:00 MX 2215048 America/Hermosillo
-05:00 US 2672398 America/Indiana/Indianapolis
-06:00 US 15000 America/Indiana/Knox
-05:00 US 15000 America/Indiana/Marengo
-05:00 US 15000 America/Indiana/Petersburg
-06:00 US 15000 America/Indiana/Tell_City
-05:00 US 15000 America/Indiana/Vevay
-05:00 US 15451 America/Indiana/Vincennes
-05:00 US 15000 America/Indiana/Winamac
-06:00 CA 15000 America/Inuvik
-05:00 CA 15000 America/Iqaluit
-05:00 JM 2069735 America/Jamaica
-09:00 US 31555 America/Juneau
-05:00 US 909379 America/Kentucky/Louisville
-05:00 US 15000 America/Kentucky/Monticello
-04:00 BO 6958595 America/La_Paz
-05:00 PE 21406340 America/Lima
-08:00 US 46301242 America/Los_Angeles
-04:00 SX 15000 America/Lower_Princes
-03:00 BR 4805317 America/Maceio
-06:00 NI 2621115 America/Managua
-04:00 BR 3918958 America/Manaus
-04:00 MF 15000 America/Marigot
-04:00 MQ 243860 America/Martinique
-06:00 MX 1899165 America/Matamoros
-07:00 MX 2951216 America/Mazatlan
-06:00 US 15000 America/Menominee
-06:00 MX 4154924 America/Merida
-09:00 US 15000 America/Metlakatla
-06:00 MX 61603325 America/Mexico_City
-03:00 PM 15000 America/Miquelon
-04:00 CA 381536 America/Moncton
-06:00 MX 9714766 America/Monterrey
-03:00 UY 2457462 America/Montevideo
-04:00 MS 15000 America/Montserrat
-05:00 BS 319054 America/Nassau
-05:00 US 88988896 America/New_York
-09:00 US 15000 America/Nome
-02:00 BR 15000 America/Noronha
-06:00 US 15000 America/North_Dakota/Beulah
-06:00 US 15000 America/North_Dakota/Center
-06:00 US 21382 America/North_Dakota/New_Salem
-02:00 GL 15000 America/Nuuk
-06:00 MX 50784 America/Ojinaga
-05:00 PA 1692726 America/Panama
-03:00 SR 454064 America/Paramaribo
-07:00 US 6541994 America/Phoenix
-05:00 HT 5328623 America/Port-au-Prince
-04:00 TT 456832 America/Port_of_Spain
-04:00 BR 1551818 America/Porto_Velho
-04:00 PR 1605968 America/Puerto_Rico
-03:00 CL 135935 America/Punta_Arenas
-06:00 CA 15000 America/Rankin_Inlet
-03:00 BR 8832691 America/Recife
-06:00 CA 982810 America/Regina
-06:00 CA 15000 America/Resolute
-05:00 BR 794527 America/Rio_Branco
-03:00 BR 1403419 America/Santarem
-04:00 CL 15912038 America/Santiago
-04:00 DO 7521391 America/Santo_Domingo
-03:00 BR 129186469 America/Sao_Paulo
-02:00 GL 15000 America/Scoresbysund
-09:00 US 15000 America/Sitka
-04:00 BL 15000 America/St_Barthelemy
-03:30 CA 202443 America/St_Johns
-04:00 KN 15000 America/St_Kitts
-04:00 LC 45210 America/St_Lucia
-04:00 VI 70601 America/St_Thomas
-04:00 VC 48723 America/St_Vincent
-06:00 CA 16604 America/Swift_Current
-06:00 HN 4808928 America/Tegucigalpa
-04:00 GL 15000 America/Thule
-08:00 MX 3797218 America/Tijuana
-05:00 CA 24763654 America/Toronto
-04:00 VG 15000 America/Tortola
-07:00 CA 6340886 America/Vancouver
-07:00 CA 28201 America/Whitehorse
-06:00 CA 922566 America/Winnipeg
-09:00 US 15000 America/Yakutat
+10:00 AU 15000 Antarctica/Macquarie
+01:00 SJ 15000 Arctic/Longyearbyen
+03:00 YE 6904010 Asia/Aden
+05:00 KZ 9055499 Asia/Almaty
+03:00 JO 4950859 Asia/Amman
+12:00 RU 15604 Asia/Anadyr
+05:00 KZ 282409 Asia/Aqtau
+05:00 KZ 598827 Asia/Aqtobe
+05:00 TM 2706037 Asia/Ashgabat
+05:00 KZ 388248 Asia/Atyrau
+03:00 IQ 29681856 Asia/Baghdad
+03:00 BH 815447 Asia/Bahrain
+04:00 AZ 5491302 Asia/Baku
+07:00 TH 49896297 Asia/Bangkok
+07:00 RU 1413356 Asia/Barnaul
+02:00 LB 4467748 Asia/Beirut
+06:00 KG 2233412 Asia/Bishkek
+08:00 BN 230416 Asia/Brunei
+09:00 RU 486311 Asia/Chita
+05:30 LK 4297175 Asia/Colombo
+03:00 SY 10939175 Asia/Damascus
+06:00 BD 35955225 Asia/Dhaka
+09:00 TL 311685 Asia/Dili
+04:00 AE 12931222 Asia/Dubai
+05:00 TJ 2578933 Asia/Dushanbe
+02:00 CY 109959 Asia/Famagusta
+07:00 VN 42129036 Asia/Ho_Chi_Minh
+08:00 HK 24678261 Asia/Hong_Kong
+07:00 MN 122174 Asia/Hovd
+08:00 RU 2231790 Asia/Irkutsk
+07:00 ID 68794489 Asia/Jakarta
+09:00 ID 2512221 Asia/Jayapura
+02:00 IL 7901151 Asia/Jerusalem
+04:30 AF 8764027 Asia/Kabul
+12:00 RU 247112 Asia/Kamchatka
+05:00 PK 88744953 Asia/Karachi
+05:45 NP 5913313 Asia/Kathmandu
+09:00 RU 15000 Asia/Khandyga
+05:30 IN 365373326 Asia/Kolkata
+07:00 RU 2615869 Asia/Krasnoyarsk
+08:00 MY 33322164 Asia/Kuala_Lumpur
+08:00 MY 4013140 Asia/Kuching
+03:00 KW 1662180 Asia/Kuwait
+08:00 MO 1236695 Asia/Macau
+11:00 RU 92782 Asia/Magadan
+08:00 ID 12458359 Asia/Makassar
+08:00 PH 64227523 Asia/Manila
+04:00 OM 3290021 Asia/Muscat
+02:00 CY 679420 Asia/Nicosia
+07:00 RU 2355475 Asia/Novokuznetsk
+07:00 RU 2119272 Asia/Novosibirsk
+06:00 RU 1243165 Asia/Omsk
+05:00 KZ 364799 Asia/Oral
+07:00 KH 4111780 Asia/Phnom_Penh
+07:00 ID 1819584 Asia/Pontianak
+09:00 KP 12876883 Asia/Pyongyang
+03:00 QA 1566088 Asia/Qatar
+05:00 KZ 529104 Asia/Qostanay
+05:00 KZ 511391 Asia/Qyzylorda
+03:00 SA 23913997 Asia/Riyadh
+11:00 RU 326982 Asia/Sakhalin
+05:00 UZ 3864475 Asia/Samarkand
+09:00 KR 47400555 Asia/Seoul
+08:00 CN 861293141 Asia/Shanghai
+08:00 SG 11621053 Asia/Singapore
+11:00 RU 15000 Asia/Srednekolymsk
+08:00 TW 26394699 Asia/Taipei
+05:00 UZ 7452125 Asia/Tashkent
+04:00 GE 1827911 Asia/Tbilisi
+03:30 IR 50648371 Asia/Tehran
+06:00 BT 170210 Asia/Thimphu
+09:00 JP 141330654 Asia/Tokyo
+07:00 RU 783576 Asia/Tomsk
+08:00 MN 1438738 Asia/Ulaanbaatar
+06:00 CN 12667986 Asia/Urumqi
+10:00 RU 15000 Asia/Ust-Nera
+07:00 LA 1561716 Asia/Vientiane
+10:00 RU 2534711 Asia/Vladivostok
+09:00 RU 902983 Asia/Yakutsk
+06:30 MM 18836338 Asia/Yangon
+05:00 RU 15407217 Asia/Yekaterinburg
+04:00 AM 2880620 Asia/Yerevan
-01:00 PT 20056 Atlantic/Azores
-04:00 BM 15000 Atlantic/Bermuda
+00:00 ES 2054431 Atlantic/Canary
-01:00 CV 252678 Atlantic/Cape_Verde
+00:00 FO 15000 Atlantic/Faroe
+00:00 PT 213794 Atlantic/Madeira
+00:00 IS 245356 Atlantic/Reykjavik
+00:00 SH 15000 Atlantic/St_Helena
-03:00 FK 15000 Atlantic/Stanley
+09:30 AU 1706678 Australia/Adelaide
+10:00 AU 5807246 Australia/Brisbane
+09:30 AU 17456 Australia/Broken_Hill
+09:30 AU 199509 Australia/Darwin
+08:45 AU 15000 Australia/Eucla
+10:00 AU 392450 Australia/Hobart
+10:00 AU 15000 Australia/Lindeman
+10:30 AU 15000 Australia/Lord_Howe
+10:00 AU 9304158 Australia/Melbourne
+08:00 AU 3086441 Australia/Perth
+10:00 AU 9352313 Australia/Sydney
+01:00 NL 13892513 Europe/Amsterdam
+01:00 AD 36283 Europe/Andorra
+04:00 RU 644812 Europe/Astrakhan
+02:00 GR 6286690 Europe/Athens
+01:00 RS 5756549 Europe/Belgrade
+01:00 DE 62740682 Europe/Berlin
+01:00 SK 2548401 Europe/Bratislava
+01:00 BE 9038306 Europe/Brussels
+02:00 RO 11070040 Europe/Bucharest
+01:00 HU 9366333 Europe/Budapest
+01:00 DE 15000 Europe/Busingen
+02:00 MD 1460347 Europe/Chisinau
+01:00 DK 3885672 Europe/Copenhagen
+01:00 IE 2720758 Europe/Dublin
+01:00 GI 26544 Europe/Gibraltar
+00:00 GG 16488 Europe/Guernsey
+02:00 FI 5265184 Europe/Helsinki
+00:00 IM 26218 Europe/Isle_of_Man
+03:00 TR 77554557 Europe/Istanbul
+00:00 JE 28000 Europe/Jersey
+02:00 RU 664545 Europe/Kaliningrad
+03:00 RU 782604 Europe/Kirov
+02:00 UA 35633582 Europe/Kyiv
+00:00 PT 6372176 Europe/Lisbon
+01:00 SI 552127 Europe/Ljubljana
+00:00 GB 57817786 Europe/London
+01:00 LU 131322 Europe/Luxembourg
+01:00 ES 42918247 Europe/Madrid
+01:00 MT 141714 Europe/Malta
+02:00 AX 15000 Europe/Mariehamn
+03:00 BY 6105410 Europe/Minsk
+01:00 MC 48977 Europe/Monaco
+03:00 RU 69342062 Europe/Moscow
+01:00 NO 3296711 Europe/Oslo
+01:00 FR 33093827 Europe/Paris
+01:00 ME 398494 Europe/Podgorica
+01:00 CZ 5924565 Europe/Prague
+02:00 LV 1206422 Europe/Riga
+01:00 IT 34033666 Europe/Rome
+04:00 RU 3546813 Europe/Samara
+01:00 SM 15000 Europe/San_Marino
+01:00 BA 1905798 Europe/Sarajevo
+04:00 RU 1705529 Europe/Saratov
+03:00 UA 1620906 Europe/Simferopol
+01:00 MK 1754303 Europe/Skopje
+02:00 BG 4111057 Europe/Sofia
+01:00 SE 7149541 Europe/Stockholm
+02:00 EE 1106943 Europe/Tallinn
+01:00 AL 1629643 Europe/Tirane
+04:00 RU 814189 Europe/Ulyanovsk
+01:00 LI 15000 Europe/Vaduz
+01:00 VA 15000 Europe/Vatican
+01:00 AT 5274040 Europe/Vienna
+02:00 LT 2103133 Europe/Vilnius
+03:00 RU 1837053 Europe/Volgograd
+01:00 PL 22720110 Europe/Warsaw
+01:00 HR 1650334 Europe/Zagreb
+01:00 CH 3461664 Europe/Zurich
+03:00 MG 6115943 Indian/Antananarivo
+06:00 IO 15000 Indian/Chagos
+07:00 CX 15000 Indian/Christmas
+06:30 CC 15000 Indian/Cocos
+03:00 KM 118353 Indian/Comoro
+05:00 TF 15000 Indian/Kerguelen
+04:00 SC 22881 Indian/Mahe
+05:00 MV 103693 Indian/Maldives
+04:00 MU 701493 Indian/Mauritius
+03:00 YT 138967 Indian/Mayotte
+04:00 RE 804329 Indian/Reunion
+13:00 WS 40407 Pacific/Apia
+12:00 NZ 5203989 Pacific/Auckland
+11:00 PG 40266 Pacific/Bougainville
+12:45 NZ 15000 Pacific/Chatham
+10:00 FM 15000 Pacific/Chuuk
-06:00 CL 15000 Pacific/Easter
+11:00 VU 35901 Pacific/Efate
+12:00 FJ 334403 Pacific/Fiji
+12:00 TV 15000 Pacific/Funafuti
-06:00 EC 15000 Pacific/Galapagos
-09:00 PF 15000 Pacific/Gambier
+11:00 SB 194707 Pacific/Guadalcanal
+10:00 GU 121094 Pacific/Guam
-10:00 US 1569453 Pacific/Honolulu
+13:00 KI 15000 Pacific/Kanton
+14:00 KI 15000 Pacific/Kiritimati
+11:00 FM 15000 Pacific/Kosrae
+12:00 MH 15000 Pacific/Kwajalein
+12:00 MH 45701 Pacific/Majuro
-09:30 PF 15000 Pacific/Marquesas
+12:00 NR 15000 Pacific/Nauru
-11:00 NU 15000 Pacific/Niue
+11:00 NF 15000 Pacific/Norfolk
+11:00 NC 137086 Pacific/Noumea
-11:00 AS 15000 Pacific/Pago_Pago
+09:00 PW 15000 Pacific/Palau
-08:00 PN 15000 Pacific/Pitcairn
+11:00 FM 15000 Pacific/Pohnpei
+10:00 PG 588589 Pacific/Port_Moresby
-10:00 CK 15000 Pacific/Rarotonga
+10:00 MP 48220 Pacific/Saipan
-10:00 PF 81958 Pacific/Tahiti
+12:00 KI 40311 Pacific/Tarawa
+13:00 TO 22400 Pacific/Tongatapu
+12:00 WF 15000 Pacific/Wallis
1 offset territory weight zone
2 +00:00 CI 17496811 Africa/Abidjan
3 +00:00 GH 11277813 Africa/Accra
4 +03:00 ET 18690487 Africa/Addis_Ababa
5 +01:00 DZ 20111539 Africa/Algiers
6 +03:00 ER 798575 Africa/Asmara
7 +00:00 ML 7673493 Africa/Bamako
8 +01:00 CF 2582076 Africa/Bangui
9 +00:00 GM 1305981 Africa/Banjul
10 +00:00 GW 904776 Africa/Bissau
11 +02:00 MW 3030905 Africa/Blantyre
12 +01:00 CG 3748808 Africa/Brazzaville
13 +02:00 BI 1251675 Africa/Bujumbura
14 +02:00 EG 47242427 Africa/Cairo
15 +00:00 MA 22808531 Africa/Casablanca
16 +01:00 ES 85985 Africa/Ceuta
17 +00:00 GN 6679241 Africa/Conakry
18 +00:00 SN 10055356 Africa/Dakar
19 +03:00 TZ 21350525 Africa/Dar_es_Salaam
20 +03:00 DJ 1316108 Africa/Djibouti
21 +01:00 CM 8330801 Africa/Douala
22 +00:00 EH 374107 Africa/El_Aaiun
23 +00:00 SL 1752243 Africa/Freetown
24 +02:00 BW 1262880 Africa/Gaborone
25 +02:00 ZW 4508424 Africa/Harare
26 +02:00 ZA 47939803 Africa/Johannesburg
27 +02:00 SS 1679674 Africa/Juba
28 +03:00 UG 9664318 Africa/Kampala
29 +02:00 SD 11781926 Africa/Khartoum
30 +02:00 RW 2910190 Africa/Kigali
31 +01:00 CD 20651243 Africa/Kinshasa
32 +01:00 NG 75725576 Africa/Lagos
33 +01:00 GA 1731692 Africa/Libreville
34 +00:00 TG 3089219 Africa/Lome
35 +01:00 AO 23567341 Africa/Luanda
36 +02:00 CD 16660579 Africa/Lubumbashi
37 +02:00 ZM 8422414 Africa/Lusaka
38 +01:00 GQ 355840 Africa/Malabo
39 +02:00 MZ 8598836 Africa/Maputo
40 +02:00 LS 739682 Africa/Maseru
41 +02:00 SZ 191312 Africa/Mbabane
42 +03:00 SO 6165052 Africa/Mogadishu
43 +00:00 LR 2127307 Africa/Monrovia
44 +03:00 KE 16920989 Africa/Nairobi
45 +01:00 TD 3363418 Africa/Ndjamena
46 +01:00 NE 3689982 Africa/Niamey
47 +00:00 MR 2157288 Africa/Nouakchott
48 +00:00 BF 6125427 Africa/Ouagadougou
49 +01:00 BJ 4001576 Africa/Porto-Novo
50 +00:00 ST 53300 Africa/Sao_Tome
51 +02:00 LY 6105792 Africa/Tripoli
52 +01:00 TN 7314557 Africa/Tunis
53 +02:00 NA 983097 Africa/Windhoek
54 -10:00 US 15000 America/Adak
55 -09:00 US 366200 America/Anchorage
56 -04:00 AI 15000 America/Anguilla
57 -04:00 AG 51737 America/Antigua
58 -03:00 BR 858988 America/Araguaina
59 -03:00 AR 11817784 America/Argentina/Buenos_Aires
60 -03:00 AR 580969 America/Argentina/Catamarca
61 -03:00 AR 8998034 America/Argentina/Cordoba
62 -03:00 AR 413866 America/Argentina/Jujuy
63 -03:00 AR 237745 America/Argentina/La_Rioja
64 -03:00 AR 695484 America/Argentina/Mendoza
65 -03:00 AR 241619 America/Argentina/Rio_Gallegos
66 -03:00 AR 2120781 America/Argentina/Salta
67 -03:00 AR 518624 America/Argentina/San_Juan
68 -03:00 AR 266728 America/Argentina/San_Luis
69 -03:00 AR 788916 America/Argentina/Tucuman
70 -03:00 AR 109506 America/Argentina/Ushuaia
71 -04:00 AW 90927 America/Aruba
72 -03:00 PY 3653883 America/Asuncion
73 -05:00 CA 15000 America/Atikokan
74 -03:00 BR 13131907 America/Bahia
75 -06:00 MX 36253 America/Bahia_Banderas
76 -04:00 BB 98511 America/Barbados
77 -03:00 BR 7977349 America/Belem
78 -06:00 BZ 132559 America/Belize
79 -04:00 CA 15000 America/Blanc-Sablon
80 -04:00 BR 550434 America/Boa_Vista
81 -05:00 CO 37243567 America/Bogota
82 -07:00 US 748802 America/Boise
83 -07:00 CA 15000 America/Cambridge_Bay
84 -04:00 BR 2429053 America/Campo_Grande
85 -05:00 MX 1328961 America/Cancun
86 -04:00 VE 28324666 America/Caracas
87 -03:00 GF 155245 America/Cayenne
88 -05:00 KY 44705 America/Cayman
89 -06:00 US 55510713 America/Chicago
90 -06:00 MX 1533843 America/Chihuahua
91 -07:00 MX 1512450 America/Ciudad_Juarez
92 -06:00 CR 1458629 America/Costa_Rica
93 -03:00 CL 62723 America/Coyhaique
94 -07:00 CA 15000 America/Creston
95 -04:00 BR 2960376 America/Cuiaba
96 -04:00 CW 145838 America/Curacao
97 +00:00 GL 15000 America/Danmarkshavn
98 -07:00 CA 15000 America/Dawson
99 -07:00 CA 21465 America/Dawson_Creek
100 -07:00 US 9069711 America/Denver
101 -05:00 US 4344725 America/Detroit
102 -04:00 DM 16571 America/Dominica
103 -06:00 CA 3518059 America/Edmonton
104 -05:00 BR 142900 America/Eirunepe
105 -06:00 SV 2571611 America/El_Salvador
106 -07:00 CA 15000 America/Fort_Nelson
107 -03:00 BR 21824546 America/Fortaleza
108 -04:00 CA 122883 America/Glace_Bay
109 -04:00 CA 15000 America/Goose_Bay
110 -05:00 TC 27489 America/Grand_Turk
111 -04:00 GD 15000 America/Grenada
112 -04:00 GP 250260 America/Guadeloupe
113 -06:00 GT 7302205 America/Guatemala
114 -05:00 EC 11564603 America/Guayaquil
115 -04:00 GY 314746 America/Guyana
116 -04:00 CA 843888 America/Halifax
117 -05:00 CU 11972822 America/Havana
118 -07:00 MX 2215048 America/Hermosillo
119 -05:00 US 2672398 America/Indiana/Indianapolis
120 -06:00 US 15000 America/Indiana/Knox
121 -05:00 US 15000 America/Indiana/Marengo
122 -05:00 US 15000 America/Indiana/Petersburg
123 -06:00 US 15000 America/Indiana/Tell_City
124 -05:00 US 15000 America/Indiana/Vevay
125 -05:00 US 15451 America/Indiana/Vincennes
126 -05:00 US 15000 America/Indiana/Winamac
127 -06:00 CA 15000 America/Inuvik
128 -05:00 CA 15000 America/Iqaluit
129 -05:00 JM 2069735 America/Jamaica
130 -09:00 US 31555 America/Juneau
131 -05:00 US 909379 America/Kentucky/Louisville
132 -05:00 US 15000 America/Kentucky/Monticello
133 -04:00 BO 6958595 America/La_Paz
134 -05:00 PE 21406340 America/Lima
135 -08:00 US 46301242 America/Los_Angeles
136 -04:00 SX 15000 America/Lower_Princes
137 -03:00 BR 4805317 America/Maceio
138 -06:00 NI 2621115 America/Managua
139 -04:00 BR 3918958 America/Manaus
140 -04:00 MF 15000 America/Marigot
141 -04:00 MQ 243860 America/Martinique
142 -06:00 MX 1899165 America/Matamoros
143 -07:00 MX 2951216 America/Mazatlan
144 -06:00 US 15000 America/Menominee
145 -06:00 MX 4154924 America/Merida
146 -09:00 US 15000 America/Metlakatla
147 -06:00 MX 61603325 America/Mexico_City
148 -03:00 PM 15000 America/Miquelon
149 -04:00 CA 381536 America/Moncton
150 -06:00 MX 9714766 America/Monterrey
151 -03:00 UY 2457462 America/Montevideo
152 -04:00 MS 15000 America/Montserrat
153 -05:00 BS 319054 America/Nassau
154 -05:00 US 88988896 America/New_York
155 -09:00 US 15000 America/Nome
156 -02:00 BR 15000 America/Noronha
157 -06:00 US 15000 America/North_Dakota/Beulah
158 -06:00 US 15000 America/North_Dakota/Center
159 -06:00 US 21382 America/North_Dakota/New_Salem
160 -02:00 GL 15000 America/Nuuk
161 -06:00 MX 50784 America/Ojinaga
162 -05:00 PA 1692726 America/Panama
163 -03:00 SR 454064 America/Paramaribo
164 -07:00 US 6541994 America/Phoenix
165 -05:00 HT 5328623 America/Port-au-Prince
166 -04:00 TT 456832 America/Port_of_Spain
167 -04:00 BR 1551818 America/Porto_Velho
168 -04:00 PR 1605968 America/Puerto_Rico
169 -03:00 CL 135935 America/Punta_Arenas
170 -06:00 CA 15000 America/Rankin_Inlet
171 -03:00 BR 8832691 America/Recife
172 -06:00 CA 982810 America/Regina
173 -06:00 CA 15000 America/Resolute
174 -05:00 BR 794527 America/Rio_Branco
175 -03:00 BR 1403419 America/Santarem
176 -04:00 CL 15912038 America/Santiago
177 -04:00 DO 7521391 America/Santo_Domingo
178 -03:00 BR 129186469 America/Sao_Paulo
179 -02:00 GL 15000 America/Scoresbysund
180 -09:00 US 15000 America/Sitka
181 -04:00 BL 15000 America/St_Barthelemy
182 -03:30 CA 202443 America/St_Johns
183 -04:00 KN 15000 America/St_Kitts
184 -04:00 LC 45210 America/St_Lucia
185 -04:00 VI 70601 America/St_Thomas
186 -04:00 VC 48723 America/St_Vincent
187 -06:00 CA 16604 America/Swift_Current
188 -06:00 HN 4808928 America/Tegucigalpa
189 -04:00 GL 15000 America/Thule
190 -08:00 MX 3797218 America/Tijuana
191 -05:00 CA 24763654 America/Toronto
192 -04:00 VG 15000 America/Tortola
193 -07:00 CA 6340886 America/Vancouver
194 -07:00 CA 28201 America/Whitehorse
195 -06:00 CA 922566 America/Winnipeg
196 -09:00 US 15000 America/Yakutat
197 +10:00 AU 15000 Antarctica/Macquarie
198 +01:00 SJ 15000 Arctic/Longyearbyen
199 +03:00 YE 6904010 Asia/Aden
200 +05:00 KZ 9055499 Asia/Almaty
201 +03:00 JO 4950859 Asia/Amman
202 +12:00 RU 15604 Asia/Anadyr
203 +05:00 KZ 282409 Asia/Aqtau
204 +05:00 KZ 598827 Asia/Aqtobe
205 +05:00 TM 2706037 Asia/Ashgabat
206 +05:00 KZ 388248 Asia/Atyrau
207 +03:00 IQ 29681856 Asia/Baghdad
208 +03:00 BH 815447 Asia/Bahrain
209 +04:00 AZ 5491302 Asia/Baku
210 +07:00 TH 49896297 Asia/Bangkok
211 +07:00 RU 1413356 Asia/Barnaul
212 +02:00 LB 4467748 Asia/Beirut
213 +06:00 KG 2233412 Asia/Bishkek
214 +08:00 BN 230416 Asia/Brunei
215 +09:00 RU 486311 Asia/Chita
216 +05:30 LK 4297175 Asia/Colombo
217 +03:00 SY 10939175 Asia/Damascus
218 +06:00 BD 35955225 Asia/Dhaka
219 +09:00 TL 311685 Asia/Dili
220 +04:00 AE 12931222 Asia/Dubai
221 +05:00 TJ 2578933 Asia/Dushanbe
222 +02:00 CY 109959 Asia/Famagusta
223 +07:00 VN 42129036 Asia/Ho_Chi_Minh
224 +08:00 HK 24678261 Asia/Hong_Kong
225 +07:00 MN 122174 Asia/Hovd
226 +08:00 RU 2231790 Asia/Irkutsk
227 +07:00 ID 68794489 Asia/Jakarta
228 +09:00 ID 2512221 Asia/Jayapura
229 +02:00 IL 7901151 Asia/Jerusalem
230 +04:30 AF 8764027 Asia/Kabul
231 +12:00 RU 247112 Asia/Kamchatka
232 +05:00 PK 88744953 Asia/Karachi
233 +05:45 NP 5913313 Asia/Kathmandu
234 +09:00 RU 15000 Asia/Khandyga
235 +05:30 IN 365373326 Asia/Kolkata
236 +07:00 RU 2615869 Asia/Krasnoyarsk
237 +08:00 MY 33322164 Asia/Kuala_Lumpur
238 +08:00 MY 4013140 Asia/Kuching
239 +03:00 KW 1662180 Asia/Kuwait
240 +08:00 MO 1236695 Asia/Macau
241 +11:00 RU 92782 Asia/Magadan
242 +08:00 ID 12458359 Asia/Makassar
243 +08:00 PH 64227523 Asia/Manila
244 +04:00 OM 3290021 Asia/Muscat
245 +02:00 CY 679420 Asia/Nicosia
246 +07:00 RU 2355475 Asia/Novokuznetsk
247 +07:00 RU 2119272 Asia/Novosibirsk
248 +06:00 RU 1243165 Asia/Omsk
249 +05:00 KZ 364799 Asia/Oral
250 +07:00 KH 4111780 Asia/Phnom_Penh
251 +07:00 ID 1819584 Asia/Pontianak
252 +09:00 KP 12876883 Asia/Pyongyang
253 +03:00 QA 1566088 Asia/Qatar
254 +05:00 KZ 529104 Asia/Qostanay
255 +05:00 KZ 511391 Asia/Qyzylorda
256 +03:00 SA 23913997 Asia/Riyadh
257 +11:00 RU 326982 Asia/Sakhalin
258 +05:00 UZ 3864475 Asia/Samarkand
259 +09:00 KR 47400555 Asia/Seoul
260 +08:00 CN 861293141 Asia/Shanghai
261 +08:00 SG 11621053 Asia/Singapore
262 +11:00 RU 15000 Asia/Srednekolymsk
263 +08:00 TW 26394699 Asia/Taipei
264 +05:00 UZ 7452125 Asia/Tashkent
265 +04:00 GE 1827911 Asia/Tbilisi
266 +03:30 IR 50648371 Asia/Tehran
267 +06:00 BT 170210 Asia/Thimphu
268 +09:00 JP 141330654 Asia/Tokyo
269 +07:00 RU 783576 Asia/Tomsk
270 +08:00 MN 1438738 Asia/Ulaanbaatar
271 +06:00 CN 12667986 Asia/Urumqi
272 +10:00 RU 15000 Asia/Ust-Nera
273 +07:00 LA 1561716 Asia/Vientiane
274 +10:00 RU 2534711 Asia/Vladivostok
275 +09:00 RU 902983 Asia/Yakutsk
276 +06:30 MM 18836338 Asia/Yangon
277 +05:00 RU 15407217 Asia/Yekaterinburg
278 +04:00 AM 2880620 Asia/Yerevan
279 -01:00 PT 20056 Atlantic/Azores
280 -04:00 BM 15000 Atlantic/Bermuda
281 +00:00 ES 2054431 Atlantic/Canary
282 -01:00 CV 252678 Atlantic/Cape_Verde
283 +00:00 FO 15000 Atlantic/Faroe
284 +00:00 PT 213794 Atlantic/Madeira
285 +00:00 IS 245356 Atlantic/Reykjavik
286 +00:00 SH 15000 Atlantic/St_Helena
287 -03:00 FK 15000 Atlantic/Stanley
288 +09:30 AU 1706678 Australia/Adelaide
289 +10:00 AU 5807246 Australia/Brisbane
290 +09:30 AU 17456 Australia/Broken_Hill
291 +09:30 AU 199509 Australia/Darwin
292 +08:45 AU 15000 Australia/Eucla
293 +10:00 AU 392450 Australia/Hobart
294 +10:00 AU 15000 Australia/Lindeman
295 +10:30 AU 15000 Australia/Lord_Howe
296 +10:00 AU 9304158 Australia/Melbourne
297 +08:00 AU 3086441 Australia/Perth
298 +10:00 AU 9352313 Australia/Sydney
299 +01:00 NL 13892513 Europe/Amsterdam
300 +01:00 AD 36283 Europe/Andorra
301 +04:00 RU 644812 Europe/Astrakhan
302 +02:00 GR 6286690 Europe/Athens
303 +01:00 RS 5756549 Europe/Belgrade
304 +01:00 DE 62740682 Europe/Berlin
305 +01:00 SK 2548401 Europe/Bratislava
306 +01:00 BE 9038306 Europe/Brussels
307 +02:00 RO 11070040 Europe/Bucharest
308 +01:00 HU 9366333 Europe/Budapest
309 +01:00 DE 15000 Europe/Busingen
310 +02:00 MD 1460347 Europe/Chisinau
311 +01:00 DK 3885672 Europe/Copenhagen
312 +01:00 IE 2720758 Europe/Dublin
313 +01:00 GI 26544 Europe/Gibraltar
314 +00:00 GG 16488 Europe/Guernsey
315 +02:00 FI 5265184 Europe/Helsinki
316 +00:00 IM 26218 Europe/Isle_of_Man
317 +03:00 TR 77554557 Europe/Istanbul
318 +00:00 JE 28000 Europe/Jersey
319 +02:00 RU 664545 Europe/Kaliningrad
320 +03:00 RU 782604 Europe/Kirov
321 +02:00 UA 35633582 Europe/Kyiv
322 +00:00 PT 6372176 Europe/Lisbon
323 +01:00 SI 552127 Europe/Ljubljana
324 +00:00 GB 57817786 Europe/London
325 +01:00 LU 131322 Europe/Luxembourg
326 +01:00 ES 42918247 Europe/Madrid
327 +01:00 MT 141714 Europe/Malta
328 +02:00 AX 15000 Europe/Mariehamn
329 +03:00 BY 6105410 Europe/Minsk
330 +01:00 MC 48977 Europe/Monaco
331 +03:00 RU 69342062 Europe/Moscow
332 +01:00 NO 3296711 Europe/Oslo
333 +01:00 FR 33093827 Europe/Paris
334 +01:00 ME 398494 Europe/Podgorica
335 +01:00 CZ 5924565 Europe/Prague
336 +02:00 LV 1206422 Europe/Riga
337 +01:00 IT 34033666 Europe/Rome
338 +04:00 RU 3546813 Europe/Samara
339 +01:00 SM 15000 Europe/San_Marino
340 +01:00 BA 1905798 Europe/Sarajevo
341 +04:00 RU 1705529 Europe/Saratov
342 +03:00 UA 1620906 Europe/Simferopol
343 +01:00 MK 1754303 Europe/Skopje
344 +02:00 BG 4111057 Europe/Sofia
345 +01:00 SE 7149541 Europe/Stockholm
346 +02:00 EE 1106943 Europe/Tallinn
347 +01:00 AL 1629643 Europe/Tirane
348 +04:00 RU 814189 Europe/Ulyanovsk
349 +01:00 LI 15000 Europe/Vaduz
350 +01:00 VA 15000 Europe/Vatican
351 +01:00 AT 5274040 Europe/Vienna
352 +02:00 LT 2103133 Europe/Vilnius
353 +03:00 RU 1837053 Europe/Volgograd
354 +01:00 PL 22720110 Europe/Warsaw
355 +01:00 HR 1650334 Europe/Zagreb
356 +01:00 CH 3461664 Europe/Zurich
357 +03:00 MG 6115943 Indian/Antananarivo
358 +06:00 IO 15000 Indian/Chagos
359 +07:00 CX 15000 Indian/Christmas
360 +06:30 CC 15000 Indian/Cocos
361 +03:00 KM 118353 Indian/Comoro
362 +05:00 TF 15000 Indian/Kerguelen
363 +04:00 SC 22881 Indian/Mahe
364 +05:00 MV 103693 Indian/Maldives
365 +04:00 MU 701493 Indian/Mauritius
366 +03:00 YT 138967 Indian/Mayotte
367 +04:00 RE 804329 Indian/Reunion
368 +13:00 WS 40407 Pacific/Apia
369 +12:00 NZ 5203989 Pacific/Auckland
370 +11:00 PG 40266 Pacific/Bougainville
371 +12:45 NZ 15000 Pacific/Chatham
372 +10:00 FM 15000 Pacific/Chuuk
373 -06:00 CL 15000 Pacific/Easter
374 +11:00 VU 35901 Pacific/Efate
375 +12:00 FJ 334403 Pacific/Fiji
376 +12:00 TV 15000 Pacific/Funafuti
377 -06:00 EC 15000 Pacific/Galapagos
378 -09:00 PF 15000 Pacific/Gambier
379 +11:00 SB 194707 Pacific/Guadalcanal
380 +10:00 GU 121094 Pacific/Guam
381 -10:00 US 1569453 Pacific/Honolulu
382 +13:00 KI 15000 Pacific/Kanton
383 +14:00 KI 15000 Pacific/Kiritimati
384 +11:00 FM 15000 Pacific/Kosrae
385 +12:00 MH 15000 Pacific/Kwajalein
386 +12:00 MH 45701 Pacific/Majuro
387 -09:30 PF 15000 Pacific/Marquesas
388 +12:00 NR 15000 Pacific/Nauru
389 -11:00 NU 15000 Pacific/Niue
390 +11:00 NF 15000 Pacific/Norfolk
391 +11:00 NC 137086 Pacific/Noumea
392 -11:00 AS 15000 Pacific/Pago_Pago
393 +09:00 PW 15000 Pacific/Palau
394 -08:00 PN 15000 Pacific/Pitcairn
395 +11:00 FM 15000 Pacific/Pohnpei
396 +10:00 PG 588589 Pacific/Port_Moresby
397 -10:00 CK 15000 Pacific/Rarotonga
398 +10:00 MP 48220 Pacific/Saipan
399 -10:00 PF 81958 Pacific/Tahiti
400 +12:00 KI 40311 Pacific/Tarawa
401 +13:00 TO 22400 Pacific/Tongatapu
402 +12:00 WF 15000 Pacific/Wallis
+1
View File
@@ -0,0 +1 @@
{ "format": "{tld}", "rows": "tld.tsv", "key": "tld", "name": "unicode" }
+1439
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1 +1 @@
["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:123.0) Gecko/20100101 Firefox/123.0", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Safari/605.1.15", "Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Mobile/15E148 Safari/604.1", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0"] { "format": "{ua}", "rows": "useragent.tsv" }
+97
View File
@@ -0,0 +1,97 @@
browser device os ua
Chrome mobile Android Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36
Chrome mobile Android Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Mobile Safari/537.36
Chrome mobile Android Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Mobile Safari/537.36
Chrome mobile Android Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Mobile Safari/537.36
Chrome mobile Android Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Mobile Safari/537.36
Chrome mobile Android Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36
Chrome mobile Android Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Mobile Safari/537.36
Chrome mobile Android Mozilla/5.0 (Linux; Android 12; Pixel 6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36
Chrome desktop ChromeOS Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36
Chrome desktop Linux Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Chrome desktop Linux Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36
Chrome desktop Linux Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36
Chrome desktop Linux Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36
Chrome desktop Linux Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36
Chrome desktop Linux Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.5938.132 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 YaBrowser/26.8.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.7922.34 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36
Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Safari/537.36
Chrome mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 26_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/152.0.7977.64 Mobile/15E148 Safari/604.1
Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Safari/537.36
Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36
Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36
Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36
Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36
Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36
Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36
Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36
Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36
Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Safari/537.36
Edge desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36 Edg/151.0.0.0
Edge desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36 Edg/152.0.0.0
Edge desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Safari/537.36 Edg/153.0.0.0
Edge desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36 Edg/152.0.0.0
Firefox desktop Linux Mozilla/5.0 (X11; Linux x86_64; rv:155.0) Gecko/20100101 Firefox/155.0
Firefox desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0
Firefox desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:154.0) Gecko/20100101 Firefox/154.0
Firefox desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:155.0) Gecko/20100101 Firefox/155.0
Firefox desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:154.0) Gecko/20100101 Firefox/154.0
Firefox desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:155.0) Gecko/20100101 Firefox/155.0
Opera desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36 OPR/135.0.0.0
Opera desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 OPR/134.0.0.0
Safari mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1
Safari mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.7.5 Mobile/15E148 Safari/604.1
Safari mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.2 Mobile/15E148 Safari/604.1
Safari mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1
Safari mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5 Mobile/15E148 Safari/604.1
Safari mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5.2 Mobile/15E148 Safari/604.1
Safari mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.6 Mobile/15E148 Safari/604.1
Safari mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.6.1 Mobile/15E148 Safari/604.1
Safari mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/27.0 Mobile/15E148 Safari/604.1
Safari desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Safari/605.1.15
Safari desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Safari/605.1.15
Safari desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.2 Safari/605.1.15
Safari desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5 Safari/605.1.15
Safari desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5.2 Safari/605.1.15
Safari desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.6 Safari/605.1.15
Safari desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.6.1 Safari/605.1.15
Safari desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.6.2 Safari/605.1.15
Safari desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/27.0 Safari/605.1.15
Samsung Internet mobile Android Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/30.0 Chrome/143.0.0.0 Mobile Safari/537.36
1 browser device os ua
2 Chrome mobile Android Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36
3 Chrome mobile Android Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Mobile Safari/537.36
4 Chrome mobile Android Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Mobile Safari/537.36
5 Chrome mobile Android Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Mobile Safari/537.36
6 Chrome mobile Android Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Mobile Safari/537.36
7 Chrome mobile Android Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36
8 Chrome mobile Android Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Mobile Safari/537.36
9 Chrome mobile Android Mozilla/5.0 (Linux; Android 12; Pixel 6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36
10 Chrome desktop ChromeOS Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36
11 Chrome desktop Linux Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
12 Chrome desktop Linux Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36
13 Chrome desktop Linux Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36
14 Chrome desktop Linux Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36
15 Chrome desktop Linux Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36
16 Chrome desktop Linux Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Safari/537.36
17 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
18 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.5938.132 Safari/537.36
19 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
20 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
21 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
22 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
23 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
24 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
25 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
26 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
27 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
28 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
29 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
30 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36
31 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36
32 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36
33 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
34 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
35 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36
36 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
37 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36
38 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36
39 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36
40 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
41 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36
42 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 YaBrowser/26.8.0.0 Safari/537.36
43 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36
44 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.7922.34 Safari/537.36
45 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36
46 Chrome desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Safari/537.36
47 Chrome mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 26_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/152.0.7977.64 Mobile/15E148 Safari/604.1
48 Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
49 Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
50 Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
51 Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Safari/537.36
52 Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
53 Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
54 Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
55 Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
56 Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36
57 Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36
58 Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
59 Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36
60 Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36
61 Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36
62 Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
63 Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36
64 Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36
65 Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36
66 Chrome desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Safari/537.36
67 Edge desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36 Edg/151.0.0.0
68 Edge desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36 Edg/152.0.0.0
69 Edge desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Safari/537.36 Edg/153.0.0.0
70 Edge desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36 Edg/152.0.0.0
71 Firefox desktop Linux Mozilla/5.0 (X11; Linux x86_64; rv:155.0) Gecko/20100101 Firefox/155.0
72 Firefox desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0
73 Firefox desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:154.0) Gecko/20100101 Firefox/154.0
74 Firefox desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:155.0) Gecko/20100101 Firefox/155.0
75 Firefox desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:154.0) Gecko/20100101 Firefox/154.0
76 Firefox desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:155.0) Gecko/20100101 Firefox/155.0
77 Opera desktop Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36 OPR/135.0.0.0
78 Opera desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 OPR/134.0.0.0
79 Safari mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1
80 Safari mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.7.5 Mobile/15E148 Safari/604.1
81 Safari mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.2 Mobile/15E148 Safari/604.1
82 Safari mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1
83 Safari mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5 Mobile/15E148 Safari/604.1
84 Safari mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5.2 Mobile/15E148 Safari/604.1
85 Safari mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.6 Mobile/15E148 Safari/604.1
86 Safari mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.6.1 Mobile/15E148 Safari/604.1
87 Safari mobile iOS Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/27.0 Mobile/15E148 Safari/604.1
88 Safari desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Safari/605.1.15
89 Safari desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Safari/605.1.15
90 Safari desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.2 Safari/605.1.15
91 Safari desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5 Safari/605.1.15
92 Safari desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5.2 Safari/605.1.15
93 Safari desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.6 Safari/605.1.15
94 Safari desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.6.1 Safari/605.1.15
95 Safari desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.6.2 Safari/605.1.15
96 Safari desktop macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/27.0 Safari/605.1.15
97 Samsung Internet mobile Android Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/30.0 Chrome/143.0.0.0 Mobile Safari/537.36
+1
View File
@@ -0,0 +1 @@
{ "format": "{number}", "rows": "birth-number.tsv", "parent": "sex" }
+3
View File
@@ -0,0 +1,3 @@
sex number
f 238
m 239
1 sex number
2 f 238
3 m 239
+1 -13
View File
@@ -1,13 +1 @@
{ "{date(1970-01-01,2029-12-31,'2006-01-02')}"
"format": "{year}-{month}-{day}",
"month": ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"],
"day": ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28"],
"year": [
"197{digits(1)}",
"198{digits(1)}",
{ "format": "199{digits(1)}", "weight": 2 },
{ "format": "200{digits(1)}", "weight": 3 },
{ "format": "201{digits(1)}", "weight": 3 },
{ "format": "202{digits(1)}", "weight": 2 }
]
}
+1
View File
@@ -0,0 +1 @@
{ "format": "{name}", "rows": "first-name.tsv", "name": "name", "parent": "sex", "weight": "count" }
File diff suppressed because it is too large Load Diff
+1
View File
@@ -0,0 +1 @@
{ "format": "{name}", "rows": "last-name.tsv", "key": "name", "weight": "count" }
File diff suppressed because it is too large Load Diff
+5 -30
View File
@@ -1,32 +1,7 @@
{ {
"format": "{prefix}{femalefirst|malefirst} {last}", "format": "{prefix}{first} {last}",
"femalefirst": ["Agnes", "Alice", "Alicia", "Alma", "Amanda", "Anna", "Astrid", "Cornelia", "Ebba", "Elin", "Ella", "Ellen", "Elsa", "Emilia", "Emma", "Ester", "Eva", "Frida", "Hanna", "Hedda", "Ida", "Ingrid", "Isabelle", "Julia", "Karin", "Klara", "Kristina", "Lena", "Linnéa", "Lova", "Maja", "Maria", "Moa", "Molly", "Märta", "Nellie", "Nora", "Olivia", "Saga", "Sara", "Selma", "Signe", "Siri", "Sofia", "Stina", "Tilde", "Tuva", "Wilma", "Ylva", "Åsa"], "first": "{.first-name.name}",
"malefirst": ["Adam", "Albin", "Alexander", "Alfred", "Anders", "Anton", "Arvid", "Axel", "Bengt", "Bo", "Carl", "David", "Edvin", "Elias", "Emil", "Erik", "Filip", "Folke", "Fredrik", "Gustav", "Göran", "Hampus", "Hans", "Henrik", "Hugo", "Isak", "Johan", "Jonas", "Karl", "Kjell", "Lars", "Leo", "Linus", "Love", "Magnus", "Mats", "Mattias", "Mikael", "Nils", "Olle", "Oskar", "Otto", "Patrik", "Per", "Pontus", "Rasmus", "Samuel", "Sixten", "Stefan", "Sten", "Sven", "Theodor", "Tobias", "Viktor", "William", "Åke"], "last": "{.last-name.name}",
"last": [ "prefix": [null, { "format": "{.title.name} ", "weight": 0.05 }],
{ "sex": "{.sex.name}"
"format": "{first}sson",
"weight": 5,
"first": ["Ander", "Arvid", "Bengt", "Daniel", "David", "Erik", "Fredrik", "Gustaf", "Henrik", "Håkan", "Isak", "Jakob", "Johan", "Jon", "Jön", "Karl", "Lar", "Magnu", "Matt", "Mikael", "Mårten", "Nil", "Ol", "Per", "Petter", "Samuel", "Sven"]
},
{
"format": "{first}{last}",
"weight": 3.6,
"first": ["Ahl", "Berg", "Blom", "Ceder", "Dahl", "Ek", "Eng", "Falk", "Fors", "Gran", "Hag", "Hed", "Holm", "Lind", "Lund", "Mal", "Ny", "Rosen", "Sand", "Sjö", "Skog", "Söder", "Sten", "Strand", "Sund", "Wik", "Öst"],
"last": ["berg", "blad", "crona", "dahl", "ed", "fors", "gren", "holm", "in", "kvist", "löf", "lund", "man", "mark", "qvist", "roth", "stedt", "sten", "strand", "ström", "vall"]
},
{
"format": "{first}{last}",
"weight": 0.267,
"first": ["Hell", "Wall"],
"last": ["berg", "blad", "crona", "dahl", "ed", "fors", "gren", "holm", "in", "kvist", "man", "mark", "qvist", "roth", "stedt", "sten", "strand", "ström", "vall"]
},
{
"format": "{first}{last}",
"weight": 0.133,
"first": "Norr",
"last": ["berg", "blad", "crona", "dahl", "ed", "fors", "gren", "holm", "in", "kvist", "löf", "lund", "man", "mark", "qvist", "stedt", "sten", "strand", "ström", "vall"]
},
["Berg", "Blom", "Eismar", "Falk", "Holm", "Lind", "Norberg", "Strand", "Ström", "von Flemming", "Åberg", "Öberg"]
],
"prefix": ["", { "format": "{string} ", "string": ["dr", "prof"], "weight": 0.05 }]
} }
+1
View File
@@ -0,0 +1 @@
"{date(1930-01-01,2025-12-31,'060102')}-{.birth-number.number}{luhn()}"
+1
View File
@@ -0,0 +1 @@
"{date(1930-01-01,2025-12-31,'0601')}{int(61,88)}-{.birth-number.number}{luhn()}"
+1
View File
@@ -0,0 +1 @@
{ "format": "{name}", "rows": "sex.tsv", "key": "code", "name": "name" }
+3
View File
@@ -0,0 +1,3 @@
code name
f kvinna
m man
1 code name
2 f kvinna
3 m man
-22
View File
@@ -1,22 +0,0 @@
{
"format": "{digits(2)}{mmdd}-{digits(3)}{luhn()}",
"mmdd": [
{
"format": "{m}{d}",
"weight": 7,
"m": ["01", "03", "05", "07", "08", "10", "12"],
"d": ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"]
},
{
"format": "{m}{d}",
"weight": 4,
"m": ["04", "06", "09", "11"],
"d": ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30"]
},
{
"format": "{m}{d}",
"m": "02",
"d": ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28"]
}
]
}
+1 -17
View File
@@ -1,17 +1 @@
{ "{time('15:04')}"
"format": "{hour}:{minute}{sec}",
"hour": [
{ "format": "0{digits(1)}", "weight": 4 },
{ "format": "1{digits(1)}", "weight": 4 },
{ "format": "2{t}", "t": ["0", "1", "2", "3"], "weight": 2 }
],
"minute": { "format": "{t}{digits(1)}", "t": ["0", "1", "2", "3", "4", "5"] },
"sec": [
"",
{
"format": ":{s}",
"s": { "format": "{t}{digits(1)}", "t": ["0", "1", "2", "3", "4", "5"] },
"weight": 0.4
}
]
}
+1
View File
@@ -0,0 +1 @@
{ "format": "{name}", "rows": "title.tsv", "key": "name", "weight": "share" }
+3
View File
@@ -0,0 +1,3 @@
name share
dr 3
prof 1
1 name share
2 dr 3
3 prof 1
+167 -24
View File
@@ -10,7 +10,7 @@ import (
// TestShippedDataCategories asserts every shipped locale emits only well-formed // TestShippedDataCategories asserts every shipped locale emits only well-formed
// values for each data category. en and sv patterns differ where the format is // values for each data category. en and sv patterns differ where the format is
// locale-specific (date, time, ssn, company, price, ...); the rest are shared. // locale-specific (date, time, company, price, ...); the rest are shared.
func TestShippedDataCategories(t *testing.T) { func TestShippedDataCategories(t *testing.T) {
letters := regexp.MustCompile(`^[\pL'-]+$`) letters := regexp.MustCompile(`^[\pL'-]+$`)
semver := regexp.MustCompile(`^v?\d+\.\d+\.\d+(-(alpha|beta|rc)\.\d+)?$`) semver := regexp.MustCompile(`^v?\d+\.\d+\.\d+(-(alpha|beta|rc)\.\d+)?$`)
@@ -33,10 +33,7 @@ func TestShippedDataCategories(t *testing.T) {
regexp.MustCompile(`^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$`)}, regexp.MustCompile(`^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$`)},
{"time", {"time",
regexp.MustCompile(`^([1-9]|1[0-2]):[0-5]\d (AM|PM)$`), regexp.MustCompile(`^([1-9]|1[0-2]):[0-5]\d (AM|PM)$`),
regexp.MustCompile(`^([01]\d|2[0-3]):[0-5]\d(:[0-5]\d)?$`)}, regexp.MustCompile(`^([01]\d|2[0-3]):[0-5]\d$`)},
{"ssn",
regexp.MustCompile(`^[1-9]\d{2}-\d{2}-\d{4}$`),
regexp.MustCompile(`^\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])-\d{4}$`)},
{"version", semver, semver}, {"version", semver, semver},
{"email", email, email}, {"email", email, email},
{"ip", ip, ip}, {"ip", ip, ip},
@@ -72,7 +69,11 @@ func TestShippedMiscCategories(t *testing.T) {
v4 := regexp.MustCompile(`^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$`) v4 := regexp.MustCompile(`^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$`)
mac := regexp.MustCompile(`^([0-9a-f]{2}:){5}[0-9a-f]{2}$`) mac := regexp.MustCompile(`^([0-9a-f]{2}:){5}[0-9a-f]{2}$`)
objectid := regexp.MustCompile(`^[0-9a-f]{24}$`) objectid := regexp.MustCompile(`^[0-9a-f]{24}$`)
datetime := regexp.MustCompile(`^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\dZ$`)
for i := 0; i < 200; i++ { for i := 0; i < 200; i++ {
if v := fake(t, f, "datetime"); !datetime.MatchString(v) {
t.Fatalf("misc datetime %q is not an RFC 3339 UTC instant", v)
}
if v := fake(t, f, "objectid"); !objectid.MatchString(v) { if v := fake(t, f, "objectid"); !objectid.MatchString(v) {
t.Fatalf("misc objectid %q is not 24 hex chars", v) t.Fatalf("misc objectid %q is not 24 hex chars", v)
} }
@@ -97,19 +98,41 @@ func TestShippedMiscReferenceData(t *testing.T) {
"currency": regexp.MustCompile(`^[A-Z]{3}$`), "currency": regexp.MustCompile(`^[A-Z]{3}$`),
"currency.name": regexp.MustCompile(`\p{L}`), "currency.name": regexp.MustCompile(`\p{L}`),
"currency.symbol": regexp.MustCompile(`^\S+$`), "currency.symbol": regexp.MustCompile(`^\S+$`),
"country": regexp.MustCompile(`\p{L}`), "territory": regexp.MustCompile(`\p{L}`),
"country.alpha2": regexp.MustCompile(`^[A-Z]{2}$`), "territory.alpha2": regexp.MustCompile(`^[A-Z]{2}$`),
"country.alpha3": regexp.MustCompile(`^[A-Z]{3}$`), "territory.alpha3": regexp.MustCompile(`^[A-Z]{3}$`),
"territory.country": regexp.MustCompile(`^[A-Z]{2}$`),
"language": regexp.MustCompile(`\p{L}`), "language": regexp.MustCompile(`\p{L}`),
"language.code": regexp.MustCompile(`^[a-z]{2}$`), "language.code": regexp.MustCompile(`^[a-z]{2}$`),
"timezone": regexp.MustCompile(`^([A-Za-z_]+(/[A-Za-z_]+)+|UTC)$`), "language.code3": regexp.MustCompile(`^[a-z]{3}$`),
"timezone": regexp.MustCompile(`^[A-Za-z]+(/[A-Za-z0-9_+-]+)+$`),
"timezone.offset": regexp.MustCompile(`^[+-](0\d|1[0-4]):[0-5]\d$`),
"timezone.territory": regexp.MustCompile(`^[A-Z]{2}$`),
"timezone.weight": regexp.MustCompile(`^[1-9]\d*$`),
"mimetype": regexp.MustCompile(`^[a-z]+/[a-z0-9.+-]+$`), "mimetype": regexp.MustCompile(`^[a-z]+/[a-z0-9.+-]+$`),
"mimetype.ext": regexp.MustCompile(`^\.[a-z0-9]+$`), "mimetype.ext": regexp.MustCompile(`^\.[a-z0-9_-]+$`),
"httpmethod": regexp.MustCompile(`^(CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PUT|TRACE)$`),
"httpmethod.safe": regexp.MustCompile(`^(true|false)$`),
"httpmethod.idempotent": regexp.MustCompile(`^(true|false)$`),
"port": regexp.MustCompile(`^[1-9]\d{0,4}$`),
"port.service": regexp.MustCompile(`^\S+$`),
"protocol": regexp.MustCompile(`^\S+( \S+)*$`),
"protocol.name": regexp.MustCompile(`\S`),
"protocol.number": regexp.MustCompile(`^\d{1,3}$`),
"loglevel": regexp.MustCompile(`^(alert|crit|debug|emerg|err|info|notice|warning)$`),
"loglevel.code": regexp.MustCompile(`^[0-7]$`),
"loglevel.severity": regexp.MustCompile(`^(Alert|Critical|Debug|Emergency|Error|Informational|Notice|Warning)$`),
"tld": regexp.MustCompile(`^\.[a-z0-9]([a-z0-9-]*[a-z0-9])?$`),
"tld.type": regexp.MustCompile(`^(country-code|generic|generic-restricted|infrastructure|sponsored)$`),
"tld.unicode": regexp.MustCompile(`^\.\S+$`),
"httpstatus": regexp.MustCompile(`^[1-5]\d{2} \S.*$`), "httpstatus": regexp.MustCompile(`^[1-5]\d{2} \S.*$`),
"httpstatus.code": regexp.MustCompile(`^[1-5]\d{2}$`), "httpstatus.code": regexp.MustCompile(`^[1-5]\d{2}$`),
"useragent": regexp.MustCompile(`^Mozilla/5\.0 .+`), "useragent": regexp.MustCompile(`^Mozilla/5\.0 .+`),
"useragent.browser": regexp.MustCompile(`^(Chrome|Edge|Firefox|Opera|Safari|Samsung Internet)$`),
"useragent.device": regexp.MustCompile(`^(desktop|mobile)$`),
"useragent.os": regexp.MustCompile(`^(Android|ChromeOS|Linux|Windows|iOS|macOS)$`),
"car": regexp.MustCompile(`^\S.* \S`), "car": regexp.MustCompile(`^\S.* \S`),
"car.maker": regexp.MustCompile(`^\S`), "car.make": regexp.MustCompile(`^\S`),
} }
for i := 0; i < 100; i++ { for i := 0; i < 100; i++ {
for p, rx := range re { for p, rx := range re {
@@ -147,30 +170,122 @@ func TestSwedishPersonNamesHaveNoTripleLetter(t *testing.T) {
} }
} }
// TestSwedishPersonnummer checks the two rules the shape regex can't: the date // TestSwedishPersonnummer checks what the shape regex can't: the date is a real
// is a real calendar date (so month-length variants never emit e.g. Apr 31 or // calendar date, the birth number is Skatteverket's test series (238 female, 239
// Feb 30) and the trailing digit is a valid Luhn checksum over the other nine. // male), the trailing digit is a Luhn checksum over the other nine, and a
// samordningsnummer is the same with 60 added to the day.
func TestSwedishPersonnummer(t *testing.T) { func TestSwedishPersonnummer(t *testing.T) {
sv := newGenerator(t, "data", WithSeed(1)) sv := newGenerator(t, "data", WithSeed(1))
sawLongMonthEnd := false re := regexp.MustCompile(`^\d{6}-23[89]\d$`)
sawLongMonthEnd, birth := false, map[string]bool{}
for i := 0; i < 2000; i++ { for i := 0; i < 2000; i++ {
v := fake(t, sv, "sv_SE.ssn") v := fake(t, sv, "sv_SE.personnummer")
d := digitsOnly(v) d := digitsOnly(v)
if len(d) != 10 { if !re.MatchString(v) {
t.Fatalf("ssn %q has %d digits, want 10", v, len(d)) t.Fatalf("personnummer %q, want YYMMDD-238C or YYMMDD-239C", v)
} }
if _, err := time.Parse("060102", d[:6]); err != nil { // 2-digit year, real-date check if _, err := time.Parse("060102", d[:6]); err != nil {
t.Fatalf("ssn %q is not a valid calendar date: %v", v, err) t.Fatalf("personnummer %q is not a valid calendar date: %v", v, err)
} }
if !luhnValid(d) { if !luhnValid(d) {
t.Fatalf("ssn %q fails the Luhn check", v) t.Fatalf("personnummer %q fails the Luhn check", v)
} }
if d[4:6] == "31" { sawLongMonthEnd = sawLongMonthEnd || d[4:6] == "31"
sawLongMonthEnd = true birth[d[6:9]] = true
s := fake(t, sv, "sv_SE.samordningsnummer")
sd := digitsOnly(s)
day, err := strconv.Atoi(sd[4:6])
if !re.MatchString(s) || err != nil || day < 61 || day > 88 || !luhnValid(sd) {
t.Fatalf("samordningsnummer %q, want YYMM(61-88)-23[89]C, Luhn-valid", s)
}
if _, err := time.Parse("0601", sd[:4]); err != nil {
t.Fatalf("samordningsnummer %q is not a valid year and month: %v", s, err)
} }
} }
if !sawLongMonthEnd { if !sawLongMonthEnd {
t.Fatal("never generated a 31st — 31-day months are not reaching their last day") t.Fatal("never generated a 31st")
}
if !birth["238"] || !birth["239"] {
t.Fatalf("birth numbers drawn %v, want both 238 and 239", birth)
}
for i := 0; i < 200; i++ {
got := fakeTemplate(t, sv, `{/sv_SE.person.sex} {/sv_SE.personnummer}`)
sex, id, _ := strings.Cut(got, " ")
if want := map[string]string{"kvinna": "238", "man": "239"}[sex]; want == "" || !strings.Contains(id, "-"+want) {
t.Fatalf("%q: a person and a personnummer in one render disagree on sex", got)
}
}
}
// TestShippedUSTaxIds pins the SSA and IRS ranges: an SSN's area is 001-899 but
// 666, its group 01-99 and its serial 0001-9999; an ITIN is 9XX-GG-XXXX with GG
// in 50-65, 70-88, 90-92 or 94-99.
func TestShippedUSTaxIds(t *testing.T) {
f := newGenerator(t, "data", WithSeed(5))
ssn := regexp.MustCompile(`^(\d{3})-(\d{2})-(\d{4})$`)
itin := regexp.MustCompile(`^9\d{2}-(5\d|6[0-5]|7\d|8[0-8]|9[0-24-9])-\d{4}$`)
for i := 0; i < 2000; i++ {
v := fake(t, f, "en_US.ssn")
m := ssn.FindStringSubmatch(v)
if m == nil {
t.Fatalf("ssn %q, want AAA-GG-SSSS", v)
}
area, _ := strconv.Atoi(m[1])
group, _ := strconv.Atoi(m[2])
serial, _ := strconv.Atoi(m[3])
if area < 1 || area > 899 || area == 666 || group < 1 || serial < 1 {
t.Fatalf("ssn %q is in a range the SSA never assigns", v)
}
if v := fake(t, f, "en_US.itin"); !itin.MatchString(v) {
t.Fatalf("itin %q, want %s", v, itin)
}
}
}
// TestShippedPersonNames pins the name tables: a sex pins its first names, a name
// both sexes carry appears under both, and the record's sex agrees with its name.
func TestShippedPersonNames(t *testing.T) {
f := newGenerator(t, "data", WithSeed(9))
for path, want := range map[string]string{
"sv_SE.sex[f]": "kvinna",
"sv_SE.sex[man].code": "m",
"en_US.sex[f]": "female",
"sv_SE.sex[f].first-name[Anna]": "Anna",
"sv_SE.sex[m].first-name[Erik].sex": "m",
"en_US.sex[m].first-name[James]": "James",
"en_US.sex[f].first-name[Taylor].sex": "f",
"en_US.sex[m].first-name[Taylor].sex": "m",
"sv_SE.last-name[Andersson]": "Andersson",
"sv_SE.last-name[Andersson].count": "",
"en_US.last-name[Smith]": "Smith",
} {
got := fake(t, f, path)
if want == "" && !regexp.MustCompile(`^[1-9]\d*$`).MatchString(got) {
t.Errorf("Fake(%q) = %q, want a count", path, got)
} else if want != "" && got != want {
t.Errorf("Fake(%q) = %q, want %q", path, got, want)
}
}
if _, err := f.Fake("en_US.first-name[Taylor]"); err == nil || !strings.Contains(err.Error(), "sex[f].first-name[Taylor]") {
t.Fatalf("Fake(en_US.first-name[Taylor]) = %v, want both sexes' rows listed", err)
}
for _, locale := range []string{"sv_SE", "en_US"} {
seen := map[string]bool{}
for i := 0; i < 2000; i++ {
seen[fake(t, f, locale+".sex[f].first-name")] = true
first, sex := fake(t, f, locale+".person.first"), fake(t, f, locale+".person.sex")
if first == "" || sex == "" {
t.Fatalf("%s.person lacks a first name or a sex", locale)
}
}
if len(seen) < 300 || !seen["Anna"] && locale == "sv_SE" || !seen["Mary"] && locale == "en_US" {
t.Fatalf("%s female first names: %d distinct in 2000, want a weighted register", locale, len(seen))
}
got := fakeTemplate(t, f, `{/`+locale+`.sex.code}|{/`+locale+`.person.first}`)
code, first, _ := strings.Cut(got, "|")
if v := fake(t, f, locale+".sex["+code+"].first-name["+first+"]"); v != first {
t.Fatalf("%s: %q drawn as a %s name is not one", locale, first, code)
}
} }
} }
@@ -300,3 +415,31 @@ func TestShippedStreetNumberFormats(t *testing.T) {
} }
} }
} }
// TestShippedUSTitleAgreesWithSex pins that one person's title and sex agree, and
// that the everyday titles are reachable.
func TestShippedUSTitleAgreesWithSex(t *testing.T) {
f := newGenerator(t, "data", WithSeed(4))
female := map[string]bool{"Miss": true, "Mrs": true, "Ms": true}
seen := map[string]bool{}
for i := 0; i < 3000; i++ {
got := fakeTemplate(t, f, `{/en_US.person.prefix}|{/en_US.person.sex}`)
title, sex, _ := strings.Cut(got, "|")
title = strings.TrimSpace(title)
seen[title] = true
if title == "Mr" && sex != "male" || female[title] && sex != "female" {
t.Fatalf("%q: the title contradicts the sex", got)
}
}
for _, want := range []string{"", "Mr", "Ms"} {
if !seen[want] {
t.Errorf("en_US.person.prefix never drew %q in 3000 draws", want)
}
}
swedish := map[string]bool{"dr": true, "prof": true}
for i := 0; i < 50; i++ {
if got := fake(t, f, "sv_SE.title"); !swedish[got] {
t.Fatalf("sv_SE.title = %q, want an unsexed Swedish honorific", got)
}
}
}
@@ -0,0 +1,148 @@
# Part 1 — Names, finance, company: sources and rules
Researched 2026-09-17. "Embed" = ship as a data file in an MIT repo. Everything not marked UNVERIFIED was read from the cited page or file this session.
## 1. US person names and identifiers
### SSA baby names (given names by year and sex)
- Page: https://www.ssa.gov/oact/babynames/limits.html — national zip https://www.ssa.gov/oact/babynames/names.zip (7 MB), state zip https://www.ssa.gov/oact/babynames/state/namesbystate.zip (23 MB), territories 228 kB.
- Format (per SSA page + readme as mirrored by https://github.com/hackerb9/ssa-baby-names): one `yobYYYY.txt` per year 1880–2025, CSV `name,sex,count`, name 2–15 chars, sex `M`/`F`, sorted by sex then count desc. Names with < 5 occurrences in a year are excluded.
- Counts: ~100,364 distinct names, ~2.02 M rows across all years (hackerb9 snapshot; year of snapshot UNVERIFIED). Top 1000 names cover 71.5 % of 2025 births (SSA page).
- Licence: data.gov catalog entry https://catalog.data.gov/dataset/baby-names-from-social-security-card-applications-national-data lists licence **CC0 1.0** (`https://creativecommons.org/publicdomain/zero/1.0/`), publisher SSA. US federal work, no attribution required; embeddable.
- Note: ssa.gov returns 403 to non-browser user agents (curl/WebFetch); download with a browser UA or via the data.gov link.
### Census 2010 surnames
- Page: https://www.census.gov/topics/population/genealogy/data/2010_surnames.html
- Files: full set https://www2.census.gov/topics/genealogy/2010surnames/names.zip (CSV + XLSX, `Names_2010Census.csv`), top 1000 `Names_2010Census_Top1000.xlsx`, docs https://www2.census.gov/topics/genealogy/2010surnames/surnames.pdf.
- Fields (from surnames.pdf): `name, rank, count, prop100k, cum_prop100k, pctwhite, pctblack, pctapi, pctaian, pct2prace, pcthispanic`. `(S)` = suppressed percentage. Names are UPPERCASE.
- Count: 162,253 surnames occurring ≥ 100 times (covers 90.1 % of people with a recorded surname); the CSV also has a trailing `ALL OTHER NAMES` row (UNVERIFIED — www2.census.gov returned 403 to curl this session; download with a browser).
- Licence: US Census Bureau work → US federal government work, public domain in the US (17 U.S.C. §105). Census only asks for citation (https://www.census.gov/about/policies/citation.html: "U.S. Census Bureau, [Table], [Product], [Vintage], [URL], accessed on [date]"). Embeddable; cite source in the data file header.
### Name prefixes / suffixes
- No authoritative enumerated list exists. USPS Publication 28 §33 (https://pe.usps.com/text/pub28/28c3_011.htm) defines the fields: Name Prefix, First Name, Middle Name or Initial, Surname, **Suffix Title** = "maturity (e.g., JR, SR) and professional (e.g., PHD, DDS) suffixes"; example "MR. WALTER W. WITHERSPOON JR.".
- Recommendation: hand-curate. Prefixes `Mr., Mrs., Ms., Mx., Dr., Rev.`; suffixes `Jr., Sr., II, III, IV, PhD, MD, DDS, Esq.`. Rule of thumb: generational suffix (Jr/Sr/II–IV) only with a male name in traditional US usage; never combine Jr. with Sr.; at most one generational suffix.
### SSN
- Structure: `AAA-GG-SSSS` (area 3, group 2, serial 4). No check digit (Wikipedia).
- Randomization since **2011-06-25** (https://www.ssa.gov/employer/randomization.html): "Previously unassigned area numbers were introduced for assignment excluding area numbers 000, 666 and 900-999." Area no longer geographic.
- Invalid per SSA POMS RM 10201.035 (https://secure.ssa.gov/apps10/poms.nsf/lnx/0110201035): area `000`, `666`, `900–999`; group `00`; serial `0000`.
- Generator rule: area ∈ [001,899] \ {666}; group ∈ [01,99]; serial ∈ [0001,9999].
- Advertising SSNs (https://www.ssa.gov/history/ssn/misused.html): `078-05-1120` (Woolworth wallet card, 1938; > 40,000 people claimed it) and `219-09-9999` (1940 Social Security Board pamphlet). Both are structurally valid — exclude from output.
- `987-65-4320`–`987-65-4329` "reserved for advertising": repeated by searchbug.com, ssn-check.org, a Missouri state standard (https://oa.mo.gov/sites/default/files/CC-SocialSecurityNumberNamingStandardV050305.pdf, which even misprints it as 987-54-4329). **UNVERIFIED** — not found on any ssa.gov page or POMS this session; Wikipedia no longer carries it. Safe to use these ten as the library's "obviously fake" examples, but do not cite SSA for it.
### ITIN (IRS)
- IRS Publication 4757 (Rev. 6-2026), p. 5 (https://www.irs.gov/pub/irs-pdf/p4757.pdf): "All valid ITINs are nine-digit numbers in the same format as the SSN (9XX-8X-XXXX), beginning with a "9" and the 4th and 5th digits ranging from 50 to 65, 70 to 88, 90 to 92, and 94 to 99."
- Group `93` = ATIN (adoption TIN); `89` reserved (Intuit/TaxSlayer support pages, not IRS — UNVERIFIED).
- Generator rule: `9` + 2 digits + group ∈ {50–65, 70–88, 90–92, 94–99} + 4 digits (serial `0000` not documented as invalid for ITIN; avoid it anyway).
### EIN (IRS)
- Format `NN-NNNNNNN`. Page: https://www.irs.gov/businesses/small-businesses-self-employed/how-eins-are-assigned-and-valid-ein-prefixes ("The first two digits of your EIN show the IRS campus that assigned it or if you applied online").
- Valid prefixes (union of the table, 2026-09-17):
`01 02 03 04 05 06 10 11 12 13 14 15 16 20 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 71 72 73 74 75 76 77 80 81 82 83 84 85 86 87 88 90 91 92 93 94 95 98 99`
By campus: Andover 10,12 · Atlanta 60,67 · Austin 50,53 · Brookhaven 01–06,11,13,14,16,21–23,25,34,51,52,54–59,65 · Cincinnati 30,32,35–38,61 · Fresno 15,24 · Kansas City 40,44 · Memphis 94,95 · Ogden 80,90 · Philadelphia 33,39,41–43,46,48,62–64,66,68,71–77,85–88,91–93,98,99 · Internet 20,26,27,33,39,41,42,45–47,81–88,92,93,99 · SBA 31.
- Not valid: 00, 07, 08, 09, 17, 18, 19, 28, 29, 49, 69, 70, 78, 79, 89, 96, 97. No check digit.
## 2. Finance
### ABA routing number (RTN)
- Wikipedia https://en.wikipedia.org/wiki/ABA_routing_transit_number: 9 digits; check: `(3(d1+d4+d7) + 7(d2+d5+d8) + (d3+d6+d9)) mod 10 = 0`.
- First two digits: `00` US Government; `01–12` Federal Reserve districts (normal banks); `21–32` thrifts (historic, still valid); `61–72` non-bank payment processors/clearinghouses; `80` traveler's checks. Other prefixes unused (Wikipedia does not say so explicitly — inferred).
- Generator rule: prefix ∈ {01–12, 21–32, 61–72}, 6 random digits, compute 9th as `(10 − (3d1+7d2+d3+3d4+7d5+d6+3d7+7d8) mod 10) mod 10`.
- Open list of real RTNs: the Federal Reserve E-Payments Routing Directory (https://www.frbservices.org/resources/routing-number-directory/index.html) says "may not be sold, re-licensed, or otherwise used for commercial gain" → **not embeddable**. Generate synthetically.
### Payment card numbers (Wikipedia "Payment card number", https://en.wikipedia.org/wiki/Payment_card_number; all Luhn-checked)
| Network | IIN ranges | Length | CVV |
|---|---|---|---|
| Visa | 4 | 13, 16, 19 | 3 |
| Mastercard | 51–55, 2221–2720 | 16 | 3 |
| American Express | 34, 37 | 15 | 4 (front) |
| Discover | 6011, 644–649, 65, 622126–622925 (UnionPay co-brand) | 16–19 | 3 |
| JCB | 3528–3589 | 16–19 | 3 |
| Diners Club International | 30 (covers 300–305, 3095), 36, 38, 39 | 14–19 | 3 |
| Diners Club US & Canada | 55 (Mastercard co-brand) | 16 | 3 |
| UnionPay | 62 | 16–19 | 3 |
| Maestro | 5018, 5020, 5038, 5893, 6304, 6759, 6761, 6762, 6763 | 12–19 | 3 |
| Maestro UK | 6759, 676770, 676774 | 12–19 | 3 |
| Dankort 5019 · Mir 2200–2204 · RuPay 60,65,81,82,508 · Troy 65,9792 · UATP 1 (15) · Verve 506099–506198, 507865–507964, 650002–650027 (16/18/19) | | | |
- CVV lengths: https://en.wikipedia.org/wiki/Card_security_code ("three-digit ... Visa, Mastercard, and Discover"; "American Express is a four-digit code on the front").
- The requested "Maestro 50/56–58/6xxx" is a looser legacy rule; use Wikipedia's explicit IINs.
- Wikipedia text is CC BY-SA 4.0 — copy the *facts* (not prose) into your table; facts are not copyrightable.
### Published test cards
- Stripe: https://docs.stripe.com/testing — Visa 4242424242424242, Mastercard 5555555555554444, Amex 378282246310005, Discover 6011111111111117, Diners 3056930009020004 (14), JCB 3566002020360505, UnionPay 6200000000000005; any future expiry, any CVC (4 for Amex).
- PayPal: https://developer.paypal.com/tools/sandbox/card-testing/ — Visa 4005519200000004, 4012000033330026, 4012000077777777, 4012888888881881, 4217651111111119, 4500600000000061, 4772129056533503, 4915805038587737; Mastercard 2223000048400011; Amex 371449635398431, 376680816376961; Diners 36461510000039, 36461510000013; Maestro 6304000000000000, 5063516945005047; JCB 3636500000000260, 3636500000000989; CUP 6200680000000004, 6200680000000038.
- Reuse: neither page carries an open licence (Stripe docs are under Stripe's site terms). The numbers themselves are Luhn-valid facts, widely reproduced; embedding the numbers with a "from Stripe/PayPal test docs" note is low-risk but **UNVERIFIED** as an explicit grant. Alternative: generate Luhn-valid numbers from the IIN table above — no dependency on either vendor.
### BIC / SWIFT (ISO 9362)
- https://en.wikipedia.org/wiki/ISO_9362: 4 letters bank code + 2 letters ISO 3166-1 country + 2 alphanumeric location + optional 3 alphanumeric branch (8 or 11 chars; `XXX` = primary office). Location second char `0` = test BIC, `1` = passive participant, `2` = reverse billing.
- Generator rule: `[A-Z]{4}[A-Z]{2}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?` — avoid `0`/`1` as the 8th char for a "live" BIC.
- SWIFT's BIC Directory is proprietary (SwiftRef licence, redistribution needs a separate "SwiftRef Redistribution License": https://www.swift.com/myswift/ordering/order-products-services/swiftref-redistribution-license) → **not embeddable**.
- Open alternative: GLEIF BIC-to-LEI mapping, https://www.gleif.org/en/lei-data/lei-mapping/download-bic-to-lei-relationship-files, files at https://mapping.gleif.org/api/v2/bic-lei/ (monthly zip; `LEI-BIC-20260828.zip` → `lei-bic-20260828T000000.csv`, columns `LEI,BIC`, 39,347 rows). Licence: "BIC/LEI Mapping Table License Agreement" (https://www.gleif.org/lei-data/lei-mapping/download-bic-to-lei-relationship-files/2017-12-21_annex-2_bic-to-lei-mapping-table-license-agreement_final.pdf) — a CC0-style grant "for any purpose whatsoever, including ... commercial" but **conditional on reproducing the notice** "SWIFT © and database rights [month year]. All rights reserved. This Mapping Table has been developed by SWIFT. Any use of the Mapping Table ... is subject to the BIC/LEI Mapping Table License Agreement ... For the latest BIC information and updates, always refer to www.swift.com/bic." Embeddable in an MIT repo with that notice in the data file; it is a list of real live BICs (bank names not included — join to GLEIF LEI data if names are wanted).
### ISIN (https://en.wikipedia.org/wiki/International_Securities_Identification_Number)
- 12 chars: 2-letter country + 9 alphanumeric NSIN + 1 check digit.
- Check: convert letters A=10…Z=35 (ASCII − 55) to produce a digit string, then Luhn over that string (double every second digit from the right, sum digits, check makes total ≡ 0 mod 10). Pitfall: work on the *expanded* digit string; a transposed letter pair can pass.
### CUSIP (https://en.wikipedia.org/wiki/CUSIP)
- 9 chars: 6 issuer + 2 issue + 1 check. Values: digits as-is, A=10…Z=35, `*`=36, `@`=37, `#`=38.
- Check: for i in 1..8, v = value; if i even, v ×= 2; sum += v div 10 + v mod 10; check = (10 − sum mod 10) mod 10.
- Real CUSIPs are proprietary (CGS/FactSet); generate synthetic ones only.
### IBAN (ISO 13616)
- Validation (https://en.wikipedia.org/wiki/International_Bank_Account_Number): move first 4 chars to end, letters → 10–35, integer mod 97 must equal 1; max 34 chars; check digits 02–98.
- SWIFT registry: https://www.swift.com/standards/data-standards/iban-international-bank-account-number, PDF release 101 https://www.swift.com/sites/default/files/files/iban-registry-v101.pdf (release 100 was Oct 2025); TXT also published (URL **UNVERIFIED** — swift.com returns 403/errors to automation this session). Terms: free of charge; no explicit licence text found (**UNVERIFIED**). Country count: 89 countries per Wikipedia (Dec 2024).
- Embeddable per-country length tables already extracted from the registry:
- php-iban `registry.txt` (https://github.com/globalcitizen/php-iban, **LGPL-3.0**): pipe-separated, 121 rows (116 official + unofficial), columns `country_code|country_name|domestic_example|bban_example|bban_format_swift|bban_format_regex|bban_length|iban_example|iban_format_swift|iban_format_regex|iban_length|bban_bankid_start_offset|...|country_sepa|swift_official|...|currency_iso4217|central_bank_url|central_bank_name|membership`. LGPL data in an MIT repo is awkward; use it as a *reference* to build your own table (formats are facts) rather than copying the file.
- ibankit-js (https://github.com/koblas/ibankit-js, **Apache-2.0**, registry v95) — same caveat.
- Best route: own table `{country, length, bban_format}` derived from the SWIFT PDF (facts), cite SWIFT.
### Currencies (ISO 4217)
- ISO says use is free: https://www.iso.org/iso-4217-currency-codes.html — "ISO allows free-of-charge use of its country, currency and language codes from ISO 3166, ISO 4217 and ISO 639". Official list from SIX: https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list-one.xml (+ `.xls`, `list-three` historic). Fields `CtryNm, CcyNm, Ccy, CcyNbr, CcyMnrUnts`; published 2026-01-01; 280 entity rows, 178 distinct codes. No symbols. No licence text inside the XML.
- Alternatives:
- datasets/currency-codes (https://github.com/datasets/currency-codes): **PDDL** (public domain); `data/codes-all.csv` fields `Entity, Currency, AlphabeticCode, NumericCode, MinorUnit, WithdrawalDate`; built from SIX list one + three; no symbols. Embeddable.
- npm `currency-codes` v2.2.0 (https://github.com/freeall/currency-codes): **MIT**; fields `code, number, digits, currency, countries[]`; generated from the SIX XML; no symbols. Embeddable.
- umpirsky/currency-list (https://github.com/umpirsky/currency-list): **MIT**; code → localised name only (311 entries in `data/en_US/currency.json`, includes historic); no symbols, no numeric codes, no decimals.
- Debian iso-codes (https://salsa.debian.org/iso-codes-team/iso-codes): **LGPL-2.1+**; `data/iso_4217.json` has `alpha_3, name, numeric` only (179 entries); no symbols/minor units. LGPL → avoid embedding.
- Symbols: none of the above carry them. Unicode CLDR (`common/main/en.xml` currency symbols, Unicode License, MIT-compatible with notice) is the usual source — **UNVERIFIED this session**.
### Crypto addresses
- Bitcoin (https://en.bitcoin.it/wiki/List_of_address_prefixes): P2PKH version 0x00 → leading `1`; P2SH 0x05 → leading `3`; Base58Check 25–34 chars (alphabet excludes `0OIl`; last 4 bytes = first 4 of double-SHA256 of version+payload). Testnet `m`/`n`, `2`, `tb1`.
- Bech32 (BIP-173, https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki, BSD-2-Clause): HRP `bc`, separator `1`, charset `qpzry9x8gf2tvdw0s3jn54khce6mua7l`, all-lowercase (or all-uppercase), max 90 chars; P2WPKH `bc1q…` = 42 chars, P2WSH `bc1q…` = 62 chars.
- Bech32m (BIP-350, https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki): witness v1+ (P2TR `bc1p…`, 62 chars), checksum constant `0x2bc830a3` instead of 1.
- Ethereum EIP-55 (https://eips.ethereum.org/EIPS/eip-55, CC0): `0x` + 40 hex; keccak256 of the lowercase hex (no 0x, as ASCII); for each hex letter, uppercase iff the corresponding hash nibble ≥ 8 (bit 4·i set). Digits unchanged.
## 3. Company
### NAICS 2022 (US Census)
- Page https://www.census.gov/naics/ ; files: 6-digit list https://www.census.gov/naics/2022NAICS/6-digit_2022_Codes.xlsx (82 kB; **1,012** six-digit codes, 111110…928120, verified by parsing), 2–6 digit https://www.census.gov/naics/2022NAICS/2-6%20digit_2022_Codes.xlsx, structure https://www.census.gov/naics/2022NAICS/2022_NAICS_Structure.xlsx, descriptions https://www.census.gov/naics/2022NAICS/2022_NAICS_Descriptions.xlsx, manual PDF https://www.census.gov/naics/reference_files_tools/2022_NAICS_Manual.pdf.
- Format: xlsx, column A code (numeric), column B title (trailing spaces in some titles — trim).
- Licence: no statement on the page or in the manual front matter; US federal government work → public domain in the US (17 U.S.C. §105). Embeddable; cite Census/OMB.
### SEC EDGAR company names
- `https://www.sec.gov/files/company_tickers.json`: object keyed `"0".."N"` of `{cik_str, ticker, title}`; **10,422** entries (2026-09-17). `company_tickers_exchange.json`: `{"fields":["cik","name","ticker","exchange"],"data":[...]}`.
- `https://www.sec.gov/Archives/edgar/cik-lookup-data.txt`: 40 MB, **1,059,372** lines, `NAME:CIK:` (`COMPANY NAME:0001234567:`), all filers incl. individuals — filter to the ticker list for company names.
- Access: declare `User-Agent: Company Name email@domain`, ≤ 10 req/s (https://www.sec.gov/os/webmaster-faq). Licence: "All Government-created content on sec.gov and EDGAR public filing content are free to access and reuse" (same FAQ). Embeddable; the ticker file (~800 kB) is the practical one.
### DUNS
- https://en.wikipedia.org/wiki/Data_Universal_Numbering_System: 9 digits, no significance; shown `NN-NNN-NNNN` or plain. Had a mod-10 check digit until ~Dec 2006; **dropped** since (expanded the pool by 800 M). So: any 9 digits are structurally valid today; no validation rule to enforce. Optional DUNS+4 suffix (4 alphanumerics) is user-assigned.
### Legal entity suffixes per country
- GLEIF ISO 20275 Entity Legal Forms code list v1.6 (2026-02-19): page https://www.gleif.org/en/lei-data/code-lists/iso-20275-entity-legal-forms-code-list ; CSV https://www.gleif.org/lei-data/code-lists/iso-20275-entity-legal-forms-code-list/2026-02-19-elf-code-list-v1.6.csv (758 kB; xlsx alongside).
- Columns: `ELF Code, Country of formation, Country Code (ISO 3166-1), Jurisdiction of formation, Country sub-division code (ISO 3166-2), Entity Legal Form name Local name, Language, Language Code (ISO 639-1), Entity Legal Form name Transliterated name, Abbreviations Local language, Abbreviations transliterated, Date created, ELF Status ACTV/INAC, Modification, Modification date, Reason`.
- Counts: 4,002 rows; 130 countries; 3,790 ACTV / 212 INAC; 1,518 rows have a local abbreviation (e.g. US `N.A.`, `FSA`; SE `AB`… multiple abbreviations separated by `;`). US has 737 rows (per-state forms). Abbreviations are the field you want for `Inc`, `LLC`, `GmbH`, `AB`, `SAS`, `Pty Ltd`; many rows have none, so filter on non-empty abbreviation and status ACTV.
- Licence: GLEIF Open Data page (https://www.gleif.org/en/about/open-data): "The data on GLEIF's website is provided under a Creative Commons (CC0) license"; LEI Data Terms of Use: "provided under the CC0 licence, see CC0 1.0 Universal". The ELF page itself names no licence — that CC0 explicitly covers this code list is **UNVERIFIED**, but GLEIF treats all its published data this way. Embeddable.
## Quick embed verdict
| Item | Embed? | Licence / attribution |
|---|---|---|
| SSA baby names | yes | CC0 (data.gov) |
| Census 2010 surnames | yes | US gov PD; cite Census |
| EIN prefixes, ITIN/SSN rules | yes (rules) | facts from IRS/SSA |
| NAICS 2022 | yes | US gov PD |
| SEC company_tickers.json | yes | free to reuse (SEC) |
| GLEIF ELF code list | yes | CC0 (GLEIF) |
| GLEIF BIC-LEI (real BICs) | yes, with mandatory SWIFT notice | custom permissive licence |
| ISO 4217 (SIX XML / datasets PDDL / npm MIT) | yes | free use (ISO), PDDL, MIT |
| Fed routing directory, SwiftRef BIC directory, CUSIP lists | no | restricted/proprietary — generate synthetically |
| php-iban / ibankit registries | copy facts only | LGPL-3.0 / Apache-2.0 |
| Stripe / PayPal test cards | numbers only, note source | no explicit grant (UNVERIFIED) |
@@ -0,0 +1,118 @@
# Open data sources: Internet, Vehicle, Airline (researched 2026-09-17)
Verdict key: **EMBED** = safe to vendor into an MIT repo; **EMBED+ATTR** = ok with a notice; **AVOID** = licence incompatible or unclear.
## 4. Internet
### IANA registries (all of them)
- Licence: IANA/IETF statement at https://www.iana.org/help/licensing-terms — "IANA and IETF intend that the Protocol Registries may be freely used by any party for any purpose", data dedicated under **CC0 1.0**. No attribution required. **EMBED**.
- All registries below share this licence; ship one `SOURCES`/NOTICE line pointing at that URL.
| Registry | CSV URL | Rows (2026-09-16) | Notes |
|---|---|---|---|
| Media types | `https://www.iana.org/assignments/media-types/<type>.csv`, type ∈ application, audio, font, haptics, image, message, model, multipart, text, video (also `example`) | application 1800, audio 165, font 6, haptics 3, image 88, message 27, model 42, multipart 17, text 105, video 97 (header excluded) ≈ **2350** | Fields: `Name,Template,Reference`. Template is the full `type/subtype`; some rows are DEPRECATED/OBSOLETED in Name (filter). Format: RFC 6838 §4.2 — `type "/" subtype`, restricted chars, max 127 chars each, case-insensitive. |
| HTTP status codes | https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv | 75 rows, **64 assigned** (306 and 418 are "(Unused)"; 104 is TEMPORARY) → 62 usable | Fields: `Value,Description,Reference`. Value is 3 digits 1xx–5xx. |
| IPv4 special-purpose | https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry-1.csv | 26 blocks | Fields: `Address Block,Name,RFC,Allocation Date,Termination Date,Source,Destination,Forwardable,Globally Reachable,Reserved-by-Protocol`. |
| IPv6 special-purpose | https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry-1.csv | 27 blocks | Same fields. Contains `2001:db8::/32` and `3fff::/20`. |
| Service names / ports | https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.csv | 14,534 rows; 11,731 with both name and a single port; **6,102 distinct named ports**; 6,008 tcp-named; 707 tcp names < 1024 | Fields: `Service Name,Port Number,Transport Protocol,Description,Assignee,Contact,Registration Date,Modification Date,Reference,Service Code,Unauthorized Use Reported,Assignment Notes`. Port Number may be empty, single, or a range `a-b`. Well-known = 0–1023, registered 1024–49151, dynamic 49152–65535 (RFC 6335). ~1.1 MB; embed only the named-port subset. |
| TLDs | https://data.iana.org/TLD/tlds-alpha-by-domain.txt | **1,401** TLDs (first line is a `# Version …` comment) | Upper-case ASCII; IDNs as `XN--…` punycode. Same IANA CC0 terms (UNVERIFIED that data.iana.org is explicitly covered by the licensing page; it is the same registry data). Lower-case on use. |
### MIME extension mapping: jshttp/mime-db
- https://github.com/jshttp/mime-db — **MIT** (GitHub API spdx MIT; npm `license: MIT`), version 1.54.0 on npm.
- `db.json` (CDN: https://cdn.jsdelivr.net/npm/mime-db/db.json): object keyed by lower-case type → `{source, extensions[], compressible, charset}`.
- Counts (1.54.0): **2,522 types**, **1,015 with extensions**; source = iana 2,136, apache 275, nginx 13, custom 98.
- Sources: IANA registry (CC0), Apache httpd `mime.types` (Apache-2.0), nginx `mime.types` (BSD-2). **EMBED+ATTR** (keep the MIT copyright notice). Data updates are not semver-breaking per README.
### IPv4 / IPv6 generation rules (RFCs, no data file needed)
- RFC 5737 documentation: `192.0.2.0/24` (TEST-NET-1), `198.51.100.0/24` (TEST-NET-2), `203.0.113.0/24` (TEST-NET-3). https://www.rfc-editor.org/rfc/rfc5737.html
- RFC 1918 private: `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`. Also useful: `100.64.0.0/10` CGNAT (RFC 6598), `198.18.0.0/15` benchmarking (RFC 2544), `169.254.0.0/16` link-local.
- IPv6 documentation: `2001:db8::/32` (RFC 3849) and `3fff::/20` (RFC 9637, "expands on the existing 2001:db8::/32 … with the reservation of an additional, larger prefix"). ULA `fc00::/7` (use `fd00::/8`), link-local `fe80::/10`.
- Validation: generate inside those blocks; avoid network/broadcast (`.0`/`.255`) if the consumer expects host addresses. Format IPv6 per RFC 5952 (lower-case hex, `::` once, longest zero run).
### MAC OUI (IEEE MA-L)
- CSV: https://standards-oui.ieee.org/oui/oui.csv (3.8 MB, **40,161 rows**, fields `Registry,Assignment,Organization Name,Organization Address`; Assignment is 6 hex chars). Server returns HTTP 418 to non-browser user agents; fetch with a browser UA. Also MA-M `oui28.csv`, MA-S `oui36.csv`, CID `cid.csv`.
- Licence: no licence on the IEEE pages themselves (site footer "© IEEE – All rights reserved" is generic). Debian's `ieee-data` copyright file (https://metadata.ftp-master.debian.org/changelogs/main/i/ieee-data/unstable_copyright) records IEEE's 2014 statement: *"IEEE does not assert any copyright in the OUI Public Listing or attempt to restrict distribution of the listing in any way. The IEEE Registration Authority does, however, strongly encourage those who use the list to obtain it directly from IEEE…"* — same text in the FSF directory. Debian ships it in `main` on that basis. **EMBED+ATTR** (cite the statement); the org-address column is not needed — keep `Assignment,Organization Name` only (~1 MB → few hundred KB). UNVERIFIED: no current IEEE page restates it (regauth FAQ and IPR pages do not mention it).
- Alternative needing no data: locally administered unicast MAC — first octet's bit 1 (U/L) = 1, bit 0 (I/G) = 0 → second hex digit ∈ {2, 6, A, E}, e.g. `x2:xx:xx:xx:xx:xx`. Guaranteed never to collide with a vendor OUI. Notations: `01:23:45:67:89:ab`, `01-23-45-67-89-AB`, Cisco `0123.4567.89ab`.
### User-agent strings
| Source | Licence | Verdict |
|---|---|---|
| https://www.useragents.me/ | No licence stated anywhere on the page ("© 2022–2025 Useragents.me"); `/api` returns 404 now; JSON blobs embedded in page, weekly updates | **AVOID** (unlicensed = all rights reserved) |
| https://explore.whatismybrowser.com/useragents/explore/ + API legal https://developers.whatismybrowser.com/api/about/legal/ | Proprietary: "You may NOT share the unique database download URL, or the downloaded file itself … EXCEPT for making it publicly available on the internet" | **AVOID** |
| npm `user-agents` (intoli) https://github.com/intoli/user-agents | **BSD-2-Clause**, v2.1.185, daily-rebuilt dataset from Intoli traffic, weighted by frequency; fields `userAgent, platform, vendor, appName, deviceCategory, screenWidth/Height, viewportWidth/Height, connection{…}, oscpu, cpuClass, pluginsLength` | **EMBED+ATTR** (keep BSD notice). Count not stated on the page (UNVERIFIED; dataset is a few thousand rows). |
| npm `top-user-agents` (microlinkhq) https://github.com/microlinkhq/top-user-agents | **MIT** (GitHub API). Top 100 UA strings from microlink.io traffic, weekly; JSON: https://cdn.jsdelivr.net/gh/microlinkhq/top-user-agents@master/src/index.json (+ desktop.json, mobile.json) | **EMBED+ATTR** — smallest clean option |
- None of the above is CC0. Alternative: generate UAs from templates (Chrome/Firefox/Safari/Edge strings are fixed-form; only version numbers vary), no data needed.
### Programming languages: GitHub Linguist
- https://raw.githubusercontent.com/github-linguist/linguist/main/lib/linguist/languages.yml — **MIT** (repo LICENSE, "Copyright (c) 2017 GitHub, Inc."). **EMBED+ATTR**.
- **835** top-level entries; **562** with `type: programming` (others: data, markup, prose). Per-entry fields: `type, color, extensions, aliases, tm_scope, ace_mode, language_id, group, interpreters, …`.
### Operating systems
- No open dataset found beyond awesome-lists. OS names/versions are facts — hand-author a small table (Windows 10/11, Windows Server, macOS versions+names, Ubuntu/Debian/Fedora/Arch/Alpine, iOS, Android, FreeBSD…). `user-agents` (BSD-2) carries `platform`/`oscpu` values if a data-driven list is wanted.
### Database engines / collations
- Engine names: hand-author (facts).
- MySQL manual (https://dev.mysql.com/doc/refman/8.4/en/preface.html): Oracle terms — "you may not … copy, reproduce … distribute … any part" except distributing the docs with the software. **AVOID copying tables from MySQL docs.** Instead dump `SHOW COLLATION` from a `mysql:8.4.x` container (server output is factual, not the manual) — ~286 collations / 41 charsets in 8.x (UNVERIFIED count). PostgreSQL docs are under the PostgreSQL licence (permissive, keep notice) — `pg_collation` dump or docs both fine. MariaDB KB is CC BY-SA — avoid.
## 5. Vehicle
### NHTSA vPIC
- API base `https://vpic.nhtsa.dot.gov/api/vehicles/`, `?format=json|xml|csv`. Endpoints verified: `GetAllMakes` (**12,363 makes**, fields `Make_ID,Make_Name`; 612 KB JSON, mostly small trailer/custom builders — filter with `GetMakesForVehicleType/car` → 195 makes, `/truck` → 207), `GetModelsForMake/honda` (362 models, `Make_ID,Make_Name,Model_ID,Model_Name`), `DecodeWMI/1HG`, `GetWMIsForManufacturer/honda` (45 WMIs, fields `WMI,Name,Country,VehicleType,Id,…`), `GetVehicleVariableList`, `GetVehicleVariableValuesList/<display name>` (must be the display name, URL-encoded, e.g. `Fuel%20Type%20-%20Primary`; the camel-case name returns 0 rows).
- Value lists (counts): **Fuel Type - Primary 14**, **Body Class 71**, **Transmission Style 12**, **Drive Type 23**, **Vehicle Type 9**. Fields `Id,Name`.
- Bulk: https://vpic.nhtsa.dot.gov/downloads/ — `vPICList_lite_2026_08.bak.zip` (MS SQL Server 2019+ backup, 190 MB, updated 2026-08-14), also `.plain.zip` / `.custom.zip`. Page says standalone DB "limited to VIN decoding"; makes/models/variables still via API. Contains `Wmi`, `Make`, `Model`, `WMIYearValidChars` tables (UNVERIFIED table names).
- Licence: FAQ https://vpic.nhtsa.dot.gov/api/home/index/faq — "No, NHTSA is a government agency and the services provided on the API are free for use by the public as an offering as a part of our Open Data initiatives"; no rate-limit number stated, batch jobs asked to run at night. Work of the US federal government → public domain under 17 USC §105; data.gov entry lists licence as "unknown". **EMBED** (note source; no attribution legally required).
### VIN (ISO 3779 / 49 CFR 565, North America)
- 17 chars from `0-9 A-H J-N P R-Z` (**I, O, Q never**). Positions: 1–3 WMI, 4–8 VDS, 9 check digit, 10 model year, 11 plant, 12–17 serial (last 4 must be digits for US, positions 12–14 alphanumeric — 49 CFR 565.15).
- Check digit: transliterate `A=1 B=2 C=3 D=4 E=5 F=6 G=7 H=8 J=1 K=2 L=3 M=4 N=5 P=7 R=9 S=2 T=3 U=4 V=5 W=6 X=7 Y=8 Z=9`, digits as-is; weights `8 7 6 5 4 3 2 10 0 9 8 7 6 5 4 3 2`; sum mod 11 → digit, remainder 10 → `X`.
- Model year (pos 10): excludes `I O Q U Z 0`; `A=2010 … H=2017 J=2018 K=2019 L=2020 M=2021 N=2022 P=2023 R=2024 S=2025 T=2026 V=2027 W=2028 X=2029 Y=2030`, `1=2031…9=2039` (30-year cycle; `1–9` also = 2001–2009). Source: https://en.wikipedia.org/wiki/Vehicle_identification_number (rules are facts; do not copy prose).
### WMI list
- SAE J1044 / SAE WMI database is paid (https://www.sae.org/standards/j1044_202501-world-manufacturer-identifier) — **AVOID**.
- Wikipedia "List of WMIs" — CC BY-SA — **AVOID**.
- Use vPIC: `GetWMIsForManufacturer/<name or id>` per manufacturer, or the `Wmi` table in the standalone `.bak`. Public domain. Country prefix rule (first char): `1,4,5` USA, `2` Canada, `3` Mexico, `J` Japan, `K` Korea, `S` UK, `W` Germany, `Y` Sweden/Finland, `Z` Italy, `L` China (ISO 3780 facts).
### US licence plate formats
| Source | Licence | Verdict |
|---|---|---|
| openalpr `runtime_data/postprocess/us.patterns` (https://github.com/openalpr/openalpr) | **AGPL-3.0** | **AVOID** (291 lines, `@`=letter `#`=digit — useful only as a reference to check hand-authored patterns) |
| Wikipedia "United States license plate designs and serial formats" | CC BY-SA | **AVOID copying**; formats themselves are facts |
| jonnii/platekit | MIT, but SVG rendering, no serial patterns | not useful |
- No MIT/CC0 per-state pattern list found. Recommendation: hand-author a per-state table (facts); current standard passenger formats as listed by Wikipedia (verify against DMV pages before use): AL `0AXXXXX`/`00AXXXX`, AK `ABC 123`, AZ `XXX 1XX`, AR `ABC 12D`, CA `1ABC123` (digit-3 letters-3 digits), CO `ABC-D12`, CT `AB·12345`, DE `123456`, DC `AB-1234`, FL `ABC D12`, GA `ABC1234`, HI `ABC 123`, ID `A 1234U`, IL `AB 12345`, IN `123ABC`, IA `ABC 123`, KS `1234ABC`, KY `ABC123`, LA `123 ABC`, ME `123·ABC`, MD `1AB2345`, MA `1ABC 23`, MI `ABC 1234`, MN `ABC-123`, MS `ABC 123`, MO `AB1 C2D`, MT `0-AB1234`, NE `ABC 123`, NV `123·A45`, NH `123 4567`, NJ `D12-ABC`, NM `123-ABC`, NY `ABC-1234`, NC `ABC-1234`, ND `123 ABC`, OH `ABC 1234`, OK `ABC-123`, OR `123 ABC`, PA `ABC1234`, RI `1AB 234`, SC `123ABC`, SD `0A1 234`, TN `ABC 1234`, TX `ABC-1234`, UT `A12 3BC`, VT `ABC 123`, VA `ABC-1234`, WA `ABC1234`, WV `X1A 2345`, WI `ABC-1234`, WY `1A-123A`. Most states omit I/O/Q from serials (state-specific, UNVERIFIED per state).
## 6. Airline
### OurAirports
- https://ourairports.com/data/ — "All data is released to the Public Domain"; mirror repo https://github.com/davidmegginson/ourairports-data is **Unlicense** (GitHub API). Nightly updates. **EMBED**.
- Raw URLs: `https://davidmegginson.github.io/ourairports-data/{airports,airport-frequencies,runways,navaids,countries,regions}.csv`.
| File | Rows | Fields |
|---|---|---|
| airports.csv (12.7 MB) | **86,089**; by type: small_airport 42,734, heliport 23,216, closed 13,524, medium 4,106, seaplane_base 1,273, large 1,174, balloonport 62 | `id,ident,type,name,latitude_deg,longitude_deg,elevation_ft,continent,iso_country,iso_region,municipality,scheduled_service,icao_code,iata_code,gps_code,local_code,home_link,wikipedia_link,keywords` |
| — with `iata_code` | **9,055** (large 1,171, medium 3,398, small 4,233, seaplane 153, heliport 100); `scheduled_service=yes` 4,335; US with IATA 2,036 (873 large/medium) | Suggested subset: `iata_code != '' AND type IN (large_airport, medium_airport)` → 4,569 rows |
| countries.csv | **249** | `id,code,name,continent,wikipedia_link,keywords` |
| regions.csv | **3,987** | `id,code,local_code,name,continent,iso_country,wikipedia_link,keywords` (code = ISO 3166-2, e.g. `US-KS`) |
- No airline file. Derived: datasets/airport-codes on datahub (PDDL) — no need, use upstream.
### OpenFlights
- https://openflights.org/data.php — airports/airlines/routes/planes under **ODbL 1.0** (+ DbCL); airline/plane data partly from Wikipedia (GFDL/CC BY-SA). 5,888 airlines (2012). **AVOID** (share-alike). npm `airline-codes` (npow, ISC) is a straight OpenFlights sync → inherits ODbL → **AVOID**.
### Airline IATA/ICAO codes — open options
| Source | Licence | Count | Verdict |
|---|---|---|---|
| Wikidata SPARQL (https://query.wikidata.org/sparql) | **CC0** (https://www.wikidata.org/wiki/Wikidata:Licensing) | **2,928** items with IATA code (P229), **3,644** with ICAO code (P230) | **EMBED**. Query: `SELECT ?item ?itemLabel ?iata ?icao ?callsign WHERE { ?item wdt:P229 ?iata . OPTIONAL { ?item wdt:P230 ?icao } OPTIONAL { ?item wdt:P432 ?callsign } SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } }`. Includes defunct airlines — filter `MINUS { ?item wdt:P576 ?dissolved }` and/or P31 = Q46970 (airline). |
| OpenTravelData `optd_airlines.csv` (https://github.com/opentraveldata/opentraveldata) | **CC BY 4.0** | 1,620 rows; `^`-separated; fields `pk^env_id^validity_from^validity_to^3char_code^2char_code^num_code^name^name2^alliance_code^alliance_status^type^wiki_link^flt_freq^alt_names^bases^key^version^parent_pk_list^successor_pk_list` | **EMBED+ATTR** (attribution notice required) |
- Format rules: IATA designator = 2 alphanumeric chars (`[A-Z0-9]{2}`, at least one letter in practice; a third optional char exists in the standard but is unused); "controlled duplicates" share a code between non-overlapping regional carriers. ICAO designator = 3 letters `[A-Z]{3}`, unique. Accounting/prefix code = 3 digits (ticket number prefix, e.g. `016` United).
### Aircraft types
| Source | Licence | Verdict |
|---|---|---|
| ICAO Doc 8643 (https://www.icao.int/operational-safety/doc-8643-aircraft-type-designators) | ICAO copyright notice: "None of the materials … may be used, reproduced or transmitted … without permission in writing from ICAO"; API Data Service is paid (25 free trial calls) | **AVOID** — including GitHub mirrors such as ColtJD45/icao-aircraft-designator-list (MIT-labelled, 7,388 rows, fields `manufacturer,model,type_designator,description,engine_type,engine_count,wtc`) because the underlying data is scraped ICAO content (UNVERIFIED provenance) |
| OpenSky aircraft database (https://opensky-network.org/data/aircraft; CSV https://s3.opensky-network.org/data-samples/metadata/aircraftDatabase.csv) | "The aircraft database is unlicensed and does not fall under our terms of use … offered as is"; built from registries, openflights.org and ICAO Doc 8643; citation requested; page says it is no longer up to date | **AVOID** ("unlicensed" ≠ open; upstream includes ODbL/ICAO). Fields for reference: `icao24,registration,manufacturericao,manufacturername,model,typecode,serialnumber,linenumber,icaoaircrafttype,operator,operatorcallsign,operatoricao,operatoriata,owner,…,engines,…,categoryDescription` |
| Wikidata | **CC0** | **550** items with ICAO aircraft type designator (P8305); also IATA aircraft code P9040 (UNVERIFIED property id), manufacturer P176 | **EMBED**. Query: `SELECT ?item ?itemLabel ?icao ?mfrLabel WHERE { ?item wdt:P8305 ?icao . OPTIONAL { ?item wdt:P176 ?mfr } SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } }` |
- Format: ICAO type designator 2–4 alphanumerics (`[A-Z0-9]{2,4}`, e.g. `B738`, `A20N`, `E190`); IATA aircraft code 3 alphanumerics (`738`, `32N`).
### Airport / flight / seat format rules
- IATA airport code `[A-Z]{3}`; ICAO location indicator `[A-Z0-9]{4}` (US `K…`, Canada `C…`, UK `EG…`, Sweden `ES…`). Use OurAirports rows so codes are real.
- Flight number: 2-char IATA designator + 1–4 digits, no leading zeros in display (`QF9`, `AA1234`); systems cap at 0001–9999. Conventions (not rules): 1–999 mainline, 3000–5999 regional affiliates, ≥6000 codeshares, 8xxx charters, ≥9000 ferry/positioning. ICAO form: 3-letter designator + 1–4 alphanumerics (`AFR1`). Source: https://en.wikipedia.org/wiki/Flight_number.
- Seat: `row + letter`. Rows typically 1–~60 (A380 up to ~90); many airlines skip 13 (and 14/17 on some carriers). Letters `A–K` **skipping I** (looks like 1/l); narrow-body 3-3 = `ABC DEF` (A/F windows, C/D aisles); wide-body 3-4-3 = `ABC DEFG HJK`, 2-4-2 = `AB DEFG JK`. Regex: `^[1-9][0-9]?[A-HJK]$`.
+149
View File
@@ -0,0 +1,149 @@
# Part 3 — Science/nature, Text, Dates: open data sources for an MIT fake-data library
Researched 2026-09-17. "OK to embed" = redistributable inside an MIT repo with the stated notice. Anything not fetched first-hand is marked **UNVERIFIED**.
## 7. Science / nature
### Periodic table
| Source | Licence | Embed in MIT repo | Fields | Rows | Format |
|---|---|---|---|---|---|
| PubChem periodic table — CSV https://pubchem.ncbi.nlm.nih.gov/rest/pug/periodictable/CSV, JSON https://pubchem.ncbi.nlm.nih.gov/rest/pug/periodictable/JSON (page: https://pubchem.ncbi.nlm.nih.gov/periodic-table/) | US-government work, public domain. NLM policy (https://www.ncbi.nlm.nih.gov/home/about/policies/): "Information that is created by or for the US government on this site is within the public domain … may be freely distributed and copied. However, it is requested that in any subsequent use of this work, NLM be given appropriate acknowledgment." | Yes; add an acknowledgment line ("Element data: PubChem/NLM"). | `AtomicNumber, Symbol, Name, AtomicMass, CPKHexColor, ElectronConfiguration, Electronegativity, AtomicRadius, IonizationEnergy, ElectronAffinity, OxidationStates, StandardState, MeltingPoint, BoilingPoint, Density, GroupBlock, YearDiscovered` (17) | 118 (Z=1..118, verified) | CSV; JSON is `{Table:{Columns:{Column:[...]},Row:[{Cell:[...]}]}}` |
| NIST periodic table https://www.nist.gov/pml/periodic-table-elements | Public domain (17 USC 105); NIST asks for citation (https://www.nist.gov/open/copyright-fair-use-and-licensing-statements-srd-data-software-and-technical-series-publications) | Yes, but | PDF only (no CSV/JSON) — not usable as a data source | 118 | PDF |
| Bowserinator/Periodic-Table-JSON https://github.com/Bowserinator/Periodic-Table-JSON | **CC BY-SA 3.0** (LICENSE.md, verified; data derived from Wikipedia) | **No** — ShareAlike is incompatible with MIT redistribution | 33 keys incl. `name, symbol, number, atomic_mass, category, phase, period, group, block, shells, electron_configuration, summary, cpk-hex, …` | **119** (includes hypothetical Ununennium) | JSON, CSV |
| faker-js `src/locales/en/science/chemical_element.ts` https://github.com/faker-js/faker (branch `next`) | MIT (LICENSE verified) | Yes, keep MIT notice | `{symbol, name, atomicNumber}` | 118 | TS |
Validation rules: `AtomicNumber` 1..118 unique; `Symbol` 1–2 letters, first uppercase, unique; `Name` unique. PubChem leaves numeric fields empty for Z≥104 where unknown; `ElectronConfiguration` for Og is `"[Rn]7s2 7p6 5f14 6d10 (predicted)"` and `StandardState` is `"Expected to be a Gas"` — strip "(predicted)"/"Expected to be a" if you want an enum. `AtomicMass` for unstable elements is the mass number of the most stable isotope as a bare decimal (e.g. `295.216`), no brackets. `CPKHexColor` is 6 hex digits without `#`, empty for some.
### SI units
- Source: BIPM SI Brochure, 9th ed. (2019; current revision v4.01, 2026) https://www.bipm.org/en/publications/si-brochure ; PDF https://www.bipm.org/documents/20126/41483022/SI-Brochure-9-EN.pdf
- Licence: **CC BY 4.0** — stated on the brochure page and on BIPM's copyright page (https://www.bipm.org/en/copyright): content may be adapted, copied, used in commercial products with "appropriate acknowledgement of the BIPM and its source"; BIPM name/logo must not imply endorsement. Verified via the HTML pages; the PDF's own front-matter licence line is **UNVERIFIED** (could not text-extract the PDF here).
- Embed: Yes — the unit *names/symbols* are facts (not copyrightable); attribute "SI Brochure, BIPM, CC BY 4.0" anyway.
- Data (cross-checked against https://en.wikipedia.org/wiki/International_System_of_Units):
- 7 base units: second s (time), metre m (length), kilogram kg (mass), ampere A (electric current), kelvin K (thermodynamic temperature), mole mol (amount of substance), candela cd (luminous intensity).
- 22 coherent derived units with special names: radian rad, steradian sr, hertz Hz, newton N, pascal Pa, joule J, watt W, coulomb C, volt V, farad F, ohm Ω, siemens S, weber Wb, tesla T, henry H, degree Celsius °C, lumen lm, lux lx, becquerel Bq, gray Gy, sievert Sv, katal kat.
- 24 prefixes: quetta Q 10^30, ronna R 10^27, yotta Y 10^24, zetta Z 10^21, exa E 10^18, peta P 10^15, tera T 10^12, giga G 10^9, mega M 10^6, kilo k 10^3, hecto h 10^2, deca da 10^1, deci d 10^-1, centi c 10^-2, milli m 10^-3, micro µ 10^-6, nano n 10^-9, pico p 10^-12, femto f 10^-15, atto a 10^-18, zepto z 10^-21, yocto y 10^-24, ronto r 10^-27, quecto q 10^-30.
- Format rules for valid output: unit symbols are case-sensitive (`s` vs `S`, `m` vs `M`); prefix and unit symbol are joined without a space (`kJ`, `µs`); a space separates number and unit (`12 kg`), except the degree/minute/second of plane angle; `kg` already carries a prefix — never `µkg`; micro is Greek mu U+03BC (U+00B5 micro sign is the legacy compatibility character); ohm is U+03A9 (U+2126 OHM SIGN is deprecated); `°C` not `° C`.
- MIT alternative: faker-js `en/science/unit.ts` — 29 `{name, symbol}` objects, MIT.
### Animals by class
- **Wikidata** (https://www.wikidata.org/wiki/Wikidata:Licensing): all structured data **CC0** — no attribution required. Embed: Yes.
- Feasibility, live SPARQL (https://query.wikidata.org/sparql), pattern `?t wdt:P31 wd:Q16521; wdt:P105 wd:Q7432; wdt:P171* wd:<class>; wdt:P1843 ?cn FILTER(LANG(?cn)='en')` (taxon, rank species, parent-taxon chain, English common name):
- Mammalia Q7377: **5,759** species with ≥1 English common name.
- Aves Q5113: **12,432**.
- Reptilia Q10811: **16,369** — suspiciously large; Wikidata's parent chain likely pulls birds/Sauropsida in. Use Squamata Q122422 + Testudines Q223044 + Crocodilia Q1387 (or check the chain) instead.
- Insecta Q1390 and Plantae Q756: **timed out (502/504) every attempt** — trees too big for the 60 s public endpoint. Options: paginate by order (`P171` one level at a time), use the weekly JSON dump, or take GBIF instead.
- Sample rows (mammals): `Notoryctes typhlops` → "Central Desert Marsupial Mole", "Itjaritjari", "Marsupial Mole", "Southern marsupial mole", "Southern Marsupial Mole" — i.e. **several P1843 values per taxon, inconsistent casing, and indigenous-language names tagged `en`**. Validation: pick one name per taxon (prefer the one matching the item's English `rdfs:label`), normalise case, drop names that equal the scientific name.
- **GBIF Backbone Taxonomy** https://www.gbif.org/dataset/d7dddbf4-2cf0-4f39-9b2a-bb099caae36c — licence **CC BY 4.0** (verified via https://api.gbif.org/v1/dataset/d7dddbf4-2cf0-4f39-9b2a-bb099caae36c, `license: http://creativecommons.org/licenses/by/4.0/legalcode`); required citation text: "GBIF Secretariat (2023). GBIF Backbone Taxonomy. Checklist dataset https://doi.org/10.15468/39omei". Embed: Yes with that citation. Vernacular names come via `/v1/species/{key}/vernacularNames`, each row from a *different* source checklist with its own licence (some CC BY-NC) — record and check per row. GBIF's site terms page (https://www.gbif.org/terms) was unreachable (timeout) — **UNVERIFIED** beyond the API field.
- **faker-js** `src/locales/en/animal/*` (MIT; counts = quoted string lines on branch `next`): bird 821, snake 533, dog 493, cow 467, horse 342, rodent 161, insect 129, fish 95, cat 55, cetacean 52, rabbit 49, type 44 (generic: "bat, bear, bee, …, zebra"), pet_name 42, crocodilia 24, bear 8, lion 7. These are breeds/species mixed with common names, no class field; fine as MIT drop-ins. (A WebFetch summariser claimed 1,036 dogs; the regex count is 493 — treat the exact count as UNVERIFIED.)
### Plants
- Same Wikidata approach (CC0) — but the Plantae query timed out; paginate by order or family (`?t wdt:P171 ?family . ?family wdt:P105 wd:Q35409`) or use the dump.
- GBIF Plantae (kingdomKey 6) vernacular names, CC BY 4.0, same per-row-licence caveat.
- faker-js has **no** plant list (en locale dirs: airline, animal, app, book, color, commerce, company, database, date, finance, food, hacker, internet, location, lorem, medical, music, person, phone_number, science, team, vehicle, word).
- USDA PLANTS database (public domain, has common names) — **UNVERIFIED**, not fetched.
### Planets / moons
- NASA NSSDCA Planetary Fact Sheet https://nssdc.gsfc.nasa.gov/planetary/factsheet/ — 10 columns (Mercury, Venus, Earth, Moon, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto) × 20 rows (mass 10^24 kg, diameter km, density, gravity, escape velocity, rotation period, day length, distance from Sun, perihelion, aphelion, orbital period, orbital velocity, inclination, eccentricity, obliquity, mean temp °C, surface pressure, number of moons, rings Y/N, magnetic field Y/N). HTML table only. NASA content "generally not subject to copyright in the United States" (https://www.nasa.gov/nasa-brand-center/images-and-media/); NASA asks to be acknowledged; the NASA insignia must not be used. Embed: Yes with "Source: NASA NSSDCA".
- Wikidata (CC0): planets = `?p wdt:P31/wdt:P279* wd:Q634; wdt:P397 wd:Q525` → Mercury Q308, Venus Q313, Earth Q2, Mars Q111, Jupiter Q319, Saturn Q193, Uranus Q324, Neptune Q332 (plus hypothetical Theia Q1053432 — filter out). Moons = `?m wdt:P397 <planet>; wdt:P31/wdt:P279* wd:Q2537` (natural satellite; note **Q2199 is "dwarf planet"**, not moon): Saturn 165, Jupiter 85, Uranus 29, Neptune 16, Earth 5, Mars 2. Caveats: Wikidata lags IAU counts (Saturn has 274 recognised moons as of 2025 — UNVERIFIED figure); Earth's 5 includes quasi-satellites; provisional designations (`S/2004 S 3`) are labels too — filter `^S/\d{4}` if you want proper names only.
### Blood type distribution
- **US** (Stanford Blood Center https://stanfordbloodcenter.org/donate-blood/blood-donation-facts/blood-types/, verified; cites AABB Technical Manual 18th ed.): O+ 37.4 %, A+ 35.7 %, B+ 8.5 %, AB+ 3.4 %, O− 6.6 %, A− 6.3 %, B− 1.5 %, AB− 0.6 % (sums to 100.0). Facts — freely embeddable; cite Stanford/AABB.
- American Red Cross https://www.redcrossblood.org/donate-blood/blood-types.html — **UNVERIFIED**: site returns HTTP 403 (Akamai) to both WebFetch and the headless browser. Search snippets say the Red Cross gives type O by ethnicity (Latino 57 %, African American 51 %, Caucasian 45 %) rather than an 8-way national table.
- **Global**: no authoritative figure found. Wikipedia "Blood type distribution by country" gives a population-weighted row (O+ 38.4, A+ 27.3, B+ 8.1, AB+ 2.0, O− 13.1, A− 8.1, B− 2.0, AB− 0.01) that its own editors flag "unreliable source"; WorldAtlas gives O+ 42, A+ 31, B+ 15, AB+ 5, O− 3, A− 2.5, B− 1, AB− 0.5 with no source. Recommend shipping only the US table, or per-country tables from Wikipedia (facts; Wikipedia prose is CC BY-SA but the numbers are cited to national blood services — cite those).
- Validation: ABO ∈ {A, B, AB, O}; Rh ∈ {+, −}; weights must sum to 100 ± rounding.
## 8. Text
### English word lists with part of speech
| Source | Licence | Embed | Counts | Format |
|---|---|---|---|---|
| Princeton WordNet 3.0 / 3.1 https://wordnet.princeton.edu/license-and-commercial-use ; download https://wordnetcode.princeton.edu/wn3.1.dict.tar.gz | "WordNet License" (SPDX `WordNet`), BSD-style: permission to use/copy/modify/distribute "for any purpose and without fee or royalty … provided that … the following copyright notice and statements, including the disclaimer … appear on ALL copies … including modifications". Notice text: "WordNet 3.0 Copyright 2006 by Princeton University. All rights reserved." + AS-IS disclaimer; no use of Princeton's name in advertising. | Yes — ship the LICENSE text alongside the data | WordNet 3.0 (wnstats(7WN), verified): unique strings noun 117,798 / verb 11,529 / adj 21,479 / adv 4,481 (total 155,287); synsets 82,115 / 13,767 / 18,156 / 3,621 | WNDB: `index.noun|verb|adj|adv` (one lemma per line: `lemma pos synset_cnt p_cnt [ptr…] sense_cnt tagsense_cnt synset_offset…`), `data.<pos>` (synsets with glosses). Multi-word lemmas use `_` for spaces; lower-case; entries can contain digits/apostrophes/hyphens. |
| Open English WordNet 2025 https://en-word.net/ ; https://github.com/globalwordnet/english-wordnet | **CC BY 4.0**; cite "Open English WordNet … derived from Princeton WordNet" | Yes, with attribution | 135,969 words, 107,519 synsets (README, verified) | `english-wordnet-2025.zip` (WNDB, 9.2 MB), `english-wordnet-2025.xml.gz` (WN-LMF, 10.8 MB), `english-wordnet-2025-json.zip` (9.5 MB), `.ttl.gz` (16.9 MB) |
| SCOWL v2 / ESDB https://github.com/en-wl/wordlist (branch v2) ; classic http://wordlist.aspell.net/ | Custom MIT-like (Copyright 2000-2026 Kevin Atkinson: use/copy/modify/distribute/sell "provided that the above copyright notice appears in all copies and that both the above copyright notice and this notice appear in supporting documentation"). Sources 12dicts + ENABLE2K are public domain; lists above size 80 add the UKACD notice; **POS assignments partly from WordNet, so the WordNet notice "MIGHT apply"** (their words). Australian-English parts carry an extra notice. | Yes, ship the Copyright file | Sizes 35 (small), 50 (medium), 60 (spell-check default), 70 (large), 80 (incl. game words), 85 (archaic). No per-size counts published in the v2 README. Classic SCOWL sizes 10–95 — counts **UNVERIFIED** (README not reachable). | v2: `scowl.db` (SQLite), `scowl.txt`, Python `libscowl`. ESDB rows carry POS, spelling (A/B/Z/C/D) and region codes. |
| 12dicts http://wordlist.aspell.net/12dicts-readme/ | Public domain ("I explicitly release them to the public domain, but request acknowledgment"), **except** `2of12inf` and the `2+2+3*` lists, which depend on AGID and inherit its terms | Yes (PD lists); acknowledge Alan Beale | 3esl ≈22k, 6of12 ≈32k, 2of12 ≈41k, 2of12inf ≈82k, 3of6game ≈65k, 5d+2a ≈68k, 3of6all ≈83k, 2+2+3lem ≈84k, 2of5core ≈4.7k, 6phrase ≈22k, neol2016 ≈600 | Plain text, one word per line; marker suffixes `+ ! ^ &` (not POS). **No POS tags** in any current 12dicts list. |
| Moby Part-of-Speech II https://www.gutenberg.org/ebooks/3203 ; file https://www.gutenberg.org/files/3203/files/mobypos.txt | Public domain ("Public Domain material by grant from the author, January, 2001", in the package README) | Yes, no notice needed | **233,356** lines (verified) | One entry per line: `word\CODES`, CRLF line ends (e.g. `A-line\NA`, `a tempo\Avh`). Codes in priority order: `N` noun, `p` plural, `h` noun phrase, `V` verb (usu. participle), `t` transitive verb, `i` intransitive verb, `A` adjective, `v` adverb, `C` conjunction, `P` preposition, `!` interjection, `r` pronoun, `D` definite article, `I` indefinite article, `o` nominative. Many entries are phrases, proper nouns, or 1990s-era; non-ASCII entries use a legacy 8-bit encoding (e.g. `a bon march\v` lost its `é`) — restrict to ASCII `[a-z]+` for a clean list. |
| faker-js `en/word/*` (MIT) | MIT | Yes | adjective 1000, noun 1000, verb 1000, adverb 325, preposition 109, conjunction 51, interjection 46 | TS string arrays |
### Word frequency lists
| Source | Licence | Verdict |
|---|---|---|
| Google Books Ngram data v2/v3 https://storage.googleapis.com/books/ngrams/books/datasetsv3.html | **CC BY 3.0** ("This compilation is licensed under a Creative Commons Attribution 3.0 Unported License") | Embeddable with attribution. Format `ngram TAB year TAB match_count TAB volume_count`; 1-gram files split by leading letter, GBs each — aggregate offline to a top-N list. |
| wordfreq https://github.com/rspeer/wordfreq | Code **Apache 2.0** (not MIT). Data: "may be redistributed under a Creative Commons Attribution-ShareAlike 4.0 license" (mix of Google Books, Wikipedia, OpenSubtitles, SUBTLEX, Leeds, ParaCrawl, Twitter); maintainer notes the CSV export "does not follow the CC-By-SA license". Project in sunset mode (data snapshot ≈2021). | **Avoid** embedding the data (ShareAlike). |
| Peter Norvig count_1w.txt https://norvig.com/ngrams/ | Page says "Code … under the MIT license"; the **data** comes from the Google Web 1T corpus distributed by LDC under LDC terms — no data licence stated. | **UNVERIFIED / avoid**. 333,333 words, `word TAB count`, lowercase. |
| hermitdave/FrequencyWords https://github.com/hermitdave/FrequencyWords | "MIT License for code. CC-by-sa-4.0 for content." | **Avoid** (ShareAlike). |
### Lorem ipsum
- Canonical paragraph (Letraset, 1966; public domain — garbled Cicero): "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- Source: Cicero, *De finibus bonorum et malorum* 1.10.32–33 (45 BC), public domain; the "dolorem ipsum" fragment begins "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit…". Reference: https://en.wikipedia.org/wiki/Lorem_ipsum
- MIT word pool alternative: faker-js `en/lorem/word.ts` — 999 words.
### Quote collections
- Project Gutenberg #27889 https://www.gutenberg.org/ebooks/27889 — Bartlett, *Familiar Quotations*, **9th edition** (title page "NINTH EDITION", copyright 1875/1882/1891/1903) — not the 1919 10th. "Public domain in the USA." Plain text 3.1 MB, HTML zip 50 MB, EPUB.
- Project Gutenberg #16732 https://www.gutenberg.org/ebooks/16732 — an early (Hurst & Co. reprint) edition, no edition number given. PD in USA.
- 10th edition (1914/1919, ed. Nathan Haskell Dole) exists on archive.org (https://archive.org/details/bartlettsfamilia0000john_o4b4) — not found on Gutenberg; **UNVERIFIED** availability as clean text.
- Either Bartlett text needs parsing (quote / author / source headings); no structured file. Wikiquote is CC BY-SA — avoid.
- Validation: strip Gutenberg header/footer (`*** START OF THE PROJECT GUTENBERG EBOOK` … `*** END …`) before extraction; Gutenberg's trademark terms only bind if you keep the "Project Gutenberg" name on the output — strip it.
### Colour names
| Source | Licence | Embed | Count / format |
|---|---|---|---|
| CSS Color Module Level 4 §named colors https://www.w3.org/TR/css-color-4/#named-colors | W3C Document License (2023) https://www.w3.org/copyright/document-license-2023/ — copy/distribute allowed for any purpose; derivatives allowed only "to facilitate implementation of the technical specifications"; notice required: "Copyright © 2023 W3C®. This software or document includes material copied from or derived from [title and URI]." | Yes — the name→hex table is factual data and is copied into every browser; include the W3C notice line with the spec title + URI. | **148** names (verified: aliceblue … yellowgreen, incl. `rebeccapurple #663399`); all names lowercase ASCII, hex 6 lowercase digits. |
| XKCD colour survey https://xkcd.com/color/rgb.txt | **CC0** (file header: `# License: https://creativecommons.org/publicdomain/zero/1.0/`) | Yes, no notice needed | **949** lines (verified). Format `name TAB #rrggbb TAB` (note the trailing tab). Max name length 26; all hex valid lowercase; no duplicate names. Contains crude names ("poo", "baby poop green", "diarrhea", "vomit") — apply a blocklist. |
| faker-js `en/color/human.ts` | MIT | Yes | 31 names |
| Pantone | Proprietary | **Avoid** | — |
## 9. Dates
### IANA tz database
- Source https://www.iana.org/time-zones ; files https://data.iana.org/time-zones/tzdb/ (current version **2026d**, verified). LICENSE: "Unless specified below, all files in the tz code and data (including this LICENSE file) are in the public domain" (only `date.c`, `newstrftime.3`, `strftime.c` are BSD-3). Embed: Yes, no notice needed.
- `zone1970.tab` — **312** data rows; tab-separated; UTF-8; `#` comments. Columns: (1) comma-separated ISO 3166-1 alpha-2 codes of countries overlapping the zone, most-populous first; (2) coordinates in ISO 6709 `±DDMM±DDDMM` or `±DDMMSS±DDDMMSS` (lat then lon, no separator); (3) TZ name (`Europe/Zurich`); (4) comment, present iff the country has several zones. One row per timezone where civil time has agreed since 1970.
- `zone.tab` — **418** rows, older one-country-per-row table (column 1 is a single country code); kept for backward compatibility. Prefer `zone1970.tab`.
- `backward` — **252** `Link TARGET LINK-NAME` lines mapping old/merged names (`US/Eastern`, `Asia/Calcutta`, `Europe/Kiev`) to current ones; also a few `Zone` entries. Use it to (a) accept aliases as input and (b) never emit them as output.
- UTC offsets: do **not** embed — offsets depend on DST rules that change several times a year. Derive at runtime: `new Intl.DateTimeFormat('en-US', { timeZone, timeZoneName: 'longOffset' }).formatToParts(date)` → part `timeZoneName` = `GMT-05:00` (or `GMT` for zero) — strip `GMT`, treat bare `GMT` as `+00:00`. Validation of a generated zone name: `Intl.supportedValuesOf('timeZone')` (canonical names only; whether links like `US/Eastern` appear depends on the ICU build) or `try { new Intl.DateTimeFormat(undefined, { timeZone }) } catch { invalid }`, which accepts links too.
### ISO 8601 layouts (https://en.wikipedia.org/wiki/ISO_8601)
| Layout | Extended | Basic | Example |
|---|---|---|---|
| Calendar date | `YYYY-MM-DD` | `YYYYMMDD` | 2009-01-06 |
| Ordinal date | `YYYY-DDD` | `YYYYDDD` | 1981-095 |
| Week date | `YYYY-Www-D` | `YYYYWwwD` | 2009-W01-1 (weeks start Monday, week 1 contains 4 Jan) |
| Time | `hh:mm:ss[.fff]` | `hhmmss` | 13:47:30 (24 h; `T` prefix optional standalone) |
| UTC / offset | `Z` or `±hh:mm` | `±hhmm`, `±hh` | 2007-04-05T14:30Z, 2024-06-01T09:00-05:00 |
| Date-time | date `T` time offset | | 2007-04-05T14:30:00+02:00 |
| Duration | `PnYnMnDTnHnMnS` / `PnW` | | P3Y6M4DT12H30M5S |
| Interval | start`/`end, start`/`duration, duration`/`end | | 2007-03-01T13:00:00Z/2008-05-11T15:30:00Z |
| Recurring | `Rn/`interval | | R5/2008-03-01T13:00:00Z/P1Y2M10DT2H30M |
RFC 3339 profile (what JSON/APIs usually mean): extended forms only, `T`/`Z` may be lowercase, space allowed instead of `T`, `-00:00` = unknown offset, no durations/intervals/week/ordinal dates. Generate RFC 3339 by default.
### Unicode CLDR (locale month/weekday names, date patterns)
- Licence: **Unicode License v3** (SPDX `Unicode-3.0`), OSI-approved 2023-11-17 (https://opensource.org/license/unicode-3-0). Text https://www.unicode.org/license.txt — MIT-style: use/copy/modify/sell "provided that either (a) this copyright and permission notice appear with all copies of the Data Files or Software, or (b) this copyright and permission notice appear in associated Documentation"; no use of the Unicode name in advertising. Embed: Yes; put the notice in LICENSE/NOTICE.
- npm: `cldr-core`, `cldr-dates-full`, `cldr-numbers-full` (peer of dates), etc.; current **48.2.0** (CLDR 48, verified via npm registry, `license: Unicode-3.0`); repo https://github.com/unicode-org/cldr-json .
- Path is **`cldr-dates-full/main/<locale>/ca-gregorian.json`** (not `dates/gregorian.json`), rooted at `main.<locale>.dates.calendars.gregorian`. Keys (verified for `en`): `months`, `days`, `quarters`, `dayPeriods`, `eras`, `dateFormats`, `dateSkeletons`, `timeFormats`, `timeSkeletons`, `dateTimeFormats`, `dateTimeFormats-atTime`, `dateTimeFormats-relative`.
- `months.{format|stand-alone}.{abbreviated|narrow|wide}` keyed `"1".."12"`; `days.{format|stand-alone}.{abbreviated|narrow|short|wide}` keyed `sun..sat`.
- `dateFormats`: en = full `EEEE, MMMM d, y`, long `MMMM d, y`, medium `MMM d, y`, short `M/d/yy`.
- `timeFormats`: en = full `h:mm:ss a zzzz`, long `h:mm:ss a z`, medium `h:mm:ss a`, short `h:mm a` — **the `a` is preceded by U+202F NARROW NO-BREAK SPACE**; `*-alt-ascii` variants use a plain space. Pick one spelling (ASCII) and ignore the other.
- `dateTimeFormats.{full|long|medium|short}` = glue like `{1}, {0}` ({1} date, {0} time); `availableFormats` = skeleton→pattern map (`yMMMd` → `MMM d, y`), plus `intervalFormats`, `appendItems`.
- `dayPeriods.format.abbreviated`: `am: AM`, `pm: PM`, plus `midnight`, `noon`, `morning1`… variants.
- Pattern letters follow LDML (https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table): `y` year, `M`/`L` month (format/stand-alone), `d` day, `E`/`c` weekday, `h` 1–12, `H` 0–23, `a` AM/PM, `z`/`zzzz` zone name, `x`/`X` ISO offset; literal text in single quotes. Same patterns drive `Intl.DateTimeFormat` internally, so runtime `Intl` can replace embedding for month/weekday names if bundle size matters.
## Summary of licence verdicts
- Embed freely (PD/CC0): PubChem periodic table, NIST, NASA fact sheet, Wikidata, Moby POS, 12dicts (PD lists), Bartlett via Gutenberg, XKCD colours, IANA tz, Lorem ipsum/Cicero.
- Embed with notice: WordNet 3.x (WordNet License), Open English WordNet (CC BY 4.0), SCOWL/ESDB (custom MIT-like), GBIF backbone (CC BY 4.0 + citation), BIPM SI (CC BY 4.0), CSS named colours (W3C notice), CLDR (Unicode-3.0), Google Books ngrams (CC BY 3.0), faker-js lists (MIT).
- Avoid: Bowserinator periodic table (CC BY-SA 3.0), wordfreq data (CC BY-SA 4.0), hermitdave (CC BY-SA 4.0), Norvig count_1w (LDC-derived, unstated), Wikiquote (CC BY-SA), Pantone.
- UNVERIFIED: American Red Cross figures (site blocks fetches), any global blood-type table, BIPM PDF front-matter licence line, classic SCOWL per-size counts, USDA PLANTS, IAU moon counts, exact faker dog count, Bartlett 10th-edition text availability.
+139
View File
@@ -0,0 +1,139 @@
# Part 4 — ISO lists, commerce, books/music/food
Researched 2026-09-17. "Embed?" = can the data ship inside an MIT-licensed repo. Anything marked UNVERIFIED was not confirmed against the primary source.
## 10. ISO lists
### ISO 3166-1 countries
| Source | Licence | Embed in MIT repo? | Rows | Fields | Format |
|---|---|---|---|---|---|
| [datasets/country-codes](https://github.com/datasets/country-codes) | PDDL (README: "Public Domain Dedication and License"; GitHub API detects no licence file) | Yes, no attribution required. README caveat: ISO itself says its list is "for internal use and non-commercial purposes free of charge" — the repo argues no rights subsist in a list of facts | 249 | ISO3166-1-Alpha-2/-Alpha-3/-numeric, official_name_en, UNTERM names (ar/zh/en/fr/ru/es short+formal), Dial, TLD, Capital, Continent, Languages, ISO4217 currency code/name/numeric/minor_unit, Region/Sub-region/Intermediate names+codes (M49), FIPS, IOC, FIFA, MARC, ITU, WMO, GAUL, EDGAR, Geoname ID, wikidata_id, CLDR display name, is_independent, LDC/LLDC/SIDS flags | CSV `data/country-codes.csv` |
| [annexare/Countries](https://github.com/annexare/Countries) (npm `countries-list` 3.4.1, 2026-07-14) | MIT | Yes; keep MIT notice | 252 countries, 185 languages (incl. non-ISO entries like AC, XK) | per country: name, native, phone[] (calling codes), continent, capital, currency[], languages[], optional alias[], partOf; separate ISO 4217 currency table (name, native, symbol, numeric, decimals); languages: name, native | TS source, exported JSON/CSV/SQL |
| [Debian iso-codes](https://salsa.debian.org/iso-codes-team/iso-codes) | LGPL-2.1-or-later (Debian copyright file) | Not safely as embedded data in an MIT repo — LGPL applies to the data files; you would have to ship it as a separately licensed component with LGPL notice. Avoid unless accepting that | 3166-1: 249 | alpha_2, alpha_3, numeric, name, official_name, common_name, flag | JSON `data/iso_3166-1.json` (raw URL needs `?inline=false`) |
| [mledoze/countries](https://github.com/mledoze/countries) | ODbL-1.0 | No — share-alike + attribution; derived databases must be ODbL. Avoid | ~250 | common/official names, cca2/cca3/ccn3/cioc, tld, currencies, idd (calling codes), capital, region/subregion, languages, translations, latlng, borders, area, demonyms, flag emoji, UN member | JSON/CSV/XML/YAML |
| [restcountries](https://gitlab.com/restcountries/restcountries) | MPL-2.0 (source repo; hosted API v5 is proprietary/API-key) | File-level copyleft: a copied data file stays MPL and must carry the notice; OK to ship next to MIT code but not to relicense. Prefer PDDL/MIT sources | 250+ | name, tld, cca2, ccn3, cca3, cioc, fifa, independent, status, unMember, currencies, idd, capital, capitalInfo, altSpellings, region, subregion, continents, languages, translations, latlng, landlocked, borders, area, flag (emoji), demonyms, flags, coatOfArms, population, maps, gini, car, postalCode, startOfWeek, timezones | JSON `src/main/resources/countriesV3.1.json` |
| [lukes/ISO-3166-Countries-with-Regional-Codes](https://github.com/lukes/ISO-3166-Countries-with-Regional-Codes) | CC BY-SA 4.0 (LICENSE.md) | No — share-alike. Avoid | 249 | name, alpha-2, alpha-3, country-code, iso_3166-2, region, sub-region, intermediate-region + codes | CSV/JSON/XML (all, slim-2, slim-3) |
| [stefangabos/world_countries](https://github.com/stefangabos/world_countries) | Data: CC BY-SA 4.0 (README, GitHub licence detection); npm `world_countries_lists` package.json says LGPL-3.0-or-later — contradictory | No — share-alike either way. Avoid | 249 world / 193 UN; subdivisions 5046 | id (numeric), alpha2, alpha3, name (37 languages); subdivisions: country, code, name, name_en, type, parent | JSON/CSV/PHP/SQL/XML |
| [i18n-iso-countries](https://www.npmjs.com/package/i18n-iso-countries) 7.14.0 | MIT | Yes | 78 language files | alpha2, alpha3, numeric, localized names | JSON per language |
| Wikipedia ISO 3166-1 | CC BY-SA 4.0 | No (share-alike) | — | — | — |
| [ISO OBP](https://www.iso.org/obp) | Proprietary; ISO grants free use only for "internal use and non-commercial purposes" (quoted in datasets/country-codes README) | No | — | — | — |
- Flag emoji: derive, no data needed — for alpha-2 `XY`, emit U+1F1E6 + (X − 'A') and U+1F1E6 + (Y − 'A') (regional indicator symbols).
- Recommendation: `datasets/country-codes` (PDDL) covers every requested field (name, alpha2, alpha3, numeric, calling code, TLD, capital, currency, languages) in one CSV; flag emoji derived. `annexare` (MIT) is the fallback for native names/calling codes if PDDL's ISO caveat worries you; it lacks TLD.
- Validation rules: alpha-2 `^[A-Z]{2}$`, alpha-3 `^[A-Z]{3}$`, numeric `^\d{3}$` (zero-padded, keep as string); calling code 1–3 digits, NANP countries share `1`; TLD `^\.[a-z]{2}$` (ccTLD = lowercase alpha-2, exceptions: GB uses `.uk`).
### ISO 639 languages
| Source | Licence | Embed? | Rows | Fields | Format |
|---|---|---|---|---|---|
| [langs](https://www.npmjs.com/package/langs) 2.0.0 (2017, unmaintained) | MIT | Yes | 184 | name, local, 1 (639-1), 2, 2T, 2B, 3 | `data.js` array |
| [iso-639-1](https://www.npmjs.com/package/iso-639-1) 3.1.6 (2026-07-02) | MIT | Yes | 183 | code, name, nativeName | `src/data.js` |
| annexare/Countries languages | MIT | Yes | 185 | code (639-1), name, native | TS/JSON |
| Debian iso-codes 639-2 / 639-3 / 639-5 | LGPL-2.1+ | See above (LGPL) | 639-2: 487; 639-3: 7923 | 639-2: alpha_2, alpha_3, bibliographic, name, common_name; 639-3: + inverted_name, scope, type | JSON |
| [SIL ISO 639-3 tables](https://iso639-3.sil.org/code_tables/download_tables) | SIL terms: may incorporate into software (commercial or not) with attribution to iso639-3.sil.org, must not modify identifiers, and product "does not provide a means to redistribute the code set" | Risky — a git repo with the table IS a means to redistribute; avoid embedding the full table. Codes themselves are facts | 7927 | Id, Part2b, Part2t, Part1, Scope, Language_Type, Ref_Name, Comment | tab-delimited `iso-639-3.tab` |
| [Library of Congress ISO 639-2](https://www.loc.gov/standards/iso639-2/ascii_8bits.html) | US federal government work → public domain in the US | Yes | ~487 (matches Debian 639-2 count) | pipe-delimited: alpha3-B, alpha3-T, alpha2, English name, French name — UNVERIFIED: loc.gov is behind a Cloudflare bot check (WebFetch, curl and Playwright all blocked); field layout from memory | `ISO-639-2_utf-8.txt` |
- Recommendation: `langs` or `iso-639-1` (MIT) for 639-1 names; both are small and derived from public code tables. Anything 639-3-sized is LGPL or SIL-restricted.
- Rules: 639-1 `^[a-z]{2}$`, 639-2/3 `^[a-z]{3}$`; 639-2 has B/T pairs (e.g. `fre`/`fra`, `ger`/`deu`) — pick one consistently (T codes = 639-3).
### ISO 3166-2 subdivisions
| Source | Licence | Embed? | Rows | Fields |
|---|---|---|---|---|
| Debian iso-codes 3166-2 | LGPL-2.1+ | LGPL caveat | 5046 | code, name, type, parent |
| [olahol/iso-3166-2.json](https://github.com/olahol/iso-3166-2.json) | package.json says ISC; no LICENSE file; GitHub detects none; data scraped from eQuest xls (provenance unclear); last push 2021 | No — unclear licence and provenance | 237 countries / 3807 divisions | `{alpha2: {name, divisions: {code: name}}}` |
| [esosedi/3166](https://github.com/esosedi/3166) (npm `iso3166-2-db` 2.3.11) | MIT | Yes; data mixes GeoNames (CC BY 4.0), Wikipedia (CC BY-SA), OSM (ODbL) — the MIT label may not survive scrutiny for the Wikipedia/OSM-derived parts. UNVERIFIED how much is derived from each | "all countries and regions" (count not stated) | ISO 3166-2 + FIPS codes, names in 12 languages, admin level, GeoNames/OSM/Wikipedia/WOF ids |
| stefangabos subdivisions | CC BY-SA 4.0 | No | 5046 | country, code, name, name_en, type, parent |
| [US Census state.txt](https://www2.census.gov/geo/docs/reference/state.txt) | US government work → public domain | Yes | 57 (50 states + DC + 6 territories) | STATE (FIPS), STUSAB, STATE_NAME, STATENS |
- Recommendation: for an en_US library, ship only the US list (Census/USPS, public domain: 50 states + DC, optionally territories) — ISO 3166-2 code = `US-` + USPS abbreviation. Skip the ~5000-row world list; every open compilation is LGPL, CC BY-SA or unclear.
- Rule: `^[A-Z]{2}-[A-Z0-9]{1,3}$`.
## 11. Commerce
### Word lists (product name / adjective / material)
- [@faker-js/faker](https://github.com/faker-js/faker) 10.6.0 — MIT (LICENSE covers code and locale data; copyright Faker contributors 2022-2025 and Marak Squires 2011-2020; acknowledges Ruby Faker and Perl Data::Faker, both MIT). No separate data licence.
- Provenance policy in [CONTRIBUTING.md](https://github.com/faker-js/faker/blob/next/CONTRIBUTING.md): "Faker must not contain copyrighted materials"; facts (finite known lists) are OK; compilations must not be copied from a single source (Wikipedia, "most popular" articles, government sites) because "a compilation of facts can be copyrighted" — contributors are told to draw on multiple sources and their own judgement.
- Verdict: reusing faker's `en` commerce lists (`product_name.adjective/material/product`, `department`) is fine under MIT — keep the MIT notice with the copied data. The lists are short curated words (no external dataset). Nothing in the repo or docs restricts locale-data reuse beyond MIT.
### Garment and shoe sizes
- Letter sizes XS–XXL: EN 13402-3 letter codes with chest/bust ranges (Wikipedia [EN 13402](https://en.wikipedia.org/wiki/EN_13402), CC BY-SA — but the table is a handful of facts; the standard itself is paywalled). Men chest / women bust cm: XXS 70–78 / 66–74, XS 78–86 / 74–82, S 86–94 / 82–90, M 94–102 / 90–98, L 102–110 / 98–107, XL 110–118 / 107–119, XXL 118–129 / 119–131, 3XL 129–141 / 131–143.
- US numeric women's sizes (0–20, even) come from ASTM D5585 (paywalled); no open dataset. Just generate the even-number series.
- Shoe sizes: no open dataset found (search hits are ML demos and retailer charts). Use the formulas from Wikipedia [Shoe size](https://en.wikipedia.org/wiki/Shoe_size) (facts, not copyrightable): EU (Paris point) ≈ 1.5 × foot cm + 2 (i.e. 3/20 × mm + 2); UK adult ≈ 3 × foot in − 23; US men ≈ 3 × foot in − 22 = UK + 1; US women (common) = US men + 1.5 (FIA scale: 3 × foot in − 21); Mondopoint = foot length mm. ISO/TS 19407:2023 has the official conversion tables (paywalled). Generate from a foot length (men 24–31 cm, women 21–27 cm) in half-size steps so all systems agree.
### Check-digit rules (all verified against Wikipedia articles; algorithms are facts)
| Code | Rule |
|---|---|
| EAN-13 / UPC-A / GTIN-8/12/13/14 | Weights 3,1,3,1… starting from the rightmost data digit (the one next to the check digit); check = (10 − sum mod 10) mod 10. UPC-A = EAN-13 with a leading 0 (GS1 prefix of a 12-digit GTIN is `0` + first two digits). GTIN-14 first digit is an indicator 1–8 (packaging level) or 9 (variable measure); 0 is not valid there. |
| UPC-A number system (first digit) | 0,1,6,7,8,9 regular; 2 variable-weight; 3 drugs (NDC); 4 in-store/local; 5 coupons. |
| ISBN-10 | Σ(weights 10..2 × first 9 digits) + check ≡ 0 mod 11; check = (11 − sum mod 11) mod 11, 10 → `X`. |
| ISBN-13 | EAN-13 with prefix 978 or 979. 979 groups in use: 979-8 USA, 979-10 France, 979-11 Korea, 979-12 Italy. 978 groups 0 and 1 = English-language. For an en_US generator: `978-0…`, `978-1…`, `979-8…`. The official range file (`https://www.isbn-international.org/export_rangemessage.xml`) is XML only and the site says "You must not republish material from our site … without our written permission" — do not embed it; group/registrant length only matters for hyphenation, not validity. |
| ISSN | Format `NNNN-NNNC`; weights 8..2 over first 7 digits, sum mod 11; check = 0 if remainder 0 else 11 − remainder; 10 → `X`. EAN-13 form: `977` + 7 ISSN digits (no check) + 2 variant digits + EAN check. |
| IMEI | 15 digits: TAC 8 (RBI 2 + 6) + serial 6 + Luhn check (ISO/IEC 7812; from the right, double every second digit, sum digits, total ≡ 0 mod 10). SVN never enters the check. IMEISV = 14 digits + 2-digit SVN, no check. RBI `00` = test IMEI (Wikipedia [Reporting Body Identifier](https://en.wikipedia.org/wiki/Reporting_Body_Identifier)); live RBIs: 01 CTIA/PTCRB (US), 35 TÜV SÜD/BABT (UK), 86 TAF (China), 99 GHA. For fake data use TAC `00xxxxxx` so it can never match a real handset — UNVERIFIED: third-party pages claim the GSMA TS.06 test-TAC shape is `00 44` + 4 digits; the TS.06 PDF could not be text-extracted here. |
| ASIN | 10 chars `[A-Z0-9]{10}`; non-books start `B0` + 8 alphanumerics (`^B0[A-Z0-9]{8}$`); books reuse their ISBN-10 verbatim. No check digit (Wikipedia). |
| SKU | Not standardised (Wikipedia). Convention only: 8–12 uppercase alphanumerics, e.g. `[A-Z]{3}-\d{4}-[A-Z]{2}`; avoid leading 0 and O/I if you want scanner-safe. |
### GS1 prefixes
- Official table: [gs1.org/standards/id-keys/company-prefix](https://www.gs1.org/standards/id-keys/company-prefix) (rendered via Playwright; WebFetch gets 403). Copyright notice ([gs1.org/terms-use](https://www.gs1.org/terms-use)): reproduction allowed only "in unaltered form … for your personal, non-commercial use or use within your organisation"; "You are not permitted to re-transmit, distribute or commercialise the information or material without seeking prior written approval from GS1." → Do not copy the GS1 page. The prefix-to-country mapping is factual and also on Wikipedia ([List of GS1 country codes](https://en.wikipedia.org/wiki/List_of_GS1_country_codes), CC BY-SA 4.0 — avoid verbatim copy). Safe path: embed only the US/special ranges you need, written from the facts below.
- Ranges relevant to an en_US generator (from the GS1 page): 001–019, 030–039, 060–139 GS1 US (UPC-A compatible); 020–029 restricted circulation within a region; 040–049 restricted within a company; 050–059 GS1 US reserved; 200–299 restricted circulation (region); 952 "used for demonstrations and examples of the GS1 system"; 977 ISSN; 978–979 ISBN; 980 refund receipts; 981–983 coupons (common currency); 990–999 coupons. Prefixes do not identify country of origin. Selected others: 300–379 France, 400–440 Germany, 450–459 & 490–499 Japan, 500–509 UK, 690–699 China, 730–739 Sweden, 750 Mexico, 754–755 Canada, 760–769 Switzerland, 800–839 Italy, 840–849 Spain, 870–879 Netherlands, 880–881 South Korea, 890 India, 930–939 Australia, 940–949 New Zealand.
- Generator rule: for fake UPC/EAN use prefix `952` (GS1 demo) or a `2xx` restricted-circulation prefix — never a real company prefix; for US-looking UPC-A use number system 0–1/6–8 with a random 5-digit manufacturer code and accept that it may collide with real products.
## 12. Books, music, food
### Project Gutenberg catalog
- URL: `https://www.gutenberg.org/cache/epub/feeds/pg_catalog.csv` (20 MB) / `pg_catalog.csv.gz` (5.3 MB), regenerated weekly; also RDF (`rdf-files.tar.bz2`, 121 MB) and MARC.
- Fields: `Text#, Type, Issued, Title, Language, Authors, Subjects, LoCC, Bookshelves` (comma CSV, quoted; Authors as `Last, First, birth-death`, `;`-separated).
- Count (2026-09-17): 79 381 rows; Type: Text 78 130, Sound 1 114, Dataset 89, Image 33, other 12; Language: en 62 860, fr 4 190, fi 3 684, de 2 425, it 1 110.
- Licence: each RDF record carries `<cc:Work><cc:license rdf:resource="https://creativecommons.org/publicdomain/zero/1.0/"/>` → catalog metadata is CC0 1.0 (verified on `cache/epub/1/pg1.rdf`). The CSV itself has no header notice; treat as CC0 by the same source. Terms of use: do not hammer their servers (bulk feeds are the sanctioned path), "Project Gutenberg" is a trademark — royalties for commercial use of the *name*; do not brand the data file with it beyond a source citation.
- Embed: yes (CC0). For a fake-data library ship a filtered subset (Type=Text, Language=en, title + first author, maybe 5–10k rows) rather than 20 MB.
### Music genres and instruments
| Source | Licence | Embed? | Count | Notes |
|---|---|---|---|---|
| [MusicBrainz genre list](https://musicbrainz.org/genres) | Genre is a core entity (schema doc lists 13 core entities incl. Genre) → core data dump `mbdump.tar.bz2` is CC0. The genre→entity *associations* come via user tags (CC BY-NC-SA 3.0) — do not use those | Yes, names only | 2 202 (`/ws/2/genre/all?fmt=json`, `genre-count`) | WS API needs a descriptive User-Agent; list is a JSON array of `{id, name, disambiguation}` |
| [Discogs data dumps](https://data.discogs.com/) | CC0 | Yes | genre/style vocab is embedded in release XML (monthly dumps, GBs) — no standalone style list; UNVERIFIED count (~15 genres, ~600 styles from memory) | Impractical to extract; prefer MusicBrainz |
| ID3v1 genres | Names 0–79 from the 1999 ID3v1 spec, 80–125 Winamp, 126–191 Winamp 5.6 (2010) — a de-facto spec table, treated as public domain facts | Yes | 192 (0–191) | Wikipedia [List of ID3v1 genres](https://en.wikipedia.org/wiki/List_of_ID3v1_genres) (CC BY-SA page; the list itself is a spec enumeration). id3.org returned HTTP 500 during research — UNVERIFIED against the original spec page |
| Wikidata instruments | CC0 | Yes | 9 194 items `P31/P279* Q34379` with English labels; 2 372 with a Hornbostel–Sachs number (P1762) | Filter by P1762 for a clean orchestral/folk instrument list |
| Wikidata music genres | CC0 | Yes | 6 619 (`Q188451`) | Noisier than MusicBrainz |
### USDA FoodData Central
- Downloads: [fdc.nal.usda.gov/download-datasets](https://fdc.nal.usda.gov/download-datasets/) (April 2026 release):
- Foundation Foods: JSON 459 KB zip / 6.5 MB; CSV 3.7 MB zip / 32 MB — 394 foods (API `totalHits`, dataType=Foundation).
- SR Legacy (final, April 2018): JSON 12.3 MB zip / 205 MB; CSV 6.7 MB zip / 54 MB — 7 793 foods.
- FNDDS 2021-2023: CSV 200 MB zip / 1.6 GB — 5 432 foods.
- Branded: CSV 428 MB zip / 2.9 GB — 433 403 foods.
- Full: CSV 460 MB zip / 3.1 GB.
- Licence ([API guide](https://fdc.nal.usda.gov/api-guide/)): "USDA FoodData Central data are in the public domain and they are not copyrighted. They are published under CC0 1.0 Universal (CC0 1.0)". No permission needed; USDA *requests* listing FoodData Central as source and notifying them. Suggested citation: "U.S. Department of Agriculture, Agricultural Research Service. FoodData Central, 2019. fdc.nal.usda.gov."
- Embed: yes (CC0). Ship a derived list (SR Legacy `description` + `food_category`) not the raw dump.
- CSV structure (UNVERIFIED — the field-description PDF could not be text-extracted; from memory): `food.csv` (fdc_id, data_type, description, food_category_id, publication_date), `food_category.csv` (id, code, description), `nutrient.csv` (id, name, unit_name, nutrient_nbr, rank), `food_nutrient.csv` (id, fdc_id, nutrient_id, amount, …), `food_portion.csv`, `measure_unit.csv`, `sr_legacy_food.csv` (fdc_id, NDB_number), `foundation_food.csv`.
### Dishes, cuisines, drinks
| Source | Licence | Embed? | Count | Notes |
|---|---|---|---|---|
| Wikidata dishes (`Q746549`) | CC0 | Yes | 7 480 with English label | SPARQL `?i wdt:P31/wdt:P279* wd:Q746549` |
| Wikidata cuisines (`Q1968435`) | CC0 | Yes | 219 | |
| Wikidata cocktails (`Q134768`) | CC0 | Yes | 305 | |
| Wikidata beer (`Q44` subclass tree) / wine (`Q282`) | CC0 | Yes | 420 / 3 025 | Wine tree is mostly appellations/brands; filter by P279 depth |
| IBA official cocktails | IBA site "© IBA 2026 – All rights reserved"; Wikipedia list CC BY-SA 4.0 | Names only are facts (102 cocktails: 34 Unforgettables, 34 Contemporary Classics, 34 New Era, 2024 revision); do not copy recipes/descriptions | 102 | Safest: take the names from Wikidata (`P31 Q134768`) rather than the IBA page |
| [Open Brewery DB](https://github.com/openbrewerydb/openbrewerydb) | MIT (LICENSE, © 2025 Open Brewery DB) | Yes | 11 931 breweries (US 8 308, DE 1 445, AU 514, BE 478, CA 283, NZ 243) | `breweries.csv`: id (UUID), name, brewery_type (micro 5 906, brewpub 3 947, closed 644, planning 635, regional 240, contract 208, large 137, proprietor, taproom, bar, nano, cidery, beergarden), address_1..3, city, state_province, postal_code, country, phone, website_url, longitude, latitude. Real businesses — fine for names, but generating "fake" data with real addresses/phones may be undesirable |
| Wikipedia lists (cuisines, dishes, IBA) | CC BY-SA 4.0 | No verbatim copies | | |
## Summary of safe picks
- Countries: `datasets/country-codes` (PDDL) or `annexare/Countries` (MIT); flag emoji derived from alpha-2.
- Languages: `langs` / `iso-639-1` (MIT, 639-1 only).
- Subdivisions: US-only list from Census (public domain); skip world list.
- Commerce words: faker `en` lists (MIT). Check digits: implement from the rules above; GS1 prefix table: hand-write the few ranges needed, use `952`/`2xx` for generated barcodes; ISBN range file: do not embed.
- Books: Gutenberg `pg_catalog.csv` (CC0), filtered.
- Music: MusicBrainz genre names (CC0, 2 202), ID3v1 list (192), Wikidata instruments (CC0).
- Food: USDA FDC SR Legacy/Foundation descriptions (CC0, cite USDA), Wikidata dishes/cuisines (CC0), Open Brewery DB (MIT).
- Avoid: mledoze (ODbL), lukes (CC BY-SA), stefangabos (CC BY-SA/LGPL), Debian iso-codes (LGPL), SIL 639-3 table (no-redistribution clause), GS1/ISBN-International pages (all rights reserved), Wikipedia tables verbatim (CC BY-SA), MusicBrainz tag associations (CC BY-NC-SA).
+114
View File
@@ -0,0 +1,114 @@
# Open data sources for real Swedish geographic and postal-address data
Researched 2026-09-16. Goal: Sweden → län → kommun → tätort/postort → street, with real postal codes, embeddable in an MIT-licensed library.
## TL;DR
| Need | Best source | Licence | Embed in MIT repo? |
|---|---|---|---|
| Län + kommun names/codes | SCB `kommunlankod-2026.xlsx` | CC0 1.0 | Yes, no attribution needed |
| Population per kommun (weighting) | SCB PxWeb API `BE0101A/BefolkningNy` | CC0 1.0 | Yes |
| Tätorter (2,017) with code, kommun, län, population | SCB open geodata WFS/GeoPackage `stat:Tatorter_2023` + PxWeb `MI0810A/LandarealTatortN` | CC0 1.0 | Yes |
| Streets + house numbers + postnummer + postort + kommun + coordinates (~3.9M points) | Lantmäteriet *Belägenhetsadress Nedladdning, vektor* (STAC, GeoPackage per kommun) | CC BY 4.0 **plus** personal-data terms, purpose review, Basic-auth download | **Not as-is** — raw redistribution is bound by the personal-data terms; a derived aggregate (street ↔ postnummer ↔ postort, no house numbers) is the realistic path but needs a stated purpose approved by Lantmäteriet. Legal review needed. |
| postnummer → postort (list only) | GeoNames `SE.zip` (18,887 rows, 1,780 postorter) | CC BY 4.0 | Yes with attribution — but source is an undated third-party file, likely stale |
| Street names per kommun/postort without Lantmäteriet | Trafikverket NVDB *Gatunamn* (Lastkajen) | CC0 1.0 | Yes, but no postnummer; needs account to download |
| Street names | OpenStreetMap | ODbL 1.0 | Effectively no (share-alike on the extracted database) |
| Municipal address files | OpenAddresses `sources/se/*` (16 kommuner) | Mixed: CC0 (Göteborg, Malmö), CC BY 4.0 (Helsingborg), unspecified (Stockholm 2016 dump, Uppsala) | Per source |
| Postal code register (authoritative) | PostNord → Postnummerservice Norden AB / Geposit AB | Commercial; "resale/sublicensing not permitted" | No |
## 1. Lantmäteriet
Since 2025-02-03 the EU High Value Datasets (HVD) products are fee-free but Lantmäteriet explicitly says they are *not* "öppna data" because conditions attach ([Avgiftsfria produkter](https://www.lantmateriet.se/sv/geodata/vara-produkter/avgiftsfria-produkter/)). Two tiers exist:
- **Öppna data** — licence "Creative Commons, CC0" ([Öppna data](https://www.lantmateriet.se/sv/geodata/vara-produkter/avgiftsfria-produkter/oppna-data/)). Verified on Geotorget product pages for *Topografi 50/100/250/1M Nedladdning, vektor* ("Villkor: Creative Commons, CC0", "Juridisk prövning: Nej", GeoPackage, download in Geotorget or via the *Geotorget Nedladdning* API).
- **Värdefulla datamängder (HVD)** — licence **CC BY 4.0** per the terms document *Användningsvillkor för värdefulla datamängder* (DNR LM2025/009266 v1.0, 2025-02-01, [PDF](https://www.lantmateriet.se/globalassets/geodata/geodataprodukter/anvandningsvillkor_for_vardefulla_datamangder.pdf)). Products with personal data use *Användningsvillkor för värdefulla datamängder som innehåller personuppgifter* (DNR LM2025/009269 v1.1, 2025-03-04, [PDF](https://www.lantmateriet.se/globalassets/geodata/geodataprodukter/anvandningsvillkor_for_vardefulla_datamangder_pu.pdf)).
Per-product status (Geotorget product pages, rendered 2026-09-16):
| Product | Fee | Terms | Legal review | Access | Format |
|---|---|---|---|---|---|
| [Belägenhetsadress Nedladdning, vektor](https://geotorget.lantmateriet.se/geodataprodukter/belagenhetsadress-nedladdning-vektor-api) | 0 | HVD terms **with personal data** | **Yes** | STAC API `https://api.lantmateriet.se/stac-vektor/v1`, collection `belagenhetsadresser` | GeoPackage, one zip per kommun |
| [Belägenhetsadress Direkt](https://geotorget.lantmateriet.se/geodataprodukter/belagenhetsadress-direkt-api) | 0 | HVD terms with personal data | Yes | REST `https://api.lantmateriet.se/distribution/produkter/belagenhetsadress/v4.2` (OAuth2 via API portal) | JSON / XML |
| [Belägenhetsadress Nedladdning, Inspire](https://www.lantmateriet.se/sv/geodata/vara-produkter/produktlista/belagenhetsadress-nedladdning-inspire/) | 0 | HVD terms with personal data | Yes (3–5 working days extra for security review) | Atom feed, login | GML; SWEREF 99 TM / ETRS89; semi-annual |
| [Ortnamn Nedladdning, vektor](https://geotorget.lantmateriet.se/geodataprodukter/ortnamn-nedladdning-vektor-api) | 0 | HVD terms (no personal data) | No | STAC collection `ortnamn`, one national zip (58.5 MB) | GeoPackage |
| [Ortnamn Direkt](https://geotorget.lantmateriet.se/geodataprodukter/ortnamn-direkt-api) | 0 | HVD terms | No | REST `…/distribution/produkter/ortnamn/v2.2` | JSON / XML |
| Kommun, län och rike (administrativ indelning) | 0 | STAC says `CC-BY-4.0`; a Lantmäteriet HVD presentation (GISS, 2025-03-04) tables it as **CC0** ("CC0 används som licens för tjänster som är gemensamma för HVD och NGP … Kommun, Län och Rike") — **conflicting, unverified which prevails** | No | STAC collection `kommun-lan-rike` (zip ~6 MB, yearly + "aktuell"); OGC API Features `https://api.lantmateriet.se/ogc-features/v1/administrativ-indelning` (collections `kommuner`, `lan`, `rike`, plus `-2025`/`-2026`; items endpoint returns 401) | GeoPackage / GeoJSON |
| [Topografi 10 Nedladdning, vektor](https://geotorget.lantmateriet.se/geodataprodukter/topografi-10-nedladdning-vektor) | 0 | HVD terms with personal data | **Yes** | Geotorget download / API | GeoPackage |
| Topografi 50 / 100 / 250 / 1M Nedladdning, vektor | 0 | **CC0** | No | Geotorget download / *Geotorget Nedladdning* API | GeoPackage |
Notes:
- *Administrativ indelning* is not a standalone Geotorget product; it is the STAC collection `kommun-lan-rike`, the OGC API above, an [Inspire download](https://www.lantmateriet.se/sv/geodata/vara-produkter/produktlista/administrativ-indelning-nedladdning-inspire/) (Atom/WCS), or a layer in Topografi 100/250/1M (CC0). Topografi 1M also carries "tätortsgränser och tätortssymboler".
- The STAC catalog root and collection/item listings are public (HTTP 200, no auth); it self-describes: "avgiftsfria och får användas enligt creative commons licens CC BY 4.0. För vissa informationsmängder kommer din användning att prövas juridiskt … och du behöver då godkänna särskilda användningsvillkor." Asset downloads on `dl1.lantmateriet.se` return **401 Basic** — credentials are the Geotorget account (private person) or a system account (organisation). Private accounts are "endast för privat bruk" ([konto-privatperson](https://geotorget.lantmateriet.se/konto-privatperson)); an MIT library is not private use, so apply as an organisation.
- **Record count.** 290 STAC items (one per kommun), total 324 MB zipped. Smallest Bjurholm 143 KB, largest Stockholm 9.1 MB, Göteborg 8.9 MB, Malmö 4.9 MB. Fastighetsregistret held 3,882,361 valid addresses in 2022 (2,886,796 street addresses + 964,737 rural) per [SCB/LM presentation](https://kartografiska.se/wp-content/uploads/5C_Foretagsadresser_SCB_LM.pdf); the OSM import thread cites 3.7 M. So ~3.9 M address points, not 4–5 M.
- **Fields** (JSON schema `belagenhetsadress-4.2.2.json`, matches *Nationell specifikation Adress* v1.0.1): `kommunkod`, `kommunnamn`, `kommundel` (geografisk kommundel), `adressomrade` + `adressomradestyp` (gatuadressområde / metertalsadressområde / byadressområde), `gardsadressomrade`, `adressplatsnummer`, `bokstavstillagg`, `lagestillagg`/`lagestillaggsnummer`, `adressplatstyp`, `adressplatsbeteckning`, `postnummer`, `postort` (both "beslutas av PostNord AB", only on current addresses), `popularnamn`, `distriktskod`/`distriktsnamn`, `adressattAnlaggning`, `anmarkningstyp`/`anmarkningstext`, `registerenhetsreferens` (property link), `objektidentitet`, `objektstatus`, `versionGiltigFran`, `geometri` (SWEREF 99 TM point). No län field — derive from kommunkod (first two digits).
- Lantmäteriet treats addresses as personal data via Fastighetsregisterlagen § 6: usage only for the purpose approved in the application, EU/EEA-only storage, spot checks, revocation (terms PU §§ 3.3–4.2). The OSM community reports Lantmäteriet refused ODbL compatibility and OpenAddresses ([#7657](https://github.com/openaddresses/openaddresses/issues/7657), [#7608](https://github.com/openaddresses/openaddresses/issues/7608)) has not been able to include it; the OSM thread ([127427](https://community.openstreetmap.org/t/lantmateriet-belagenhetsadress/127427), 91 posts, last 2026-07-25) says one mapper got approval for a full 3.7 M import but no formal import has happened.
- **Attribution text required (CC BY 4.0 + terms § 3.1):** product name as data source, "©Lantmäteriet", whether the data was processed, and that CC BY 4.0 applies — may be placed in accompanying documentation/metadata.
- Ortnamn: name types include `Tätort` ("minst 200 invånare"), Bebyggelse, Trakt, Kyrka, Anläggning, nature names; Ortnamnsregistret holds ~980,000 names (Lantmäteriet, figure not re-verified). Not delivered as CSV.
## 2. SCB (Statistics Sweden)
- **Licence.** Statistics and geodata published as open data: "Creative Commons 0 1.0 Universal, CC0" ([användningsvillkor](https://www.scb.se/om-scb/om-scb.se-och-anvandningsvillkor)); since 2021-07-01. Optional credit "Källa: SCB" / "Source: Statistics Sweden"; do not cite SCB as source for data you have processed. API limit 10 requests / 10 s per IP.
- **Län and kommuner with codes.** 21 län, 290 kommuner ([lan-och-kommuner](https://www.scb.se/hitta-statistik/regional-statistik-och-kartor/regionala-indelningar/lan-och-kommuner/)). Download: `https://www.scb.se/contentassets/7a89e48960f741e08918e489ea36354a/kommunlankod-2026.xlsx` (18 KB, HTTP 200). Codes: län 2 digits (01 Stockholm … 25 Norrbotten), kommun 4 digits = län + 2 (0180 Stockholm).
- **Population per kommun.** PxWeb API `https://api.scb.se/OV0104/v1/doris/sv/ssd/START/BE/BE0101/BE0101A/BefolkningNy` — region dimension has 312 values (riket, 21 län, 290 kommuner), years 1968–2024 (verified 2026-09-16). Also `BE0101C/BefArealTathetKon` (density, 1991–2025).
- **Tätorter.** 2,017 tätorter in 2023 (WFS `resultType=hits` on `stat:Tatorter_2023` → `numberOfFeatures="2017"`; SCB also states 2,017). Open geodata: `https://geodata.scb.se/geoserver/stat/wfs` (WFS/WMS) and GeoPackage download ([statistiska tätorter](https://www.scb.se/vara-tjanster/oppna-data/oppna-geodata/statistiska-tatorter/)). Attributes: `tatortskod`, `tatort`, `kommun`, `kommunnamn`, `lan`, `lannamn`, `area_ha`, `bef` (population), `ar`. Population per tätort also in PxWeb `MI0810/MI0810A/LandarealTatortN` (2,827 region codes, every 5 years to 2023). Also `Smaorter_2023`, `DeSO_2025`, `RegSO_2025`.
## 3. Postal codes
- **Owner.** PostNord Sverige owns and operates the postnummer system; PTS is supervisory authority; a Postnummerråd approves changes 3–4 times a year (sv.wikipedia). Register management is delegated to **Postnummerservice Norden AB**, machine access via **Geposit AB**. Postnummerservice's [terms](https://postnummerservice.se/en/information/kopvillkor): "free use within your own organization", "resale of data is not permitted", "sublicensing to third parties is not permitted" — unusable for an open library.
- **No open list from PostNord, Lantmäteriet or Digg.** dataportal.se search for "postnummer" (2026-09-16) yields only Postnummerservice's own commercial catalogue entry ("Svenska postnummer och postorter", published 2012), Helsingborg's municipal postnummer polygons, and Lantmäteriet's Inspire address entry. The old dataportal community called the postnummer system "slarvats bort till ett privat bolag". GitHub CSVs (`zegl/sweden-zipcode`, `lapplandi/sveriges-postnummer`, `beshrkayali/sverige_postnummer`) state no licence or provenance — do not use.
- **Lantmäteriet addresses carry `postnummer` + `postort`** on every current address point (set by PostNord), so the address product is the only lawful open-ish route to a *complete, current* postnummer ↔ postort ↔ street mapping.
- **GeoNames `SE.zip`** ([readme](https://download.geonames.org/export/zip/readme.txt)): CC BY 4.0 ("a link on your website to www.geonames.org is ok"). Downloaded and counted: **18,887 rows, 18,887 distinct postnummer, 1,780 postorter, 22 admin1 values (21 län + blank), 285 admin2 (kommun code) values; 3,055 rows lack kommun; accuracy: 16,115 rows = 4 (centroid of postal code area), 389 = 1, 2,383 blank**. Fields: country, postal code (`111 64` with space), place name, admin1 name/code (län), admin2 name/code (kommun 4-digit), admin3, lat, lon, accuracy. The GeoNames sources page lists Sweden's source as `www.pellesoft.se/upload/program/prg00745.zip` with **no date** (URL now dead) — a hobbyist upload, so freshness is unknown; the row count (18.9 k) exceeds today's ~17 k total codes, indicating retired codes are still present. The zip is rebuilt daily (Last-Modified 2026-09-16) but that says nothing about the underlying data. 96 KB zipped.
- **Counts.** Postnummerservice: "~17 000 postal codes", "10 500 deliverable postal codes", "1 743 postal cities"; Kartanalys: 10,839 geographic postnummer, 1,740 postorter; Wikipedia: >16,100 areas (2008). Changes quarterly.
- **Structure** (sv/en Wikipedia): 5 digits written `NNN NN`. Lower numbers further south, except 1xx xx = Stockholm. First digit/tens: 10–19 Stockholm, 20–29 Skåne (Malmö 20–21), 30–39 southern Sweden, 40–49 Göteborg area (Göteborg 40–41), 50–59, 60–69, 70–79, 80–89, 90–99 progressively north to Norrbotten (98x). Postorter come in 2-, 3- or 5-position sizes; in two-position places the 3rd digit (in three-position the 4th) marks delivery type: 0 = boxes/postal, 1 = boxes/business, 2–4 and 6–7 = street delivery, 5 = rural (lantbrevbäring), 8 = reply mail, 9 = competitions/temporary — with exceptions in big cities. Box codes are therefore not street-deliverable and should be excluded when generating street addresses.
## 4. Streets
- **Lantmäteriet** — see § 1; `adressomrade` with `adressomradestyp = gatuadressområde` is the street name.
- **Trafikverket NVDB** — CC0 1.0 Universal since 2017-04-03 ([trafikverket.se](https://www.trafikverket.se/e-tjanster/hamta-data-fran-trafikverket/) links `creativecommons.org/publicdomain/zero/1.0/deed.sv`; [OSM wiki](https://wiki.openstreetmap.org/wiki/Sweden/trafikverket)). Data product **Gatunamn** = "det officiellt adressbildande namnet på gatan" (municipal decision); Trafikverket is cleaning it in 2026 so it holds only names used in street addresses ([Vägnamn i NVDB](https://www.nvdb.se/sv/aktuellt/nyhetsarkiv/2026/vagnamn-i-nvdb/)). Download via Lastkajen (registration with e-mail + accept licence; Shapefile/GeoPackage), or the Datautbytesportal API. Gives street ↔ kommun (and geometry) but **no postnummer/postort**. Record count not published on the pages checked.
- **OpenStreetMap** — ODbL 1.0. A list of street names extracted from OSM is a Derivative Database: "Where you make our data or any Derivative Database available to others, it must continue to be licensed under the ODbL" ([OSMF FAQ](https://osmfoundation.org/wiki/Licence/Licence_and_Legal_FAQ)); only *Produced Works* (maps etc.) escape share-alike. Embedding an OSM-derived JSON in an MIT repo therefore forces that data file to ODbL with attribution "© OpenStreetMap contributors" + link to openstreetmap.org/copyright, and downstream consumers inherit share-alike on the data. Not recommended.
- **OpenAddresses** — 16 Swedish sources, all municipal (`sources/se/municipality_of_*.json`: Alingsås, Gislaved, Göteborg, Helsingborg, Höganäs, Kalmar, Kristinehamn, Malmö, Nacka, Sävsjö, Stockholm, Uppsala, Västerås, Vaxholm, Växjö, Österåker). OA does not relicense; licence is per source. Checked: Göteborg **CC0 1.0** (attribution "Göteborgs stad", shapefile, `gatunamn`), Malmö **CC0 1.0** (CSV with `ADRESSOMR`, `ADRESSPLAT`, `POSTNR`, `POSTORT`, cached 2024-11), Helsingborg **CC BY 4.0** ("Helsingborgs stad", GeoJSON with Gatunamn/Postnummer/Stad), Uppsala attribution required, licence name not stated (ArcGIS REST), Stockholm **no licence field**, data is a 2016 cache of a defunct WS. Usable for a few big cities only; no national coverage.
- **Unique street-name counts.** SCB (Lägenhetsregistret 2019, [artikel](https://www.scb.se/hitta-statistik/artiklar/2021/pa-ringvagen-bor-det-flest/)): "Antalet gator eller vägar med en eller flera adresser är 399 175 i hela landet" — this is streets counted per place, not unique names. Most frequent: Ringvägen 205, Skogsvägen 204, Björkvägen 200, Skolgatan 196, Storgatan 180 (in 180 kommuner, 55,360 residents). A national unique-name count was not found; expect well under 399 k (probably 100–200 k) — **unverified**.
## 5. Sizes
| Level | Count | Source |
|---|---|---|
| Län | 21 | SCB |
| Kommuner | 290 | SCB; 290 STAC items |
| Tätorter (2023) | 2,017 | SCB WFS hits |
| Postorter | ~1,740–1,780 | Postnummerservice 1,743; Kartanalys 1,740; GeoNames 1,780 |
| Postnummer | ~17,000 total, ~10,500–10,840 deliverable/geographic | Postnummerservice, Kartanalys |
| Streets with addresses (per place) | 399,175 (2019) | SCB |
| Unique street names | not published; likely 100–200 k | unverified |
| Address points | ~3.9 M (3,882,361 in 2022) | Lantmäteriet/SCB |
| Lantmäteriet address GeoPackages | 324 MB zipped, 290 files | STAC |
| GeoNames SE.zip | 96 KB (18,887 rows) | download |
| Ortnamn national GeoPackage | 58.5 MB zipped; ~980 k names | STAC; Lantmäteriet |
Embedding suggestion (size-driven, before licence): län + kommun + population (~20 KB) and tätorter with population (~100 KB) are trivially embeddable under CC0. A postnummer→postort table is ~300 KB raw. A national (street, postort, postnummer-range) table at ~400 k rows is roughly 15–25 MB JSON, ~3–5 MB gzipped — optional download pack territory; a default pack could carry the top N streets per kommun (e.g. 20 × 290 ≈ 6 k rows, <300 KB).
## 6. Licence compatibility with an MIT repo
| Source | Licence | Embed? | Required notice |
|---|---|---|---|
| SCB codes, population, tätorter | CC0 1.0 | Yes | None; optional "Källa: SCB" |
| Lantmäteriet Topografi 50/100/250/1M (admin boundaries, tätort symbols) | CC0 | Yes | None (courtesy credit suggested) |
| Lantmäteriet Ortnamn | CC BY 4.0 + HVD terms (no personal data, no review) | Yes, data file stays CC BY 4.0 inside the MIT repo | "Källa: Ortnamn Nedladdning, vektor, ©Lantmäteriet, bearbetad, CC BY 4.0" (product name, ©Lantmäteriet, processed-flag, CC BY 4.0) |
| Lantmäteriet kommun-län-rike | CC BY 4.0 per STAC (CC0 per LM slide — unresolved) | Yes | Same attribution form as above unless CC0 is confirmed |
| Lantmäteriet Belägenhetsadress | CC BY 4.0 + personal-data terms, purpose approval, EU-only storage, revocable | **Only with an approved application** whose stated purpose covers deriving and publishing an aggregated street/postnummer/postort list under CC BY 4.0. Raw points (house numbers, property links) should not be redistributed. Get written confirmation from geodatasupport@lm.se; treat as unresolved until then. | Product name, ©Lantmäteriet, "bearbetad", CC BY 4.0 |
| GeoNames SE | CC BY 4.0 | Yes | Link/credit to www.geonames.org; note staleness |
| Trafikverket NVDB Gatunamn | CC0 1.0 | Yes | None |
| OpenStreetMap | ODbL 1.0 | Not practical (share-alike on the data) | "© OpenStreetMap contributors" + ODbL if ever used |
| OpenAddresses Göteborg, Malmö | CC0 1.0 | Yes | None (Göteborg asks credit "Göteborgs stad") |
| OpenAddresses Helsingborg | CC BY 4.0 | Yes | "Helsingborgs stad" |
| OpenAddresses Stockholm/Uppsala | unspecified | No | — |
| PostNord/Postnummerservice files | commercial, no redistribution | No | — |
CC BY 4.0 and CC0 data files can sit in an MIT repo; the MIT licence covers the code, and a `DATA-LICENSES.md`/NOTICE lists each dataset with its licence and the attribution above. CC BY 4.0 § 2(a)(5)(B) (no technical protection measures) is irrelevant for a plain JSON file.
## Could not verify
- Whether the kommun-län-rike collection is CC0 or CC BY 4.0 (sources disagree).
- Whether Lantmäteriet will approve an application whose purpose is publishing a derived open dataset; OSM/OpenAddresses experience suggests refusal is likely.
- GeoNames Sweden source date; assume stale.
- National count of unique street names; Gatunamn (NVDB) record count.
- Exact number of active postnummer today (three sources: ~17 k total / 10.5–10.8 k deliverable).
+208
View File
@@ -0,0 +1,208 @@
# Open geographic / postal-address data outside Sweden — for fejkdata (MIT)
Researched 2026-09-16. "Embeddable in MIT repo" below means: the data licence permits redistribution and commercial use with at most an attribution notice, so the data can ship inside an MIT-licensed package with a separate `DATA-LICENSES` file. Anything share-alike (ODbL, CC BY-SA) is flagged as **not** embeddable. Items marked *(unverified)* were not confirmed against a primary source.
## 0. Summary table
| Country | Official open address register | Licence | Addresses | Postcode in register | Postcode data open? | Embed in MIT? |
|---|---|---|---|---|---|---|
| US | DOT National Address Database (NAD) | US public domain | ~80 M (Jun 2026) | ZIP (optional field; fill rate *unverified*) | ZCTA yes (public domain); USPS publishes no open ZIP file | Yes |
| Norway | Kartverket Matrikkelen – Adresse | CC BY 4.0 | 2.58 M (Jun 2024) | Yes (postnummer + poststed) | Yes: Bring postnummerregister, NLOD 2.0 | Yes |
| Denmark | Danmarks Adresseregister (DAR) via DAWA / Datafordeler | CC BY 4.0 | ~3.8 M | Yes | Yes (in DAR; 1,089 postnumre) | Yes |
| Finland | DVV building addresses (final release Feb 2025) + Posti PCF/BAF | CC BY 4.0 / Posti terms (free; redistribute with terms attached) | ~5 M buildings | Yes | Yes (Posti PCF/BAF) | Yes (Posti: attach terms) |
| UK (GB) | No open *address* register. OS Open UPRN (points only), OS Open Names (streets/places/postcodes), Code-Point Open (postcodes) | OGL v3 | 40 M UPRNs (no addresses); 870 k roads; 1.7 M postcodes | n/a | Yes for GB (Code-Point Open, OGL); Northern Ireland restricted | Yes (GB only; no house numbers) |
| Germany | No national register. 15 Länder publish Hauskoordinaten/Gebäudereferenzen (dl-de/by-2-0, dl-de/zero-2-0); Bavaria missing | mixed, mostly permissive | ~19 M points across Länder | Yes in Hauskoordinaten | **No** — Deutsche Post DATAFACTORY is proprietary; open PLZ lists are OSM-derived (ODbL) | Partly (Länder files yes; a national PLZ list is the problem) |
| Netherlands | BAG (Kadaster/PDOK) | CC0 1.0 | ~9.9 M | Yes | Yes (in BAG) | Yes |
| France | Base Adresse Nationale (BAN) | Licence Ouverte / Etalab 2.0 | >25 M | Yes | Yes (BAN; La Poste "base officielle des codes postaux", open licence) | Yes |
| Spain | Catastro INSPIRE Addresses (AD) + INE callejero | Catastro own licence (free, attribution) / INE legal notice | ~15.7 M points (mailwoman count) | Yes (AD:PostCode) | Correos' postcode layer closed since 2017; postcodes still appear per address in Catastro AD | Probably (read Catastro licence PDF first) |
| Australia | G-NAF (Geoscape via data.gov.au) | EULA based on CC BY 4.0 + "no mail-out" restriction | 15.95 M (Aug 2026) | Yes | In G-NAF; Australia Post file is non-commercial only | Yes (with EULA notice) |
| Canada | StatCan National Address Register (NAR) 2024; ODA v1 (2021) | StatCan Open Licence / OGL-Canada | 17.1 M / ~10 M | NAR: MAIL_POSTAL_CODE "for most addresses" | Canada Post's postal code file is **proprietary**; only what NAR/ODA carry | Yes (NAR); postcode completeness unverified |
## 1. Per-country detail
### United States
**Official address register — National Address Database (NAD), US DOT**
- Licence: US public domain (`http://www.usa.gov/publicdomain/label/1.0/`), stated on data.gov: https://catalog.data.gov/dataset/national-address-database-nad-text-file. No attribution required. Embeddable.
- Size: ~80 M records; current release compiled 2026-06-30, dataset updated 2026-09-03. Sources: https://data.transportation.gov/dataset/National-Address-Database-NAD-Text-File/fc2s-wawr/about_data, https://www.placekey.io/datasets/national-address-database (80 M; "24 fields" in the text export).
- Coverage: aggregated from state/local providers; a mix of fully, partially and non-participating states (placekey page; the DOT page https://www.transportation.gov/gis/national-address-database blocks scrapers, so the coverage map was not read).
- Formats: zipped flat text and File Geodatabase. The text file is ordered by spatial cluster, not by OID.
- Fields (NAD schema https://www.transportation.gov/sites/dot.gov/files/2023-07/NAD_Schema_202304.pdf, blocked for bots; list taken from the FGDC content-requirements doc https://www.fgdc.gov/organization/working-groups-subcommittees/address-sc/220810-nad-content-requirements-approved.pdf): address number parts (`AddNum_Pre`, `Add_Number`, `AddNum_Suf`), street name parts (`St_PreDir`, `St_PreTyp`, `St_Name`, `St_PosTyp`, `St_PosDir`, `StNam_Full`), sub-address (`Building`, `Floor`, `Unit`, `Room`), place names (`Inc_Muni`, `Post_City`, `Census_Plc`, `Uninc_Comm`), `County`, `State`, `Zip_Code`, `Plus_4`, `Longitude`, `Latitude`, `NatGrid`, `Addr_Type`, `Placement`, `NAD_Source`, `DataSet_ID`. FGDC: "A Zip Code is recommended but not mandatory"; a complete place name and state are mandatory. Expect some records without ZIP.
- Census Address Count Listing files give housing-unit counts per block, not addresses: https://census.gov/geographies/reference-files/2025/geo/addcountlisting.html. The Census MAF itself is not public.
**Administrative hierarchy — Census Bureau (public domain)**
- States: 50 + DC + PR + 4 island areas = 56 FIPS state codes ("States & Equivalents: 56" in the 2020 tallies). ANSI list: https://www.census.gov/library/reference/code-lists/ansi/ansi-codes-for-states.html (also carries FM, MH, PW, UM).
- Counties: 3,144 in the 50 states + DC; 3,234 including PR and island areas (2020 tallies https://www.census.gov/geographies/reference-files/time-series/geo/tallies.html; https://en.wikipedia.org/wiki/List_of_United_States_counties_and_county_equivalents). Connecticut switched to 9 planning regions as county equivalents in 2022 — use a current vintage.
- Places: 19,734 incorporated places + 12,454 CDPs (2020 tallies, incl. PR/island areas); "approximately 19,500" incorporated places in the 50 states (https://www.census.gov/library/stories/2020/05/america-a-nation-of-small-towns.html).
- TIGER/Line 2025 shapefiles and the pipe-delimited **Gazetteer files** (2026 vintage: states, counties, county subdivisions, places, ZCTAs; GEOID, name, area, centroid lat/lon; **no population**): https://www.census.gov/geographies/reference-files/time-series/geo/gazetteer-files.html. Gazetteer excludes island areas, includes PR.
- Population per place: **SUB-EST2025** CSVs (incorporated places + MCDs, April 2020 base through July 2025, released May 2026): https://www.census.gov/data/tables/time-series/demo/popest/2020s-total-cities-and-towns.html. Public domain. The right file for population-weighted draws.
**Postal codes**
- USPS publishes no open ZIP list file; counts quoted 41,541–41,695 active ZIPs (https://facts.usps.com/42000-zip-codes/ says 41,554). Commercial "USPS-licensed" databases exist.
- Census **ZCTA**: 33,791 ZCTAs (2020), public domain, in TIGER + Gazetteer + relationship files (ZCTA↔place, ZCTA↔county): https://www.census.gov/programs-surveys/geography/technical-documentation/records-layout/2020-zcta-record-layout.html. PO-box-only ZIPs have no ZCTA (https://en.wikipedia.org/wiki/ZIP_Code_Tabulation_Area).
- GeoNames `US.txt` (CC BY 4.0): ZIP → place name, state, county, lat/lon. Count not stated on the site *(≈41 k, unverified)*.
**Street names**
- TIGER/Line `featnames` relationship files (per county) hold every feature name with prefix/suffix parts; joined to `edges` and `addrfeat` (address ranges). Public domain. No published count of unique street names *(unverified; must be computed)*.
- NAD `St_Name`/`StNam_Full` distinct per `Post_City` is the cheaper source for "real streets in Denver".
**Sizes for the embed-vs-download decision (US)**
| Level | Count | Source |
|---|---|---|
| States + DC + PR + island areas | 56 | Census tallies 2020 |
| Counties / equivalents | 3,144 (50+DC) / 3,234 (with PR + islands) | Census tallies, Wikipedia |
| Incorporated places | 19,734 (all) / ~19,500 (50+DC) | Census tallies |
| CDPs | 12,454 | Census tallies |
| ZCTAs / USPS ZIPs | 33,791 / ~41,500 | Census tallies / USPS facts |
| Address points (NAD) | ~80 M | DOT |
| OpenAddresses US collections | NE 2.35 GB + South 7.11 GB + West 8.54 GB + Midwest 4.86 GB (zipped CSV); 2,381 US sources | https://batch.openaddresses.io/ (2026-09) |
| Unique street names | unknown; compute from NAD/TIGER | — |
### Norway
- **Matrikkelen – Adresse** (Kartverket). Licence CC BY 4.0 (https://data.norge.no/en/datasets/8f1151bf-ad63-3e47-adbb-143f876776ee/matrikkelen-adresse; Geonorge register https://register.geonorge.no/inspire-statusregister/matrikkelen-adresse/73bc0329-faac-419b-80ff-d113c0ffe6a0). Formats: CSV, SOSI, GML, SQL/PostGIS, FGDB, Atom feed, REST API `https://api.kartverket.no/adresser/v1/`. Files per kommune (daily) and fylke/country (weekly).
- Counts (Kartverket "Antall vegadresser og matrikkeladresser", extract 2024-06-01, https://www.kartverket.no/datakvalitet/rapporter/adresse/Antall%20vegadresser%20og%20matrikkeladresser.xlsx): **2,577,825 addresses** — 2,536,663 vegadresser (street addresses) + 41,162 matrikkeladresser (cadastral, no street name).
- Fields (CSV): adressenavn (street), nummer, bokstav, postnummer, poststed, kommunenummer, kommunenavn, grunnkrets, tettsted, coordinates (EPSG:25833 / 4258); bruksenhetsnummer only in non-CSV formats. Fylke = first two digits of kommunenummer.
- Hierarchy: 15 fylker + Svalbard, 357 kommuner (2024). Kartverket/SSB code lists are open *(SSB Klass API licence NLOD, unverified)*.
- Postal codes: Bring/Posten **Postnummerregister** — postnummer, poststed, kommunenummer, kommunenavn, kategori; TAB text + xlsx; **NLOD 2.0** per data.norge.no (https://data.norge.no/en/datasets/5e6847ba-156d-4e14-85d3-8d7f8b727523/postnummer-i-norge). Updated annually (Sept/Oct). Embeddable.
- OpenAddresses: 17 `no/` sources.
### Denmark
- **Danmarks Adresseregister (DAR)**, served by **DAWA** (`https://api.dataforsyningen.dk/`) and Datafordeler. Licence **CC BY 4.0**, credit "Klimadatastyrelsen" (https://datafordeler.dk/vejledning/brugervilkaar/danmarks-adresseregister-dar/). Embeddable.
- Counts: ~3.8 M adresser (Klimadatastyrelsen DAWA report); DAWA today: **1,089 postnumre, 53,976 vejnavne, 99 kommuner, 5 regioner** (queried 2026-09-16 via `?format=csv`).
- Fields (DAWA `adresser`): vejnavn, husnr, etage, dør, postnr, postnrnavn, supplerende bynavn, kommunekode/-navn, regionskode/-navn, sogn, koordinater (ETRS89/WGS84), DAR ids. Downloads: CSV, JSON, GeoJSON, per kommune or whole country; `adgangsadresser` = access address (building entrance, no floor/door). Docs: https://dawadocs.dataforsyningen.dk/dok/adresser.
- Hierarchy: 5 regioner → 98 kommuner (99 rows incl. Christiansø) → postnumre/byer. All in DAWA.
- Postcodes: in DAR (source PostNord, updated on change), same licence.
- OpenAddresses: `dk/countrywide` (1 source).
### Finland
- No single address-register download today. Sources:
- **DVV (Digital and Population Data Services Agency) building address open data** — CC BY 4.0; final official release 2025-02-14, distribution ended 2025-03-14; archived copies (CSV/GeoPackage, ~5 M buildings: street fi/sv, house number, postal code, municipality, WGS84) at https://markuskainu.fi/posts/2025-02-03-dvv-rakennusten-osoitetiedot/. Successor: **SYKE/Ryhti building addresses** via OGC API Features, CC BY 4.0 (https://avoindata.suomi.fi/data/fi/dataset/syke-rakennusten-osoitteet-ogc-api-features) — page blocked the fetch; verify fields and bulk download before relying on it.
- **NLS (Maanmittauslaitos)** topographic database address points — CC BY 4.0 (https://www.maanmittauslaitos.fi/en/opendata-licence-cc40); address points computed from road-name data.
- **Digiroad** (Fintraffic since 2026-01-01) — CC BY 4.0; road names + address number ranges (https://vayla.fi/en/transport-network/data/digiroad).
- **Posti postal code files** (https://www.posti.fi/en/for-businesses/customer-support/postal-code-services; directory https://www.posti.fi/webpcode/): **PCF** (postal code, names fi/sv + abbreviations, type code, region code/name, municipality code/name fi/sv, language code; daily), **BAF** (every street per postal code with odd/even building-number ranges + municipality; weekly; excludes Åland), **POM** (monthly changes). Fixed-width `.dat`, Unix LF. Terms (service description 2015-01-01): "The files are freely downloadable … The data can be disclosed to third parties but it must be ensured that the recipient of the data is aware of the terms of use for the service as well as the download date." No licence name, no fee, no commercial restriction stated. Embeddable if the terms PDF + download date ship with the data.
- Hierarchy: Statistics Finland classifications, CC BY 4.0: Municipalities 2026 https://stat.fi/en/luokitukset/kunta/kunta_1_20260101, Regions 2026 https://stat.fi/en/luokitukset/maakunta/maakunta_1_20260101. Posti PCF also carries municipality + region codes.
- OpenAddresses: `fi/countrywide-fi`, `fi/countrywide-sv` + 38 municipal sources.
### United Kingdom (Great Britain; NI separate)
- No open full-address register (AddressBase is paid). Open pieces, all **OGL v3**, attribution "Contains OS data © Crown copyright and database right [year]" (https://wiki.openstreetmap.org/wiki/Ordnance_Survey_OpenData_Licence; OS moved to OGL v3 in 2015):
- **OS Open Names** — "over 870 000 named and numbered roads, nearly 44 000 settlements and over 1.6 million postcodes"; 34 attributes incl. `name1`, `name2` (Welsh/Gaelic), `type`, `local_type` (populatedPlace: City/Town/Village/Hamlet/Suburban Area/Other Settlement; transportNetwork: Named Road, Numbered Road, Section Of …; other: Postcode), `postcode_district`, `populated_place`, `district_borough`, `county_unitary`, `region`, `country`, `GEOMETRY_X/Y`. CSV/GML/GeoPackage, quarterly. https://docs.os.uk/os-downloads/products/addresses-and-names-portfolio/os-open-names. Gives street → settlement → district → county → region → country, but **no house numbers** and only the postcode district per road.
- **Code-Point Open** — ~1.7 M GB postcode units; fields Postcode, Positional_quality_indicator, Eastings, Northings, Country_code, NHS codes, Admin_county_code, Admin_district_code, Admin_ward_code. No street or locality names. GB only; NI excluded. https://docs.os.uk/os-downloads/products/areas-and-zones-portfolio/code-point-open.
- **OS Open UPRN** — ~40 M UPRN + coordinates, no addresses. https://www.ordnancesurvey.co.uk/products/os-open-uprn.
- **ONS Postcode Directory (ONSPD)** — postcode → all admin geographies; OGL, but requires Royal Mail attribution ("Contains Royal Mail data © Royal Mail copyright and database right [year]") and NI (BT) postcodes are end-user-licence only (no commercial redistribution): https://www.ons.gov.uk/methodology/geography/licences. Drop NI rows.
- Hierarchy codes: ONS GSS codes (countries, regions, counties/UAs, districts, wards) via the ONS Open Geography Portal, OGL. Population: ONS mid-year estimates (OGL) at local-authority level; settlement population must come from GeoNames/Wikidata.
- OpenAddresses: 0 `gb/` sources.
- Practical: a deliverable GB address needs street + number + postcode unit; open data gives street + postcode *district* only. "Real street in a real town with a plausible district" is achievable; a real full postcode for that street is not.
### Germany
- **No national open address register.** BKG sells "Georeferenzierte Adressdaten" commercially. Open data is per Land: Hauskoordinaten / Gebäudereferenzen from 15 Länder under dl-de/by-2-0, dl-de/zero-2-0 or CC BY 4.0; **Bavaria missing** (~13 M people) — https://github.com/sister-software/mailwoman/issues/2300 (19.3 M permissive points vs 20.3 M in an ODbL build). Example: NRW "Gebäudereferenzen NW", dl-de/zero-2-0, semi-annual, https://open.nrw/dataset/172a0ba8-d470-47c1-ac89-b85f8190ac7e. Thuringia is dl-de/by-2-0. OpenAddresses lists 14 `de/*/statewide` sources (bb, bw, hb, he, hh, mv, ni, nw, rp, sh, sl, sn, st, th) — no `by`; Berlin appears as a Geoportal source *(check)*.
- Hierarchy: **BKG VG250** (Land → Regierungsbezirk → Kreis → Verwaltungsgemeinschaft → Gemeinde with AGS keys; VG250-EW adds population), dl-de/by-2-0: https://gdz.bkg.bund.de/index.php/default/open-data/verwaltungsgebiete-1-250-000-stand-01-01-vg250-01-01.html. **Destatis Gemeindeverzeichnis GV100/GV-ISys** (all Gemeinden with AGS, population, area, PLZ of the Verwaltungssitz), quarterly ASCII/Excel: https://www.destatis.de/DE/Themen/Laender-Regionen/Regionales/Gemeindeverzeichnis/_inhalt.html — licence dl-de/by-2-0 *(not stated on that page; Destatis default, unverified)*. 16 Länder, ~400 Kreise, ~10,800 Gemeinden *(approx.)*.
- **Postal codes are the blocker**: Deutsche Post **DATAFACTORY** is proprietary and licensed for internal use only (https://www.deutschepost.de/de/d/deutsche-post-direkt/datafactory.html; a FragDenStaat request for the data was refused). Open PLZ lists (OpenPLZ API, yetzt/postleitzahlen, Geofabrik postcode polygons) are **OSM-derived → ODbL** (OpenPLZ sources page https://www.openplzapi.org/en/sources/: streets and PLZ from OSM, municipalities from Destatis GV100). GeoNames `DE.txt` provenance not stated *(unverified)*. The Länder Hauskoordinaten carry PLZ per address, so a PLZ↔Ort↔Straße table can be derived legitimately for the 15 covered Länder; GV100 gives one PLZ per Gemeinde seat.
- OpenAddresses: 32 `de/` sources.
### Netherlands
- **BAG** (Basisregistratie Adressen en Gebouwen), Kadaster. Licence **CC0 1.0** (https://data.overheid.nl/en/dataset/basisregistratie-adressen-en-gebouwen--bag-; OSM wiki: "released under a Public Domain license"). Embeddable, no attribution.
- ~9.9 M addresses (mailwoman count). Object types: panden, verblijfsobjecten, **nummeraanduidingen** (huisnummer + huisletter + toevoeging + postcode), **openbare ruimten** (streets), **woonplaatsen**. Fields yield street, number, postcode (4 digits + 2 letters), woonplaats, gemeente (CBS code), RD/WGS84 point.
- Download: BAG Extract XML (monthly full + mutations) and BAG GeoPackage via PDOK Atom `https://service.pdok.nl/lv/bag/atom/bag.xml`; REST API `https://api.pdok.nl/lv/bag/`. data.overheid.nl mentions distribution fees for some Kadaster products; the PDOK extract/GeoPackage is free.
- Hierarchy: 12 provincies → 342 gemeenten (2025) → ~2,500 woonplaatsen. CBS gebiedsindelingen (CC BY 4.0); CBS "Kerncijfers wijken en buurten" for population.
- Postcodes: in BAG since 2012 (CC0). PostNL's product is proprietary but unnecessary.
- OpenAddresses: `nl/countrywide` (1 source).
### France
- **Base Adresse Nationale (BAN)** — **Licence Ouverte / Etalab 2.0** since 2020-01-01 (https://fr.wikipedia.org/wiki/Base_adresse_nationale; https://adresse.data.gouv.fr/outils/telechargements). Embeddable with attribution.
- >25 M addresses. Downloads: CSV national / per département / per commune, "CSV with BAN ids", addok format; daily updates with weekly/monthly archives; also MVT/WFS/WMS. CSV fields `id, id_fantoir, numero, rep, nom_voie, code_postal, code_insee, nom_commune, code_insee_ancienne_commune, nom_ancienne_commune, x, y, lon, lat, type_position, alias, nom_ld, libelle_acheminement, nom_afnor, source_position, source_nom_voie, certification_commune, cad_parcelles` *(from BAN docs, not re-verified this session)*.
- Hierarchy: INSEE **Code Officiel Géographique** (18 régions, 101 départements, ~34,900 communes), Licence Ouverte; INSEE populations légales per commune (Licence Ouverte).
- Postal codes: in BAN; also La Poste **"Base officielle des codes postaux"** (commune → code postal → libellé d'acheminement, INSEE code), open licence, https://datanova.laposte.fr/datasets/laposte-hexasmal and https://www.data.gouv.fr/datasets/base-officielle-des-codes-postaux.
- OpenAddresses: 107 `fr/` sources (one per département, fed weekly from BAN).
### Spain
- **Catastro INSPIRE Addresses (AD)** — per-municipality GML via Atom `http://www.catastro.minhap.es/INSPIRE/Addresses/ES.SDGC.AD.atom.xml`, refreshed ~6-monthly; WFS `http://ovc.catastro.meh.es/INSPIRE/wfsAD.aspx`. Fields: ThoroughfareName, address number, `AD:PostCode` (5 digits), AdminUnitName (municipio, provincia), point at building entrance or parcel centroid. Coverage: 95% of Catastro territory, **excludes País Vasco and Navarra** (own cadastres; Navarra has OpenAddresses source `es/nc/statewide`). Licence: "licencia de cesión de derechos que se obtendrá de manera automática", free, attribution "© Dirección General del Catastro" (https://www.catastro.hacienda.gob.es/webinspire/documentos/Conjuntos%20de%20datos.pdf; https://www.catastro.hacienda.gob.es/webinspire/index.html). mailwoman labels it CC BY 4.0 (15.66 M points); the Catastro PDF does not say "CC BY" — **read the "Descripción de la licencia" PDF before embedding**.
- **INE Callejero del Censo Electoral** — VIAS, TRAMOS, PSEUDOVIAS, UNIDADES POBLACIONALES; ASCII ZIP, national + per province, Jan/Jul each year, `https://www.ine.es/prodyser/callejero/caj_esp/caj_esp_MMYYYY.zip` (https://datos.gob.es/en/catalogo/ea0010587-callejero-de-censo-electoral). Licence = INE aviso legal (free reuse with source citation *(unverified; page blocked)*). Whether TRAMOS carry código postal: *(unverified)*.
- **CartoCiudad (IGN/CNIG)** — addresses, postcodes, toponyms, admin units; CC BY 4.0 (https://datos.gob.es/es/aplicaciones/direcciones-postales-de-cartociudad-espana). Its postcode polygon layer came from Correos and was **withdrawn in 2017** (Correos now sells it, ~€6k/yr) — https://www.nosolosig.com/articulos/asi-hice-el-mapa-de-los-codigos-postales-de-espana-con-sig-y-datos-abiertos. Per-address postcodes remain in Catastro AD and CartoCiudad addresses.
- Hierarchy: 17 CCAA + 2 ciudades autónomas → 50 provincias → 8,132 municipios; INE padrón gives population per municipio; INE codes are open.
- OpenAddresses: `es/countrywide` (Catastro) + `es/nc/statewide` + 4 others.
### Australia
- **G-NAF** (Geoscape via data.gov.au, https://data.gov.au/data/dataset/geocoded-national-address-file-g-naf). August 2026: **15,949,543 addresses** (15,108,510 principal). Quarterly. PSV tables (~5 GB unpacked, many tables to join) + **G-NAF Core** single simplified table; GDA94 or GDA2020.
- Licence: **G-NAF End User Licence Agreement, "based on CC BY 4.0"**, plus: must not be used to compile addresses for sending mail unless each is verified against a secondary source; must follow the Australian Privacy Principles. Preferred attribution: "Incorporates or developed using G-NAF © Geoscape Australia licensed by the Commonwealth of Australia under the Open Geo-coded National Address File (G-NAF) End User Licence Agreement." Embeddable with the EULA text and that notice; the mail restriction is irrelevant to fake data but must be passed on.
- Fields: number first/last with prefix/suffix, flat/level, street name + type + suffix, locality, state, postcode, lat/lon, mesh block; LGA via ABS codes.
- Hierarchy: 8 states/territories → LGAs (~560) → localities (~15,000 in the G-NAF locality table). **ABS ASGS Edition 3** boundaries/allocation files, CC BY 4.0: https://www.abs.gov.au/statistics/standards/australian-statistical-geography-standard-asgs/edition-3-july-2021-june-2026/access-and-downloads/digital-boundary-files. Population: ABS ERP by SA2/LGA (CC BY 4.0).
- Postcodes: in G-NAF. Australia Post's postcode file is free only as a **non-commercial PDF**; CSV products are paid (https://auspost.com.au/business/services/data-services/address-data/postcode-data). ABS "Postal Areas" (2,644 POAs, CC BY 4.0) are mesh-block approximations.
- OpenAddresses: `au/countrywide` + 7 statewide + councils (58 sources).
### Canada
- **National Address Register (NAR)**, Statistics Canada — December 2024 release, **17.1 M** records, all 13 provinces/territories; two CSVs per province (addresses, locations). Licence **Statistics Canada Open Licence** (use, reproduce, distribute, sell, sublicense; attribution "Adapted from Statistics Canada, National Address Register, 2024. This does not constitute an endorsement by Statistics Canada of this product."): https://www.statcan.gc.ca/en/reference/licence; user guide https://www150.statcan.gc.ca/n1/pub/46-26-0002/462600022024002-eng.htm. Fields: `CIVIC_NO, CIVIC_NO_SUFFIX, OFFICIAL_STREET_NAME/TYPE/DIR, APT_NO_LABEL, MAIL_STREET_NAME/TYPE/DIR, MAIL_MUN_NAME, MAIL_PROV_ABVN, MAIL_POSTAL_CODE, CSD_CODE, CSD_ENG_NAME, CSD_FRE_NAME, PROV_CODE, REPPOINT_LATITUDE/LONGITUDE, BG_X/Y, BU_USE`. Postal code present "for most addresses" — completeness per province unverified. Embeddable.
- **Open Database of Addresses (ODA) v1** (2021), ~10 M records from 99 datasets, OGL-Canada, CSV per province, postal code where the provider had it: https://www.statcan.gc.ca/en/lode/databases/oda. Older; prefer NAR.
- Hierarchy: StatCan Standard Geographical Classification 2021 — 13 provinces/territories → 293 census divisions → ~5,160 census subdivisions (municipalities); population per CSD from Census 2021. StatCan Open Licence.
- **Postal codes are proprietary**: Canada Post asserts copyright, sells the file, and sued Geocoder.ca in 2012 (https://opennorth.ca/resources/open-postal-code-data/). StatCan's PCCF is licensed from Canada Post and not redistributable. GeoNames `CA.txt` = **FSA (first 3 chars) only**. Only NAR/ODA `MAIL_POSTAL_CODE` gives open per-address postal codes.
- OpenAddresses: `ca/countrywide` + 221 sources; Canada collection 1.25 GB.
## 2. Cross-country hierarchy sources
| Source | Licence | Content | Notes |
|---|---|---|---|
| Debian **iso-codes** (`iso_3166-1.json`, `iso_3166-2.json`; XML deprecated) | LGPL-2.1 (https://salsa.debian.org/iso-codes-team/iso-codes) | All ISO 3166-1 countries and 3166-2 subdivisions with codes, types, parents; 90+ translations | LGPL on a data file is awkward inside MIT; ship it as a separately-licensed data file or consume it only at build time. ISO's own OBP is not open. |
| **GeoNames** `admin1CodesASCII.txt`, `admin2Codes.txt` | CC BY 4.0 | admin1/admin2 names + geonameids per country | admin1 codes follow ISO 3166-2 for some countries and FIPS/numeric codes for others. |
| `amckenna41/iso3166-2` (PyPI) | MIT (code); data compiled from Wikipedia/RestCountries | 250 countries, >5,000 subdivisions with names, lat/lon | Convenient; provenance mixed. |
| Per-country official lists (section 1) | see country | authoritative codes + population | Preferred for the 11 target countries. |
## 3. Localities with population
| Source | Licence | Size | Fit |
|---|---|---|---|
| **GeoNames** `cities500/1000/5000/15000` + `allCountries` (https://download.geonames.org/export/dump/) | CC BY 4.0 (attribution to geonames.org) | cities500 ≈185 k, cities1000 ≈130 k, cities5000 ≈50 k, cities15000 ≈25 k; fields geonameid, name, asciiname, alternatenames, lat/lon, feature class/code (PPL, PPLA…), country, admin1–4 codes, population, timezone | Best single cross-country locality+population source; population uneven (many zeros). Embeddable with attribution. |
| **Census SUB-EST2025** (US) | public domain | ~19.5 k places | Authoritative US population. |
| **Wikidata** (P1082 population, P131 located-in, P281 postal code) | CC0 | all | No attribution; needs a SPARQL/dump pipeline; quality varies. |
| **Who's On First** (https://www.whosonfirst.org/docs/licenses/) | CC0 for WOF's own work; 312 sources ranging CC0…CC BY 3.0/4.0, OGL | localities, regions, counties with hierarchy + population where sourced | Attribution list is per source; no share-alike found. Heavy (one GeoJSON per record). |
| **dr5hn/countries-states-cities-database** (https://github.com/dr5hn/countries-states-cities-database) | **ODbL 1.0** | 250 countries, 5,299 states, 153,765 cities, 844,248 postcodes (125 countries) | **Share-alike → not embeddable in MIT.** Community-maintained; README: data "may contain errors or lag behind geopolitical changes"; issue tracker shows large re-parenting fixes (8,727 French cities). Not a source of truth. |
## 4. Postal codes — GeoNames and per-country openness
- **GeoNames postal** (https://download.geonames.org/export/zip/, CC BY 4.0): TSV fields `country code, postal code, place name, admin name1, admin code1, admin name2, admin code2, admin name3, admin code3, latitude, longitude, accuracy (1–6)`. ~100 countries. Readme caveats: Canada and Netherlands partial codes only (full NL/CA files separate); UK from Royal Mail (© Royal Mail 2022 — attribution needed); Ireland/Malta first letters only; Argentina 5 chars; Brazil only `-000` codes; Chile/China partial. Lat/lon is algorithmic (matched to a GeoNames toponym or averaged from neighbours) — a locality centroid, not the postcode's. Per-country provenance is not documented, so DE's origin is unknown.
| Country | Open? | Best open source |
|---|---|---|
| US | Yes (ZCTA, public domain); USPS list not a file | Census ZCTA + GeoNames US.txt |
| Norway | Yes (NLOD 2.0) | Bring postnummerregister; also in Matrikkelen |
| Denmark | Yes (CC BY 4.0) | DAWA `postnumre` (1,089) |
| Finland | Yes (Posti terms) | Posti PCF (codes) + BAF (streets per code) |
| UK | GB yes (OGL, Code-Point Open); NI restricted | Code-Point Open + OS Open Names |
| Germany | **No** (Deutsche Post proprietary); OSM lists are ODbL | Derive PLZ↔Ort↔Straße from Länder Hauskoordinaten (15 Länder); GV100 for seat PLZ |
| Netherlands | Yes (CC0, in BAG) | BAG |
| France | Yes (Licence Ouverte) | La Poste hexasmal + BAN |
| Spain | Polygon layer closed since 2017; per-address codes open via Catastro AD (own licence) | Catastro AD `AD:PostCode`; INE callejero |
| Australia | In G-NAF (EULA/CC BY 4.0); Australia Post file paid/non-commercial | G-NAF locality table |
| Canada | **No** (Canada Post proprietary; GeoNames FSA only) | NAR `MAIL_POSTAL_CODE` where present |
## 5. OpenAddresses and OpenStreetMap
**OpenAddresses** (https://openaddresses.io/, https://batch.openaddresses.io/)
- Global collection 48.39 GB (2026-09-07); US in 4 regional collections (table in section 1); Canada 1.25 GB. 3,282 sources (1,586 flagged "need attention"). Sources per country in the batch list: US 2,381, CA 222, FR 107, AU 58, FI 40, DE 32, NO 17, ES 6, DK 1, NL 1, GB 0.
- Licensing: the repo LICENSE (BSD-3) covers source definitions only. **Each source keeps its own licence**, recorded in the source JSON and `state.txt`; "most sources only require attribution", but several are share-alike (ODbL, CC BY-SA) — e.g. OSM-derived and some municipal sources (https://geocode.earth/docs/reference/data_sources/). For MIT: filter by the per-source licence field, keep PD/CC0/CC BY/OGL/dl-de sources, generate the attribution file from `state.txt`. The old results.openaddresses.io coverage page is frozen at mid-2021.
- The official registers above are themselves the OA sources for NO/DK/FI/NL/FR/ES/AU (and NAD/state sources for the US); going to the register directly gives cleaner licensing and fresher data. OA's value is one uniform CSV schema (`LON,LAT,NUMBER,STREET,UNIT,CITY,DISTRICT,REGION,POSTCODE,ID,HASH`).
**OpenStreetMap** — ODbL 1.0
- Any *substantial* extract (systematic, >100 features, or an area with >1,000 inhabitants) is a Derivative Database; distributing it — including embedded in a library — requires offering it under ODbL (share-alike) plus attribution. OSMF guideline: https://osmfoundation.org/wiki/Licence/Community_Guidelines/Substantial_-_Guideline ("village map OK, town map not OK"; repeated small extractions count as one).
- Consequence: an embedded street/postcode list derived from OSM (OpenPLZ, Geofabrik postcode polygons, yetzt/postleitzahlen, OSM-derived dr5hn rows) cannot ship inside an MIT package without that data file being ODbL and tracked as a separate database; downstream users mixing it into their databases inherit share-alike. Keep OSM out of the default; at most an *optional* download pack clearly labelled ODbL.
## 6. Embed vs. optional download — sizes and a recommendation
**US (ships by default with en_US)**
- Embed (small, public domain): 56 states (+ USPS abbreviations, FIPS), 3,234 counties (GEOID, name, state), ~19.5 k incorporated places with population + county + lat/lon (SUB-EST2025 joined to the Gazetteer), 33,791 ZCTAs with the ZCTA→place/county relationship, and a compact **street-name pool per place** derived from NAD (distinct `St_Name`+`St_PosTyp` per `Post_City`/`State`, top-N by frequency). Places+ZCTAs ≈ 2–4 MB gzipped; a street pool for all ~19.5 k places would run to tens of MB — cap to the ~1,000 largest places or ~20 streets per place for the default pack.
- Download pack: full NAD (~80 M rows, multi-GB), TIGER `featnames`/`addrfeat` per county, OA US collections (~23 GB zipped). Real house numbers + ZIP+4 come only from here.
- Deliverability caveat: NAD ZIP is optional, and place naming mixes `Post_City` (USPS city) with `Inc_Muni`; use `Post_City` + `Zip_Code` for mailing realism.
**Other countries** — same shape: embed hierarchy + localities-with-population + postcode↔locality table (a few MB per country: NO's 2.6 M addresses collapse to ~4.5 k postcodes and ~90 k street names; DK 1,089 postcodes / 54 k street names; NL/FR/AU similar), with street pools for the largest localities; keep full address points as download packs fetched from the official Atom/CSV endpoints at runtime, never vendored (G-NAF ~5 GB, BAN CSV ~2 GB, BAG ~2 GB, NAR ~1 GB).
**Licence file needed in the repo** (`DATA-LICENSES.md`): CC BY 4.0 (GeoNames, Kartverket, Klimadatastyrelsen, Statistics Finland, DVV/SYKE, NLS, ABS, CartoCiudad), NLOD 2.0 (Bring), OGL v3 (OS, ONS), Licence Ouverte 2.0 (BAN, La Poste, INSEE), G-NAF EULA notice, StatCan Open Licence notice, dl-de/by-2-0 and dl-de/zero-2-0 (BKG, Länder), Posti terms + download date, Catastro "© Dirección General del Catastro". CC0/public domain (US Census, DOT NAD, BAG, Wikidata) need nothing but are worth listing.
## 7. Open questions / unverified
- NAD ZIP fill rate and the list of non-participating states (DOT site blocks fetches; read the NAD coverage map manually).
- Unique US street-name count — compute from NAD once downloaded.
- Catastro licence text ("Descripción de la licencia" PDF) — confirm redistribution inside a software package.
- INE aviso legal wording; whether callejero TRAMOS include código postal.
- Destatis GV100 licence statement; Berlin/Bayern Hauskoordinaten status.
- SYKE/Ryhti address API fields and bulk-download availability (avoindata.fi blocked the fetch).
- NAR `MAIL_POSTAL_CODE` completeness per province.
- GeoNames DE/US postal-code provenance and counts.
- BAN CSV field list re-verification.
+287
View File
@@ -0,0 +1,287 @@
# Fake-data libraries: data-category inventory
Researched 2026-09-16. Sources: official docs and current `master`/`main`/`next` source trees. "Big four" = @faker-js/faker (JS), Faker (Python), gofakeit (Go), Datafaker (Java). Abbreviations in tables: **JS**, **PY**, **GO**, **DF**, **BG** (Bogus), **MM** (Mimesis), **CH** (Chance), **RB** (Ruby faker).
## 1. Category modules and their generators
Legend: names are the library's own identifiers (camelCase = JS/DF/BG, snake_case = PY/MM/RB, PascalCase = GO). Columns list what each library offers under that module; a `—` means the module does not exist there.
### person
| Lib | Generators |
|---|---|
| JS | firstName, lastName, middleName, fullName, prefix, suffix, sex, sexType, gender, bio, jobArea, jobDescriptor, jobTitle, jobType, zodiacSign (all name methods take `sex: female|male|generic`) |
| PY | first_name/_female/_male/_nonbinary, last_name/_female/_male/_nonbinary, name/_female/_male/_nonbinary, prefix/_female/_male/_nonbinary, suffix/_female/_male/_nonbinary, language_name; separate providers: job (job, job_female, job_male), ssn (ssn; per-locale variants: vat_id, itin, ein, nif, cpf, personnummer …), passport (passport_number, passport_dob, passport_owner), profile (profile → job, company, ssn, residence, current_location, blood_group, website, username, name, sex, address, mail, birthdate; simple_profile) |
| GO | Person (struct), Name, NamePrefix, NameSuffix, FirstName, MiddleName, LastName, Gender, Age, Ethnicity, SSN, EIN, Hobby, SocialMedia, Bio, Contact, Email, Phone, PhoneFormatted, Teams |
| DF | Name: name, nameWithMiddle, fullName, firstName, femaleFirstName, maleFirstName, lastName, prefix, suffix, title, username; Demographic: race, educationalAttainment, demonym, sex, maritalStatus; Gender; Pronouns; BloodType; Mbti; Zodiac; Relationship; Hobby; Mood; Job; Passport; DrivingLicense; IdNumber (valid/invalid per country: US SSN, SE, ZA, SG FIN/UIN, CN, PT NIF, MX, PL PESEL, KR RRN, GE); CPF/CNPJ (BR); Nigeria; Australia |
| BG | Name: FirstName, LastName, FullName, Prefix, Suffix, FindName, JobTitle, JobDescriptor, JobArea, JobType; Person object (Gender, FirstName, LastName, FullName, UserName, Avatar, Email, DateOfBirth, Address, Phone, Website, Company); country extensions: Ssn/Ein (US), Personnummer/Samordningsnummer (SE), Cpr (DK), Henkilotunnus (FI), Fodselsnummer (NO), Pesel/Nip/Regon (PL), CodiceFiscale (IT), Cpf/Cnpj (BR), Sin (CA), Nino (GB), Cnp (RO), NationalNumber (BE), Nif/Nipc (PT) |
| MM | Person: first_name, surname/last_name, patronymic, full_name, name, title, username, password, email, birthdate, gender, gender_symbol, gender_code, sex, height, weight, blood_type, occupation, nationality, university, academic_degree, language, phone_number, telephone, identifier |
| CH | first, last, name, prefix, suffix, gender, age, birthday, ssn, cpf, cf (IT codice fiscale), profession |
| RB | Name (name, name_with_middle, first_name, male_first_name, female_first_name, neutral_first_name, last_name, prefix, suffix, initials), Gender, Demographic, IDNumber (per-country), Job, Relationship, Blood, DrivingLicence, Avatar, ChileRut, SouthAfrica, NationalHealthService |
### address / location
| Lib | Generators |
|---|---|
| JS (location) | buildingNumber, cardinalDirection, city, continent, country, countryCode, county, direction, language, latitude, longitude, nearbyGPSCoordinate, ordinalDirection, postalAddress, secondaryAddress, state({abbreviated}), street, streetAddress, timeZone, zipCode({state, format}) |
| PY (address) | address, building_number, city, city_suffix, country, country_code, current_country, current_country_code, postcode, street_address, street_name, street_suffix; locale extras e.g. en_US: city_prefix, secondary_address, administrative_unit, state_abbr, zipcode_plus4, postcode_in_state, military_ship/state/apo/dpo; ja_JP: prefecture, city, town, chome, ban, gou, building_name; fr_FR: department, department_name, department_number, region; es_ES: region/autonomous_community; de_DE: city_with_postcode, street_suffix_short/long; en_GB: county; separate **geo** provider: coordinate, latitude, longitude, latlng, local_latlng(country), location_on_land (real geonames.org places with tz) |
| GO (address) | Address (struct), City, Country, CountryAbr, State, StateAbr, Street, StreetName, StreetNumber, StreetPrefix, StreetSuffix, Unit, Zip, Latitude, LatitudeInRange, Longitude, LongitudeInRange |
| DF (Address) | streetName, streetAddressNumber, streetAddress, secondaryAddress, zipCode, postcode, eircode, zipCodePlus4, zipCodeByState, countyByZipCode, streetSuffix, streetPrefix, citySuffix, cityPrefix, city, cityName, state, stateAbbr, latitude, longitude, latLon, lonLat, timeZone, country, countryCode, buildingNumber, fullAddress, mailBox; plus Country (name, code2/3, capital, currency, flag), Nation (nationality, language, capital, flag), Compass, Mountain, Planet, Space, Locality (locale codes) |
| BG (Address) | ZipCode, City, StreetAddress, CityPrefix, CitySuffix, StreetName, BuildingNumber, StreetSuffix, SecondaryAddress, County, Country, FullAddress, CountryCode, State, StateAbbr, Latitude, Longitude, Direction, CardinalDirection, OrdinalDirection; premium Bogus.Locations: GPS, altitude, depth, geohash |
| MM (Address) | street_number, street_name, street_suffix, secondary_address, address, state/region/province/federal_subject/prefecture (abbr), postal_code/zip_code, country, country_code (A2/A3/numeric), country_emoji_flag, default_country, city, latitude, longitude, coordinates (DMS option), continent, calling_code/isd_code, iata_code, icao_code |
| CH | address, street, city, zip, postal (CA), postcode (GB), state, province, country, areacode, phone, latitude, longitude, altitude, depth, coordinates, geohash, locale |
| RB | city, street_name, street_address, secondary_address, building_number, mail_box, community, zip_code(state_abbreviation:), zip, postcode, time_zone, street_suffix, city_suffix, city_prefix, state, state_abbr, country, country_by_code, country_name_to_code, country_code, country_code_long, latitude, longitude, full_address, full_address_as_hash; Travel: airport, train_station; Locations: australia |
### company
| Lib | Generators |
|---|---|
| JS | name, buzzAdjective, buzzNoun, buzzPhrase, buzzVerb, catchPhrase, catchPhraseAdjective, catchPhraseDescriptor, catchPhraseNoun (locale data: adjective, descriptor, noun, legal_entity_type, name_pattern) |
| PY | company, company_suffix, catch_phrase, bs; locale extras (e.g. it_IT/pl_PL company_vat, nl_NL, ru_RU large_company, etc.) |
| GO | Company, CompanySuffix, BS, Blurb, BuzzWord, Slogan, Job, JobDescriptor, JobLevel, JobTitle |
| DF | Company: name, suffix, industry, profession, buzzword, catchPhrase, bs, logo, domainName, url; Business; Brand; IndustrySegments; Marketing; Team; Restaurant; Subscription; Twitter; University; Educator |
| BG | CompanySuffix, CompanyName, CatchPhrase, Bs |
| MM | Finance.company, company_type |
| CH | company, profession |
| RB | Company (name, suffix, industry, profession, type, catch_phrase, buzzword, bs, logo, ein, duns_number, swedish_organisation_number, czech_organisation_number, french_siren/siret, norwegian/australian/spanish/polish/russian/south_african/brazilian ids …), Business, Marketing, IndustrySegments, Team, University, Educator, Restaurant, Subscription, Construction |
### internet
| Lib | Generators |
|---|---|
| JS | displayName, domainName, domainSuffix, domainWord, email, exampleEmail, emoji, httpMethod, httpStatusCode, ip, ipv4, ipv6, jwt, jwtAlgorithm, mac, password, port, protocol, url, userAgent, username |
| PY | email, safe_email, free_email, company_email, ascii_* variants, free_email_domain, domain_name, domain_word, safe_domain_name, tld, hostname, dga, http_method, http_status_code, iana_id, image_url, ipv4, ipv4_network_class, ipv4_private, ipv4_public, ipv6, mac_address, nic_handle(s), port_number, ripe_id, slug, uri, uri_extension, uri_page, uri_path, url, user_name; user_agent provider (chrome, firefox, safari, opera, internet_explorer, platform tokens); emoji provider |
| GO | URL, UrlSlug, DomainName, DomainSuffix, IPv4Address, IPv6Address, MacAddress, HTTPStatusCode(Simple), HTTPMethod, HTTPVersion, LogLevel, UserAgent (+Chrome/Firefox/Opera/Safari/API), Username, Password, Emoji (+22 category fns), InputName, Svg |
| DF | Internet: username, emailAddress(name), safeEmailAddress, emailSubject, domainName/Word/Suffix, url, webdomain, image, httpMethod, password(opts), port, macAddress, ipV4Address, privateIpV4Address, publicIpV4Address, ipV4Cidr, ipV6Address, ipV6Cidr, slug, uuidv3/4/7, userAgent, botUserAgent; Http; Domain; Sip; Emoji; SlackEmoji; Credentials; Aws; Azure; Hashing; Fingerprint; Computer; Device; Camera; Drone; Robin |
| BG | Avatar, Email, ExampleEmail, UserName, UserNameUnicode, DomainName, DomainWord, DomainSuffix, Ip, Port, IpAddress, IpEndPoint, Ipv6, UserAgent, Mac, Password, Color, Protocol, Url, UrlWithPath, UrlRootedPath |
| MM | Internet: content_type, dsn, http_status_message/code, http_method, ip_v4/v6 (+object, cidr, with_port, special), cloud_region, asn, mac_address, hostname, url, uri, query_string/parameters, tld, user_agent, port, path, slug, public_dns, http_request/response_headers |
| CH | avatar, color, domain, email, fbid, google_analytics, hashtag, ip, ipv6, klout, tld, twitter, url |
| RB | Internet (email, username, password, domain_name, ip_v4/v6, mac_address, url, slug, user_agent, uuid, bot_user_agent …), Internet::HTTP, Omniauth, Stripe, X (Twitter), Avatar, Placeholdit, LoremFlickr |
### finance / payment / bank
| Lib | Generators |
|---|---|
| JS | accountName, accountNumber, amount, bic, bitcoinAddress, creditCardCVV, creditCardIssuer, creditCardNumber, currency, currencyCode, currencyName, currencyNumericCode, currencySymbol, ethereumAddress, iban, litecoinAddress, pin, routingNumber, transactionDescription, transactionType |
| PY | bank: aba, bank, bank_country, bban, iban, swift, swift8, swift11; credit_card: credit_card_number, credit_card_provider, credit_card_expire, credit_card_security_code, credit_card_full; currency: currency, currency_code, currency_name, currency_symbol, cryptocurrency(_code/_name), pricetag |
| GO | Price, CreditCard, CreditCardCvv, CreditCardExp, CreditCardNumber, CreditCardType, Currency, CurrencyLong, CurrencyShort, AchRouting, AchAccount, BitcoinAddress, BitcoinPrivateKey, BankName, BankType, Cusip, Isin |
| DF | Finance: creditCard(type), bic, iban(country), ibanSupportedCountries, usRoutingNumber; Money: currency, currencyCode, currencyNumericCode, currencySymbol; Currency; Stock; FinancialTerms; CryptoCoin; Coin; Business |
| BG | Account, AccountName, Amount, TransactionType, Currency, CreditCardNumber, CreditCardCvv, BitcoinAddress, EthereumAddress, RoutingNumber, Bic, Iban; GB SortCode, VatNumber |
| MM | Finance: bank, currency_iso_code, currency_symbol, cryptocurrency_iso_code/_symbol, price, price_in_btc, stock_ticker, stock_name, stock_exchange; Payment: cid, bitcoin_address, ethereum_address, credit_card_network/number/expiration_date, cvv, credit_card_owner |
| CH | cc, cc_type, currency, currency_pair, dollar, euro, exp, exp_month, exp_year |
| RB | Finance (credit_card, vat_number, ticker, stock_market), Bank (name, swift_bic, iban, account_number, routing_number, bsb_number), Currency, Crypto, Blockchain (bitcoin, ethereum, tezos, aeternity), Invoice, Stripe, Coin |
### commerce / product
| Lib | Generators |
|---|---|
| JS | department, isbn, price, product, productAdjective, productDescription, productMaterial, productName, upc |
| PY | barcode: ean, ean8, ean13, localized_ean*; isbn: isbn10, isbn13; sbn; (no product/commerce provider in core; community Ecommerce provider) |
| GO | Product (struct), ProductName, ProductDescription, ProductCategory, ProductFeature, ProductMaterial, ProductUPC, ProductAudience, ProductDimension, ProductUseCase, ProductBenefit, ProductSuffix, ProductISBN |
| DF | Commerce: department, productName, material, brand, vendor, price(min,max), promotionCode; Barcode; Code (isbn10/13, gtin8/13, ean, asin, imei); Appliance; GarmentSize; Size; Tire; House; ElectricalComponents |
| BG | Department, Price, Categories, ProductName, Color, Product, ProductAdjective, ProductMaterial, Ean8, Ean13 |
| MM | Code: locale_code, issn, isbn, ean, imei, pin |
| CH | — |
| RB | Commerce (color, department, material, product_name, price, promotion_code, brand, vendor), Barcode, Code (isbn, ean, asin, imei, npi, nric, rut, sin), Appliance, Device, Camera, House |
### vehicle / transport
| Lib | Generators |
|---|---|
| JS | bicycle, color, fuel, manufacturer, model, type, vehicle, vin, vrm; airline: aircraftType, airline, airplane, airport, flightNumber, recordLocator, seat |
| PY | automotive: license_plate, vin (per-locale plate formats) |
| GO | Car (struct), CarMaker, CarModel, CarType, CarFuelType, CarTransmissionType; Airline*: AircraftType, Airplane, Airport, AirportIATA, FlightNumber, RecordLocator, Seat |
| DF | Vehicle: vin, manufacturer, make, model(make), makeAndModel, style, color, upholstery(+Color/Fabric), transmission, driveType, fuelType, carType, engine, carOptions, standardSpecs, doors, licensePlate(state); Aviation; Transport; DrivingLicense |
| BG | Vin, Manufacturer, Model, Type, Fuel; GbRegistrationPlate |
| MM | Transport: manufacturer, car, airplane, vehicle_registration_code(locale) |
| CH | — |
| RB | Vehicle (vin, manufacture, make, model, make_and_model, style, color, transmission, drive_type, fuel_type, car_type, engine, car_options, standard_specs, doors, door, year, mileage, license_plate, singapore_license_plate, version), Drone, Travel::Airport, Travel::TrainStation |
### lorem / text / words
| Lib | Generators |
|---|---|
| JS | lorem: lines, paragraph(s), sentence(s), slug, text, word(s); word: adjective, adverb, conjunction, interjection, noun, preposition, sample, verb, words; hacker: abbreviation, adjective, ingverb, noun, phrase, verb; string: alpha, alphanumeric, binary, fromCharacters, hexadecimal, nanoid, numeric, octal, sample, symbol, ulid, uuid |
| PY | lorem: word(s), sentence(s), paragraph(s), text(s), get_words_list; misc: password, md5, sha1, sha256, binary, boolean, null_boolean, csv/dsv/psv/tsv, fixed_width, json, json_bytes, image, tar, zip, uuid4 |
| GO | Word families: Noun* (Common/Concrete/Abstract/Collective*/Countable/Uncountable/Proper/Determiner), Verb* (Action/Linking/Helping/Transitive/Intransitive), Adverb* (Manner/Degree/Place/Time*/Frequency*), Preposition* (Simple/Double/Compound), Adjective* (8 kinds), Pronoun* (8 kinds), Connective* (6 kinds), Word, Interjection, Sentence, Paragraph, LoremIpsum{Word,Sentence,Paragraph}, Question, Quote, Phrase{,Noun,Verb,Adverb,Preposition}, Comment; Hacker*, Hipster{Word,Sentence,Paragraph}; Letter(N), Digit(N), Vowel, Lexify, Numerify, RandomString, ShuffleStrings |
| DF | Lorem (word(s), sentence(s), paragraph(s), characters, fixedString, maxLengthSentence, supplemental), Text (character, upper/lowercase, text with symbol rules), Verb, Word, Hacker, Hipster, Shakespeare, Yoda, Joke, ChuckNorris, Matz, NatoPhoneticAlphabet, FunnyName, Marketing |
| BG | Lorem: Word(s), Letter, Sentence(s), Paragraph(s), Text, Lines, Slug; Hacker: Abbreviation, Adjective, Noun, Verb, IngVerb, Phrase; Rant: Review(s) |
| MM | Text: alphabet, level, text, sentence, title, words, word, quote, color, hex_color, rgb_color, answer, emoji |
| CH | paragraph, sentence, syllable, word, character, letter, string |
| RB | Lorem (word(s), character(s), sentence(s), paragraph(s), question(s), paragraph_by_chars, multibyte), Markdown, Hipster, Hacker, Adjective, Verbs, Quote, Quotes::Shakespeare/Chiquito/Rajnikanth, ChuckNorris, Emotion, Source (code snippets), Html, Json, Types, Alphanumeric, String, Boolean, NatoPhoneticAlphabet |
### date / time
| Lib | Generators |
|---|---|
| JS | anytime, between, betweens, birthdate({mode: age|year}), future, past, recent, soon, month, weekday, timeZone (locale data: month, weekday) |
| PY | date_time: date, date_time, date_object, time, time_object, date_between(_dates), date_time_between(_dates), date_this_century/decade/month/year, date_time_this_*, date_time_ad, date_of_birth(minimum_age, maximum_age), future_date(time), past_date(time), iso8601, unix_time, time_delta, time_series, timezone, pytimezone, am_pm, century, year, month, month_name, day_of_month, day_of_week |
| GO | Date, PastDate, FutureDate, DateRange, NanoSecond, Second, Minute, Hour, Month, MonthString, Day, WeekDay, Year, TimeZone, TimeZoneAbv, TimeZoneFull, TimeZoneOffset, TimeZoneRegion |
| DF | DateAndTime: future, past, between, birthday, birthdayLocalDate, duration, period; Time; TimeAndDate |
| BG | Past, PastOffset, Soon, SoonOffset, Future, FutureOffset, Between, BetweenOffset, Recent, RecentOffset, Timespan, Month, Weekday |
| MM | Datetime: date, datetime, time, timestamp, formatted_*, week_date, day_of_week, month, year, day_of_month, timezone, gmt_offset, periodicity, future/past_date(time), duration, bulk_create_datetimes |
| CH | ampm, date, hammertime, hour, millisecond, minute, month, second, timestamp, timezone, weekday, year |
| RB | Date (between, between_except, forward, backward, birthday, in_date_period, on_day_of_week_between), Time (between, between_dates, forward, backward) |
### phone
| Lib | Generators |
|---|---|
| JS | number({style: human|national|international}), imei |
| PY | phone_number, country_calling_code, msisdn (per-locale formats) |
| GO | Phone, PhoneFormatted |
| DF | PhoneNumber: cellPhone, cellPhoneInternational, phoneNumber, phoneNumberInternational, phoneNumberNational, extension, subscriberNumber |
| BG | PhoneNumber, PhoneNumberFormat |
| MM | Person.phone_number/telephone (mask), Address.calling_code |
| CH | phone, areacode |
| RB | PhoneNumber (phone_number, cell_phone, country_code, phone_number_with_country_code, cell_phone_with_country_code, cell_phone_in_e164, area_code, exchange_code, subscriber_number, extension) |
### science / medical
| Lib | Generators |
|---|---|
| JS | chemicalElement, unit; medical locale data (en only) |
| PY | — (community: Healthcare, Biology, Geoscience, Scientific) |
| GO | — |
| DF | Science: element, elementSymbol, unit, scientist, tool, quark, leptons, bosons; Medical, Medication, Disease, MedicalProcedure, CareProvider, Observation, BloodType, Measurement, Weather, Planet, Space, Mountain, Cannabis, LargeLanguageModel |
| BG | premium Bogus.Healthcare |
| MM | Science: rna_sequence, dna_sequence |
| CH | — |
| RB | Science (element, element_symbol, element_state, element_subcategory, scientist, modifier, tool), Space, Measurement, Cannabis, Medical (NationalHealthService) |
### music / animal / food / books / entertainment
| Lib | Generators |
|---|---|
| JS | music: album, artist, genre, songName; animal: bear, bird, cat, cetacean, cow, crocodilia, dog, fish, horse, insect, lion, petName, rabbit, rodent, snake, type; food: adjective, description, dish, ethnicCategory, fruit, ingredient, meat, spice, vegetable; book: author, format, genre, publisher, series, title |
| PY | — (core has none; community Music, Sci Fi) |
| GO | Song, SongName, SongArtist, SongGenre; PetName, Animal, AnimalType, FarmAnimal, Cat, Dog, Bird; Fruit, Vegetable, Breakfast, Lunch, Dinner, Snack, Dessert, Drink; Beer{Alcohol,Blg,Hop,Ibu,Malt,Name,Style,Yeast}; Book, BookTitle, BookAuthor, BookGenre; Movie, MovieName, MovieGenre; Celebrity{Actor,Business,Sport}; Minecraft (18 fns) |
| DF | Music: instrument, key, chord, genre; RockBand; Artist; Kpop; Hololive; Animal: name, scientificName, genus, species; Cat, Dog, Horse; Food: ingredient, allergen, spice, dish, fruit, vegetable, sushi, measurement; Apple, Beer, Cheese, Coffee, Dessert, IceCream, Tea; Book, Movie, Show, OscarMovie; ~75 entertainment franchises, ~31 videogames, 9 sports |
| BG | Music (premium Hollywood: movies, TV, actors) |
| MM | Food: vegetable, fruit, dish, spices, drink |
| CH | animal (with type), tv, radio, rpg, dice |
| RB | Music (+11 bands), Creature (animal, bird, cat, dog, horse), Food, Beer, Coffee, Tea, Dessert, Book, Books (4 series), Movie/Movies (17), TvShows (39), Games (26), JapaneseMedia (10), Sports (6), Fantasy::Tolkien, Religion::Bible, Superhero, DcComics, Kpop, Ancient, GreekPhilosophers, Cosmere |
### color / image / system / database / misc
| Lib | Generators |
|---|---|
| JS | color: cmyk, colorByCSSColorSpace, cssSupportedFunction, cssSupportedSpace, hsl, human, hwb, lab, lch, rgb, space; image: avatar, avatarGitHub, dataUri, personPortrait, url, urlLoremFlickr, urlPicsumPhotos; system: commonFileExt/Name/Type, cron, directoryPath, fileExt/Name/Path/Type, mimeType, networkInterface, semver; database: collation, column, engine, mongodbObjectId, type; git: branch, commitDate, commitEntry, commitMessage, commitSha; number: bigInt, binary, float, hex, int, octal, romanNumeral; datatype.boolean; science.unit |
| PY | color: color, color_name, safe_color_name, hex_color, safe_hex_color, rgb_color, rgb_css_color, color_hsl/hsv/rgb/rgb_float; file: file_extension, file_name, file_path, mime_type, unix_device, unix_partition; python: pybool, pydecimal, pydict, pyfloat, pyint, pyiterable, pylist, pyobject, pyset, pystr, pystr_format, pystruct, pytuple, enum; doi; emoji; user_agent |
| GO | Color, HexColor, RGBColor, HSLColor, SafeColor, NiceColors; Image, ImageJpeg, ImagePng; CSV, JSON, XML, SQL, FileExtension, FileMimeType, Template, Markdown, EmailText, FixedWidth; ID, UUID; Error* (9 kinds); AppName, AppVersion, AppAuthor; Language, LanguageAbbreviation, LanguageBCP, ProgrammingLanguage; School; Gamertag, Dice; Bool, Weighted, FlipACoin; Number/Int*/Uint*/Float* ranges |
| DF | Color, Image, File, App, ProgrammingLanguage, LanguageCode, Number, Bool, Unique, Options, Photography, Military, OlympicSport, Weather, Construction, Community, Chiquito … (263 providers total) |
| BG | Images: DataUri, PicsumUrl, PlaceholderUrl, LoremFlickrUrl; System: FileName, DirectoryPath, FilePath, CommonFileName, MimeType, CommonFileType/Ext, FileType, FileExt, Semver, Version, Exception, AndroidId, ApplePushToken, BlackBerryPin; Database: Column, Type, Collation, Engine; Randomizer (numbers, chars, Guid, Hash, Enum, WeightedRandom, Shuffle …) |
| MM | Hardware: resolution, screen_size, cpu, cpu_frequency, generation, cpu_codename, ram_type, ram_size, ssd_or_hdd, graphics, manufacturer, phone_model; Development: software_license, calver, version, stage, programming_language, os, boolean, system_quality_attribute; File, BinaryFile, Path, Cryptographic (uuid, hash, token, mnemonic), Numeric, Choice |
| CH | bool, falsy, floating, integer, natural, prime, hex, guid, hash, coin, dice, normal (Gaussian), n, unique, weighted, android_id, apple_token, bb_pin, wp7_anid, wp8_anid2 |
| RB | Color, File, Computer, Device, ProgrammingLanguage, App, Number, Boolean, Hash/Crypto, Json, Html, Markdown, Military, Compass, Coin, Mountain, Nation, Space, Time, Types, Slack Emoji, Vulnerability identifier |
Module presence summary:
| Module | JS | PY | GO | DF | BG | MM | CH | RB |
|---|---|---|---|---|---|---|---|---|
| person | x | x | x | x | x | x | x | x |
| address | x | x | x | x | x | x | x | x |
| company | x | x | x | x | x | (finance) | x | x |
| internet | x | x | x | x | x | x | x | x |
| finance | x | x | x | x | x | x | x | x |
| commerce/product | x | barcode only | x | x | x | code only | — | x |
| vehicle | x | plate/vin | x | x | x | x | — | x |
| airline | x | — | x | x | — | iata/icao | — | x |
| lorem/words | x | x | x | x | x | x | x | x |
| date | x | x | x | x | x | x | x | x |
| phone | x | x | x | x | x | x | x | x |
| science | x | — | — | x | — | dna | — | x |
| medical | data only | — | — | x | premium | — | — | x |
| music | x | — | x | x | — | — | — | x |
| animal | x | — | x | x | — | — | x | x |
| food | x | — | x | x | — | x | — | x |
| book | x | isbn | x | x | — | — | — | x |
| color | x | x | x | x | x | text | x | x |
| image | x | x | x | x | x | binaryfile | avatar | x |
| system/file | x | x | x | x | x | x | — | x |
| database | x | — | sql | — | x | dsn | — | — |
| git | x | — | — | — | — | — | — | — |
| hacker/hipster | x | — | x | x | x | — | — | x |
| national IDs | — | ssn per locale | SSN/EIN | IdNumber | ext. pkgs | identifier | ssn/cpf/cf | IDNumber |
| pop-culture | — | — | minecraft, movie | ~110 | premium | — | tv, rpg | ~85 |
| hardware | — | — | — | Computer/Device | — | x | — | Computer/Device |
| weather/space | — | — | — | x | — | — | — | Space |
## 2. Locale coverage and address data structure
### Locale counts
| Lib | Locales | Structure |
|---|---|---|
| JS | 77 dirs under `src/locales` (incl. `base`, `en_BORK`, `en_AU_ocker`) | One dir per locale, one file per module per key (`en/location/city_name.ts`). Fallback chain per Faker instance: `[de_CH, de, en, base]`; first locale that defines a key wins. `base` holds locale-independent data (ISO codes, time zones). A key may be explicitly `null` to mean "not applicable" (e.g. no zip codes for HK) so it does not fall through to `en`. https://fakerjs.dev/guide/localization.html |
| PY | 126 locale codes listed; per provider: address 67, person 86, ssn 56 | Python subclasses per `providers/<provider>/<locale>/__init__.py` overriding tuples/formats of the base. Missing provider for a locale falls back to `en_US`. Coverage is uneven (`am_ET` = phone only). Multi-locale `Faker(['it_IT','en_US'])` with optional weights. https://faker.readthedocs.io/en/master/locales.html |
| GO | 1 (English/US). No locale API; `Language`/`LanguageBCP` only emit language codes | Static Go maps in `data/*.go`. Open issue #352 "generate data for specific country/language" unanswered. https://github.com/brianvoe/gofakeit/issues/352 |
| DF | 127 yml files in `src/main/resources` (incl. 49 country-only files like `_SE.yml` and 78 language(-region) files); README says "60+" | One YAML per locale (`sv-SE.yml`) under `sv-SE: faker: address: …`; `en/` split into 264 per-provider files. Locale chain `de_CH → de → en`, key-by-key. Values are templates `#{Name.first_name}`. Custom yml via `faker.addPath(locale, path)`. Country file (`_SE.yml`) layered over language file. |
| BG | 50 (`data/*.locale.json`; README says 46) | Verbatim copy of faker.js (v5-era) locale JSON, merged with `data_extend/*.locale.json` by a gulp task, shipped as BSON. Falls back to `en`. https://github.com/bchavez/Bogus/wiki/Creating-Locales |
| MM | 47 (53 dirs incl. `global`, `int`, `bin`, template) | Per locale six JSON files: `address, datetime, finance, food, person, text`. Everything else (internet, payment, code, hardware…) is locale-independent. |
| CH | 1 (en; `postal` CA and `postcode` GB formats exist, `locale()` only returns codes) | Data inline in `chance.js`. |
| RB | 58 yml files ("over 40" in README) | One YAML per locale `lib/locales/<code>.yml` (`en` split into `en/*.yml`), I18n gem, key-level fallback to `en`. |
### Address data: real or synthetic, and correlation
| Lib | Cities | Street names | Postcodes | Hierarchy / correlation |
|---|---|---|---|---|
| JS | `en`: real list `city_name` (~1000 US cities) is one of 5 `city_pattern`s; the other 4 are `{prefix} {firstName}{suffix}` style synthetic. `de`: 327 real cities; `sv`: no `city_name`, pattern-only synthetic. Varies per locale. | `en`: `street_pattern` = `{firstName} {street_suffix}` / `{lastName} …` (synthetic); `de`: 1800 real street names (from one NRW region). | Format masks (`#####`, `#####-####`). `en_US` has `postcode_by_state` so `zipCode({state:'CA'})` gives a state-prefixed range. | None between city↔state↔zip. `county` is a flat list. `timeZone` is per-locale. `nearbyGPSCoordinate` is the only "correlated" geo function. Issue #983: en_CA returned US cities; PR #2141 added real cities for ZA locales — real-city coverage is locale-by-locale volunteer work. |
| PY | Per locale. `en_US`/`en_GB`: synthetic (`{city_prefix} {first_name}{city_suffix}`). `de_DE` 400+ real, `sv_SE` 45 real, `pl_PL` real, `ja_JP` real prefectures/cities/towns, `es_ES` real provinces + regions. | `en_US`: `{first_name} {street_suffix}`; `sv_SE`: prefix+suffix ("Björkgatan"); `de_DE`: synthetic name+Straße; `pl_PL`: real street-name pools. | Masks. `en_US`: `postcode_in_state` with real per-state numeric ranges (still random within range, "not correlated with cities"). `fr_FR`: postcode built from a real department number (correlated to department, not to city). `en_GB`: real outward-area letters but random assembly. `sv_SE`: `%####`. | No country→state→city hierarchy anywhere; `ja_JP` has prefecture–city pairs in data but methods pick independently. `geo.local_latlng(country)` returns real geonames places (name, lat, lon, country, tz) — the only real, correlated location record in the library. `address_formats` are weighted (`25.0` standard vs `1.0` military). |
| GO | Real list of major US cities | Real-looking suffix lists; StreetName is a pool | `#####` mask | None: `Address()` picks city, state, zip independently; lat/lon are uniform random on the globe, not near the city. Open issue #196 "Better address" unanswered. |
| DF | `en`: `city` formats are all synthetic (`#{city_prefix} #{Name.first_name}#{city_suffix}`); `cityName` draws from a separate real list. `sv-SE`: real `city_name` list; `de`: synthetic. | `en`: `#{Name.first_name} #{street_suffix}`; `de`: real `street_root` list combined randomly. | Masks; `en-US` `postcode_by_state` (`350##`), `zipCodeByState`, `countyByZipCode` (en-US only), `eircode` (IE). | None by default. Issue #1551 (Locale.CHINA yields "福建省南京市") open as "proposal". Issue #1477 unresolved directive for city names in some locales. |
| BG | Whatever faker.js v5 had per locale (`en`: synthetic patterns only — real `city_name` list postdates the copy) | synthetic | Masks; `en_US` `postcode_by_state` | None. Issue #481 "Invalid Zip Codes (US)" open. Issue #342 "City returns people's names" (side effect of `{firstName}` patterns). |
| MM | Real lists per locale (`en`: real US cities; `sv`: real municipalities incl. small towns) | `en`: real San Francisco street names; `sv`: real Swedish street names | `postal_code_fmt` mask per locale; `sv` has none | `state` (name+ISO 3166-2 abbr) real, but no link to city or postcode; `default_country` tied to locale. Open question #1584 on choosing default city per locale. |
| CH | Synthetic (3-syllable word) | Synthetic word + real suffix | Real-format masks | None |
| RB | `en`: synthetic patterns (`city_with_state` exists but is `city, state` random) ; some locales have real lists | `{first_name} {street_suffix}` | `#####`; `zip_code(state_abbreviation:)` uses per-state pattern (`900##`); doc says "may not be an actual state zip" | `full_address_as_hash` returns fields but does not correlate them. Issue #2881 (state vs state_abbr mismatch, country vs country_code mismatch) open; #1958 asked for geocodable city+zip; #2899 fake zips closed "not planned". |
**Which libraries correlate any address fields at all:** Python Faker (`fr_FR` postcode↔department, `en_US` zip↔state range, `geo.local_latlng` real records), faker-js/Datafaker/Bogus/Ruby (`zip↔state` range only, en_US), Mimesis (locale↔country only). None ships a country→region→city→postcode hierarchy or city↔lat/lon.
### Other localized fields (what varies per locale)
- JS: `sv` overrides color, commerce, company, date, internet, location, person, phone_number, team; `en` defines 24 modules; `base` 9. So finance/vehicle/animal/food/science are effectively English-only.
- PY: per-locale providers exist for address, automotive (plate formats), bank (IBAN/BBAN/SWIFT by country), company (VAT IDs), currency, date_time (month/day names), internet (TLDs, free email domains, user-name formats), job, lorem (word lists), person, phone_number, ssn (national IDs with check digits), passport, color, barcode (EAN prefixes), misc.
- DF `de.yml` overrides: address, company, compass, creature, lorem, hipster, name, color, commerce, book, university, chuck_norris, space, music, games, food, simpsons, dr_who, vehicle. Country files (`_SE.yml`) mainly phone_number and address formats.
- MM: only address, datetime, finance, food, person, text are localized.
### Name weighting
| Lib | Weighted by frequency? |
|---|---|
| PY | Yes, default `use_weighting=True`. `en_US`: ~500 female + ~500 male first names weighted from SSA decade tables, ~1000 surnames weighted by US Census; `sv_SE`: ~1000/1000/1000 weighted from Skatteverket/ISOF. Plus weighted `address_formats`, `random_element(OrderedDict)`. |
| JS | No. Plain lists (`en`: ~650 female, ~550 male, ~400 generic first names). `helpers.weightedArrayElement` exists for user data only. |
| GO | No. ~1500 first, ~500 last, plain slices. `Weighted(options, weights)` for user data. |
| DF | No. `en`: ~1200 male, ~4400 female first names, ~1000 last, unweighted. |
| BG | No (faker.js data); `Randomizer.WeightedRandom` for user data. |
| MM | No. `en`: ~4000 female, ~3000 male, ~2500 surnames, unweighted. |
| CH | No; `weighted()` helper only. |
| RB | No. |
## 3. Common complaints (issues and posts)
- **Uncorrelated address parts** — the single most repeated request across every library:
- faker-ruby #1958 "Need an address object that has a street, city, zip that correlate" (geocoding breaks) https://github.com/faker-ruby/faker/issues/1958; #2881 "Consistent addresses" (state ≠ state_abbr, country ≠ country_code) https://github.com/faker-ruby/faker/issues/2881; #2899 "Fake Zip Codes" closed not-planned https://github.com/faker-ruby/faker/issues/2899; #275 zips like 90099 https://github.com/stympy/faker/issues/275
- fzaninotto/Faker #625 "Faking Legitimate Addresses" https://github.com/fzaninotto/Faker/issues/625
- java-faker #378 "Italy, Lima" / "USA, Moscow" https://github.com/DiUS/java-faker/issues/378; Datafaker #1551 wrong province–city for China https://github.com/datafaker-net/datafaker/issues/1551
- gofakeit #196 "city may not be in the same state as the zip" https://github.com/brianvoe/gofakeit/issues/196
- Bogus #481 invalid US zips https://github.com/bchavez/Bogus/issues/481
- Python Faker #697 "city in country" https://github.com/joke2k/faker/issues/697; #1812 `states_postcode` fails for territories
- **Synthetic city names** ("East Jarretmouth", "Nord Müller-stadt"): faker-js #2021 merged `city`/`cityName` and documented that only some patterns are real https://github.com/faker-js/faker/issues/2021; Bogus #342 `Address.City` returns people's names https://github.com/bchavez/Bogus/issues/342; faker-js PR #2141 / #2127 / #3792 adding "real" or "more realistic" cities per locale.
- **Localized data falling through to English**: faker-js #983 en_CA cities were US cities https://github.com/faker-js/faker/issues/983; Datafaker #1477 unresolved directive for city names https://github.com/datafaker-net/datafaker/issues/1477; #1358 ru-MD city names; Python #2432 vi_VN outdated administrative units.
- **Fields within one record don't match**: Python #1185 profile name vs username/email https://github.com/joke2k/faker/issues/1185; #1420 email consistent with name https://github.com/joke2k/faker/issues/1420 (both stale, no maintainer answer); gofakeit `Person()` picks gender and first name independently and email from a fresh name.
- **No frequency weighting / flat distributions**: blood types come out uniform when O+ and A+ are >70% of population (https://www.statology.org/how-to-validate-enhance-faker-profile-data-generation/); Python's `use_weighting` is the only built-in answer and only some locales supply weights; #1815 weighting silently dropped after adding a provider https://github.com/joke2k/faker/issues/1815.
- **Formats that produce impossible values**: Python #1849 US phone numbers that can't exist; #1868 fr_FR postcodes with <5 digits; faker-js #1159 unrealistic BIC; #3429 routing numbers fixed to use a real Federal Reserve lookup table; Ruby #1123 wrong pt-BR zip ranges.
- **No locales at all** in gofakeit (#352, open) and Chance.
- **"Column-by-column" generation, no relationships between columns/tables** as a general critique of Faker-style tools (https://securityboulevard.com/2026/04/best-synthetic-data-generation-tools-and-platforms-compared-for-2026/).
- **Uniqueness**: faker-js removed `faker.unique` and tells users to roll their own (https://fakerjs.dev/guide/unique.html); Python `fake.unique` raises `UniquenessException` after retries.
## 4. Notable and unusual features
- **Datafaker** — expression language `#{Name.first_name}`, `#{regexify '[a-z]{4,10}'}`, `#{numerify '##'}`, `#{bothify}`, `#{letterify}`, `#{templatify}`, `#{examplify}`, `#{options.option 'A','B'}`, `#{csv …}`, `#{json …}`, method calls with args (`#{date.birthday 'yy DDD'}`); nested resolution (https://www.datafaker.net/documentation/expressions/). `Schema.of(field(...), compositeField(...))` with transformers to CSV, JSON, YAML, XML, TOML, SQL (batch inserts, Postgres/Oracle/Spark dialects, ARRAY/MULTISET/ROW), `@FakeForSchema` POJO population (https://www.datafaker.net/documentation/schemas/). `faker.collection(...).len(3,5)`, infinite `stream()`, `faker.unique()`, sequences, custom yml via `addPath`. 263 providers, the largest pop-culture catalogue (≈110 franchises/games).
- **gofakeit** — Go `text/template` based `Template()`, `Markdown()`, `EmailText()`, `FixedWidth()`; `Generate("{firstname} {regex:[a-z]{5}} {randomstring:[a,b]}")` mini-language; `Struct(&v)` fill via `fake:"{city}"`, `fakesize`, `format` tags; `Slice`, `Map`, `Regex`; `CSV/JSON/XML/SQL` output; `AddFuncLookup` registers custom functions with parameter metadata (used by its CLI and HTTP server); `Weighted()`; word families split by grammatical role (46 Noun/Verb/Adjective/Pronoun/Connective sub-kinds); `Error*` generators; Minecraft.
- **Mimesis** — `Field`/`Fieldset`/`Schema` builder (`Field(locale)("person.full_name")`, keyed lookups with `key=` post-processors like `maybe`, `romanize`), `Schema(schema=lambda: {...}, iterations=n)` exporting to JSON/CSV/pickle, relational data with `SchemaRef` foreign keys, custom field handlers, factory-boy integration, fastest Python generator; locale = six JSON files; ISO country codes in A2/A3/numeric; DMS coordinates.
- **Bogus** — `Faker<T>().RuleFor(x => x.Prop, f => …)` fluent rules with `StrictMode`, `CustomInstantiator`, `FinishWith`, `Rules()`, `Ignore`, rule sets; local vs global seeding, `UseDateTimeReference`; `Bogus.Distributions.Gaussian`; country ID extension packages; premium Locations/Healthcare/Hollywood/Text packages; Roslyn analyzer; `AutoBogus` auto-fills any class.
- **faker-js** — locale fallback stack with explicit `null` = "not applicable"; `mergeLocales`; `helpers.fake('{{person.firstName}}')` template; `helpers.fromRegExp`, `weightedArrayElement`, `multiple`, `uniqueArray`, `mustache`; pluggable `Randomizer` (32/53-bit Mersenne), `Distributors` (uniform, exponential); `date.birthdate({mode:'age'|'year'})`; `location.nearbyGPSCoordinate`; `git` module; `person.bio`; typed per-locale definition files generated by script.
- **Python Faker** — `use_weighting` (frequency-weighted names/formats from census data); `OrderedDict` weighted `random_element`; `fake.unique`, `fake.optional`; multi-locale instance with weights; `geo.local_latlng` real geonames records; `misc` file/archive/CSV/JSON/image generators; `pystr_format`; pytest fixture; CLI; 24 community providers (healthcare, market data, observability, airtravel, education, security, pyspark …).
- **Chance** — `weighted`, `normal` (Gaussian), `unique`, `n`, `mixin`, `set` (override data), `pick/pickone/pickset`; mobile IDs (android_id, apple_token, bb_pin, wp7/8 anid); geohash/altitude/depth.
- **Ruby faker** — `full_address_as_hash`, `Faker::Config.locale`, `Faker::UniqueGenerator`, `Faker::Config.random`; `Types` generator for random Ruby types; company registration numbers for ~12 countries; deep pop-culture catalogue (~85 themed generators).
+145
View File
@@ -0,0 +1,145 @@
# Swedish (sv_SE) fake-data sources — research 2026-09-17
Scope: names, identifiers, phone, company, plates/cars, words, dates/misc, other. Geography excluded.
"Verified" = fetched and read this session. Local copies of inspected files: `/home/lilleman/.claude/jobs/e377c8d4/tmp/`.
## Licence summary (embed in MIT repo?)
| Source | Licence (exact) | Embed in MIT? | Attribution |
|---|---|---|---|
| SCB Statistikdatabasen + geodata | CC0 1.0 Universal | Yes | None required; SCB asks "Källa: SCB" for statistics taken from scb.se |
| SCB files on scb.se (xlsx: names, SNI, SSYK, SUN) | Not stated per file; scb.se terms: cite "Källa: SCB" | Yes (flag: CC0 statement names only statistikdatabasen/geodata) | "Källa: SCB" |
| Skatteverket testpersonnummer / testsamordningsnummer | CC0 1.0 (in DCAT) | Yes | None |
| Skatteverket namn på nyfödda, efternamn lists | No licence in DCAT/page; "fri att använda, inga avtal eller avgifter" (PSI law 2022:818) | Yes, flag | Cite Skatteverket |
| Bolagsverket statistics CSVs | CC BY 2.5 SE | Yes | Attribution required |
| Bolagsverket/SCB bulk company files | Not stated ("värdefulla datamängder", free, no agreement) | Derive stats only; do not embed raw | Cite |
| Bankinfrastruktur clearing CSV | Not stated; accuracy disclaimer | Facts only; flag | Cite BSAB |
| Bankgirot PDFs | "© Bankgirocentralen BGC AB. All rights reserved." (Informationsklass: Öppen) | No verbatim copy; facts only | — |
| PTS numbering plan PDF | Not stated (no licence on pts.se or in PDF) | Facts only; flag | Cite PTS |
| Transportstyrelsen blocked combinations | Not stated on page | Facts (a list of 99 codes); flag | Cite |
| SALDO morphology (Språkbanken) | CC BY 4.0 | Yes | Cite: Språkbanken (2017) SALDO's morphology, DOI 10.23695/agcm-ny22 |
| Språkbanken word statistics | CC BY 4.0 | Yes | Cite Språkbanken |
| Folkets lexikon | CC BY-SA 2.5 Generic | No (share-alike) | — |
| SAOL (svenska.se) | Copyright, written permission required | No | — |
| Hunspell sv_SE (DSSO) | MPL 1.1 / GPL 2 / LGPL 2.1 (tri); yeager/hunspell-sv LGPL-3.0 | Avoid | — |
| Mobility Sweden registrations | "ange källa" (no open licence) | Top-N facts only | Cite Mobility Sweden |
| Wikipedia (sv/en) | CC BY-SA 4.0 | No copying; facts only | — |
| CLDR (via ICU/Intl) | Unicode licence | Yes | Unicode notice |
## 1. Person names
### SCB (historic, frozen)
- SCB stopped producing name statistics from 2024 and refers to Skatteverket (Namnsök page, verified). Statistikdatabasen folder BE0001 now holds only "Äldre tabeller som inte längre uppdateras" (BE0001D newborns, BE0001G whole population).
- Whole-population xlsx (verified, downloaded): https://www.scb.se/contentassets/9fe7dbb460994c72b835163dbc491ef9/namn-med-minst-tva-barare-31-december-2022.xlsx — 13.1 MB, last-modified 2024-11-21, reference date 2022-12-31, names with >= 2 bearers, names in UPPERCASE.
| Sheet | Rows (incl. 4 header rows) | Columns |
|---|---|---|
| Efternamn | 411,802 | Efternamn, Antal bärare |
| Förnamn kvinnor | 91,247 | Förnamn, Antal bärare |
| Förnamn män | 79,128 | Förnamn, Antal bärare |
| Tilltalsnamn kvinnor | 57,785 | Tilltalsnamn, Antal bärare, Medelålder (only where >= 10 bearers, else "-") |
| Tilltalsnamn män | 49,404 | same |
- Gender split: a name appearing in both kvinnor/män sheets gives P(female) = count_k / (count_k + count_m).
- Middle names: "Förnamn" = every given name a person carries; "Tilltalsnamn" = the one used. Förnamn-minus-tilltalsnamn frequency approximates middle-name usage. Legal "mellannamn" (a second surname) is a different concept, no longer grantable under namnlagen 2016:1013 (not verified this session).
- Junk rows to filter: single letters ("A"), initials ("A-C", "K C", "JR"), "A:SON".
- Legacy PxWeb tables (folder BE0001G, verified via web UI): BE0001T06AR, BE0001TNamn10 (tilltalsnamn >= 10 bearers 1999–2020), BE0001T100, BE0001T08AR, BE0001T07AR, BE0001FNamn10 (förnamn >= 10 bearers), BE0001F100, BE0001T03Ar (efternamn top), BE0001ENamn10 (efternamn >= 10 bearers 1999–2020). PxWebApi v1 (`api.scb.se/OV0104/v1/doris/sv/ssd/START/BE/BE0001/BE0001G/...`) returns HTTP 400 and PxWebApi 2 (`/v2beta/api/v2/tables/BE0001T06AR`) returns "Non-existent table" — these tables are web-UI only now (verified). Use the xlsx.
- Licence: SCB terms page (verified): "Statistik och geodata som SCB tillgängliggör som öppna data i statistikdatabasen och i vår geodataplattform har licensen Creative commons 0 1.0 Universal, CC0" and "Om du använder eller sprider statistik från scb.se ska dock som källa alltid SCB anges". The xlsx sits on scb.se, not in statistikdatabasen — flag; treat as CC0 + "Källa: SCB".
### Skatteverket (current)
- Namn på nyfödda (2021+), annual: DCAT https://skatteverket.entryscape.net/store/26/metadata/416; CSV `fbf_namn_nyfodda.csv` https://skatteverket.entryscape.net/store/26/resource/417; JSON API https://skatteverket.entryscape.net/rowstore/dataset/da2556d0-c717-45e8-a1d8-3320161d3a7d/json?_limit=100&_offset=0 (47,529 rows, verified). Columns: rangordning, kön (Kvinna/Man), fodelsear, uppdateringsdatum, namn, gruppering (Kommun/…), grupperingsvärde (e.g. ALE), antal. Names in Title case. No licence field in DCAT — flag.
- Most common surnames (> 2,000 bearers, ~500 names), 2026 text file (verified, 517 lines, format `Andersson 211808`): https://www.skatteverket.se/download/18.70685bee19c85dd5dd03b59/1775049117448/Fria_efternamn_namn_antal_textfil_2026.txt (also two PDFs). Page: https://www.skatteverket.se/privat/folkbokforing/namn/bytaefternamn/sokblanddevanligasteefternamnen.4.515a6be615c637b9aa48e09.html. Licence not stated.
- Skatteverket general open-data terms (verified): "Vår öppna data är fri att använda och kräver varken några avtal eller innebär några avgifter" under lag 2022:818; no CC licence named except on the test-number datasets (CC0).
- Skatteverket publishes no whole-population first-name list as a file; its statistikportalen "Så många har ett visst namn" is an interactive search (page 404 on fetch; unverified).
Recommendation: embed SCB 2022 xlsx-derived lists (top-N per sheet with counts) + Skatteverket 2026 surname counts for freshness.
## 2. Identifiers
### Personnummer (Folkbokföringslagen 1991:481 18 §, verified via lagen.nu)
- 10 digits: YYMMDD + födelsenummer (3 digits) + kontrollsiffra. Födelsenummer odd = male, even = female. Separator "-" ; "+" once the person turns 100. 12-digit form YYYYMMDDNNNC (no separator).
- Check digit: Luhn/mod 10 over the 9 digits YYMMDDNNN (weights 2,1,2,1,… from the left; sum digits of two-digit products; check = (10 − sum mod 10) mod 10).
- Before 1990 the first two födelsenummer digits encoded county; now random (Wikipedia, unverified officially).
### Samordningsnummer
- Same layout; day + 60 (3rd → 63); individual number random 001–999, odd male / even female; same Luhn (Skatteverket rättslig vägledning, via search excerpt; page itself blocked). Now regulated by Lag (2022:1697) om samordningsnummer (18 a § FBL repealed) — flag.
- Example from Skatteverket: man born 1970-10-03, no. 239 → 701063-2391.
### Official test numbers (Skatteverket, CC0 1.0)
- Testpersonnummer dataset: https://www.dataportal.se/sv/datasets/6_67959/testpersonnummer (DCAT: https://admin.dataportal.se/store/6/metadata/67959?recursive=dcat). "Testpersonnummer med sekelsiffror för åren 1890-2025. Nya testnummer för kommande år läggs ut i december varje år." Formats: Excel (one file), CSV (split into many period files), JSON API https://skatteverket.entryscape.net/rowstore/dataset/b4de7df7-63c0-4e7e-bb59-1f156a591763/json?_limit=100 — resultCount 43,895 (verified), one column `testpersonnummer`, 12 digits.
- Observed pattern (verified on 1890s CSV file fully and API samples at offsets 0/10000/30000/43880): every day gets two numbers, födelsenummer 238 (female) and 239 (male), through 2026-12-31; 1890s use 980/981 (plus a few 982/983/936). All Luhn-valid. Skatteverket blocks these from ever being assigned.
- Testsamordningsnummer: DCAT https://skatteverket.entryscape.net/store/9/metadata/153; years 1914–2025; CSV per year; sample file 2022 (1,498 rows): days 61–91, individual numbers 238/239, Luhn-valid.
- Should a generator restrict to these? Skatteverket does not mandate it, but only these are guaranteed never to collide with a real person; any other Luhn-valid number may be real. Recommended: default to the official series (date + 238/239, or 980/981 for 1890s) and embed nothing but the rule (~530 kB if the full list were embedded). Flag: the 238/239 rule was sampled, not exhaustively verified for every year.
- Common practice elsewhere (Faker etc.): random date + random 3 digits + Luhn — valid but collision-prone.
### Organisationsnummer
- 10 digits NNNNNN-NNNN, last = Luhn over first 9 (same algorithm as personnummer). Digits 3–4 ("month") are always >= 20, distinguishing from personnummer (Wikipedia; not found on an official page — flag).
- First digit (gruppnummer), Bolagsverket page (verified): 5 = aktiebolag, filialer, banker, försäkringsbolag, europabolag; 9 = handelsbolag, kommanditbolag; 7 or 8 = bostadsrättsföreningar, ekonomiska föreningar, näringsdrivande ideella föreningar etc.; 2 or 8 = trossamfund; 20… = state agencies (Bolagsverket itself 202100-5489); 3 = foreign companies. Wikipedia adds: 1 = dödsbon, 2 = stat/region/kommun, 6 = samfällighetsföreningar, 8 = ideella föreningar/stiftelser. Enskild firma = owner's personnummer.
- VAT number (Skatteverket, verified): "SE" + 12 digits = organisationsnummer (10) + "01" ("De två sista siffrorna är alltid 01"). Written SE556047352101.
### Bankgiro / Plusgiro (Bankgirot "10-modul" PDF 2016-12-01, verified)
- Bankgironummer: 7 or 8 digits, last digit mod-10 (Luhn) check; printed 991-2346 (7) / 5555-5551 (8), i.e. hyphen before the last four digits. 90-konton (charity) 900-000x…904-999x, always 7 digits (Wikipedia).
- Plusgironummer: 2–8 digits, last digit Luhn (Wikipedia/samlogic; not from an official Nordea page — flag). Printed with hyphen before check digit, e.g. "12 34 56-7" (convention, unverified).
### Clearing numbers / bank accounts
- Bankinfrastruktur i Sverige AB CSV (verified, 57 rows, 40 actors): https://www.bankinfrastruktur.se/media/1melztro/tabell-over-clearingnummer-250305.csv (also `/media/sqfjsvkp/clearingnummertabell-for-nedladdning.csv`, 63 rows, newer, includes Zimpler 2130-2139). Columns: `Clearingnummer;Aktör;BIC;IBAN ID;Konto-typ;Metod IBAN konvertering`. Semicolon, UTF-8 BOM. Page: https://www.bankinfrastruktur.se/framtidens-betalningsinfrastruktur/iban-och-svenskt-nationellt-kontonummer. No licence; disclaimer "garanterar inte att publicerade uppgifter är korrekta".
- Key ranges: Nordea 1100–1199, 1400–2099, 3000–3399, 3410–3999, 4000–4999 (3300 and 3782 = personkonto); Danske 1200–1399, 2400–2499; SEB 5000–5999, 9120–9124, 9130–9149; Handelsbanken 6000–6999; Swedbank 7000–7999 (4-digit) and 8000–8999 (5-digit clearing with own check digit); Länsförsäkringar 3400–3409, 9020–9029, 9060–9069; Skandiabanken 9150–9169; ICA 9270–9279; Avanza 9550–9569; Nordnet 9100–9109; Klarna 9780–9789.
- Bankgirot "Bankernas kontonummer" 2024-02-22 (verified text): Typ 1 = 4-digit clearing + 7-digit account (11 digits) with mod-11 check, weights 1,10,9,…,1; comment 1 = weigh clearing minus first digit + 7 digits; comment 2 = whole clearing + 7 digits. Typ 2 = clearing not part of the account: Handelsbanken 9-digit account mod-11 (comment 2); Swedbank 8000–8999 up to 10 digits mod-10 (comment 3); Danske 9180–9189, Nordea personkonto 3300/3782, Sparbanken Syd 9570–9579 10 digits mod-10 (comment 1).
- IBAN SE (Bankinfrastruktur page, verified): 24 chars = "SE" + 2 check digits + 3-digit IBAN ID (from CSV column, e.g. Nordea 300, SEB 500, Handelsbanken 600, Swedbank 800, Danske 120, LF 902) + 17-digit account (zero-padded; clearing included/excluded per "Metod IBAN konvertering" 1–3).
## 3. Phone
- Source: PTS "The Swedish numbering plan for telephony according to ITU-T E.164", 2024-01-08 (verified, text extracted): https://pts.se/globalassets/globala-block/nummertillstand/the-swedish-numbering-plan-for-telephony-according-to-itu---2024-01-08.pdf. Swedish "nrplansammanstallning-2026-02-04.pdf" and https://nummer.pts.se/NbrPlanSearch are behind a Radware bot check (both curl and Playwright blocked). No licence stated by PTS anywhere found; pts.se says contact pts@pts.se for data.
- 264 geographic area codes (PDF text yields 263 "Area code for" rows; one likely split across a page break — flag). Area code = trunk "0" + NDC of 1–3 digits (08 Stockholm, 031 Göteborg, 040 Malmö, 0480 Kalmar). Geographic N(S)N (NDC + subscriber) max 9 digits, min 7 (2-digit NDC) or 8 (3-digit NDC); Stockholm min 7. Each row in the PDF gives NDC, max/min length, "Area code for <name>", so a `{ndc, name}` list can be built from it.
- Mobile: NDC 70, 72, 73, 76, 79 — N(S)N exactly 9 digits, i.e. 07X-XXX XX XX (10 digits with trunk 0). Others: 71 mobile broadband/M2M (13 digits), 74 paging, 75 personal numbering, 77 shared cost, 20 freephone, 10 location-independent (10 AXX XX XX, A=1–8), 378 M2M fixed (10 digits).
- Formatting (Språkrådet/Isof frågelådan, via search excerpts): hyphen after area code, subscriber digits grouped 2–3 from the left: `08-668 01 50`, `031-123 45 67`, `0480-123 45`, `070-123 45 67` (also `0701-23 45 67` accepted). International: `+46 70 123 45 67` (drop trunk 0).
- Wikipedia "Lista över riktnummer i Sverige" cites the same PTS document (CC BY-SA — do not copy).
## 4. Company
- Legal forms + suffixes (Bolagsverket, lag 2018:1653 om företagsnamn): aktiebolag must contain "aktiebolag" or "AB" (verified); public companies add "(publ)"; handelsbolag "HB" / "handelsbolag", kommanditbolag "KB" / "kommanditbolag", ekonomisk förening "ekonomisk förening" / "ek. för.", enskild firma no suffix — statutory wording for HB/KB/ek.för. not verified on the fetched page (flag).
- Legal-form codes (SCB "juridisk form", from Skatteverket organisationsnummer page and SCB variabelbeskrivning): 10 fysiska personer, 21 enkla bolag, 22 partrederier, 23 värdepappersfonder, 31 handelsbolag/kommanditbolag, 32 gruvbolag, 41 bankaktiebolag, 42 försäkringsaktiebolag, 43 europabolag, 49 övriga aktiebolag, 51 ekonomiska föreningar, 53 bostadsrättsföreningar, 54 kooperativ hyresrättsförening, 61 ideella föreningar, 62 samfälligheter, 63 registrerade trossamfund, 71 familjestiftelser, 72 övriga stiftelser, 81 statliga enheter, 82 kommuner, 84 regioner, 87 offentliga korporationer, 88 hypoteksföreningar, 91 oskiftade dödsbon, 92 ömsesidiga försäkringsbolag, 93 sparbanker, 94 understödsföreningar, 95 arbetslöshetskassor, 96 övriga svenska juridiska former, 98 utländska juridiska personer — codes beyond 49 quoted from memory of the SCB list, verify against https://www.scb.se/contentassets/8a8eb5c3d45f461ea93482f8e8d4de4f/variabelbeskrivning-api.pdf (flag).
- Distribution (Bolagsverket ftgstat_oppna.csv, CC BY 2.5 SE, 404,779 rows, latin-1, verified): https://www.bolagsverket.se/statistik/ftgstat_oppna.csv. Columns: ar, manad, handelse (1 = nyregistrerade, 2 = alla registrerade, 3 = avslutade), regfam, län/kommun, then counts per form: AB, BAB (bankaktiebolag), BF (bostadsförening), BRF, EK (ekonomisk förening), E (enskild näringsidkare registered at Bolagsverket only), SE (europabolag), FL (filial), FAB (försäkrings-AB), HB, I (näringsdrivande ideell förening), KB, KHF, MB, SF, SB (sparbank), TSF (trossamfund), BFL, OFB, SCE, S, EGTS, FOF, TPAB, OTPB, TPF. New registrations 2025 (computed): AB 50,859; E 8,468; HB 1,557; BRF 398; EK 319; FL 269; KB 176; I 59. Column description xlsx: https://www.bolagsverket.se/download/18.46f4138717c599ee403aac05/1638951733112/beskrivning-av-csv-fil.xlsx.
- Company-name register: Bolagsverket "värdefulla datamängder" bulk file https://vardefulla-datamangder.bolagsverket.se/bolagsverket/bolagsverket_bulkfil.zip (250 MB, updated 2026-09-14; org.nr, names, legal form, business description, address) and SCB bulk https://vardefulla-datamangder.bolagsverket.se/scb/scb_bulkfil.zip (71 MB; adds SNI up to 5 codes, status). Free, no agreement; licence not stated on the page (statistics CSVs are CC BY 2.5 SE) — flag. Use offline to derive name-token frequencies; do not embed rows. API (org.nr lookup only; name search "planned, no date"): https://bolagsverket.se/apierochoppnadata/hamtaforetagsinformation/apiforatthamtaforetagsinformation.3988.html.
- Naming rules (Bolagsverket "Välja företagsnamn", verified): must be distinctive — not only a generic activity ("Bilverkstad AB") or a bare surname; no confusion with existing names/trademarks; no professional titles without credentials; no apparent internet address; "aktiebolag/AB/handelsbolag" ignored when comparing names. Typical patterns (unverified heuristic, derive from bulk file): `<Surname> <Trade> AB`, `<Surname>s <Trade>`, `<Place> <Trade> AB`, `<Fantasy word> AB`, `<Initials> <Trade> HB`, suffix words Bygg, Konsult, Holding, Invest, Fastigheter, Förvaltning, Entreprenad, Teknik, Design.
- SNI 2007 (SCB, verified xlsx, 94 kB): https://www.scb.se/contentassets/d43b798da37140999abf883e206d0545/sni2007.xlsx — sheets Detaljgrupp (5-digit, 821 codes), Undergrupp (615), Grupp (272), Huvudgrupp (88), Avdelning (21 letters). Code format `01.110` + Swedish label. SNI 2025 replaces it from 2025-12-08 (835/651/287/87/22): https://www.scb.se/globalassets/sni-2025.xlsx (93 kB). Skatteverket/Bolagsverket transition status unverified. Licence: no statement on the classification pages; SCB terms apply ("Källa: SCB") — flag.
## 5. Licence plates and cars
- Format: `ABC 123` (since 1973) and `ABC 12A` (since 2019-01-16; last character a letter, never O). Letters never used: I, Q, V, Å, Ä, Ö. Digits 001–999 (000 not issued). Personal plates 2–7 characters, may use any letters, must not mimic the standard pattern. Source: sv.wikipedia Registreringsskyltar i Sverige (facts; not confirmed on a Transportstyrelsen page — flag).
- Blocked letter combinations, Transportstyrelsen (verified, page updated 2026-03-31, 99 codes): https://www.transportstyrelsen.se/sv/vagtrafik/fordon/aga-kopa-eller-salja-fordon/registreringsskyltar/byte-av-registreringsnummer/Sparrade-bokstavskombinationer/
APA ARG ASS BAJ BSS CUC CUK CUM DUM ETA ETT FAG FAN FEG FEL FEM FES FET FNL FUC FUK FUL GAM GAY GEJ GEY GHB GUD GYN HAT HBT HKH HOR HOT KGB KKK KUC KUF KUG KUK KYK LAM LAT LEM LOJ LSD LUS MAD MAO MEN MES MLB MUS NAZ NRP NSF NYP OND OOO ORM PAJ PKK PLO PMS PUB RAP RAS ROM RPS RUS SEG SEX SJU SOS SPY SUG SUP SUR TBC TOA TOK TRE TYP UFO USA WAM WAR WWW XTC XTZ XUK XXL XXX ZEX ZOG ZPY ZUG ZUP ZOO
- Car makes, Mobility Sweden 2025 full-year new passenger cars (272,987 total; press release 2026-01-02 "Svagt fordonsår 2025", via search excerpt; "ange källa" required): Volvo 48,961; Volkswagen 38,677; Toyota 22,189; Kia 19,922; Mercedes-Benz 17,372; Skoda 16,664; BMW 15,001; Audi 14,887; Peugeot 9,059; Polestar 7,601. Top models 2025: Volvo XC60 17,933, Volvo EX40, VW ID.7, Tesla Model Y 5,822 (press excerpts). Monthly xlsx: https://mobilitysweden.se/statistik/Nyregistreringar_per_manad_1. Not an open licence — embed as a curated list with attribution.
- Transportstyrelsen fordonsstatistik (open data, by vehicle type only, not make): https://www.transportstyrelsen.se/sv/om-oss/statistik-och-analys/statistik-inom-vagtrafik/fordonsstatistik/. Trafa (https://www.trafa.se/vagtrafik/fordon/) publishes by owner/technical/region, no make/model list found; licence not stated.
## 6. Words
- SALDO morphology (recommended): https://sprakbanken.se/en/resources/saldom — CC BY 4.0, 128,036 entries, LMF XML `saldom.xml` 254,107,385 bytes (https://svn.spraakbanken.gu.se/sb-arkiv/pub/lmf/saldom/saldom.xml, 2017-09-19). Fields: lemma, POS, inflection paradigm, full word forms with MSD. Derive a small `{lemma, pos}` list (nouns/adjectives/verbs) offline; embed with the citation "Språkbanken (2017). SALDO's morphology. https://doi.org/10.23695/agcm-ny22".
- Frequencies: Språkbanken word statistics https://sprakbanken.se/resurser/ordstatistik — `stats_all.txt.zip` 763.87 MB, CC BY 4.0, 2025-04-22, aggregated over modern corpora (Korp). Column layout not confirmed (FAQ entry not found; per-corpus files are tab-separated, 6 columns incl. word form, POS, lemgram, SALDO sense, compound flag, frequency) — flag; inspect a per-corpus stats file first (smaller).
- Folkets lexikon (KTH): CC BY-SA 2.5 — share-alike, not suitable for an MIT-embedded derivative. SAOL: svenska.se "får inte användas … utan skriftligt tillstånd" — unusable. Hunspell sv_SE/DSSO: MPL/GPL/LGPL — avoid.
## 7. Dates, money, email, domains
- CLDR sv-SE (verified with Node 24.18.1 ICU): short date `2026-09-17`; long `17 september 2026`; full `torsdag 17 september 2026 kl. 16:30`; months januari…december (lowercase), short `jan. feb. mars apr. maj juni juli aug. sep. okt. nov. dec.`; weekdays måndag…söndag, short `mån tis ons tors fre lör sön`; currency `1 234,56 kr`; number `1 234 567,891`. ICU uses U+00A0 (NBSP) as group separator; typographic guidance says hard space, decimal comma.
- Språkrådet (search excerpts): ISO 8601 `ÅÅÅÅ-MM-DD` in formal/technical text, `6 juli 2022` in running text; clock `14.30` (period; colon accepted); amounts `1 234,50 kr`.
- Public holidays, Lag (1989:253) om allmänna helgdagar (verified): nyårsdagen 1/1, trettondedag jul 6/1, långfredagen, påskdagen, annandag påsk, Kristi himmelsfärdsdag (6th Thursday after Easter), pingstdagen, nationaldagen 6/6, midsommardagen (Saturday 20–26 June), alla helgons dag (Saturday 31 Oct–6 Nov), juldagen 25/12, annandag jul 26/12, plus Sundays. Semesterlagen 3 a § (verified): "Med söndag jämställs allmän helgdag samt midsommarafton, julafton och nyårsafton". Easter needs computing (Gregorian).
- Email domains: no official statistic found (Internetstiftelsen "Svenskarna och internet" does not report providers). Common providers by general knowledge only (unverified): gmail.com, hotmail.com, outlook.com, icloud.com, yahoo.com/yahoo.se, live.se, telia.com (Telia is phasing out its mail service), bredband.net, comhem.se, spray.se, me.com. Flag as curated.
- TLDs (Internetstiftelsen registrar stats JSON, verified): .se active domains 1,475,495 (2026-07); .nu 203,940 (2026-07). https://internetstiftelsen.se/registrar-stats/se/activedomainsmonthend.json, `/nu/…`. Licence not stated.
## 8. Other
- Occupations, SSYK 2012 (SCB, verified xlsx): https://www.scb.se/contentassets/0c0089cc085a45d49c1dc83923ad933a/ssyk-2012-koder.xlsx (50 kB; sheets 1/2/3/4-siffer; 429 four-digit codes) and job-title index https://www.scb.se/contentassets/0c0089cc085a45d49c1dc83923ad933a/ssyk_index_webb_2026.xlsx (213 kB, 2026-03-18, thousands of yrkesbenämningar → code). Licence: SCB terms ("Källa: SCB") — flag as with SNI.
- Education, SUN 2020 (SCB): https://www.scb.se/contentassets/aeeedec0e28c465aa524429407dcd5ba/sun-2020_niva_inriktning2.xlsx (304 kB; levels + orientations). Population 25–64 (SCB "Befolkningens utbildning 2024", via search excerpt): ~10 % förgymnasial, ~40 % gymnasial, ~31 % eftergymnasial >= 3 years (remainder shorter post-secondary). Approximate — flag.
- Blood groups (geblod.nu 2007 via sv.wikipedia Blodgruppsfördelning; geblod.nu today only says RhD+ ≈ 85 %): A+ 37, O+ 32, B+ 10, AB+ 5, A− 7, O− 6, B− 2, AB− 1 (%).
- Regional/kommun data: out of scope (geography).
## Unverified / flagged items
1. CC0 applies by SCB's statement to statistikdatabasen/geodata; xlsx files on scb.se (names, SNI, SSYK, SUN) carry only "Källa: SCB" terms.
2. Skatteverket name datasets and surname file: no licence field; only "fri att använda" under PSI law.
3. Testpersonnummer 238/239 rule: sampled (1890s file fully, offsets 0/10k/30k/43.9k), not exhaustively checked; per-period CSV list has many files.
4. Organisationsnummer "digits 3–4 >= 20" and group digits 1/6 — Wikipedia only.
5. Plusgiro length/format — Wikipedia/blog only.
6. PTS: no licence; 264 vs 263 area codes counted in the PDF text; Swedish 2026 PDF and nummer.pts.se blocked (Radware).
7. Plate format details (000 excluded, O excluded as last letter, 2019-01-16) — Wikipedia only.
8. Legal-form codes above 49 — from memory; verify against the SCB variabelbeskrivning PDF.
9. Word-statistics column layout; email-provider list; company-name patterns; education shares — heuristic/approximate.
+616
View File
@@ -0,0 +1,616 @@
# Open data sources and format rules — US/locale-neutral fake-data categories
Researched 2026-09-17 for embedding as data files in an MIT-licensed library. Geography/addresses and Swedish data are out of scope (covered elsewhere). Each item that was not read first-hand from the cited page/file is marked **UNVERIFIED**.
## Licence key (what each licence means inside an MIT repo)
| Licence | Embed? | Obligation |
|---|---|---|
| Public domain (US federal work, 17 USC §105), CC0 1.0, PDDL, Unlicense | Yes | None; cite the source in the data file header as courtesy |
| MIT, BSD-2, ISC | Yes | Keep the copyright + permission notice next to the copied data |
| Unicode License v3 (OSI-approved 2023-11-17, verified) | Yes | Notice in LICENSE/NOTICE or docs |
| WordNet License (verified at wordnet.princeton.edu) | Yes | Notice + disclaimer on all copies; no Princeton name in advertising |
| W3C Document License 2023 | Yes (data tables) | Notice "includes material copied from or derived from <title> <URI>" |
| CC BY 3.0 / 4.0 | Yes | Creator, licence link, indicate changes (verified deed) |
| Apache-2.0 (code), LGPL-2.1/3.0 (data) | Awkward | LGPL data files stay LGPL; keep them out of an MIT repo, use as reference for facts only |
| CC BY-SA, ODbL, CC BY-NC-SA, GFDL | No | Share-alike / non-commercial — incompatible |
| No licence stated, "all rights reserved", proprietary directories (SWIFT BIC, Fed RTN, CUSIP, ICAO 8643, GS1 page, ISO OBP, SAE WMI, whatismybrowser, useragents.me, MySQL manual, Pantone) | No | Generate synthetically from the format rules instead |
## Embed verdict at a glance
| Category | Use (clean) | Use with notice | Avoid |
|---|---|---|---|
| 1 Names/IDs | SSA baby names (CC0), Census 2010 surnames (PD), IRS EIN prefixes / ITIN ranges, SSA SSN rules | — | — (prefix/suffix lists: hand-curate) |
| 2 Finance | ISO 4217 via datasets/currency-codes (PDDL) or SIX list-one.xml; algorithms (ABA, Luhn, ISIN, CUSIP, IBAN mod 97, EIP-55, Bech32) | npm currency-codes (MIT), GLEIF BIC-LEI (custom notice), CLDR currency symbols (Unicode-3.0) | Fed routing directory, SwiftRef BIC directory, real CUSIP lists, php-iban (LGPL) verbatim |
| 3 Company | NAICS 2022 (PD), SEC company_tickers.json (free reuse), GLEIF ELF list (CC0) | — | — |
| 4 Internet | All IANA registries (CC0): media types, HTTP status, ports, TLDs, IPv4/IPv6 special-purpose; RFC 5737/3849/9637 ranges; locally-administered MAC | mime-db (MIT), Linguist languages.yml (MIT), top-user-agents (MIT) / user-agents (BSD-2), IEEE OUI (IEEE "does not assert copyright" — second-hand) | useragents.me, whatismybrowser, MySQL manual tables |
| 5 Vehicle | NHTSA vPIC makes/models/WMIs/value lists (PD); VIN check-digit rule | — | SAE WMI DB, openalpr plate patterns (AGPL), Wikipedia lists verbatim |
| 6 Airline | OurAirports (PD/Unlicense), Wikidata airlines + aircraft types (CC0) | OPTD airlines (CC BY 4.0) | OpenFlights + npm mirrors (ODbL), ICAO Doc 8643 + scraped mirrors, OpenSky aircraft DB |
| 7 Science | PubChem periodic table (PD), NASA planetary fact sheet (PD), Wikidata animals/plants/moons (CC0), Stanford/AABB blood types (facts) | BIPM SI brochure (CC BY 4.0), GBIF backbone (CC BY 4.0 + citation), faker-js lists (MIT) | Bowserinator periodic table (CC BY-SA 3.0) |
| 8 Text | Moby POS (PD), 12dicts PD lists, XKCD colours (CC0), Lorem ipsum/Cicero, Bartlett via Gutenberg (PD) | WordNet 3.x (WordNet License), Open English WordNet (CC BY 4.0), SCOWL (MIT-like), CSS named colours (W3C notice), Google Books ngrams (CC BY 3.0) | wordfreq data (CC BY-SA), hermitdave (CC BY-SA), Norvig count_1w (LDC-derived), Wikiquote |
| 9 Dates | IANA tzdb (PD) | CLDR cldr-dates-full (Unicode-3.0) | — |
| 10 ISO | datasets/country-codes (PDDL), LoC ISO 639-2 (PD, UNVERIFIED layout), Census state.txt (PD) | annexare/Countries, i18n-iso-countries, langs, iso-639-1 (all MIT) | mledoze (ODbL), lukes + stefangabos (CC BY-SA), Debian iso-codes (LGPL), SIL 639-3 table (no-redistribution clause), olahol iso-3166-2 (unclear) |
| 11 Commerce | Check-digit algorithms (EAN/UPC/GTIN, ISBN-10/13, ISSN, IMEI Luhn); GS1 demo prefix 952 | faker-js en commerce word lists (MIT) | GS1 prefix page + ISBN range file verbatim, Wikipedia tables verbatim |
| 12 Books/music/food | Gutenberg pg_catalog.csv (CC0), MusicBrainz genre names (CC0), ID3v1 genres, Wikidata instruments/dishes/cuisines/cocktails (CC0), USDA FoodData Central (CC0) | Open Brewery DB (MIT) | MusicBrainz tag associations (CC BY-NC-SA), IBA site text |
## Corrections to the brief's assumptions
- Bowserinator/Periodic-Table-JSON is CC BY-SA 3.0 (not MIT) and has 119 rows; use PubChem CSV (118, PD).
- wordfreq code is Apache-2.0 and its data CC BY-SA 4.0 — avoid the data.
- CSS Color 4 has 148 named colours (rebeccapurple included).
- Gutenberg #27889 Bartlett is the 9th edition (1903); the 1919 10th is not on Gutenberg (UNVERIFIED elsewhere).
- CLDR file path is `cldr-dates-full/main/<locale>/ca-gregorian.json`; current package 48.2.0.
- Diners Club US/Canada is a Mastercard co-brand on 55; replace the loose "Maestro 50/56–58/6xxx" rule with the explicit IINs in part 2.
- Maestro/Discover/Diners/JCB/UnionPay lengths vary 12–19 — generate per the table, not a fixed 16.
- The 987-65-4320..4329 SSN advertising range is repeated by third parties but not found on any ssa.gov/POMS page (UNVERIFIED).
- DUNS dropped its mod-10 check digit in 2006 — no validation rule today.
- IEEE's OUI "does not assert copyright" statement is only recorded second-hand (Debian/FSF); no current IEEE page restates it.
- Sites blocking automation (403/Cloudflare): ssa.gov, www2.census.gov, swift.com, redcrossblood.org, loc.gov, gs1.org (WebFetch), standards-oui.ieee.org (needs browser UA). Download those manually with a browser UA.
## Recommended default picks for an en_US library
- Given names: SSA `names.zip` aggregated to top-N per sex (CC0). Surnames: Census `Names_2010Census.csv` top-N (PD).
- Countries: `datasets/country-codes` CSV (PDDL); flag emoji derived from alpha-2. Currencies: same file's ISO 4217 columns or `datasets/currency-codes`; symbols from CLDR `en` (Unicode-3.0).
- Internet: IANA registries + mime-db; UAs from templates (no data) or `top-user-agents` (MIT).
- Vehicles: vPIC `GetMakesForVehicleType/car` (195) + models per make; VIN generated with check digit.
- Airports: OurAirports rows with `iata_code` and type large/medium (4,569). Airlines: Wikidata (CC0).
- Words: WordNet 3.0 index files (with LICENSE) or Moby POS (PD) for POS-tagged words; XKCD + CSS for colours.
- Timezones: `zone1970.tab` names only; offsets via `Intl` at runtime.
- Check digits: implement from the rules in parts 1, 2 and 4 — no data needed.
---
# Part 1 — Names, finance, company: sources and rules
Researched 2026-09-17. "Embed" = ship as a data file in an MIT repo. Everything not marked UNVERIFIED was read from the cited page or file this session.
## 1. US person names and identifiers
### SSA baby names (given names by year and sex)
- Page: https://www.ssa.gov/oact/babynames/limits.html — national zip https://www.ssa.gov/oact/babynames/names.zip (7 MB), state zip https://www.ssa.gov/oact/babynames/state/namesbystate.zip (23 MB), territories 228 kB.
- Format (per SSA page + readme as mirrored by https://github.com/hackerb9/ssa-baby-names): one `yobYYYY.txt` per year 1880–2025, CSV `name,sex,count`, name 2–15 chars, sex `M`/`F`, sorted by sex then count desc. Names with < 5 occurrences in a year are excluded.
- Counts: ~100,364 distinct names, ~2.02 M rows across all years (hackerb9 snapshot; year of snapshot UNVERIFIED). Top 1000 names cover 71.5 % of 2025 births (SSA page).
- Licence: data.gov catalog entry https://catalog.data.gov/dataset/baby-names-from-social-security-card-applications-national-data lists licence **CC0 1.0** (`https://creativecommons.org/publicdomain/zero/1.0/`), publisher SSA. US federal work, no attribution required; embeddable.
- Note: ssa.gov returns 403 to non-browser user agents (curl/WebFetch); download with a browser UA or via the data.gov link.
### Census 2010 surnames
- Page: https://www.census.gov/topics/population/genealogy/data/2010_surnames.html
- Files: full set https://www2.census.gov/topics/genealogy/2010surnames/names.zip (CSV + XLSX, `Names_2010Census.csv`), top 1000 `Names_2010Census_Top1000.xlsx`, docs https://www2.census.gov/topics/genealogy/2010surnames/surnames.pdf.
- Fields (from surnames.pdf): `name, rank, count, prop100k, cum_prop100k, pctwhite, pctblack, pctapi, pctaian, pct2prace, pcthispanic`. `(S)` = suppressed percentage. Names are UPPERCASE.
- Count: 162,253 surnames occurring ≥ 100 times (covers 90.1 % of people with a recorded surname); the CSV also has a trailing `ALL OTHER NAMES` row (UNVERIFIED — www2.census.gov returned 403 to curl this session; download with a browser).
- Licence: US Census Bureau work → US federal government work, public domain in the US (17 U.S.C. §105). Census only asks for citation (https://www.census.gov/about/policies/citation.html: "U.S. Census Bureau, [Table], [Product], [Vintage], [URL], accessed on [date]"). Embeddable; cite source in the data file header.
### Name prefixes / suffixes
- No authoritative enumerated list exists. USPS Publication 28 §33 (https://pe.usps.com/text/pub28/28c3_011.htm) defines the fields: Name Prefix, First Name, Middle Name or Initial, Surname, **Suffix Title** = "maturity (e.g., JR, SR) and professional (e.g., PHD, DDS) suffixes"; example "MR. WALTER W. WITHERSPOON JR.".
- Recommendation: hand-curate. Prefixes `Mr., Mrs., Ms., Mx., Dr., Rev.`; suffixes `Jr., Sr., II, III, IV, PhD, MD, DDS, Esq.`. Rule of thumb: generational suffix (Jr/Sr/II–IV) only with a male name in traditional US usage; never combine Jr. with Sr.; at most one generational suffix.
### SSN
- Structure: `AAA-GG-SSSS` (area 3, group 2, serial 4). No check digit (Wikipedia).
- Randomization since **2011-06-25** (https://www.ssa.gov/employer/randomization.html): "Previously unassigned area numbers were introduced for assignment excluding area numbers 000, 666 and 900-999." Area no longer geographic.
- Invalid per SSA POMS RM 10201.035 (https://secure.ssa.gov/apps10/poms.nsf/lnx/0110201035): area `000`, `666`, `900–999`; group `00`; serial `0000`.
- Generator rule: area ∈ [001,899] \ {666}; group ∈ [01,99]; serial ∈ [0001,9999].
- Advertising SSNs (https://www.ssa.gov/history/ssn/misused.html): `078-05-1120` (Woolworth wallet card, 1938; > 40,000 people claimed it) and `219-09-9999` (1940 Social Security Board pamphlet). Both are structurally valid — exclude from output.
- `987-65-4320`–`987-65-4329` "reserved for advertising": repeated by searchbug.com, ssn-check.org, a Missouri state standard (https://oa.mo.gov/sites/default/files/CC-SocialSecurityNumberNamingStandardV050305.pdf, which even misprints it as 987-54-4329). **UNVERIFIED** — not found on any ssa.gov page or POMS this session; Wikipedia no longer carries it. Safe to use these ten as the library's "obviously fake" examples, but do not cite SSA for it.
### ITIN (IRS)
- IRS Publication 4757 (Rev. 6-2026), p. 5 (https://www.irs.gov/pub/irs-pdf/p4757.pdf): "All valid ITINs are nine-digit numbers in the same format as the SSN (9XX-8X-XXXX), beginning with a "9" and the 4th and 5th digits ranging from 50 to 65, 70 to 88, 90 to 92, and 94 to 99."
- Group `93` = ATIN (adoption TIN); `89` reserved (Intuit/TaxSlayer support pages, not IRS — UNVERIFIED).
- Generator rule: `9` + 2 digits + group ∈ {50–65, 70–88, 90–92, 94–99} + 4 digits (serial `0000` not documented as invalid for ITIN; avoid it anyway).
### EIN (IRS)
- Format `NN-NNNNNNN`. Page: https://www.irs.gov/businesses/small-businesses-self-employed/how-eins-are-assigned-and-valid-ein-prefixes ("The first two digits of your EIN show the IRS campus that assigned it or if you applied online").
- Valid prefixes (union of the table, 2026-09-17):
`01 02 03 04 05 06 10 11 12 13 14 15 16 20 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 71 72 73 74 75 76 77 80 81 82 83 84 85 86 87 88 90 91 92 93 94 95 98 99`
By campus: Andover 10,12 · Atlanta 60,67 · Austin 50,53 · Brookhaven 01–06,11,13,14,16,21–23,25,34,51,52,54–59,65 · Cincinnati 30,32,35–38,61 · Fresno 15,24 · Kansas City 40,44 · Memphis 94,95 · Ogden 80,90 · Philadelphia 33,39,41–43,46,48,62–64,66,68,71–77,85–88,91–93,98,99 · Internet 20,26,27,33,39,41,42,45–47,81–88,92,93,99 · SBA 31.
- Not valid: 00, 07, 08, 09, 17, 18, 19, 28, 29, 49, 69, 70, 78, 79, 89, 96, 97. No check digit.
## 2. Finance
### ABA routing number (RTN)
- Wikipedia https://en.wikipedia.org/wiki/ABA_routing_transit_number: 9 digits; check: `(3(d1+d4+d7) + 7(d2+d5+d8) + (d3+d6+d9)) mod 10 = 0`.
- First two digits: `00` US Government; `01–12` Federal Reserve districts (normal banks); `21–32` thrifts (historic, still valid); `61–72` non-bank payment processors/clearinghouses; `80` traveler's checks. Other prefixes unused (Wikipedia does not say so explicitly — inferred).
- Generator rule: prefix ∈ {01–12, 21–32, 61–72}, 6 random digits, compute 9th as `(10 − (3d1+7d2+d3+3d4+7d5+d6+3d7+7d8) mod 10) mod 10`.
- Open list of real RTNs: the Federal Reserve E-Payments Routing Directory (https://www.frbservices.org/resources/routing-number-directory/index.html) says "may not be sold, re-licensed, or otherwise used for commercial gain" → **not embeddable**. Generate synthetically.
### Payment card numbers (Wikipedia "Payment card number", https://en.wikipedia.org/wiki/Payment_card_number; all Luhn-checked)
| Network | IIN ranges | Length | CVV |
|---|---|---|---|
| Visa | 4 | 13, 16, 19 | 3 |
| Mastercard | 51–55, 2221–2720 | 16 | 3 |
| American Express | 34, 37 | 15 | 4 (front) |
| Discover | 6011, 644–649, 65, 622126–622925 (UnionPay co-brand) | 16–19 | 3 |
| JCB | 3528–3589 | 16–19 | 3 |
| Diners Club International | 30 (covers 300–305, 3095), 36, 38, 39 | 14–19 | 3 |
| Diners Club US & Canada | 55 (Mastercard co-brand) | 16 | 3 |
| UnionPay | 62 | 16–19 | 3 |
| Maestro | 5018, 5020, 5038, 5893, 6304, 6759, 6761, 6762, 6763 | 12–19 | 3 |
| Maestro UK | 6759, 676770, 676774 | 12–19 | 3 |
| Dankort 5019 · Mir 2200–2204 · RuPay 60,65,81,82,508 · Troy 65,9792 · UATP 1 (15) · Verve 506099–506198, 507865–507964, 650002–650027 (16/18/19) | | | |
- CVV lengths: https://en.wikipedia.org/wiki/Card_security_code ("three-digit ... Visa, Mastercard, and Discover"; "American Express is a four-digit code on the front").
- The requested "Maestro 50/56–58/6xxx" is a looser legacy rule; use Wikipedia's explicit IINs.
- Wikipedia text is CC BY-SA 4.0 — copy the *facts* (not prose) into your table; facts are not copyrightable.
### Published test cards
- Stripe: https://docs.stripe.com/testing — Visa 4242424242424242, Mastercard 5555555555554444, Amex 378282246310005, Discover 6011111111111117, Diners 3056930009020004 (14), JCB 3566002020360505, UnionPay 6200000000000005; any future expiry, any CVC (4 for Amex).
- PayPal: https://developer.paypal.com/tools/sandbox/card-testing/ — Visa 4005519200000004, 4012000033330026, 4012000077777777, 4012888888881881, 4217651111111119, 4500600000000061, 4772129056533503, 4915805038587737; Mastercard 2223000048400011; Amex 371449635398431, 376680816376961; Diners 36461510000039, 36461510000013; Maestro 6304000000000000, 5063516945005047; JCB 3636500000000260, 3636500000000989; CUP 6200680000000004, 6200680000000038.
- Reuse: neither page carries an open licence (Stripe docs are under Stripe's site terms). The numbers themselves are Luhn-valid facts, widely reproduced; embedding the numbers with a "from Stripe/PayPal test docs" note is low-risk but **UNVERIFIED** as an explicit grant. Alternative: generate Luhn-valid numbers from the IIN table above — no dependency on either vendor.
### BIC / SWIFT (ISO 9362)
- https://en.wikipedia.org/wiki/ISO_9362: 4 letters bank code + 2 letters ISO 3166-1 country + 2 alphanumeric location + optional 3 alphanumeric branch (8 or 11 chars; `XXX` = primary office). Location second char `0` = test BIC, `1` = passive participant, `2` = reverse billing.
- Generator rule: `[A-Z]{4}[A-Z]{2}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?` — avoid `0`/`1` as the 8th char for a "live" BIC.
- SWIFT's BIC Directory is proprietary (SwiftRef licence, redistribution needs a separate "SwiftRef Redistribution License": https://www.swift.com/myswift/ordering/order-products-services/swiftref-redistribution-license) → **not embeddable**.
- Open alternative: GLEIF BIC-to-LEI mapping, https://www.gleif.org/en/lei-data/lei-mapping/download-bic-to-lei-relationship-files, files at https://mapping.gleif.org/api/v2/bic-lei/ (monthly zip; `LEI-BIC-20260828.zip` → `lei-bic-20260828T000000.csv`, columns `LEI,BIC`, 39,347 rows). Licence: "BIC/LEI Mapping Table License Agreement" (https://www.gleif.org/lei-data/lei-mapping/download-bic-to-lei-relationship-files/2017-12-21_annex-2_bic-to-lei-mapping-table-license-agreement_final.pdf) — a CC0-style grant "for any purpose whatsoever, including ... commercial" but **conditional on reproducing the notice** "SWIFT © and database rights [month year]. All rights reserved. This Mapping Table has been developed by SWIFT. Any use of the Mapping Table ... is subject to the BIC/LEI Mapping Table License Agreement ... For the latest BIC information and updates, always refer to www.swift.com/bic." Embeddable in an MIT repo with that notice in the data file; it is a list of real live BICs (bank names not included — join to GLEIF LEI data if names are wanted).
### ISIN (https://en.wikipedia.org/wiki/International_Securities_Identification_Number)
- 12 chars: 2-letter country + 9 alphanumeric NSIN + 1 check digit.
- Check: convert letters A=10…Z=35 (ASCII − 55) to produce a digit string, then Luhn over that string (double every second digit from the right, sum digits, check makes total ≡ 0 mod 10). Pitfall: work on the *expanded* digit string; a transposed letter pair can pass.
### CUSIP (https://en.wikipedia.org/wiki/CUSIP)
- 9 chars: 6 issuer + 2 issue + 1 check. Values: digits as-is, A=10…Z=35, `*`=36, `@`=37, `#`=38.
- Check: for i in 1..8, v = value; if i even, v ×= 2; sum += v div 10 + v mod 10; check = (10 − sum mod 10) mod 10.
- Real CUSIPs are proprietary (CGS/FactSet); generate synthetic ones only.
### IBAN (ISO 13616)
- Validation (https://en.wikipedia.org/wiki/International_Bank_Account_Number): move first 4 chars to end, letters → 10–35, integer mod 97 must equal 1; max 34 chars; check digits 02–98.
- SWIFT registry: https://www.swift.com/standards/data-standards/iban-international-bank-account-number, PDF release 101 https://www.swift.com/sites/default/files/files/iban-registry-v101.pdf (release 100 was Oct 2025); TXT also published (URL **UNVERIFIED** — swift.com returns 403/errors to automation this session). Terms: free of charge; no explicit licence text found (**UNVERIFIED**). Country count: 89 countries per Wikipedia (Dec 2024).
- Embeddable per-country length tables already extracted from the registry:
- php-iban `registry.txt` (https://github.com/globalcitizen/php-iban, **LGPL-3.0**): pipe-separated, 121 rows (116 official + unofficial), columns `country_code|country_name|domestic_example|bban_example|bban_format_swift|bban_format_regex|bban_length|iban_example|iban_format_swift|iban_format_regex|iban_length|bban_bankid_start_offset|...|country_sepa|swift_official|...|currency_iso4217|central_bank_url|central_bank_name|membership`. LGPL data in an MIT repo is awkward; use it as a *reference* to build your own table (formats are facts) rather than copying the file.
- ibankit-js (https://github.com/koblas/ibankit-js, **Apache-2.0**, registry v95) — same caveat.
- Best route: own table `{country, length, bban_format}` derived from the SWIFT PDF (facts), cite SWIFT.
### Currencies (ISO 4217)
- ISO says use is free: https://www.iso.org/iso-4217-currency-codes.html — "ISO allows free-of-charge use of its country, currency and language codes from ISO 3166, ISO 4217 and ISO 639". Official list from SIX: https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list-one.xml (+ `.xls`, `list-three` historic). Fields `CtryNm, CcyNm, Ccy, CcyNbr, CcyMnrUnts`; published 2026-01-01; 280 entity rows, 178 distinct codes. No symbols. No licence text inside the XML.
- Alternatives:
- datasets/currency-codes (https://github.com/datasets/currency-codes): **PDDL** (public domain); `data/codes-all.csv` fields `Entity, Currency, AlphabeticCode, NumericCode, MinorUnit, WithdrawalDate`; built from SIX list one + three; no symbols. Embeddable.
- npm `currency-codes` v2.2.0 (https://github.com/freeall/currency-codes): **MIT**; fields `code, number, digits, currency, countries[]`; generated from the SIX XML; no symbols. Embeddable.
- umpirsky/currency-list (https://github.com/umpirsky/currency-list): **MIT**; code → localised name only (311 entries in `data/en_US/currency.json`, includes historic); no symbols, no numeric codes, no decimals.
- Debian iso-codes (https://salsa.debian.org/iso-codes-team/iso-codes): **LGPL-2.1+**; `data/iso_4217.json` has `alpha_3, name, numeric` only (179 entries); no symbols/minor units. LGPL → avoid embedding.
- Symbols: none of the above carry them. Unicode CLDR (`common/main/en.xml` currency symbols, Unicode License, MIT-compatible with notice) is the usual source — **UNVERIFIED this session**.
### Crypto addresses
- Bitcoin (https://en.bitcoin.it/wiki/List_of_address_prefixes): P2PKH version 0x00 → leading `1`; P2SH 0x05 → leading `3`; Base58Check 25–34 chars (alphabet excludes `0OIl`; last 4 bytes = first 4 of double-SHA256 of version+payload). Testnet `m`/`n`, `2`, `tb1`.
- Bech32 (BIP-173, https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki, BSD-2-Clause): HRP `bc`, separator `1`, charset `qpzry9x8gf2tvdw0s3jn54khce6mua7l`, all-lowercase (or all-uppercase), max 90 chars; P2WPKH `bc1q…` = 42 chars, P2WSH `bc1q…` = 62 chars.
- Bech32m (BIP-350, https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki): witness v1+ (P2TR `bc1p…`, 62 chars), checksum constant `0x2bc830a3` instead of 1.
- Ethereum EIP-55 (https://eips.ethereum.org/EIPS/eip-55, CC0): `0x` + 40 hex; keccak256 of the lowercase hex (no 0x, as ASCII); for each hex letter, uppercase iff the corresponding hash nibble ≥ 8 (bit 4·i set). Digits unchanged.
## 3. Company
### NAICS 2022 (US Census)
- Page https://www.census.gov/naics/ ; files: 6-digit list https://www.census.gov/naics/2022NAICS/6-digit_2022_Codes.xlsx (82 kB; **1,012** six-digit codes, 111110…928120, verified by parsing), 2–6 digit https://www.census.gov/naics/2022NAICS/2-6%20digit_2022_Codes.xlsx, structure https://www.census.gov/naics/2022NAICS/2022_NAICS_Structure.xlsx, descriptions https://www.census.gov/naics/2022NAICS/2022_NAICS_Descriptions.xlsx, manual PDF https://www.census.gov/naics/reference_files_tools/2022_NAICS_Manual.pdf.
- Format: xlsx, column A code (numeric), column B title (trailing spaces in some titles — trim).
- Licence: no statement on the page or in the manual front matter; US federal government work → public domain in the US (17 U.S.C. §105). Embeddable; cite Census/OMB.
### SEC EDGAR company names
- `https://www.sec.gov/files/company_tickers.json`: object keyed `"0".."N"` of `{cik_str, ticker, title}`; **10,422** entries (2026-09-17). `company_tickers_exchange.json`: `{"fields":["cik","name","ticker","exchange"],"data":[...]}`.
- `https://www.sec.gov/Archives/edgar/cik-lookup-data.txt`: 40 MB, **1,059,372** lines, `NAME:CIK:` (`COMPANY NAME:0001234567:`), all filers incl. individuals — filter to the ticker list for company names.
- Access: declare `User-Agent: Company Name email@domain`, ≤ 10 req/s (https://www.sec.gov/os/webmaster-faq). Licence: "All Government-created content on sec.gov and EDGAR public filing content are free to access and reuse" (same FAQ). Embeddable; the ticker file (~800 kB) is the practical one.
### DUNS
- https://en.wikipedia.org/wiki/Data_Universal_Numbering_System: 9 digits, no significance; shown `NN-NNN-NNNN` or plain. Had a mod-10 check digit until ~Dec 2006; **dropped** since (expanded the pool by 800 M). So: any 9 digits are structurally valid today; no validation rule to enforce. Optional DUNS+4 suffix (4 alphanumerics) is user-assigned.
### Legal entity suffixes per country
- GLEIF ISO 20275 Entity Legal Forms code list v1.6 (2026-02-19): page https://www.gleif.org/en/lei-data/code-lists/iso-20275-entity-legal-forms-code-list ; CSV https://www.gleif.org/lei-data/code-lists/iso-20275-entity-legal-forms-code-list/2026-02-19-elf-code-list-v1.6.csv (758 kB; xlsx alongside).
- Columns: `ELF Code, Country of formation, Country Code (ISO 3166-1), Jurisdiction of formation, Country sub-division code (ISO 3166-2), Entity Legal Form name Local name, Language, Language Code (ISO 639-1), Entity Legal Form name Transliterated name, Abbreviations Local language, Abbreviations transliterated, Date created, ELF Status ACTV/INAC, Modification, Modification date, Reason`.
- Counts: 4,002 rows; 130 countries; 3,790 ACTV / 212 INAC; 1,518 rows have a local abbreviation (e.g. US `N.A.`, `FSA`; SE `AB`… multiple abbreviations separated by `;`). US has 737 rows (per-state forms). Abbreviations are the field you want for `Inc`, `LLC`, `GmbH`, `AB`, `SAS`, `Pty Ltd`; many rows have none, so filter on non-empty abbreviation and status ACTV.
- Licence: GLEIF Open Data page (https://www.gleif.org/en/about/open-data): "The data on GLEIF's website is provided under a Creative Commons (CC0) license"; LEI Data Terms of Use: "provided under the CC0 licence, see CC0 1.0 Universal". The ELF page itself names no licence — that CC0 explicitly covers this code list is **UNVERIFIED**, but GLEIF treats all its published data this way. Embeddable.
## Quick embed verdict
| Item | Embed? | Licence / attribution |
|---|---|---|
| SSA baby names | yes | CC0 (data.gov) |
| Census 2010 surnames | yes | US gov PD; cite Census |
| EIN prefixes, ITIN/SSN rules | yes (rules) | facts from IRS/SSA |
| NAICS 2022 | yes | US gov PD |
| SEC company_tickers.json | yes | free to reuse (SEC) |
| GLEIF ELF code list | yes | CC0 (GLEIF) |
| GLEIF BIC-LEI (real BICs) | yes, with mandatory SWIFT notice | custom permissive licence |
| ISO 4217 (SIX XML / datasets PDDL / npm MIT) | yes | free use (ISO), PDDL, MIT |
| Fed routing directory, SwiftRef BIC directory, CUSIP lists | no | restricted/proprietary — generate synthetically |
| php-iban / ibankit registries | copy facts only | LGPL-3.0 / Apache-2.0 |
| Stripe / PayPal test cards | numbers only, note source | no explicit grant (UNVERIFIED) |
# Part 2 — Internet, vehicle, airline
Verdict key: **EMBED** = safe to vendor into an MIT repo; **EMBED+ATTR** = ok with a notice; **AVOID** = licence incompatible or unclear.
## 4. Internet
### IANA registries (all of them)
- Licence: IANA/IETF statement at https://www.iana.org/help/licensing-terms — "IANA and IETF intend that the Protocol Registries may be freely used by any party for any purpose", data dedicated under **CC0 1.0**. No attribution required. **EMBED**.
- All registries below share this licence; ship one `SOURCES`/NOTICE line pointing at that URL.
| Registry | CSV URL | Rows (2026-09-16) | Notes |
|---|---|---|---|
| Media types | `https://www.iana.org/assignments/media-types/<type>.csv`, type ∈ application, audio, font, haptics, image, message, model, multipart, text, video (also `example`) | application 1800, audio 165, font 6, haptics 3, image 88, message 27, model 42, multipart 17, text 105, video 97 (header excluded) ≈ **2350** | Fields: `Name,Template,Reference`. Template is the full `type/subtype`; some rows are DEPRECATED/OBSOLETED in Name (filter). Format: RFC 6838 §4.2 — `type "/" subtype`, restricted chars, max 127 chars each, case-insensitive. |
| HTTP status codes | https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv | 75 rows, **64 assigned** (306 and 418 are "(Unused)"; 104 is TEMPORARY) → 62 usable | Fields: `Value,Description,Reference`. Value is 3 digits 1xx–5xx. |
| IPv4 special-purpose | https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry-1.csv | 26 blocks | Fields: `Address Block,Name,RFC,Allocation Date,Termination Date,Source,Destination,Forwardable,Globally Reachable,Reserved-by-Protocol`. |
| IPv6 special-purpose | https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry-1.csv | 27 blocks | Same fields. Contains `2001:db8::/32` and `3fff::/20`. |
| Service names / ports | https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.csv | 14,534 rows; 11,731 with both name and a single port; **6,102 distinct named ports**; 6,008 tcp-named; 707 tcp names < 1024 | Fields: `Service Name,Port Number,Transport Protocol,Description,Assignee,Contact,Registration Date,Modification Date,Reference,Service Code,Unauthorized Use Reported,Assignment Notes`. Port Number may be empty, single, or a range `a-b`. Well-known = 0–1023, registered 1024–49151, dynamic 49152–65535 (RFC 6335). ~1.1 MB; embed only the named-port subset. |
| TLDs | https://data.iana.org/TLD/tlds-alpha-by-domain.txt | **1,401** TLDs (first line is a `# Version …` comment) | Upper-case ASCII; IDNs as `XN--…` punycode. Same IANA CC0 terms (UNVERIFIED that data.iana.org is explicitly covered by the licensing page; it is the same registry data). Lower-case on use. |
### MIME extension mapping: jshttp/mime-db
- https://github.com/jshttp/mime-db — **MIT** (GitHub API spdx MIT; npm `license: MIT`), version 1.54.0 on npm.
- `db.json` (CDN: https://cdn.jsdelivr.net/npm/mime-db/db.json): object keyed by lower-case type → `{source, extensions[], compressible, charset}`.
- Counts (1.54.0): **2,522 types**, **1,015 with extensions**; source = iana 2,136, apache 275, nginx 13, custom 98.
- Sources: IANA registry (CC0), Apache httpd `mime.types` (Apache-2.0), nginx `mime.types` (BSD-2). **EMBED+ATTR** (keep the MIT copyright notice). Data updates are not semver-breaking per README.
### IPv4 / IPv6 generation rules (RFCs, no data file needed)
- RFC 5737 documentation: `192.0.2.0/24` (TEST-NET-1), `198.51.100.0/24` (TEST-NET-2), `203.0.113.0/24` (TEST-NET-3). https://www.rfc-editor.org/rfc/rfc5737.html
- RFC 1918 private: `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`. Also useful: `100.64.0.0/10` CGNAT (RFC 6598), `198.18.0.0/15` benchmarking (RFC 2544), `169.254.0.0/16` link-local.
- IPv6 documentation: `2001:db8::/32` (RFC 3849) and `3fff::/20` (RFC 9637, "expands on the existing 2001:db8::/32 … with the reservation of an additional, larger prefix"). ULA `fc00::/7` (use `fd00::/8`), link-local `fe80::/10`.
- Validation: generate inside those blocks; avoid network/broadcast (`.0`/`.255`) if the consumer expects host addresses. Format IPv6 per RFC 5952 (lower-case hex, `::` once, longest zero run).
### MAC OUI (IEEE MA-L)
- CSV: https://standards-oui.ieee.org/oui/oui.csv (3.8 MB, **40,161 rows**, fields `Registry,Assignment,Organization Name,Organization Address`; Assignment is 6 hex chars). Server returns HTTP 418 to non-browser user agents; fetch with a browser UA. Also MA-M `oui28.csv`, MA-S `oui36.csv`, CID `cid.csv`.
- Licence: no licence on the IEEE pages themselves (site footer "© IEEE – All rights reserved" is generic). Debian's `ieee-data` copyright file (https://metadata.ftp-master.debian.org/changelogs/main/i/ieee-data/unstable_copyright) records IEEE's 2014 statement: *"IEEE does not assert any copyright in the OUI Public Listing or attempt to restrict distribution of the listing in any way. The IEEE Registration Authority does, however, strongly encourage those who use the list to obtain it directly from IEEE…"* — same text in the FSF directory. Debian ships it in `main` on that basis. **EMBED+ATTR** (cite the statement); the org-address column is not needed — keep `Assignment,Organization Name` only (~1 MB → few hundred KB). UNVERIFIED: no current IEEE page restates it (regauth FAQ and IPR pages do not mention it).
- Alternative needing no data: locally administered unicast MAC — first octet's bit 1 (U/L) = 1, bit 0 (I/G) = 0 → second hex digit ∈ {2, 6, A, E}, e.g. `x2:xx:xx:xx:xx:xx`. Guaranteed never to collide with a vendor OUI. Notations: `01:23:45:67:89:ab`, `01-23-45-67-89-AB`, Cisco `0123.4567.89ab`.
### User-agent strings
| Source | Licence | Verdict |
|---|---|---|
| https://www.useragents.me/ | No licence stated anywhere on the page ("© 2022–2025 Useragents.me"); `/api` returns 404 now; JSON blobs embedded in page, weekly updates | **AVOID** (unlicensed = all rights reserved) |
| https://explore.whatismybrowser.com/useragents/explore/ + API legal https://developers.whatismybrowser.com/api/about/legal/ | Proprietary: "You may NOT share the unique database download URL, or the downloaded file itself … EXCEPT for making it publicly available on the internet" | **AVOID** |
| npm `user-agents` (intoli) https://github.com/intoli/user-agents | **BSD-2-Clause**, v2.1.185, daily-rebuilt dataset from Intoli traffic, weighted by frequency; fields `userAgent, platform, vendor, appName, deviceCategory, screenWidth/Height, viewportWidth/Height, connection{…}, oscpu, cpuClass, pluginsLength` | **EMBED+ATTR** (keep BSD notice). Count not stated on the page (UNVERIFIED; dataset is a few thousand rows). |
| npm `top-user-agents` (microlinkhq) https://github.com/microlinkhq/top-user-agents | **MIT** (GitHub API). Top 100 UA strings from microlink.io traffic, weekly; JSON: https://cdn.jsdelivr.net/gh/microlinkhq/top-user-agents@master/src/index.json (+ desktop.json, mobile.json) | **EMBED+ATTR** — smallest clean option |
- None of the above is CC0. Alternative: generate UAs from templates (Chrome/Firefox/Safari/Edge strings are fixed-form; only version numbers vary), no data needed.
### Programming languages: GitHub Linguist
- https://raw.githubusercontent.com/github-linguist/linguist/main/lib/linguist/languages.yml — **MIT** (repo LICENSE, "Copyright (c) 2017 GitHub, Inc."). **EMBED+ATTR**.
- **835** top-level entries; **562** with `type: programming` (others: data, markup, prose). Per-entry fields: `type, color, extensions, aliases, tm_scope, ace_mode, language_id, group, interpreters, …`.
### Operating systems
- No open dataset found beyond awesome-lists. OS names/versions are facts — hand-author a small table (Windows 10/11, Windows Server, macOS versions+names, Ubuntu/Debian/Fedora/Arch/Alpine, iOS, Android, FreeBSD…). `user-agents` (BSD-2) carries `platform`/`oscpu` values if a data-driven list is wanted.
### Database engines / collations
- Engine names: hand-author (facts).
- MySQL manual (https://dev.mysql.com/doc/refman/8.4/en/preface.html): Oracle terms — "you may not … copy, reproduce … distribute … any part" except distributing the docs with the software. **AVOID copying tables from MySQL docs.** Instead dump `SHOW COLLATION` from a `mysql:8.4.x` container (server output is factual, not the manual) — ~286 collations / 41 charsets in 8.x (UNVERIFIED count). PostgreSQL docs are under the PostgreSQL licence (permissive, keep notice) — `pg_collation` dump or docs both fine. MariaDB KB is CC BY-SA — avoid.
## 5. Vehicle
### NHTSA vPIC
- API base `https://vpic.nhtsa.dot.gov/api/vehicles/`, `?format=json|xml|csv`. Endpoints verified: `GetAllMakes` (**12,363 makes**, fields `Make_ID,Make_Name`; 612 KB JSON, mostly small trailer/custom builders — filter with `GetMakesForVehicleType/car` → 195 makes, `/truck` → 207), `GetModelsForMake/honda` (362 models, `Make_ID,Make_Name,Model_ID,Model_Name`), `DecodeWMI/1HG`, `GetWMIsForManufacturer/honda` (45 WMIs, fields `WMI,Name,Country,VehicleType,Id,…`), `GetVehicleVariableList`, `GetVehicleVariableValuesList/<display name>` (must be the display name, URL-encoded, e.g. `Fuel%20Type%20-%20Primary`; the camel-case name returns 0 rows).
- Value lists (counts): **Fuel Type - Primary 14**, **Body Class 71**, **Transmission Style 12**, **Drive Type 23**, **Vehicle Type 9**. Fields `Id,Name`.
- Bulk: https://vpic.nhtsa.dot.gov/downloads/ — `vPICList_lite_2026_08.bak.zip` (MS SQL Server 2019+ backup, 190 MB, updated 2026-08-14), also `.plain.zip` / `.custom.zip`. Page says standalone DB "limited to VIN decoding"; makes/models/variables still via API. Contains `Wmi`, `Make`, `Model`, `WMIYearValidChars` tables (UNVERIFIED table names).
- Licence: FAQ https://vpic.nhtsa.dot.gov/api/home/index/faq — "No, NHTSA is a government agency and the services provided on the API are free for use by the public as an offering as a part of our Open Data initiatives"; no rate-limit number stated, batch jobs asked to run at night. Work of the US federal government → public domain under 17 USC §105; data.gov entry lists licence as "unknown". **EMBED** (note source; no attribution legally required).
### VIN (ISO 3779 / 49 CFR 565, North America)
- 17 chars from `0-9 A-H J-N P R-Z` (**I, O, Q never**). Positions: 1–3 WMI, 4–8 VDS, 9 check digit, 10 model year, 11 plant, 12–17 serial (last 4 must be digits for US, positions 12–14 alphanumeric — 49 CFR 565.15).
- Check digit: transliterate `A=1 B=2 C=3 D=4 E=5 F=6 G=7 H=8 J=1 K=2 L=3 M=4 N=5 P=7 R=9 S=2 T=3 U=4 V=5 W=6 X=7 Y=8 Z=9`, digits as-is; weights `8 7 6 5 4 3 2 10 0 9 8 7 6 5 4 3 2`; sum mod 11 → digit, remainder 10 → `X`.
- Model year (pos 10): excludes `I O Q U Z 0`; `A=2010 … H=2017 J=2018 K=2019 L=2020 M=2021 N=2022 P=2023 R=2024 S=2025 T=2026 V=2027 W=2028 X=2029 Y=2030`, `1=2031…9=2039` (30-year cycle; `1–9` also = 2001–2009). Source: https://en.wikipedia.org/wiki/Vehicle_identification_number (rules are facts; do not copy prose).
### WMI list
- SAE J1044 / SAE WMI database is paid (https://www.sae.org/standards/j1044_202501-world-manufacturer-identifier) — **AVOID**.
- Wikipedia "List of WMIs" — CC BY-SA — **AVOID**.
- Use vPIC: `GetWMIsForManufacturer/<name or id>` per manufacturer, or the `Wmi` table in the standalone `.bak`. Public domain. Country prefix rule (first char): `1,4,5` USA, `2` Canada, `3` Mexico, `J` Japan, `K` Korea, `S` UK, `W` Germany, `Y` Sweden/Finland, `Z` Italy, `L` China (ISO 3780 facts).
### US licence plate formats
| Source | Licence | Verdict |
|---|---|---|
| openalpr `runtime_data/postprocess/us.patterns` (https://github.com/openalpr/openalpr) | **AGPL-3.0** | **AVOID** (291 lines, `@`=letter `#`=digit — useful only as a reference to check hand-authored patterns) |
| Wikipedia "United States license plate designs and serial formats" | CC BY-SA | **AVOID copying**; formats themselves are facts |
| jonnii/platekit | MIT, but SVG rendering, no serial patterns | not useful |
- No MIT/CC0 per-state pattern list found. Recommendation: hand-author a per-state table (facts); current standard passenger formats as listed by Wikipedia (verify against DMV pages before use): AL `0AXXXXX`/`00AXXXX`, AK `ABC 123`, AZ `XXX 1XX`, AR `ABC 12D`, CA `1ABC123` (digit-3 letters-3 digits), CO `ABC-D12`, CT `AB·12345`, DE `123456`, DC `AB-1234`, FL `ABC D12`, GA `ABC1234`, HI `ABC 123`, ID `A 1234U`, IL `AB 12345`, IN `123ABC`, IA `ABC 123`, KS `1234ABC`, KY `ABC123`, LA `123 ABC`, ME `123·ABC`, MD `1AB2345`, MA `1ABC 23`, MI `ABC 1234`, MN `ABC-123`, MS `ABC 123`, MO `AB1 C2D`, MT `0-AB1234`, NE `ABC 123`, NV `123·A45`, NH `123 4567`, NJ `D12-ABC`, NM `123-ABC`, NY `ABC-1234`, NC `ABC-1234`, ND `123 ABC`, OH `ABC 1234`, OK `ABC-123`, OR `123 ABC`, PA `ABC1234`, RI `1AB 234`, SC `123ABC`, SD `0A1 234`, TN `ABC 1234`, TX `ABC-1234`, UT `A12 3BC`, VT `ABC 123`, VA `ABC-1234`, WA `ABC1234`, WV `X1A 2345`, WI `ABC-1234`, WY `1A-123A`. Most states omit I/O/Q from serials (state-specific, UNVERIFIED per state).
## 6. Airline
### OurAirports
- https://ourairports.com/data/ — "All data is released to the Public Domain"; mirror repo https://github.com/davidmegginson/ourairports-data is **Unlicense** (GitHub API). Nightly updates. **EMBED**.
- Raw URLs: `https://davidmegginson.github.io/ourairports-data/{airports,airport-frequencies,runways,navaids,countries,regions}.csv`.
| File | Rows | Fields |
|---|---|---|
| airports.csv (12.7 MB) | **86,089**; by type: small_airport 42,734, heliport 23,216, closed 13,524, medium 4,106, seaplane_base 1,273, large 1,174, balloonport 62 | `id,ident,type,name,latitude_deg,longitude_deg,elevation_ft,continent,iso_country,iso_region,municipality,scheduled_service,icao_code,iata_code,gps_code,local_code,home_link,wikipedia_link,keywords` |
| — with `iata_code` | **9,055** (large 1,171, medium 3,398, small 4,233, seaplane 153, heliport 100); `scheduled_service=yes` 4,335; US with IATA 2,036 (873 large/medium) | Suggested subset: `iata_code != '' AND type IN (large_airport, medium_airport)` → 4,569 rows |
| countries.csv | **249** | `id,code,name,continent,wikipedia_link,keywords` |
| regions.csv | **3,987** | `id,code,local_code,name,continent,iso_country,wikipedia_link,keywords` (code = ISO 3166-2, e.g. `US-KS`) |
- No airline file. Derived: datasets/airport-codes on datahub (PDDL) — no need, use upstream.
### OpenFlights
- https://openflights.org/data.php — airports/airlines/routes/planes under **ODbL 1.0** (+ DbCL); airline/plane data partly from Wikipedia (GFDL/CC BY-SA). 5,888 airlines (2012). **AVOID** (share-alike). npm `airline-codes` (npow, ISC) is a straight OpenFlights sync → inherits ODbL → **AVOID**.
### Airline IATA/ICAO codes — open options
| Source | Licence | Count | Verdict |
|---|---|---|---|
| Wikidata SPARQL (https://query.wikidata.org/sparql) | **CC0** (https://www.wikidata.org/wiki/Wikidata:Licensing) | **2,928** items with IATA code (P229), **3,644** with ICAO code (P230) | **EMBED**. Query: `SELECT ?item ?itemLabel ?iata ?icao ?callsign WHERE { ?item wdt:P229 ?iata . OPTIONAL { ?item wdt:P230 ?icao } OPTIONAL { ?item wdt:P432 ?callsign } SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } }`. Includes defunct airlines — filter `MINUS { ?item wdt:P576 ?dissolved }` and/or P31 = Q46970 (airline). |
| OpenTravelData `optd_airlines.csv` (https://github.com/opentraveldata/opentraveldata) | **CC BY 4.0** | 1,620 rows; `^`-separated; fields `pk^env_id^validity_from^validity_to^3char_code^2char_code^num_code^name^name2^alliance_code^alliance_status^type^wiki_link^flt_freq^alt_names^bases^key^version^parent_pk_list^successor_pk_list` | **EMBED+ATTR** (attribution notice required) |
- Format rules: IATA designator = 2 alphanumeric chars (`[A-Z0-9]{2}`, at least one letter in practice; a third optional char exists in the standard but is unused); "controlled duplicates" share a code between non-overlapping regional carriers. ICAO designator = 3 letters `[A-Z]{3}`, unique. Accounting/prefix code = 3 digits (ticket number prefix, e.g. `016` United).
### Aircraft types
| Source | Licence | Verdict |
|---|---|---|
| ICAO Doc 8643 (https://www.icao.int/operational-safety/doc-8643-aircraft-type-designators) | ICAO copyright notice: "None of the materials … may be used, reproduced or transmitted … without permission in writing from ICAO"; API Data Service is paid (25 free trial calls) | **AVOID** — including GitHub mirrors such as ColtJD45/icao-aircraft-designator-list (MIT-labelled, 7,388 rows, fields `manufacturer,model,type_designator,description,engine_type,engine_count,wtc`) because the underlying data is scraped ICAO content (UNVERIFIED provenance) |
| OpenSky aircraft database (https://opensky-network.org/data/aircraft; CSV https://s3.opensky-network.org/data-samples/metadata/aircraftDatabase.csv) | "The aircraft database is unlicensed and does not fall under our terms of use … offered as is"; built from registries, openflights.org and ICAO Doc 8643; citation requested; page says it is no longer up to date | **AVOID** ("unlicensed" ≠ open; upstream includes ODbL/ICAO). Fields for reference: `icao24,registration,manufacturericao,manufacturername,model,typecode,serialnumber,linenumber,icaoaircrafttype,operator,operatorcallsign,operatoricao,operatoriata,owner,…,engines,…,categoryDescription` |
| Wikidata | **CC0** | **550** items with ICAO aircraft type designator (P8305); also IATA aircraft code P9040 (UNVERIFIED property id), manufacturer P176 | **EMBED**. Query: `SELECT ?item ?itemLabel ?icao ?mfrLabel WHERE { ?item wdt:P8305 ?icao . OPTIONAL { ?item wdt:P176 ?mfr } SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } }` |
- Format: ICAO type designator 2–4 alphanumerics (`[A-Z0-9]{2,4}`, e.g. `B738`, `A20N`, `E190`); IATA aircraft code 3 alphanumerics (`738`, `32N`).
### Airport / flight / seat format rules
- IATA airport code `[A-Z]{3}`; ICAO location indicator `[A-Z0-9]{4}` (US `K…`, Canada `C…`, UK `EG…`, Sweden `ES…`). Use OurAirports rows so codes are real.
- Flight number: 2-char IATA designator + 1–4 digits, no leading zeros in display (`QF9`, `AA1234`); systems cap at 0001–9999. Conventions (not rules): 1–999 mainline, 3000–5999 regional affiliates, ≥6000 codeshares, 8xxx charters, ≥9000 ferry/positioning. ICAO form: 3-letter designator + 1–4 alphanumerics (`AFR1`). Source: https://en.wikipedia.org/wiki/Flight_number.
- Seat: `row + letter`. Rows typically 1–~60 (A380 up to ~90); many airlines skip 13 (and 14/17 on some carriers). Letters `A–K` **skipping I** (looks like 1/l); narrow-body 3-3 = `ABC DEF` (A/F windows, C/D aisles); wide-body 3-4-3 = `ABC DEFG HJK`, 2-4-2 = `AB DEFG JK`. Regex: `^[1-9][0-9]?[A-HJK]$`.
# Part 3 — Science/nature, Text, Dates: open data sources for an MIT fake-data library
Researched 2026-09-17. "OK to embed" = redistributable inside an MIT repo with the stated notice. Anything not fetched first-hand is marked **UNVERIFIED**.
## 7. Science / nature
### Periodic table
| Source | Licence | Embed in MIT repo | Fields | Rows | Format |
|---|---|---|---|---|---|
| PubChem periodic table — CSV https://pubchem.ncbi.nlm.nih.gov/rest/pug/periodictable/CSV, JSON https://pubchem.ncbi.nlm.nih.gov/rest/pug/periodictable/JSON (page: https://pubchem.ncbi.nlm.nih.gov/periodic-table/) | US-government work, public domain. NLM policy (https://www.ncbi.nlm.nih.gov/home/about/policies/): "Information that is created by or for the US government on this site is within the public domain … may be freely distributed and copied. However, it is requested that in any subsequent use of this work, NLM be given appropriate acknowledgment." | Yes; add an acknowledgment line ("Element data: PubChem/NLM"). | `AtomicNumber, Symbol, Name, AtomicMass, CPKHexColor, ElectronConfiguration, Electronegativity, AtomicRadius, IonizationEnergy, ElectronAffinity, OxidationStates, StandardState, MeltingPoint, BoilingPoint, Density, GroupBlock, YearDiscovered` (17) | 118 (Z=1..118, verified) | CSV; JSON is `{Table:{Columns:{Column:[...]},Row:[{Cell:[...]}]}}` |
| NIST periodic table https://www.nist.gov/pml/periodic-table-elements | Public domain (17 USC 105); NIST asks for citation (https://www.nist.gov/open/copyright-fair-use-and-licensing-statements-srd-data-software-and-technical-series-publications) | Yes, but | PDF only (no CSV/JSON) — not usable as a data source | 118 | PDF |
| Bowserinator/Periodic-Table-JSON https://github.com/Bowserinator/Periodic-Table-JSON | **CC BY-SA 3.0** (LICENSE.md, verified; data derived from Wikipedia) | **No** — ShareAlike is incompatible with MIT redistribution | 33 keys incl. `name, symbol, number, atomic_mass, category, phase, period, group, block, shells, electron_configuration, summary, cpk-hex, …` | **119** (includes hypothetical Ununennium) | JSON, CSV |
| faker-js `src/locales/en/science/chemical_element.ts` https://github.com/faker-js/faker (branch `next`) | MIT (LICENSE verified) | Yes, keep MIT notice | `{symbol, name, atomicNumber}` | 118 | TS |
Validation rules: `AtomicNumber` 1..118 unique; `Symbol` 1–2 letters, first uppercase, unique; `Name` unique. PubChem leaves numeric fields empty for Z≥104 where unknown; `ElectronConfiguration` for Og is `"[Rn]7s2 7p6 5f14 6d10 (predicted)"` and `StandardState` is `"Expected to be a Gas"` — strip "(predicted)"/"Expected to be a" if you want an enum. `AtomicMass` for unstable elements is the mass number of the most stable isotope as a bare decimal (e.g. `295.216`), no brackets. `CPKHexColor` is 6 hex digits without `#`, empty for some.
### SI units
- Source: BIPM SI Brochure, 9th ed. (2019; current revision v4.01, 2026) https://www.bipm.org/en/publications/si-brochure ; PDF https://www.bipm.org/documents/20126/41483022/SI-Brochure-9-EN.pdf
- Licence: **CC BY 4.0** — stated on the brochure page and on BIPM's copyright page (https://www.bipm.org/en/copyright): content may be adapted, copied, used in commercial products with "appropriate acknowledgement of the BIPM and its source"; BIPM name/logo must not imply endorsement. Verified via the HTML pages; the PDF's own front-matter licence line is **UNVERIFIED** (could not text-extract the PDF here).
- Embed: Yes — the unit *names/symbols* are facts (not copyrightable); attribute "SI Brochure, BIPM, CC BY 4.0" anyway.
- Data (cross-checked against https://en.wikipedia.org/wiki/International_System_of_Units):
- 7 base units: second s (time), metre m (length), kilogram kg (mass), ampere A (electric current), kelvin K (thermodynamic temperature), mole mol (amount of substance), candela cd (luminous intensity).
- 22 coherent derived units with special names: radian rad, steradian sr, hertz Hz, newton N, pascal Pa, joule J, watt W, coulomb C, volt V, farad F, ohm Ω, siemens S, weber Wb, tesla T, henry H, degree Celsius °C, lumen lm, lux lx, becquerel Bq, gray Gy, sievert Sv, katal kat.
- 24 prefixes: quetta Q 10^30, ronna R 10^27, yotta Y 10^24, zetta Z 10^21, exa E 10^18, peta P 10^15, tera T 10^12, giga G 10^9, mega M 10^6, kilo k 10^3, hecto h 10^2, deca da 10^1, deci d 10^-1, centi c 10^-2, milli m 10^-3, micro µ 10^-6, nano n 10^-9, pico p 10^-12, femto f 10^-15, atto a 10^-18, zepto z 10^-21, yocto y 10^-24, ronto r 10^-27, quecto q 10^-30.
- Format rules for valid output: unit symbols are case-sensitive (`s` vs `S`, `m` vs `M`); prefix and unit symbol are joined without a space (`kJ`, `µs`); a space separates number and unit (`12 kg`), except the degree/minute/second of plane angle; `kg` already carries a prefix — never `µkg`; micro is Greek mu U+03BC (U+00B5 micro sign is the legacy compatibility character); ohm is U+03A9 (U+2126 OHM SIGN is deprecated); `°C` not `° C`.
- MIT alternative: faker-js `en/science/unit.ts` — 29 `{name, symbol}` objects, MIT.
### Animals by class
- **Wikidata** (https://www.wikidata.org/wiki/Wikidata:Licensing): all structured data **CC0** — no attribution required. Embed: Yes.
- Feasibility, live SPARQL (https://query.wikidata.org/sparql), pattern `?t wdt:P31 wd:Q16521; wdt:P105 wd:Q7432; wdt:P171* wd:<class>; wdt:P1843 ?cn FILTER(LANG(?cn)='en')` (taxon, rank species, parent-taxon chain, English common name):
- Mammalia Q7377: **5,759** species with ≥1 English common name.
- Aves Q5113: **12,432**.
- Reptilia Q10811: **16,369** — suspiciously large; Wikidata's parent chain likely pulls birds/Sauropsida in. Use Squamata Q122422 + Testudines Q223044 + Crocodilia Q1387 (or check the chain) instead.
- Insecta Q1390 and Plantae Q756: **timed out (502/504) every attempt** — trees too big for the 60 s public endpoint. Options: paginate by order (`P171` one level at a time), use the weekly JSON dump, or take GBIF instead.
- Sample rows (mammals): `Notoryctes typhlops` → "Central Desert Marsupial Mole", "Itjaritjari", "Marsupial Mole", "Southern marsupial mole", "Southern Marsupial Mole" — i.e. **several P1843 values per taxon, inconsistent casing, and indigenous-language names tagged `en`**. Validation: pick one name per taxon (prefer the one matching the item's English `rdfs:label`), normalise case, drop names that equal the scientific name.
- **GBIF Backbone Taxonomy** https://www.gbif.org/dataset/d7dddbf4-2cf0-4f39-9b2a-bb099caae36c — licence **CC BY 4.0** (verified via https://api.gbif.org/v1/dataset/d7dddbf4-2cf0-4f39-9b2a-bb099caae36c, `license: http://creativecommons.org/licenses/by/4.0/legalcode`); required citation text: "GBIF Secretariat (2023). GBIF Backbone Taxonomy. Checklist dataset https://doi.org/10.15468/39omei". Embed: Yes with that citation. Vernacular names come via `/v1/species/{key}/vernacularNames`, each row from a *different* source checklist with its own licence (some CC BY-NC) — record and check per row. GBIF's site terms page (https://www.gbif.org/terms) was unreachable (timeout) — **UNVERIFIED** beyond the API field.
- **faker-js** `src/locales/en/animal/*` (MIT; counts = quoted string lines on branch `next`): bird 821, snake 533, dog 493, cow 467, horse 342, rodent 161, insect 129, fish 95, cat 55, cetacean 52, rabbit 49, type 44 (generic: "bat, bear, bee, …, zebra"), pet_name 42, crocodilia 24, bear 8, lion 7. These are breeds/species mixed with common names, no class field; fine as MIT drop-ins. (A WebFetch summariser claimed 1,036 dogs; the regex count is 493 — treat the exact count as UNVERIFIED.)
### Plants
- Same Wikidata approach (CC0) — but the Plantae query timed out; paginate by order or family (`?t wdt:P171 ?family . ?family wdt:P105 wd:Q35409`) or use the dump.
- GBIF Plantae (kingdomKey 6) vernacular names, CC BY 4.0, same per-row-licence caveat.
- faker-js has **no** plant list (en locale dirs: airline, animal, app, book, color, commerce, company, database, date, finance, food, hacker, internet, location, lorem, medical, music, person, phone_number, science, team, vehicle, word).
- USDA PLANTS database (public domain, has common names) — **UNVERIFIED**, not fetched.
### Planets / moons
- NASA NSSDCA Planetary Fact Sheet https://nssdc.gsfc.nasa.gov/planetary/factsheet/ — 10 columns (Mercury, Venus, Earth, Moon, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto) × 20 rows (mass 10^24 kg, diameter km, density, gravity, escape velocity, rotation period, day length, distance from Sun, perihelion, aphelion, orbital period, orbital velocity, inclination, eccentricity, obliquity, mean temp °C, surface pressure, number of moons, rings Y/N, magnetic field Y/N). HTML table only. NASA content "generally not subject to copyright in the United States" (https://www.nasa.gov/nasa-brand-center/images-and-media/); NASA asks to be acknowledged; the NASA insignia must not be used. Embed: Yes with "Source: NASA NSSDCA".
- Wikidata (CC0): planets = `?p wdt:P31/wdt:P279* wd:Q634; wdt:P397 wd:Q525` → Mercury Q308, Venus Q313, Earth Q2, Mars Q111, Jupiter Q319, Saturn Q193, Uranus Q324, Neptune Q332 (plus hypothetical Theia Q1053432 — filter out). Moons = `?m wdt:P397 <planet>; wdt:P31/wdt:P279* wd:Q2537` (natural satellite; note **Q2199 is "dwarf planet"**, not moon): Saturn 165, Jupiter 85, Uranus 29, Neptune 16, Earth 5, Mars 2. Caveats: Wikidata lags IAU counts (Saturn has 274 recognised moons as of 2025 — UNVERIFIED figure); Earth's 5 includes quasi-satellites; provisional designations (`S/2004 S 3`) are labels too — filter `^S/\d{4}` if you want proper names only.
### Blood type distribution
- **US** (Stanford Blood Center https://stanfordbloodcenter.org/donate-blood/blood-donation-facts/blood-types/, verified; cites AABB Technical Manual 18th ed.): O+ 37.4 %, A+ 35.7 %, B+ 8.5 %, AB+ 3.4 %, O− 6.6 %, A− 6.3 %, B− 1.5 %, AB− 0.6 % (sums to 100.0). Facts — freely embeddable; cite Stanford/AABB.
- American Red Cross https://www.redcrossblood.org/donate-blood/blood-types.html — **UNVERIFIED**: site returns HTTP 403 (Akamai) to both WebFetch and the headless browser. Search snippets say the Red Cross gives type O by ethnicity (Latino 57 %, African American 51 %, Caucasian 45 %) rather than an 8-way national table.
- **Global**: no authoritative figure found. Wikipedia "Blood type distribution by country" gives a population-weighted row (O+ 38.4, A+ 27.3, B+ 8.1, AB+ 2.0, O− 13.1, A− 8.1, B− 2.0, AB− 0.01) that its own editors flag "unreliable source"; WorldAtlas gives O+ 42, A+ 31, B+ 15, AB+ 5, O− 3, A− 2.5, B− 1, AB− 0.5 with no source. Recommend shipping only the US table, or per-country tables from Wikipedia (facts; Wikipedia prose is CC BY-SA but the numbers are cited to national blood services — cite those).
- Validation: ABO ∈ {A, B, AB, O}; Rh ∈ {+, −}; weights must sum to 100 ± rounding.
## 8. Text
### English word lists with part of speech
| Source | Licence | Embed | Counts | Format |
|---|---|---|---|---|
| Princeton WordNet 3.0 / 3.1 https://wordnet.princeton.edu/license-and-commercial-use ; download https://wordnetcode.princeton.edu/wn3.1.dict.tar.gz | "WordNet License" (SPDX `WordNet`), BSD-style: permission to use/copy/modify/distribute "for any purpose and without fee or royalty … provided that … the following copyright notice and statements, including the disclaimer … appear on ALL copies … including modifications". Notice text: "WordNet 3.0 Copyright 2006 by Princeton University. All rights reserved." + AS-IS disclaimer; no use of Princeton's name in advertising. | Yes — ship the LICENSE text alongside the data | WordNet 3.0 (wnstats(7WN), verified): unique strings noun 117,798 / verb 11,529 / adj 21,479 / adv 4,481 (total 155,287); synsets 82,115 / 13,767 / 18,156 / 3,621 | WNDB: `index.noun|verb|adj|adv` (one lemma per line: `lemma pos synset_cnt p_cnt [ptr…] sense_cnt tagsense_cnt synset_offset…`), `data.<pos>` (synsets with glosses). Multi-word lemmas use `_` for spaces; lower-case; entries can contain digits/apostrophes/hyphens. |
| Open English WordNet 2025 https://en-word.net/ ; https://github.com/globalwordnet/english-wordnet | **CC BY 4.0**; cite "Open English WordNet … derived from Princeton WordNet" | Yes, with attribution | 135,969 words, 107,519 synsets (README, verified) | `english-wordnet-2025.zip` (WNDB, 9.2 MB), `english-wordnet-2025.xml.gz` (WN-LMF, 10.8 MB), `english-wordnet-2025-json.zip` (9.5 MB), `.ttl.gz` (16.9 MB) |
| SCOWL v2 / ESDB https://github.com/en-wl/wordlist (branch v2) ; classic http://wordlist.aspell.net/ | Custom MIT-like (Copyright 2000-2026 Kevin Atkinson: use/copy/modify/distribute/sell "provided that the above copyright notice appears in all copies and that both the above copyright notice and this notice appear in supporting documentation"). Sources 12dicts + ENABLE2K are public domain; lists above size 80 add the UKACD notice; **POS assignments partly from WordNet, so the WordNet notice "MIGHT apply"** (their words). Australian-English parts carry an extra notice. | Yes, ship the Copyright file | Sizes 35 (small), 50 (medium), 60 (spell-check default), 70 (large), 80 (incl. game words), 85 (archaic). No per-size counts published in the v2 README. Classic SCOWL sizes 10–95 — counts **UNVERIFIED** (README not reachable). | v2: `scowl.db` (SQLite), `scowl.txt`, Python `libscowl`. ESDB rows carry POS, spelling (A/B/Z/C/D) and region codes. |
| 12dicts http://wordlist.aspell.net/12dicts-readme/ | Public domain ("I explicitly release them to the public domain, but request acknowledgment"), **except** `2of12inf` and the `2+2+3*` lists, which depend on AGID and inherit its terms | Yes (PD lists); acknowledge Alan Beale | 3esl ≈22k, 6of12 ≈32k, 2of12 ≈41k, 2of12inf ≈82k, 3of6game ≈65k, 5d+2a ≈68k, 3of6all ≈83k, 2+2+3lem ≈84k, 2of5core ≈4.7k, 6phrase ≈22k, neol2016 ≈600 | Plain text, one word per line; marker suffixes `+ ! ^ &` (not POS). **No POS tags** in any current 12dicts list. |
| Moby Part-of-Speech II https://www.gutenberg.org/ebooks/3203 ; file https://www.gutenberg.org/files/3203/files/mobypos.txt | Public domain ("Public Domain material by grant from the author, January, 2001", in the package README) | Yes, no notice needed | **233,356** lines (verified) | One entry per line: `word\CODES`, CRLF line ends (e.g. `A-line\NA`, `a tempo\Avh`). Codes in priority order: `N` noun, `p` plural, `h` noun phrase, `V` verb (usu. participle), `t` transitive verb, `i` intransitive verb, `A` adjective, `v` adverb, `C` conjunction, `P` preposition, `!` interjection, `r` pronoun, `D` definite article, `I` indefinite article, `o` nominative. Many entries are phrases, proper nouns, or 1990s-era; non-ASCII entries use a legacy 8-bit encoding (e.g. `a bon march\v` lost its `é`) — restrict to ASCII `[a-z]+` for a clean list. |
| faker-js `en/word/*` (MIT) | MIT | Yes | adjective 1000, noun 1000, verb 1000, adverb 325, preposition 109, conjunction 51, interjection 46 | TS string arrays |
### Word frequency lists
| Source | Licence | Verdict |
|---|---|---|
| Google Books Ngram data v2/v3 https://storage.googleapis.com/books/ngrams/books/datasetsv3.html | **CC BY 3.0** ("This compilation is licensed under a Creative Commons Attribution 3.0 Unported License") | Embeddable with attribution. Format `ngram TAB year TAB match_count TAB volume_count`; 1-gram files split by leading letter, GBs each — aggregate offline to a top-N list. |
| wordfreq https://github.com/rspeer/wordfreq | Code **Apache 2.0** (not MIT). Data: "may be redistributed under a Creative Commons Attribution-ShareAlike 4.0 license" (mix of Google Books, Wikipedia, OpenSubtitles, SUBTLEX, Leeds, ParaCrawl, Twitter); maintainer notes the CSV export "does not follow the CC-By-SA license". Project in sunset mode (data snapshot ≈2021). | **Avoid** embedding the data (ShareAlike). |
| Peter Norvig count_1w.txt https://norvig.com/ngrams/ | Page says "Code … under the MIT license"; the **data** comes from the Google Web 1T corpus distributed by LDC under LDC terms — no data licence stated. | **UNVERIFIED / avoid**. 333,333 words, `word TAB count`, lowercase. |
| hermitdave/FrequencyWords https://github.com/hermitdave/FrequencyWords | "MIT License for code. CC-by-sa-4.0 for content." | **Avoid** (ShareAlike). |
### Lorem ipsum
- Canonical paragraph (Letraset, 1966; public domain — garbled Cicero): "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- Source: Cicero, *De finibus bonorum et malorum* 1.10.32–33 (45 BC), public domain; the "dolorem ipsum" fragment begins "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit…". Reference: https://en.wikipedia.org/wiki/Lorem_ipsum
- MIT word pool alternative: faker-js `en/lorem/word.ts` — 999 words.
### Quote collections
- Project Gutenberg #27889 https://www.gutenberg.org/ebooks/27889 — Bartlett, *Familiar Quotations*, **9th edition** (title page "NINTH EDITION", copyright 1875/1882/1891/1903) — not the 1919 10th. "Public domain in the USA." Plain text 3.1 MB, HTML zip 50 MB, EPUB.
- Project Gutenberg #16732 https://www.gutenberg.org/ebooks/16732 — an early (Hurst & Co. reprint) edition, no edition number given. PD in USA.
- 10th edition (1914/1919, ed. Nathan Haskell Dole) exists on archive.org (https://archive.org/details/bartlettsfamilia0000john_o4b4) — not found on Gutenberg; **UNVERIFIED** availability as clean text.
- Either Bartlett text needs parsing (quote / author / source headings); no structured file. Wikiquote is CC BY-SA — avoid.
- Validation: strip Gutenberg header/footer (`*** START OF THE PROJECT GUTENBERG EBOOK` … `*** END …`) before extraction; Gutenberg's trademark terms only bind if you keep the "Project Gutenberg" name on the output — strip it.
### Colour names
| Source | Licence | Embed | Count / format |
|---|---|---|---|
| CSS Color Module Level 4 §named colors https://www.w3.org/TR/css-color-4/#named-colors | W3C Document License (2023) https://www.w3.org/copyright/document-license-2023/ — copy/distribute allowed for any purpose; derivatives allowed only "to facilitate implementation of the technical specifications"; notice required: "Copyright © 2023 W3C®. This software or document includes material copied from or derived from [title and URI]." | Yes — the name→hex table is factual data and is copied into every browser; include the W3C notice line with the spec title + URI. | **148** names (verified: aliceblue … yellowgreen, incl. `rebeccapurple #663399`); all names lowercase ASCII, hex 6 lowercase digits. |
| XKCD colour survey https://xkcd.com/color/rgb.txt | **CC0** (file header: `# License: https://creativecommons.org/publicdomain/zero/1.0/`) | Yes, no notice needed | **949** lines (verified). Format `name TAB #rrggbb TAB` (note the trailing tab). Max name length 26; all hex valid lowercase; no duplicate names. Contains crude names ("poo", "baby poop green", "diarrhea", "vomit") — apply a blocklist. |
| faker-js `en/color/human.ts` | MIT | Yes | 31 names |
| Pantone | Proprietary | **Avoid** | — |
## 9. Dates
### IANA tz database
- Source https://www.iana.org/time-zones ; files https://data.iana.org/time-zones/tzdb/ (current version **2026d**, verified). LICENSE: "Unless specified below, all files in the tz code and data (including this LICENSE file) are in the public domain" (only `date.c`, `newstrftime.3`, `strftime.c` are BSD-3). Embed: Yes, no notice needed.
- `zone1970.tab` — **312** data rows; tab-separated; UTF-8; `#` comments. Columns: (1) comma-separated ISO 3166-1 alpha-2 codes of countries overlapping the zone, most-populous first; (2) coordinates in ISO 6709 `±DDMM±DDDMM` or `±DDMMSS±DDDMMSS` (lat then lon, no separator); (3) TZ name (`Europe/Zurich`); (4) comment, present iff the country has several zones. One row per timezone where civil time has agreed since 1970.
- `zone.tab` — **418** rows, older one-country-per-row table (column 1 is a single country code); kept for backward compatibility. Prefer `zone1970.tab`.
- `backward` — **252** `Link TARGET LINK-NAME` lines mapping old/merged names (`US/Eastern`, `Asia/Calcutta`, `Europe/Kiev`) to current ones; also a few `Zone` entries. Use it to (a) accept aliases as input and (b) never emit them as output.
- UTC offsets: do **not** embed — offsets depend on DST rules that change several times a year. Derive at runtime: `new Intl.DateTimeFormat('en-US', { timeZone, timeZoneName: 'longOffset' }).formatToParts(date)` → part `timeZoneName` = `GMT-05:00` (or `GMT` for zero) — strip `GMT`, treat bare `GMT` as `+00:00`. Validation of a generated zone name: `Intl.supportedValuesOf('timeZone')` (canonical names only; whether links like `US/Eastern` appear depends on the ICU build) or `try { new Intl.DateTimeFormat(undefined, { timeZone }) } catch { invalid }`, which accepts links too.
### ISO 8601 layouts (https://en.wikipedia.org/wiki/ISO_8601)
| Layout | Extended | Basic | Example |
|---|---|---|---|
| Calendar date | `YYYY-MM-DD` | `YYYYMMDD` | 2009-01-06 |
| Ordinal date | `YYYY-DDD` | `YYYYDDD` | 1981-095 |
| Week date | `YYYY-Www-D` | `YYYYWwwD` | 2009-W01-1 (weeks start Monday, week 1 contains 4 Jan) |
| Time | `hh:mm:ss[.fff]` | `hhmmss` | 13:47:30 (24 h; `T` prefix optional standalone) |
| UTC / offset | `Z` or `±hh:mm` | `±hhmm`, `±hh` | 2007-04-05T14:30Z, 2024-06-01T09:00-05:00 |
| Date-time | date `T` time offset | | 2007-04-05T14:30:00+02:00 |
| Duration | `PnYnMnDTnHnMnS` / `PnW` | | P3Y6M4DT12H30M5S |
| Interval | start`/`end, start`/`duration, duration`/`end | | 2007-03-01T13:00:00Z/2008-05-11T15:30:00Z |
| Recurring | `Rn/`interval | | R5/2008-03-01T13:00:00Z/P1Y2M10DT2H30M |
RFC 3339 profile (what JSON/APIs usually mean): extended forms only, `T`/`Z` may be lowercase, space allowed instead of `T`, `-00:00` = unknown offset, no durations/intervals/week/ordinal dates. Generate RFC 3339 by default.
### Unicode CLDR (locale month/weekday names, date patterns)
- Licence: **Unicode License v3** (SPDX `Unicode-3.0`), OSI-approved 2023-11-17 (https://opensource.org/license/unicode-3-0). Text https://www.unicode.org/license.txt — MIT-style: use/copy/modify/sell "provided that either (a) this copyright and permission notice appear with all copies of the Data Files or Software, or (b) this copyright and permission notice appear in associated Documentation"; no use of the Unicode name in advertising. Embed: Yes; put the notice in LICENSE/NOTICE.
- npm: `cldr-core`, `cldr-dates-full`, `cldr-numbers-full` (peer of dates), etc.; current **48.2.0** (CLDR 48, verified via npm registry, `license: Unicode-3.0`); repo https://github.com/unicode-org/cldr-json .
- Path is **`cldr-dates-full/main/<locale>/ca-gregorian.json`** (not `dates/gregorian.json`), rooted at `main.<locale>.dates.calendars.gregorian`. Keys (verified for `en`): `months`, `days`, `quarters`, `dayPeriods`, `eras`, `dateFormats`, `dateSkeletons`, `timeFormats`, `timeSkeletons`, `dateTimeFormats`, `dateTimeFormats-atTime`, `dateTimeFormats-relative`.
- `months.{format|stand-alone}.{abbreviated|narrow|wide}` keyed `"1".."12"`; `days.{format|stand-alone}.{abbreviated|narrow|short|wide}` keyed `sun..sat`.
- `dateFormats`: en = full `EEEE, MMMM d, y`, long `MMMM d, y`, medium `MMM d, y`, short `M/d/yy`.
- `timeFormats`: en = full `h:mm:ss a zzzz`, long `h:mm:ss a z`, medium `h:mm:ss a`, short `h:mm a` — **the `a` is preceded by U+202F NARROW NO-BREAK SPACE**; `*-alt-ascii` variants use a plain space. Pick one spelling (ASCII) and ignore the other.
- `dateTimeFormats.{full|long|medium|short}` = glue like `{1}, {0}` ({1} date, {0} time); `availableFormats` = skeleton→pattern map (`yMMMd` → `MMM d, y`), plus `intervalFormats`, `appendItems`.
- `dayPeriods.format.abbreviated`: `am: AM`, `pm: PM`, plus `midnight`, `noon`, `morning1`… variants.
- Pattern letters follow LDML (https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table): `y` year, `M`/`L` month (format/stand-alone), `d` day, `E`/`c` weekday, `h` 1–12, `H` 0–23, `a` AM/PM, `z`/`zzzz` zone name, `x`/`X` ISO offset; literal text in single quotes. Same patterns drive `Intl.DateTimeFormat` internally, so runtime `Intl` can replace embedding for month/weekday names if bundle size matters.
## Summary of licence verdicts
- Embed freely (PD/CC0): PubChem periodic table, NIST, NASA fact sheet, Wikidata, Moby POS, 12dicts (PD lists), Bartlett via Gutenberg, XKCD colours, IANA tz, Lorem ipsum/Cicero.
- Embed with notice: WordNet 3.x (WordNet License), Open English WordNet (CC BY 4.0), SCOWL/ESDB (custom MIT-like), GBIF backbone (CC BY 4.0 + citation), BIPM SI (CC BY 4.0), CSS named colours (W3C notice), CLDR (Unicode-3.0), Google Books ngrams (CC BY 3.0), faker-js lists (MIT).
- Avoid: Bowserinator periodic table (CC BY-SA 3.0), wordfreq data (CC BY-SA 4.0), hermitdave (CC BY-SA 4.0), Norvig count_1w (LDC-derived, unstated), Wikiquote (CC BY-SA), Pantone.
- UNVERIFIED: American Red Cross figures (site blocks fetches), any global blood-type table, BIPM PDF front-matter licence line, classic SCOWL per-size counts, USDA PLANTS, IAU moon counts, exact faker dog count, Bartlett 10th-edition text availability.
# Part 4 — ISO lists, commerce, books/music/food
Researched 2026-09-17. "Embed?" = can the data ship inside an MIT-licensed repo. Anything marked UNVERIFIED was not confirmed against the primary source.
## 10. ISO lists
### ISO 3166-1 countries
| Source | Licence | Embed in MIT repo? | Rows | Fields | Format |
|---|---|---|---|---|---|
| [datasets/country-codes](https://github.com/datasets/country-codes) | PDDL (README: "Public Domain Dedication and License"; GitHub API detects no licence file) | Yes, no attribution required. README caveat: ISO itself says its list is "for internal use and non-commercial purposes free of charge" — the repo argues no rights subsist in a list of facts | 249 | ISO3166-1-Alpha-2/-Alpha-3/-numeric, official_name_en, UNTERM names (ar/zh/en/fr/ru/es short+formal), Dial, TLD, Capital, Continent, Languages, ISO4217 currency code/name/numeric/minor_unit, Region/Sub-region/Intermediate names+codes (M49), FIPS, IOC, FIFA, MARC, ITU, WMO, GAUL, EDGAR, Geoname ID, wikidata_id, CLDR display name, is_independent, LDC/LLDC/SIDS flags | CSV `data/country-codes.csv` |
| [annexare/Countries](https://github.com/annexare/Countries) (npm `countries-list` 3.4.1, 2026-07-14) | MIT | Yes; keep MIT notice | 252 countries, 185 languages (incl. non-ISO entries like AC, XK) | per country: name, native, phone[] (calling codes), continent, capital, currency[], languages[], optional alias[], partOf; separate ISO 4217 currency table (name, native, symbol, numeric, decimals); languages: name, native | TS source, exported JSON/CSV/SQL |
| [Debian iso-codes](https://salsa.debian.org/iso-codes-team/iso-codes) | LGPL-2.1-or-later (Debian copyright file) | Not safely as embedded data in an MIT repo — LGPL applies to the data files; you would have to ship it as a separately licensed component with LGPL notice. Avoid unless accepting that | 3166-1: 249 | alpha_2, alpha_3, numeric, name, official_name, common_name, flag | JSON `data/iso_3166-1.json` (raw URL needs `?inline=false`) |
| [mledoze/countries](https://github.com/mledoze/countries) | ODbL-1.0 | No — share-alike + attribution; derived databases must be ODbL. Avoid | ~250 | common/official names, cca2/cca3/ccn3/cioc, tld, currencies, idd (calling codes), capital, region/subregion, languages, translations, latlng, borders, area, demonyms, flag emoji, UN member | JSON/CSV/XML/YAML |
| [restcountries](https://gitlab.com/restcountries/restcountries) | MPL-2.0 (source repo; hosted API v5 is proprietary/API-key) | File-level copyleft: a copied data file stays MPL and must carry the notice; OK to ship next to MIT code but not to relicense. Prefer PDDL/MIT sources | 250+ | name, tld, cca2, ccn3, cca3, cioc, fifa, independent, status, unMember, currencies, idd, capital, capitalInfo, altSpellings, region, subregion, continents, languages, translations, latlng, landlocked, borders, area, flag (emoji), demonyms, flags, coatOfArms, population, maps, gini, car, postalCode, startOfWeek, timezones | JSON `src/main/resources/countriesV3.1.json` |
| [lukes/ISO-3166-Countries-with-Regional-Codes](https://github.com/lukes/ISO-3166-Countries-with-Regional-Codes) | CC BY-SA 4.0 (LICENSE.md) | No — share-alike. Avoid | 249 | name, alpha-2, alpha-3, country-code, iso_3166-2, region, sub-region, intermediate-region + codes | CSV/JSON/XML (all, slim-2, slim-3) |
| [stefangabos/world_countries](https://github.com/stefangabos/world_countries) | Data: CC BY-SA 4.0 (README, GitHub licence detection); npm `world_countries_lists` package.json says LGPL-3.0-or-later — contradictory | No — share-alike either way. Avoid | 249 world / 193 UN; subdivisions 5046 | id (numeric), alpha2, alpha3, name (37 languages); subdivisions: country, code, name, name_en, type, parent | JSON/CSV/PHP/SQL/XML |
| [i18n-iso-countries](https://www.npmjs.com/package/i18n-iso-countries) 7.14.0 | MIT | Yes | 78 language files | alpha2, alpha3, numeric, localized names | JSON per language |
| Wikipedia ISO 3166-1 | CC BY-SA 4.0 | No (share-alike) | — | — | — |
| [ISO OBP](https://www.iso.org/obp) | Proprietary; ISO grants free use only for "internal use and non-commercial purposes" (quoted in datasets/country-codes README) | No | — | — | — |
- Flag emoji: derive, no data needed — for alpha-2 `XY`, emit U+1F1E6 + (X − 'A') and U+1F1E6 + (Y − 'A') (regional indicator symbols).
- Recommendation: `datasets/country-codes` (PDDL) covers every requested field (name, alpha2, alpha3, numeric, calling code, TLD, capital, currency, languages) in one CSV; flag emoji derived. `annexare` (MIT) is the fallback for native names/calling codes if PDDL's ISO caveat worries you; it lacks TLD.
- Validation rules: alpha-2 `^[A-Z]{2}$`, alpha-3 `^[A-Z]{3}$`, numeric `^\d{3}$` (zero-padded, keep as string); calling code 1–3 digits, NANP countries share `1`; TLD `^\.[a-z]{2}$` (ccTLD = lowercase alpha-2, exceptions: GB uses `.uk`).
### ISO 639 languages
| Source | Licence | Embed? | Rows | Fields | Format |
|---|---|---|---|---|---|
| [langs](https://www.npmjs.com/package/langs) 2.0.0 (2017, unmaintained) | MIT | Yes | 184 | name, local, 1 (639-1), 2, 2T, 2B, 3 | `data.js` array |
| [iso-639-1](https://www.npmjs.com/package/iso-639-1) 3.1.6 (2026-07-02) | MIT | Yes | 183 | code, name, nativeName | `src/data.js` |
| annexare/Countries languages | MIT | Yes | 185 | code (639-1), name, native | TS/JSON |
| Debian iso-codes 639-2 / 639-3 / 639-5 | LGPL-2.1+ | See above (LGPL) | 639-2: 487; 639-3: 7923 | 639-2: alpha_2, alpha_3, bibliographic, name, common_name; 639-3: + inverted_name, scope, type | JSON |
| [SIL ISO 639-3 tables](https://iso639-3.sil.org/code_tables/download_tables) | SIL terms: may incorporate into software (commercial or not) with attribution to iso639-3.sil.org, must not modify identifiers, and product "does not provide a means to redistribute the code set" | Risky — a git repo with the table IS a means to redistribute; avoid embedding the full table. Codes themselves are facts | 7927 | Id, Part2b, Part2t, Part1, Scope, Language_Type, Ref_Name, Comment | tab-delimited `iso-639-3.tab` |
| [Library of Congress ISO 639-2](https://www.loc.gov/standards/iso639-2/ascii_8bits.html) | US federal government work → public domain in the US | Yes | ~487 (matches Debian 639-2 count) | pipe-delimited: alpha3-B, alpha3-T, alpha2, English name, French name — UNVERIFIED: loc.gov is behind a Cloudflare bot check (WebFetch, curl and Playwright all blocked); field layout from memory | `ISO-639-2_utf-8.txt` |
- Recommendation: `langs` or `iso-639-1` (MIT) for 639-1 names; both are small and derived from public code tables. Anything 639-3-sized is LGPL or SIL-restricted.
- Rules: 639-1 `^[a-z]{2}$`, 639-2/3 `^[a-z]{3}$`; 639-2 has B/T pairs (e.g. `fre`/`fra`, `ger`/`deu`) — pick one consistently (T codes = 639-3).
### ISO 3166-2 subdivisions
| Source | Licence | Embed? | Rows | Fields |
|---|---|---|---|---|
| Debian iso-codes 3166-2 | LGPL-2.1+ | LGPL caveat | 5046 | code, name, type, parent |
| [olahol/iso-3166-2.json](https://github.com/olahol/iso-3166-2.json) | package.json says ISC; no LICENSE file; GitHub detects none; data scraped from eQuest xls (provenance unclear); last push 2021 | No — unclear licence and provenance | 237 countries / 3807 divisions | `{alpha2: {name, divisions: {code: name}}}` |
| [esosedi/3166](https://github.com/esosedi/3166) (npm `iso3166-2-db` 2.3.11) | MIT | Yes; data mixes GeoNames (CC BY 4.0), Wikipedia (CC BY-SA), OSM (ODbL) — the MIT label may not survive scrutiny for the Wikipedia/OSM-derived parts. UNVERIFIED how much is derived from each | "all countries and regions" (count not stated) | ISO 3166-2 + FIPS codes, names in 12 languages, admin level, GeoNames/OSM/Wikipedia/WOF ids |
| stefangabos subdivisions | CC BY-SA 4.0 | No | 5046 | country, code, name, name_en, type, parent |
| [US Census state.txt](https://www2.census.gov/geo/docs/reference/state.txt) | US government work → public domain | Yes | 57 (50 states + DC + 6 territories) | STATE (FIPS), STUSAB, STATE_NAME, STATENS |
- Recommendation: for an en_US library, ship only the US list (Census/USPS, public domain: 50 states + DC, optionally territories) — ISO 3166-2 code = `US-` + USPS abbreviation. Skip the ~5000-row world list; every open compilation is LGPL, CC BY-SA or unclear.
- Rule: `^[A-Z]{2}-[A-Z0-9]{1,3}$`.
## 11. Commerce
### Word lists (product name / adjective / material)
- [@faker-js/faker](https://github.com/faker-js/faker) 10.6.0 — MIT (LICENSE covers code and locale data; copyright Faker contributors 2022-2025 and Marak Squires 2011-2020; acknowledges Ruby Faker and Perl Data::Faker, both MIT). No separate data licence.
- Provenance policy in [CONTRIBUTING.md](https://github.com/faker-js/faker/blob/next/CONTRIBUTING.md): "Faker must not contain copyrighted materials"; facts (finite known lists) are OK; compilations must not be copied from a single source (Wikipedia, "most popular" articles, government sites) because "a compilation of facts can be copyrighted" — contributors are told to draw on multiple sources and their own judgement.
- Verdict: reusing faker's `en` commerce lists (`product_name.adjective/material/product`, `department`) is fine under MIT — keep the MIT notice with the copied data. The lists are short curated words (no external dataset). Nothing in the repo or docs restricts locale-data reuse beyond MIT.
### Garment and shoe sizes
- Letter sizes XS–XXL: EN 13402-3 letter codes with chest/bust ranges (Wikipedia [EN 13402](https://en.wikipedia.org/wiki/EN_13402), CC BY-SA — but the table is a handful of facts; the standard itself is paywalled). Men chest / women bust cm: XXS 70–78 / 66–74, XS 78–86 / 74–82, S 86–94 / 82–90, M 94–102 / 90–98, L 102–110 / 98–107, XL 110–118 / 107–119, XXL 118–129 / 119–131, 3XL 129–141 / 131–143.
- US numeric women's sizes (0–20, even) come from ASTM D5585 (paywalled); no open dataset. Just generate the even-number series.
- Shoe sizes: no open dataset found (search hits are ML demos and retailer charts). Use the formulas from Wikipedia [Shoe size](https://en.wikipedia.org/wiki/Shoe_size) (facts, not copyrightable): EU (Paris point) ≈ 1.5 × foot cm + 2 (i.e. 3/20 × mm + 2); UK adult ≈ 3 × foot in − 23; US men ≈ 3 × foot in − 22 = UK + 1; US women (common) = US men + 1.5 (FIA scale: 3 × foot in − 21); Mondopoint = foot length mm. ISO/TS 19407:2023 has the official conversion tables (paywalled). Generate from a foot length (men 24–31 cm, women 21–27 cm) in half-size steps so all systems agree.
### Check-digit rules (all verified against Wikipedia articles; algorithms are facts)
| Code | Rule |
|---|---|
| EAN-13 / UPC-A / GTIN-8/12/13/14 | Weights 3,1,3,1… starting from the rightmost data digit (the one next to the check digit); check = (10 − sum mod 10) mod 10. UPC-A = EAN-13 with a leading 0 (GS1 prefix of a 12-digit GTIN is `0` + first two digits). GTIN-14 first digit is an indicator 1–8 (packaging level) or 9 (variable measure); 0 is not valid there. |
| UPC-A number system (first digit) | 0,1,6,7,8,9 regular; 2 variable-weight; 3 drugs (NDC); 4 in-store/local; 5 coupons. |
| ISBN-10 | Σ(weights 10..2 × first 9 digits) + check ≡ 0 mod 11; check = (11 − sum mod 11) mod 11, 10 → `X`. |
| ISBN-13 | EAN-13 with prefix 978 or 979. 979 groups in use: 979-8 USA, 979-10 France, 979-11 Korea, 979-12 Italy. 978 groups 0 and 1 = English-language. For an en_US generator: `978-0…`, `978-1…`, `979-8…`. The official range file (`https://www.isbn-international.org/export_rangemessage.xml`) is XML only and the site says "You must not republish material from our site … without our written permission" — do not embed it; group/registrant length only matters for hyphenation, not validity. |
| ISSN | Format `NNNN-NNNC`; weights 8..2 over first 7 digits, sum mod 11; check = 0 if remainder 0 else 11 − remainder; 10 → `X`. EAN-13 form: `977` + 7 ISSN digits (no check) + 2 variant digits + EAN check. |
| IMEI | 15 digits: TAC 8 (RBI 2 + 6) + serial 6 + Luhn check (ISO/IEC 7812; from the right, double every second digit, sum digits, total ≡ 0 mod 10). SVN never enters the check. IMEISV = 14 digits + 2-digit SVN, no check. RBI `00` = test IMEI (Wikipedia [Reporting Body Identifier](https://en.wikipedia.org/wiki/Reporting_Body_Identifier)); live RBIs: 01 CTIA/PTCRB (US), 35 TÜV SÜD/BABT (UK), 86 TAF (China), 99 GHA. For fake data use TAC `00xxxxxx` so it can never match a real handset — UNVERIFIED: third-party pages claim the GSMA TS.06 test-TAC shape is `00 44` + 4 digits; the TS.06 PDF could not be text-extracted here. |
| ASIN | 10 chars `[A-Z0-9]{10}`; non-books start `B0` + 8 alphanumerics (`^B0[A-Z0-9]{8}$`); books reuse their ISBN-10 verbatim. No check digit (Wikipedia). |
| SKU | Not standardised (Wikipedia). Convention only: 8–12 uppercase alphanumerics, e.g. `[A-Z]{3}-\d{4}-[A-Z]{2}`; avoid leading 0 and O/I if you want scanner-safe. |
### GS1 prefixes
- Official table: [gs1.org/standards/id-keys/company-prefix](https://www.gs1.org/standards/id-keys/company-prefix) (rendered via Playwright; WebFetch gets 403). Copyright notice ([gs1.org/terms-use](https://www.gs1.org/terms-use)): reproduction allowed only "in unaltered form … for your personal, non-commercial use or use within your organisation"; "You are not permitted to re-transmit, distribute or commercialise the information or material without seeking prior written approval from GS1." → Do not copy the GS1 page. The prefix-to-country mapping is factual and also on Wikipedia ([List of GS1 country codes](https://en.wikipedia.org/wiki/List_of_GS1_country_codes), CC BY-SA 4.0 — avoid verbatim copy). Safe path: embed only the US/special ranges you need, written from the facts below.
- Ranges relevant to an en_US generator (from the GS1 page): 001–019, 030–039, 060–139 GS1 US (UPC-A compatible); 020–029 restricted circulation within a region; 040–049 restricted within a company; 050–059 GS1 US reserved; 200–299 restricted circulation (region); 952 "used for demonstrations and examples of the GS1 system"; 977 ISSN; 978–979 ISBN; 980 refund receipts; 981–983 coupons (common currency); 990–999 coupons. Prefixes do not identify country of origin. Selected others: 300–379 France, 400–440 Germany, 450–459 & 490–499 Japan, 500–509 UK, 690–699 China, 730–739 Sweden, 750 Mexico, 754–755 Canada, 760–769 Switzerland, 800–839 Italy, 840–849 Spain, 870–879 Netherlands, 880–881 South Korea, 890 India, 930–939 Australia, 940–949 New Zealand.
- Generator rule: for fake UPC/EAN use prefix `952` (GS1 demo) or a `2xx` restricted-circulation prefix — never a real company prefix; for US-looking UPC-A use number system 0–1/6–8 with a random 5-digit manufacturer code and accept that it may collide with real products.
## 12. Books, music, food
### Project Gutenberg catalog
- URL: `https://www.gutenberg.org/cache/epub/feeds/pg_catalog.csv` (20 MB) / `pg_catalog.csv.gz` (5.3 MB), regenerated weekly; also RDF (`rdf-files.tar.bz2`, 121 MB) and MARC.
- Fields: `Text#, Type, Issued, Title, Language, Authors, Subjects, LoCC, Bookshelves` (comma CSV, quoted; Authors as `Last, First, birth-death`, `;`-separated).
- Count (2026-09-17): 79 381 rows; Type: Text 78 130, Sound 1 114, Dataset 89, Image 33, other 12; Language: en 62 860, fr 4 190, fi 3 684, de 2 425, it 1 110.
- Licence: each RDF record carries `<cc:Work><cc:license rdf:resource="https://creativecommons.org/publicdomain/zero/1.0/"/>` → catalog metadata is CC0 1.0 (verified on `cache/epub/1/pg1.rdf`). The CSV itself has no header notice; treat as CC0 by the same source. Terms of use: do not hammer their servers (bulk feeds are the sanctioned path), "Project Gutenberg" is a trademark — royalties for commercial use of the *name*; do not brand the data file with it beyond a source citation.
- Embed: yes (CC0). For a fake-data library ship a filtered subset (Type=Text, Language=en, title + first author, maybe 5–10k rows) rather than 20 MB.
### Music genres and instruments
| Source | Licence | Embed? | Count | Notes |
|---|---|---|---|---|
| [MusicBrainz genre list](https://musicbrainz.org/genres) | Genre is a core entity (schema doc lists 13 core entities incl. Genre) → core data dump `mbdump.tar.bz2` is CC0. The genre→entity *associations* come via user tags (CC BY-NC-SA 3.0) — do not use those | Yes, names only | 2 202 (`/ws/2/genre/all?fmt=json`, `genre-count`) | WS API needs a descriptive User-Agent; list is a JSON array of `{id, name, disambiguation}` |
| [Discogs data dumps](https://data.discogs.com/) | CC0 | Yes | genre/style vocab is embedded in release XML (monthly dumps, GBs) — no standalone style list; UNVERIFIED count (~15 genres, ~600 styles from memory) | Impractical to extract; prefer MusicBrainz |
| ID3v1 genres | Names 0–79 from the 1999 ID3v1 spec, 80–125 Winamp, 126–191 Winamp 5.6 (2010) — a de-facto spec table, treated as public domain facts | Yes | 192 (0–191) | Wikipedia [List of ID3v1 genres](https://en.wikipedia.org/wiki/List_of_ID3v1_genres) (CC BY-SA page; the list itself is a spec enumeration). id3.org returned HTTP 500 during research — UNVERIFIED against the original spec page |
| Wikidata instruments | CC0 | Yes | 9 194 items `P31/P279* Q34379` with English labels; 2 372 with a Hornbostel–Sachs number (P1762) | Filter by P1762 for a clean orchestral/folk instrument list |
| Wikidata music genres | CC0 | Yes | 6 619 (`Q188451`) | Noisier than MusicBrainz |
### USDA FoodData Central
- Downloads: [fdc.nal.usda.gov/download-datasets](https://fdc.nal.usda.gov/download-datasets/) (April 2026 release):
- Foundation Foods: JSON 459 KB zip / 6.5 MB; CSV 3.7 MB zip / 32 MB — 394 foods (API `totalHits`, dataType=Foundation).
- SR Legacy (final, April 2018): JSON 12.3 MB zip / 205 MB; CSV 6.7 MB zip / 54 MB — 7 793 foods.
- FNDDS 2021-2023: CSV 200 MB zip / 1.6 GB — 5 432 foods.
- Branded: CSV 428 MB zip / 2.9 GB — 433 403 foods.
- Full: CSV 460 MB zip / 3.1 GB.
- Licence ([API guide](https://fdc.nal.usda.gov/api-guide/)): "USDA FoodData Central data are in the public domain and they are not copyrighted. They are published under CC0 1.0 Universal (CC0 1.0)". No permission needed; USDA *requests* listing FoodData Central as source and notifying them. Suggested citation: "U.S. Department of Agriculture, Agricultural Research Service. FoodData Central, 2019. fdc.nal.usda.gov."
- Embed: yes (CC0). Ship a derived list (SR Legacy `description` + `food_category`) not the raw dump.
- CSV structure (UNVERIFIED — the field-description PDF could not be text-extracted; from memory): `food.csv` (fdc_id, data_type, description, food_category_id, publication_date), `food_category.csv` (id, code, description), `nutrient.csv` (id, name, unit_name, nutrient_nbr, rank), `food_nutrient.csv` (id, fdc_id, nutrient_id, amount, …), `food_portion.csv`, `measure_unit.csv`, `sr_legacy_food.csv` (fdc_id, NDB_number), `foundation_food.csv`.
### Dishes, cuisines, drinks
| Source | Licence | Embed? | Count | Notes |
|---|---|---|---|---|
| Wikidata dishes (`Q746549`) | CC0 | Yes | 7 480 with English label | SPARQL `?i wdt:P31/wdt:P279* wd:Q746549` |
| Wikidata cuisines (`Q1968435`) | CC0 | Yes | 219 | |
| Wikidata cocktails (`Q134768`) | CC0 | Yes | 305 | |
| Wikidata beer (`Q44` subclass tree) / wine (`Q282`) | CC0 | Yes | 420 / 3 025 | Wine tree is mostly appellations/brands; filter by P279 depth |
| IBA official cocktails | IBA site "© IBA 2026 – All rights reserved"; Wikipedia list CC BY-SA 4.0 | Names only are facts (102 cocktails: 34 Unforgettables, 34 Contemporary Classics, 34 New Era, 2024 revision); do not copy recipes/descriptions | 102 | Safest: take the names from Wikidata (`P31 Q134768`) rather than the IBA page |
| [Open Brewery DB](https://github.com/openbrewerydb/openbrewerydb) | MIT (LICENSE, © 2025 Open Brewery DB) | Yes | 11 931 breweries (US 8 308, DE 1 445, AU 514, BE 478, CA 283, NZ 243) | `breweries.csv`: id (UUID), name, brewery_type (micro 5 906, brewpub 3 947, closed 644, planning 635, regional 240, contract 208, large 137, proprietor, taproom, bar, nano, cidery, beergarden), address_1..3, city, state_province, postal_code, country, phone, website_url, longitude, latitude. Real businesses — fine for names, but generating "fake" data with real addresses/phones may be undesirable |
| Wikipedia lists (cuisines, dishes, IBA) | CC BY-SA 4.0 | No verbatim copies | | |
## Summary of safe picks
- Countries: `datasets/country-codes` (PDDL) or `annexare/Countries` (MIT); flag emoji derived from alpha-2.
- Languages: `langs` / `iso-639-1` (MIT, 639-1 only).
- Subdivisions: US-only list from Census (public domain); skip world list.
- Commerce words: faker `en` lists (MIT). Check digits: implement from the rules above; GS1 prefix table: hand-write the few ranges needed, use `952`/`2xx` for generated barcodes; ISBN range file: do not embed.
- Books: Gutenberg `pg_catalog.csv` (CC0), filtered.
- Music: MusicBrainz genre names (CC0, 2 202), ID3v1 list (192), Wikidata instruments (CC0).
- Food: USDA FDC SR Legacy/Foundation descriptions (CC0, cite USDA), Wikidata dishes/cuisines (CC0), Open Brewery DB (MIT).
- Avoid: mledoze (ODbL), lukes (CC BY-SA), stefangabos (CC BY-SA/LGPL), Debian iso-codes (LGPL), SIL 639-3 table (no-redistribution clause), GS1/ISBN-International pages (all rights reserved), Wikipedia tables verbatim (CC BY-SA), MusicBrainz tag associations (CC BY-NC-SA).
+1 -1
View File
@@ -97,7 +97,7 @@ func (d *draws) rowOf(t *table) int {
// pinRow pins row r of t where it agrees with the rows pinned before it. // pinRow pins row r of t where it agrees with the rows pinned before it.
func (d *draws) pinRow(t *table, r int) error { func (d *draws) pinRow(t *table, r int) error {
if pr, ok := d.pinned(t); ok && pr != r { if pr, ok := d.pinned(t); ok && pr != r {
return fmt.Errorf("%s and %s are two rows of %s", t.selectorSpelling(pr), t.selectorSpelling(r), t.category) return fmt.Errorf("%s and %s are two rows of %s", t.selectorSpelling(pr), t.selectorSpelling(r), t.path)
} }
for a := t.parentT; a != nil; a = a.parentT { for a := t.parentT; a != nil; a = a.parentT {
if pa, ok := d.pinned(a); ok && !t.under(r, a, pa) { if pa, ok := d.pinned(a); ok && !t.under(r, a, pa) {
+6 -6
View File
@@ -5,8 +5,8 @@
// then generate values by path: // then generate values by path:
// //
// f, _ := fejkdata.New(fejkdata.WithSeed(42)) // f, _ := fejkdata.New(fejkdata.WithSeed(42))
// f.Fake("sv_SE.address") // "Storgatan 12\n234 56 Göteborg" // f.Fake("sv_SE.address") // "Järvedsvägen 43\n891 77 Järved"
// f.Fake("sv_SE.address.locality") // "Göteborg" // f.Fake("sv_SE.address.locality") // "Sundbyberg": a second call draws afresh
// //
// Several sources merge in order, the last winning a name clash, so custom data // Several sources merge in order, the last winning a name clash, so custom data
// layers over the built-ins. The JSON template format is documented in the README. // layers over the built-ins. The JSON template format is documented in the README.
@@ -29,8 +29,8 @@ import (
//go:embed data //go:embed data
var shippedFS embed.FS var shippedFS embed.FS
// MaxRepeat caps a repeat, and the renders nested repeats multiply to along any // MaxRepeat caps a repeat, and caps the renders nested repeats multiply to along
// path; the CLI's --repeat shares it. // any one path; the CLI's --repeat shares it.
const MaxRepeat = 1 << 20 const MaxRepeat = 1 << 20
var _ [^uint(0)>>63 - 1]struct{} // 64-bit only, per the README's Decisions var _ [^uint(0)>>63 - 1]struct{} // 64-bit only, per the README's Decisions
@@ -40,8 +40,8 @@ var ErrNoData = errors.New("no data: WithoutShippedData needs at least one WithD
// Generator generates fake data from a loaded namespace tree. Create one with [New]. // Generator generates fake data from a loaded namespace tree. Create one with [New].
// It is safe for concurrent use; a seeded sequence is reproducible only when drawn // It is safe for concurrent use; a seeded sequence is reproducible only when drawn
// from one goroutine. The compiled tree is immutable after [New], and Fake, // from one goroutine. The compiled tree is immutable after [New], so List reads it
// NewTemplate and List read it concurrently without a lock. // without a lock; mu guards the rest, which every other entry point takes.
type Generator struct { type Generator struct {
mu sync.Mutex mu sync.Mutex
rand *session rand *session
+11
View File
@@ -81,3 +81,14 @@ func TestDifferentSeedsDiffer(t *testing.T) {
} }
t.Fatal("seeds 1 and 2 produced identical sequences") t.Fatal("seeds 1 and 2 produced identical sequences")
} }
// fakeTemplate renders an inline template against a loaded generator, so its
// references resolve.
func fakeTemplate(t *testing.T, f *Generator, s string) string {
t.Helper()
got, err := f.FakeTemplate(s)
if err != nil {
t.Fatalf("FakeTemplate(%s) = %v", s, err)
}
return got
}

Some files were not shown because too many files have changed in this diff Show More