Behind the Scenes

Shawl Math

Posted on

I had a phone call with a potential employer the other day and I found myself trying to explain one of the ways that I use my mathematical and forecasting skills in a situation where someone else might not recognize the opportunity. They make perfect sense in my head, but sound a little bit rambling when I try to explain them. Putting these instances in writing, with examples and diagrams, can only help. The example that came up on the phone was from my time with Mochimochi Land, and I’ll cover that in a future post. Today, I’ll stick to something more current.

I recently started knitting the Nurmilintu shawl out of some beautiful gradient yarn. The wedge shaped shawl alternates between solid garter stitch and panels of lace. When I finished the first garter section, I still had quite a bit of yarn left. In general, that’s a good thing, as it’s better to have too much yarn than not enough. In this case, however, failing to use all of the yarn would mean not using what I considered to be the prettiest color at the end of the gradient. So, last night, after finishing the first section, I stopped, weighed my yarn, and made adjustments using a Google spreadsheet. (I miss Microsoft Excel, but can’t justify the expense.)

The first step was to count the stitches in the shawl. It starts with a cast-on of four stitches. On odd rows, there’s an increase at the beginning of the row and a decrease at the end. The stitch count doesn’t change. On even rows, there’s only the increase at the end of the row and the stitch count increases by one. So, every pair of rows, the stitch count increases by one. The instructions are to repeat these rows until there are 79 stitches. 75 repeats (150 rows) will accomplish this. Using the geometric formula for the area of a trapezoid, the total number of stitches is:

(150 rows) * (4 stitches + 79 stitches) / 2 = 6,225

Making the same calculations for each section, I ended up with a total of 20,720 stitches. So, the first section of the shawl represents 30% of the stitches. Weighing what was left of my 100g skein of yarn, I found that it was only 25% used up.

My first thought was to add an additional section, as suggested by the pattern. I was able to try this out on paper. Each garter section after the first is 36 rows long (+18 stitches) and each lace section is 18 rows (+9 stitches). This would increase the total to 29,225 stitches and that would mean that I was only 21% through the pattern with 25% of my yarn gone. So, not an option. Instead, it made sense to increase each section.

If my first section (6,225 stitches) took 25g of yarn, then 100g of yarn should get me 24,900 stitches. I set my calculations up in a spreadsheet, multiplying each row length by the same factor and then adjusting that number to get close to 24,900.

  • First of all, I added two more rows at the end to account for binding off the stitches. Three might make more sense, as it’s important to bind off a lace project very loosely.
  • Secondly, while the garter sections can be any length, the lace sections need to follow a chart. This limits them to a repeat of six rows.

If I needed these calculations to be more robust – for example if this blog post results in a lot of knitters asking me to make custom pattern adjustments – I would set this up with a bit of code and/or formulas. As I only needed this answer once, the sheet is set up to require a little trial and error on my part to get to the optimal number. Once I knew that the adjustment would be small, I hard-coded the number of lace rows at 18 and then recalculated the adjustment for the garter rows only. When I was happy with the closeness of my number, I replaced the calculated row counts with the next-lowest even integer.

It’s also important to remember that knitting is pretty variable in practice and the amount of yarn I’m using can vary. For this reason, I tried to keep the estimated stitch total well under 24,900. I also calculated how much yarn should be left in the skein at the end of each garter section. That way, I can check and adjust my estimates as the project continues, and I’ll be more likely to succeed in using all of the blue yarn without running out.

Works In Progress

External Motivation for the win! (Weather Project, Day 1)

Posted on

I ran across a really appealing job posting today. Among other things, however, it requires a writing sample. My technical writing skills have always been pretty solid, but it’s been some time since I’ve had to write anything. And most of my writing was so full of confidential information that it wouldn’t be of use even if it was current.
I decided that the best way to generate some current, relevant writing is to start a new project. I have lots of ideas I’d like to explore, but I’m going to keep it simple and do a study of the weather.
The idea I’ll be exploring is that Chicago doesn’t have much of a fall and spring. It’s something that we say all the time around here, but how true is it? How much Confirmation Bias is actually at play? I mean, nobody makes this complaint on a seventy degree day.

ChTemp
The first thing I need to do is to find a database. This is all the more reason to start with a weather-related project. There’s plenty of information out there for the taking. NOAA has data at surprising amounts of granularity. That’s where I plan to start.
In the past, I’ve done most of my analysis in spreadsheets, but that’s not going to cut it here. I tried to import just one year of NOAA data into Google Sheets and it wouldn’t even open. It’s time to move on to something real. I’ve done a great deal of SQL training, but I have yet to put it into practice. I’m downloading PostgresSQL and doing a quick training session to learn how it ticks, then I should be able to at least begin my analysis in there.
Beyond the technical aspects of the project, I need to spend some time defining my project. When I say that Chicago doesn’t have Spring and Fall, I’m not talking about the calendar or the position of the sun in the sky. What I’m saying is that it feels like we go directly from cold weather to hot weather and back to cold without many days in between. How am I defining cold? How am I defining hot? These are subjective measures. There are some who consider fifty-five to be downright balmy and others who need a jacket as soon as it drops below seventy.
Once I’ve defined my temperature range, do I count a day as spring- (or fall-) appropriate if the day’s mean temperature is in range? Or do the high and low need to be in that range as well? Is a chilly morning enough to disqualify an otherwise perfect spring day?
Finally, how many good days is enough to feel as though we’ve had our smooth, seasonal transition? Three full months would be the ideal, but that might be a bit inflexible. Is there an acceptable number, or should I be comparing to the seasonal transitions of other cities? Nearby cities? Cities known for their stable, clement weather?
Additionally, even though it’s not directly part of this question, it might be interesting to compare contemporary results to those of 10, 20, or more years ago. Just in case people are nostalgic for the seasons of their youth.
I plan to get my database up and running first, so I can dig into the NOAA databases and see what I have to work with before I finish designing my questions. I’ll keep posting here as I fine tune things.