Логотип Karthik R Analysis Style

Karthik R Analysis Style

Спільнота
skthewimp
karthik-r-analysis-style

Використовуйте для аналізу в R у стилі Karthik, дослідницьких блокнотів RMarkdown/Quarto й аналітичних конвеєрів: робочі чернетки на основі локальних прикладів, перевірки, що починаються із запитання, код tidyverse/tidytable, швидкі таблиці й графіки, розгалуження з урахуванням предметної області, dbplyr/Arrow/DuckDB для більших наборів даних і блокноти, зручні для RStudio.

Огляд

Видавецьskthewimp
Репозиторійkarthik-data-visualization-skill
Назва навичкиkarthik-r-analysis-style
Зірки
49
Форки
5
Файли в пакеті
Лише інструкції
ЛіцензіяMIT
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Усе необхідне — в інструкціях

    Усе потрібне моделі міститься в інструкціях — жодних додаткових файлів для синхронізації.

  • Відкритий вихідний код

    Видавець на GitHub: skthewimp. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Karthik R Analysis Style у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/skthewimp/karthik-data-visualization-skill/tree/main/karthik-r-analysis-style/codex
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/skthewimp/karthik-data-visualization-skill.git /tmp/karthik-data-visualization-skill
mkdir -p .claude/skills
cp -r /tmp/karthik-data-visualization-skill/karthik-r-analysis-style/codex .claude/skills/karthik-r-analysis-style
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Karthik R Analysis Style в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Karthik R Analysis Style, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Karthik R Analysis Style не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Karthik R Analysis Style

Use for R analysis, exploratory .Rmd/.qmd notebooks, and analytics pipelines. Core rule: this is not generic EDA and not a polished report - it is a working scratchpad where the next chunk follows from what the previous chunk showed.

Own R notebook texture, local precedent, exploratory branching, and R code conventions. karthik-analysis-planner owns the analysis contract, karthik-data-cleaning owns substantive data preparation and validation, dataviz-selector owns final chart choice, karthik-data-visualization owns publication chart design, and chart-explainer owns notes attached to plots.

Analyst, not software engineer

Treat an exploratory notebook as thinking in public with data. The goal is judgement, not architecture - context-specific probes, visible assumptions, and domain reasoning over reusable machinery.

Do:

  • Start from the analytical question and unit of analysis, not a code structure.
  • Let messy facts change the next step; keep local, disposable objects if they help thinking.
  • Use domain names and metrics supported by the current question and data; don't treat one notebook family's examples as universal defaults.
  • Clean or transform only what helps answer the next question; keep caveats near the chunk that revealed them.

Don't:

  • Turn exploration into a package, framework, pipeline, or component, or abstract early into functions/configs/classes/helpers/tests/generic loaders.
  • Optimize for reproducible production code before understanding the data.
  • Hide judgement behind generic verbs like clean_data(), process_data(), run_analysis().
  • Make the notebook tidy at the cost of the reasoning trail.

A good notebook can be a little ugly if it shows the analyst's path. A bad notebook is clean, generic, and context-free.

What the 2018+ notebooks show

A 20-notebook audit (Mint, Shopify, Retail, Oliveboard, Ticketing, Onsite, elections, weather, payments, JEE, BabbageInsight, qcom/Cosmix, cricket) fixes the priors:

  • Start from a live context: article, client problem, stakeholder need, product idea, or personal curiosity. A concrete objective is fine; a generic EDA preamble is not.
  • The unit of analysis is usually implicit in the first few chunks - make it visible in new work (order, item, store-day, candidate-seat, ball, innings, match, user-test, hour-day, app-city-SKU).
  • Broad metric scans are allowed only when the business/client context calls for them, and stay metric-led (GMV, AOV, DAU, coupon burn, availability, search visibility), not column-led.
  • Rough prose is a feature: typos, fragments, "Not as interesting!", "Nothing significant", "What is this column?" are closer than polished paragraphs. Sparse is fine - not every chunk needs prose, but every sequence should reveal why that cut came next.
  • Modeling/simulation/clustering is acceptable when it's the natural analyst move (swing simulator, structural break test, clustering, forecast, player impact), not because a template says so.
  • Exports (pdf, pbcopy, saved chart) and DuckDB/S3/Parquet setup appear only when the output or data source requires them - don't generalize either into boilerplate.

If evidence conflicts, prefer older hand-written notebooks for voice and reasoning, newer ones for current data-access patterns.

Improving this skill: sequential posterior update

When updating this skill from old notebooks, don't batch-read and summarize once. Go file by file (prior → inspect file 1 → write delta → update belief → choose file 2 in that light → ... → final patch), and after each file record what the skill would have predicted, what the notebook does, which belief should strengthen/weaken/become conditional, and which future notebooks the evidence applies to. Karthik's style is a family of behaviours (article scratchpad, client metric scan, data diagnostic, model experiment, chart hunt, personal curiosity), not one global template, so later files refine earlier conclusions rather than just adding examples.

First move: RAG against local precedent

Before creating or heavily editing a notebook, retrieve local examples and update your plan from them - the skill is the prior, nearby notebooks the evidence. Inspect 3-5 before writing:

  1. Same folder/project.
  2. Same domain (cricket, elections, commerce/client, weather, time series, survey, etc.).
  3. Older hand-written notebooks (2018 onward) if recent files look AI-generated or over-structured.
  4. One adjacent "bad fit" file if useful, to avoid copying the wrong mode.

For each, ask: question/context, grain, first inspection, branch logic, code texture, stopping point. Then write in the posterior style - don't invent a new workflow if the repo has one. Copy texture, not just syntax: roughness, local object names, domain metrics, assignment style, plot roughness, section rhythm, willingness to abandon paths. If references/style-observations.md is installed (it is private and not in the public repo), read it only when matching old notebooks closely.

Notebook family routing

Classify the family before writing, so one Karthik pattern isn't over-applied to all work:

  • Article/story scratchpad: one claim or curiosity; rough prose; quick tables/plots; export only if feeding article/chart.
  • Client diagnostic: stakeholder problem list, source-of-truth decisions, metric definitions, criteria scoring, business-native cuts.
  • Metric scan: broad scan only when metrics are domain-native (GMV, AOV, DAU, conversion, burn, incidence, active plans), not generic columns.
  • Forecast/model calibration: functions and repeated evaluation allowed; keep reasoning about bias, seasonality, holdout, ratios, horizons visible.
  • Algorithm/product experiment: end-to-end functions allowed (dynamic pricing, Elo, structural breaks, parsers); still explain assumptions and check intermediate objects.
  • Text/NLP parsing: helper functions are normal; still inspect raw lines and samples before abstraction.
  • Chart recreation/graphic hunt: start from target visual/question; iterate aesthetics and anomalies; export only when the output is the point.
  • Tracker/dashboard-ish: repeated charts/maps okay; preserve update logic and assumptions, don't make a generic app unless asked.

If a precedent file is just RStudio template boilerplate or generic AI-generated sections, treat it as negative evidence - don't copy its prose or structure.

Mental model

Write like Karthik at the console: load data → print the object → ask one narrow question in plain English → run one short table or plot → react (too messy, no signal, weird, useful, dead end) → change slice/grain/benchmark from what appeared. The notebook earns its keep by choosing what to look at next, not by being comprehensive.

Notebook shape

Default exploratory .Rmd:

yaml
---
title: "Concrete title"
output: html_notebook
---
r
require(tidyverse)
require(lubridate)   # if dates matter
require(tidytable)   # if grouped summaries get compact
  • The notebook is for running chunk by chunk while exploring, never for knitting. Add nothing that only serves a knitted output (figure sizing/captions, knitr::opts_chunk$set, cross-references, run-all/knit-ready structure, YAML author/date, global config, package abstraction) unless local precedent does it or the user asked. Assume every chunk runs one at a time in the console.
  • Use absolute paths or setwd() when chunk-by-chunk execution needs it.
  • Keep chunks short - one chunk = one thought/probe. Print raw objects early (head(), count(), summary()).
  • Each displayed output gets its own chunk. Put separate tables, plots, printed objects, and diagnostic summaries in separate chunks, even when they answer the same question. A chunk may include the preparation needed for its one output; preparation-only chunks are fine. Split multiple outputs rather than hiding or suppressing them.
  • Use section titles/prose as steering notes, not report copy. Leave dead ends if they explain the next move. Reassign objects freely when the cleaning step is local and obvious.

Prose style inside notebooks

Rough working notes, e.g. What does this file look like?, Need a quick size check first, Date coverage is not identical. Remember this before comparing apps., Let's only look at stores with enough days, Too messy. Try the recent period., This is probably a dead end, What matters is whether it rained at all in this window, not the exact hour.

Avoid generated-sounding scaffolding: Question Log, Reusable Cuts, Current Conclusion, Blog Notes, Executive Summary, Key Takeaways, Data Quality Assessment, "The setup is usable...", or any standing pipeline/framework unless explicitly asked.

After a plot: say what it showed. The notes above are lead-ins; every plot also needs a note after it saying what it showed, because whoever reads this notebook didn't run it. Use chart-explainer for these (don't restate its contract here), kept in the same rough register as the surrounding notebook.

Exploration moves that feel right

Prefer these over checklist EDA:

  • count(..., sort = T) for categories, statuses, years, teams, parties, stores, cities, SKUs.
  • Direct object printing to understand shape.
  • summarise(..., .by = ...) with n(), n_distinct(), min/max dates, sums, means, medians.
  • Quick proportions: mutate(prop = n / sum(n), .by = ...).
  • Meaningful filters: recent years, top entities, enough observations, non-missing fields, competitive candidates, active stores.
  • Change grain deliberately: ball → innings → match → season; order → store-day → store; hour → day/month/year; candidate → constituency/state.
  • Compare against a baseline: prior year/election/season, others vs India, app vs app, top stores vs rest, this year vs historical average.
  • Follow anomalies selectively; don't analyze every weird column. Use domain knowledge aggressively.

Domain patterns

  • Cricket: batting order, phase, run rate, strike rate, wickets, innings, chase/bat-first, top-order contribution, player/team cuts, match context, era cuts, simulations when useful.
  • Elections: vote share, margins, winner/runner-up, party abbreviations, swing, ENPV/corners, alliances, maps, previous-election comparison.
  • Commerce/client: GMV, AOV, order frequency, availability, search/discovery, conversion, cohorts, stores/cities/SKUs, top/bottom tables, treatment/control or no-coupon baselines.
  • Weather/time series: day-of-year overlays, this year vs history, month/hour windows, thresholds, medians/quantiles, structural breaks only after visual pulse checks.
  • Survey/health/personal data: enough-n filters, distributions by meaningful demographic or behavioural cuts, longitudinal comparisons.

Code defaults

  • Prefer tidyverse %>% pipes. Use dplyr's native .by for per-operation grouping; do not switch to tidytable just to use .by.
  • Prefer mutate(..., .by = key) and summarise(..., .by = c(key1, key2)) over group_by() %>% ... %>% ungroup(). Keep grouping local to each verb; use group_by() only when grouping genuinely needs to persist across several operations or the backend lacks .by support. For order-sensitive calculations, arrange explicitly before the grouped verb; preserve any required summary ordering with arrange().
  • Preserve unrelated surrounding style in old notebooks, including T/F; apply the .by preference to new or edited grouped operations without gratuitously rewriting untouched code.
  • Default to right assignment (->) at the end of any long chain, so a pipe can run partially, line by line, in the console; always put the target on the next line after ->, indented 2 spaces from the pipeline's base indent, even for short right assignments:
r
some_pipeline(...) %>%
  more_steps(...) ->
  object
  • Left assignment is fine for short one-liners and where surrounding code uses it; new long chains end in ->.
  • Prefer case_when() over nested ifelse() in new code; don't rewrite old code without need.
  • Helpers stay small and local in first-pass exploration. Exception: parsers, simulations, forecasting calibration, Elo/dynamic-pricing algorithms, and repeated text processing may need functions - even then, inspect inputs/outputs around the function and keep assumptions visible.
  • Use write_delim(pipe('pbcopy'), '\t'), pdf(...), or quick export only when the notebook is clearly feeding a chart/article/client output.

Plot defaults

Plot early to decide whether the question is worth pursuing; good enough beats polished. Common patterns: geom_point() + geom_line() for time/ordered comparisons; geom_col() for counts; geom_histogram()/geom_density()/geom_violin() for distributions; geom_smooth(se = F) for broad shape; facet_wrap(..., scales = 'free') for entity comparisons; geom_text() when exact labels matter; geom_sf() when geography is the unit; theme_bw()/theme_minimal() with light cleanup.

Don't turn first-pass plots into publication charts unless asked, but make them interpretable enough to guide the next cut. When a plot becomes a deliverable rather than a probe, hand chart-form choice to dataviz-selector and visual execution to karthik-data-visualization; don't extend these rough defaults into a second publication style.

Database / large data

  • Don't write raw SQL. Reach for a dplyr backend: dbplyr with tbl(...) for databases, duckplyr/DuckDB for local analytical queries, arrow for Parquet/S3. Express filters, joins, and aggregation as dplyr verbs and let the backend translate.
  • Keep heavy aggregation in-backend; collect() only when local materialization is needed.
  • Only exception: an unavoidable one-off DDL/config statement (create view, attach, S3 credentials) with no dplyr equivalent. Never hand-write query logic (SELECT/GROUP BY/joins) as SQL strings.

Anti-patterns

Beyond the Don'ts above, when asked for exploratory notebooks specifically don't:

  • make a generic audit notebook unless an audit was asked for;
  • add logs, reusable-cut sections, numbered question systems, or blog-production scaffolds by default;
  • write long caveat/conclusion prose before seeing enough output, or smooth over uncertainty (if you haven't run the chunks, write probes, not conclusions);
  • create broad all-purpose notebooks - start with one concrete question and let it sprawl;
  • polish Karthik's rough working prose into corporate narration, or copy RStudio default template text (Add a new chunk...) and generic headings from precedent files.

Ban premature abstraction, not functions categorically - functions are fine when building an algorithm, parser, simulation, or forecast calibration.

Skeleton for a new scratchpad

Use this shape unless local examples suggest otherwise:

markdown
---
title: "Short scratchpad title"
output: html_notebook
---

```{r}
require(tidyverse)
read_csv("/absolute/path/file.csv") ->
  dat
dat

What does coverage look like?

dat %>%
  summarise(
    rows = n(),
    start = min(date, na.rm = T),
    end = max(date, na.rm = T),
    entities = n_distinct(entity)
  )

Which entities matter?

dat %>%
  count(entity, sort = T) %>%
  head(20)

Now take the first promising cut...


Then continue from results; don't fill the rest with hypothetical sections.

Поширені запитання

Що робить навичка ШІ Karthik R Analysis Style?

Використовуйте для аналізу в R у стилі Karthik, дослідницьких блокнотів RMarkdown/Quarto й аналітичних конвеєрів: робочі чернетки на основі локальних прикладів, перевірки, що починаються із запитання, код tidyverse/tidytable, швидкі таблиці й графіки, розгалуження з урахуванням предметної області, dbplyr/Arrow/DuckDB для більших наборів даних і блокноти, зручні для RStudio.

Навіщо використовувати Karthik R Analysis Style у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Karthik R Analysis Style — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Karthik R Analysis Style у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/skthewimp/karthik-data-visualization-skill/tree/main/karthik-r-analysis-style/codex. TypingMind прочитає файл SKILL.md і встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Karthik R Analysis Style?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Karthik R Analysis Style?

Зі скількома забажаєте. У TypingMind ви можете використовувати Karthik R Analysis Style із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Karthik R Analysis Style?

Так. На GitHub цю навичку публікує skthewimp за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇