How much yarn to buy
yarn_neededCalculate how many skeins to buy for a knitting or crochet pattern using Ravelry pattern yardage and yarn skein length, plus a safety margin. Adjust for gauge or size.
Instructions
Works out how many skeins to buy for a pattern with a given yarn, with a safety margin. Reads the yardage from a Ravelry pattern (smallest and largest size) and the skein length from a Ravelry yarn, or takes the numbers directly. Can account for a gauge difference or a bigger size (scale).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | Multiply the yardage, e.g. 1.15 for a bigger size or a looser gauge. | |
| yarn_id | No | The yarn the user will use. | |
| pattern_id | No | ||
| pattern_yards | No | Total the pattern needs for the chosen size (meters: multiply by 1.094). | |
| margin_percent | No | Safety margin. | |
| yards_per_skein | No | ||
| meters_per_skein | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| yarn | Yes | ||
| notes | Yes | ||
| options | Yes | ||
| pattern | Yes | ||
| yards_per_skein | Yes |