new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Observable Plot · all subjects

formats

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

formatNumber function

Plot.formatNumber(locale) returns a function that formats a number according to a specified locale. The locale is a BCP 47 language tag and defaults to U.S. English. Example: Plot.formatNumber("en-US")(Math.PI) returns "3.142".

formatIsoDate function

Plot.formatIsoDate(date) takes a date object and returns the shortest equivalent ISO 8601 UTC string. If the date is not valid, it returns "Invalid Date". Example: Plot.formatIsoDate(new Date("2020-01-01T00:00:00.000Z")) returns "2020-01-01".

formatWeekday function

Plot.formatWeekday(locale, format) returns a function that formats a weekday number (0 = Sunday to 6 = Saturday) according to a specified locale and format. The locale is a BCP 47 language tag and defaults to U.S. English. The format is a weekday format (narrow, short, or long) and defaults to short. Example: Plot.formatWeekday("es-MX", "long")(0) returns "domingo".

formatMonth function

Plot.formatMonth(locale, format) returns a function that formats a month number (0 = January to 11 = December) according to a specified locale and format. The locale is a BCP 47 language tag and defaults to U.S. English. The format is a month format (2-digit, numeric, narrow, short, or long) and defaults to short. Example: Plot.formatMonth("es-MX", "long")(0) returns "enero".

Format helper use cases

Format helper functions can be used as the tickFormat option for the axis mark, as the text option for a text mark, or for other uses.

Give your agent this brain