Skip to content

Commit 5772cbf

Browse files
authored
docs(site): add an analysis methods reference and framework article (#1147)
* docs(site): add the AVA analysis methods catalog * docs(site): organize analysis methods and add framework article * docs(site): add analysis charts and blog cover * Refactor analysis methods documentation for clarity and consistency - Updated English and Chinese content in methods.mdx to clarify the purpose of analysis methods and strategies. - Revised descriptions in blog.ts and docs.ts to better reflect the content focus on question-based strategies and topic browsing. - Enhanced the Chinese JSON messages for analysis methods to align with the updated descriptions. - Modified the llms.txt file to provide a clearer summary of the data analysis methods framework. * fix(site): make the documentation header full width * docs(site): illustrate all analysis methods
1 parent 54161fb commit 5772cbf

16 files changed

Lines changed: 2286 additions & 20 deletions

File tree

‎site/app/documentation/docs.css‎

Lines changed: 114 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,8 @@
4747
z-index: 40;
4848
}
4949
.docs-header-inner {
50-
max-width: 1440px;
5150
height: 100%;
5251
padding: 0 40px;
53-
margin: auto;
5452
display: flex;
5553
justify-content: space-between;
5654
align-items: center;
@@ -113,11 +111,16 @@
113111
color: var(--docs-ink);
114112
}
115113
.docs-layout {
116-
max-width: 1440px;
117-
padding-inline: 18px 40px;
118-
margin: auto;
119114
display: grid;
120-
grid-template-columns: 232px minmax(0, 1fr) 196px;
115+
grid-template-columns: 250px minmax(0, 1fr);
116+
align-items: start;
117+
}
118+
.docs-reading {
119+
width: calc(100% - 80px);
120+
max-width: 1100px;
121+
margin-inline: auto;
122+
display: grid;
123+
grid-template-columns: minmax(0, 1fr) 196px;
121124
align-items: start;
122125
column-gap: 48px;
123126
}
@@ -127,7 +130,7 @@
127130
height: calc(100dvh - 72px);
128131
display: grid;
129132
grid-template-rows: auto minmax(0, 1fr) auto;
130-
padding: 20px 12px 16px 0;
133+
padding: 20px 12px 16px 18px;
131134
border-right: 1px solid var(--docs-border);
132135
}
133136
.docs-sidebar > nav {
@@ -463,6 +466,98 @@
463466
.docs-table tr:last-child td {
464467
border: 0;
465468
}
469+
.docs-prose .docs-method-grid {
470+
display: grid;
471+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
472+
gap: 32px 28px;
473+
margin: 16px 0 28px;
474+
padding: 0;
475+
list-style: none;
476+
}
477+
.docs-prose .docs-method-card {
478+
display: flex;
479+
flex-direction: column;
480+
gap: 10px;
481+
min-width: 0;
482+
margin: 0;
483+
padding: 0;
484+
}
485+
.docs-method-name {
486+
display: flex;
487+
flex-wrap: wrap;
488+
align-items: center;
489+
justify-content: center;
490+
gap: 4px 8px;
491+
color: var(--docs-ink);
492+
font-size: 1rem;
493+
line-height: 1.45;
494+
text-align: center;
495+
}
496+
.docs-method-description,
497+
.docs-method-scenario {
498+
margin: 0;
499+
line-height: 1.65;
500+
}
501+
.docs-method-description {
502+
min-block-size: 2lh;
503+
}
504+
.docs-method-scenario {
505+
display: grid;
506+
grid-template-columns: 14px minmax(0, 1fr) 14px;
507+
align-items: center;
508+
gap: 6px;
509+
padding: 7px 10px;
510+
border-radius: 8px;
511+
background: var(--docs-tint);
512+
color: var(--docs-muted);
513+
font-size: 0.8125rem;
514+
text-align: center;
515+
}
516+
.docs-method-quote {
517+
height: 14px;
518+
color: color-mix(in srgb, var(--docs-accent) 60%, var(--docs-muted));
519+
font: 700 1.625rem / 0.85 Georgia, serif;
520+
user-select: none;
521+
}
522+
.docs-method-quote:first-child {
523+
align-self: start;
524+
}
525+
.docs-method-quote:last-child {
526+
align-self: end;
527+
}
528+
.docs-method-tag,
529+
.docs-method-status {
530+
padding: 1px 7px;
531+
border: 1px solid transparent;
532+
border-radius: 999px;
533+
font-size: 11px;
534+
font-weight: 600;
535+
line-height: 1.45;
536+
white-space: nowrap;
537+
}
538+
.docs-method-tag {
539+
background: var(--docs-tint);
540+
color: var(--docs-link);
541+
}
542+
.docs-method-status {
543+
border-color: #f2d684;
544+
background: #fff3c4;
545+
color: #785200;
546+
}
547+
.docs-method-illustration {
548+
display: block;
549+
margin-top: auto;
550+
aspect-ratio: 960 / 676;
551+
overflow: hidden;
552+
border-radius: 14px;
553+
background: var(--color-hover);
554+
}
555+
.docs-method-illustration img {
556+
display: block;
557+
width: 100%;
558+
height: 100%;
559+
object-fit: contain;
560+
}
466561
.docs-api-overview table {
467562
table-layout: fixed;
468563
}
@@ -947,22 +1042,20 @@
9471042
.docs-mobile-nav {
9481043
display: none;
9491044
}
950-
@media (min-width: 1600px) {
951-
.docs-layout {
952-
column-gap: 64px;
953-
}
954-
}
9551045
@media (max-width: 1180px) {
9561046
.docs-layout {
957-
grid-template-columns: 210px minmax(0, 1fr);
958-
gap: 36px;
959-
padding-inline: 16px 30px;
1047+
grid-template-columns: 226px minmax(0, 1fr);
9601048
}
961-
.docs-toc {
962-
display: none;
1049+
.docs-sidebar {
1050+
padding-inline-start: 16px;
9631051
}
964-
.docs-main {
1052+
.docs-reading {
1053+
width: calc(100% - 60px);
9651054
max-width: 760px;
1055+
grid-template-columns: minmax(0, 1fr);
1056+
}
1057+
.docs-toc {
1058+
display: none;
9661059
}
9671060
}
9681061
@media (max-width: 760px) {
@@ -989,7 +1082,9 @@
9891082
}
9901083
.docs-layout {
9911084
display: block;
992-
padding: 0 24px;
1085+
}
1086+
.docs-reading {
1087+
width: calc(100% - 48px);
9931088
}
9941089
.docs-main {
9951090
padding-top: 30px;

‎site/components/blog/blog.css‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@
188188
.blog-reading .docs-prose > :first-child {
189189
margin-top: 0;
190190
}
191+
.blog-article-cover {
192+
display: block;
193+
width: 100%;
194+
height: auto;
195+
border-radius: 8px;
196+
}
191197
.blog-reading .docs-prose > p {
192198
margin: 20px 0;
193199
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import type { Locale } from '../../lib/i18n';
2+
3+
type AnalysisMethod = {
4+
name: string;
5+
description: string;
6+
scenario: string;
7+
tag: string;
8+
href?: string;
9+
illustration?: string;
10+
};
11+
12+
type Props = {
13+
methods: readonly AnalysisMethod[];
14+
locale?: Locale;
15+
};
16+
17+
export default function AnalysisMethodGrid({ methods, locale = 'en' }: Props) {
18+
const comingSoon = locale === 'zh' ? '即将上线' : 'Coming soon';
19+
const illustrationLabel = locale === 'zh' ? '示例图' : 'example chart';
20+
21+
return (
22+
<ul className="docs-method-grid" role="list">
23+
{methods.map(({ name, description, scenario, tag, href, illustration }) => (
24+
<li className="docs-method-card" key={name}>
25+
<div className="docs-method-name">
26+
<strong>{href ? <a href={href}>{name}</a> : name}</strong>
27+
{!href && <span className="docs-method-status">{comingSoon}</span>}
28+
<span className="docs-method-tag">{tag}</span>
29+
</div>
30+
<p className="docs-method-description">{description}</p>
31+
<p className="docs-method-scenario">
32+
<span className="docs-method-quote" aria-hidden="true">“</span>
33+
<span>{scenario}</span>
34+
<span className="docs-method-quote" aria-hidden="true">”</span>
35+
</p>
36+
{illustration ? (
37+
<a className="docs-method-illustration" href={illustration} target="_blank" rel="noreferrer">
38+
<img src={illustration} alt={`${name} ${illustrationLabel}`} loading="lazy" decoding="async" />
39+
</a>
40+
) : (
41+
<div className="docs-method-illustration" aria-hidden="true" />
42+
)}
43+
</li>
44+
))}
45+
</ul>
46+
);
47+
}

‎site/components/docs/DocumentationLayout.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default function DocumentationLayout({ children, locale }: { children: Re
5252
<span className="docs-status-dot" /> {t('status')}
5353
</div>
5454
</aside>
55-
{children}
55+
<div className="docs-reading">{children}</div>
5656
</div>
5757
</div>
5858
);
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<img className="blog-article-cover" src="/blog/images/data-analysis-methods.webp" width="1200" height="600" alt="A blue glass lens bringing scattered points into three clear trend lines" />
2+
3+
“Why did sales fall this month?” usually takes several steps to answer. First, confirm the size of the decline. Then find the channels, products, or customer groups where it occurred. The next step might be to verify an explanation or compare possible actions. Each step calls for different evidence and a different set of methods.
4+
5+
Common data analysis methods fit into four types of work. In practice, an analysis often moves between them. If a breakdown reveals that a channel is missing records, return to the data checks before comparing performance.
6+
7+
| Analytical task | Question to answer | Common methods |
8+
| --- | --- | --- |
9+
| Understand the data | What does it record, and what comparisons can it support? | Data profiling, quality checks, descriptive statistics, exploratory analysis |
10+
| Discover patterns | What happened, and where is the change concentrated? | Comparisons, distribution and composition, trends, associations, segmentation, anomaly detection, journey analysis |
11+
| Explain and validate | What accounts for the change, and what evidence supports an explanation? | Contribution analysis, statistical inference, regression, experiments, causal analysis |
12+
| Forecast and decide | What could happen next, and which action makes sense? | Forecasting, scenario simulation, sensitivity analysis, cost-benefit analysis, risk assessment, optimization |
13+
14+
## Understand the data
15+
16+
Start by identifying what each row represents, how the metric is defined, and who or what the data covers over time. For an overall refund rate, check that the numerator and denominator refer to the same set of orders. For monthly sales, confirm which date assigns an order to a month and whether both months have complete records. Profiling and checks for missing or duplicate records help uncover these issues. Quantiles and distributions can show when a few extreme observations influence the summary.
17+
18+
## Discover patterns
19+
20+
Once you have a fair comparison, check how large the change was, when it occurred, and who or what it affected. Trend analysis shows whether sales fell for several weeks or only a few days. Looking at the sales mix can reveal dependence on a handful of products. Journeys and funnels help locate where customers dropped out. If the business has a weekly cycle, comparing the same weekday across weeks can help distinguish unusual observations from regular fluctuations.
21+
22+
## Explain and validate
23+
24+
Metric decomposition shows which parts account for a numerical change. After breaking down the sales change by channel, check that the gains and losses add up to the total. Then examine whether volumes, prices, or product mix account for the movement in the largest contributor. Evaluating the effect of an intervention also requires a suitable comparison and study design. Sample size, effect size, and uncertainty determine how strong a conclusion the evidence supports.
25+
26+
## Forecast and decide
27+
28+
Forecasting estimates future outcomes from historical data. Backtests and prediction intervals communicate error and uncertainty. Scenario analysis starts with an explicit assumption, such as a higher conversion rate, and estimates how it might affect orders. Decision analysis also considers budget, implementation costs, capacity, and risk. Sensitivity analysis can show which assumptions are most likely to change the ranking of options.
29+
30+
## Choose methods that fit the data
31+
32+
The same task can call for different methods depending on the data. Ordered observations call for attention to timing and seasonality. Geographic observations call for spatial analysis, and connections between entities can be studied as a network. Time-to-event questions about churn or equipment failure also need to account for cases where the event has yet to occur when observation ends. Choose the method based on the question and the evidence the data can provide.

‎site/content/blog/index.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ type ContentLoader = () => Promise<{ default: MDXContent }>;
55

66
export const content: Record<Locale, Record<string, ContentLoader | undefined>> = {
77
zh: {
8+
'data-analysis-methods': () => import('./zh/data-analysis-methods.mdx'),
89
'osi-semantic-layer': () => import('./zh/osi-semantic-layer.mdx'),
910
'mini-data-agent': () => import('./zh/mini-data-agent.mdx'),
1011
'ava-4-release': () => import('./zh/ava-4-release.mdx'),
1112
},
1213
en: {
14+
'data-analysis-methods': () => import('./en/data-analysis-methods.mdx'),
1315
'osi-semantic-layer': () => import('./en/osi-semantic-layer.mdx'),
1416
'mini-data-agent': () => import('./en/mini-data-agent.mdx'),
1517
'ava-4-release': () => import('./en/ava-4-release.mdx'),

0 commit comments

Comments
 (0)