Russell Atkinson's Blog, page 59

February 11, 2019

Fractal snowflake

I’m taking a Python class at the local Adult Ed. They just had us code a fractal snowflake to teach us recursion. It’s kinda fun, I suppose.



My code is below:


import turtle

def koch(t, length, n):
if n == 0:
return
angle = 60
t.fd(length*n)
t.lt(angle)
koch(t, length, n-1)
t.rt(2*angle)
koch(t, length, n-1)
t.lt(angle)
t.fd(length*n)

def snowflake(t,length,n):
for i in range(6)
koch(t, length,n)
t.rt(60)

myrtel = turtle.Turtle()

snowflake(myrtel, 3, 5)
turtle.mainloop()

The post Fractal snowflake appeared first on OnWords.

 •  0 comments  •  flag
Share on Twitter
Published on February 11, 2019 15:35

February 9, 2019

An Absolutely Remarkable Thing by Hank Green

An Absolutely Remarkable ThingAn Absolutely Remarkable Thing by Hank Green

My rating: 2 of 5 stars


I really tried to like this one, but just couldn’t. April May is a 20-ish bisexual artist/designer in New York. She happens upon a massive Transformer-like sculpture on the sidewalk one night and calls her friend Andy to come make a video. The robot, which she names Carl, appears simultaneously all over the globe in big cities. An advertising gimmick? Alien? Art? April becomes famous and her life goes to hell. The book was billed as science fiction but it’s more of a fantasy. There was little science in it and what there was did not make the plot even slightly plausible. It seems to be mostly about personal relationships and how people screw them up. Reviewers have called it witty but that’s lost on me. I just found it weird.


View all my reviews


The post An Absolutely Remarkable Thing by Hank Green appeared first on OnWords.

 •  0 comments  •  flag
Share on Twitter
Published on February 09, 2019 19:46

February 2, 2019

Cryptic Crossword 4

I just uploaded a new cryptic crossword. To play, click on the link, not the picture.


http://crosswords.ackgame.com/Cryptic_4.html



The post Cryptic Crossword 4 appeared first on OnWords.

 •  0 comments  •  flag
Share on Twitter
Published on February 02, 2019 10:26

January 31, 2019

Birth rate in the U.S.

You may be aware that for quite some time, the overall birth rate in the U.S. has been dropping. However, some states are making a comeback in this regard. The following map shows which states’ birth rates are rising or falling the fastest.  It covers the period 2010 to 2016. Note that the states shown as High do not necessarily have high birth rates; rather they have the highest increase in their birth rate compared to other states. Similarly, Low means the decrease in rate is greatest there, but it may still be relatively high. The changes may be due to migration, immigration, a changing demographic (e.g. young/old or ethnicity), or economic factors among other reasons. In general, though, an increase signifies an increased vitality in a state or at the very least, a lessening of a pessimism or depression that may have existed. The zero change point is between Colorado and Oregon. Darker green means positive change in birth rate, while the paler the green or yellow, the more the birth rate has dropped.



The increase for North Dakota was just over 25%, and for D.C. about 7.5%.  The decrease for New Mexico was about 11% and Vermont 7.5%. All the other states were in the range from -7% to +4.8%.


The post Birth rate in the U.S. appeared first on OnWords.

1 like ·   •  0 comments  •  flag
Share on Twitter
Published on January 31, 2019 15:17

January 29, 2019

Our Towns by James and Deborah Fallows

Our Towns: A 100,000-Mile Journey Into the Heart of AmericaOur Towns: A 100,000-Mile Journey Into the Heart of America by James M. Fallows

My rating: 3 of 5 stars


The authors give an account of their three-year journey by small plane across America, telling us their impressions of the communities they visited. The focus is on one question: why here? The question applies both to the residents and to the businesses that provide the economic lifeblood. Since the book avoids the major metropolitan areas, one answer universal to all the locations in the book is the low cost of being there. Low cost of living and low cost of labor make a town attractive to families and employers alike. But since that applies to probably 90% of the geographic area of America, I was looking for more – for what makes a town unique – i.e. what makes a town thrive “in the sticks?”


The authors do give many interesting tidbits along those lines, and that made the book worth reading. I’ll mention a few in a bit, but since they tend to be spoilers, I want to save those until later. I was sorely disappointed in a couple of aspects of the book, however. First and foremost is the fact that the title is a bait-and-switch. The authors wrote very little about towns. The vast majority was about medium-sized cities. Of the 29 listed names in the Table of Contents, the median population was 47,000. Two of them were state capitals and others were major regional hubs. There were only three towns below population 3000 and anything below population 20,000 got very short shrift, mostly no more than two pages. The other disappointment was the repetition. Nearly every chapter focused on just a few aspects of these cities: civic boosterism, (re)vitalization of the downtown, K-12 education, libraries, brewpubs, and river walks. These things are important, to be sure, but differed very little in their specifics and didn’t tell us much we didn’t know since virtually every town does the same thing. I skimmed a lot through the second half of the book.


Now for some of the spoilers, but they’re reasons why you should read the book. On the plus side, one unexpected bonus was the description of what it’s like to tour the country by small plane. I learned a lot that I didn’t know or hadn’t thought about, such as what makes a small regional airport good (clean bathrooms, a good crew car, a good-sized runway). The best parts for me were the accounts of a local lifeblood enterprise. Most were major businesses but these also included military bases, universities, or unique geographical features. An obvious one that attracts employers is proximity to major road, rail, or water routes, but some are not so obvious: a windswept plain that attracts windmill manufacturers; a midwestern town where the residents speak clear, “unaccented” American English that’s perfect for call centers; an abandoned factory or closed military base that already has valuable infrastructure. Often the key was simply the value of being a hometown for someone who made it big. One lesson I learned was how much people have an affection for where they grew up, so inventors and entrepreneurs, even actors or sports stars, return there and set up shop, providing jobs.


View all my reviews


The post Our Towns by James and Deborah Fallows appeared first on OnWords.

 •  0 comments  •  flag
Share on Twitter
Published on January 29, 2019 14:37

January 25, 2019

Political Map 2019

Consider this map:



The many solid blue or solid red states are an indication of the polarization that has occurred in our country in recent years, and I believe it’s unfortunate. However, the states with colors in between are proof that candidates of both parties can be elected there. It was compiled in the following way. I gave one point each for Republican office holders in the position of U.S. Senator and Governor, one point for those states that went for Trump in 2016 and one point for each quartile of the state’s GOP Congresspersons. In other words, if the state had 75% or more of its representatives Republican, it got three points; if 50% or more, 2; 25% or more, 1; and less, 0. Thus a state could get from 0 to 8 “redness” points. Of course even the deep blue or deep red states might have some Congresspersons of the opposite party, just fewer than 25%. It also doesn’t take into account mayors, state officeholders, or voter registration, so it’s by no means definitive. There are also a couple of elected Independents in the mix. I am a both surprised and dismayed at how few states are in the middle, only two purple states and three light blue.


I do not contend that this is good or bad, nor is it likely to predict anything for the 2020 national elections. Students of political science would be well-advised to consider the effect of demographics on this type of map. States in the red category especially, such as Florida, for example, may not be as red as they look for purposes of a presidential election. Democratic voters tend to be concentrated heavily in small areas such as major cities. 700,000 Democrats in an inner city district may elect one congressperson, while 700,000 Republicans spread in suburban or rural areas might elect two, but in a presidential election, the vote is split 50-50. Gerrymandering tends to accentuate this even more.


The post Political Map 2019 appeared first on OnWords.

 •  0 comments  •  flag
Share on Twitter
Published on January 25, 2019 09:39

January 20, 2019

Ivanka vs. Malia

One more post about baby names and then I’ll leave it.



The post Ivanka vs. Malia appeared first on OnWords.

 •  0 comments  •  flag
Share on Twitter
Published on January 20, 2019 14:57

January 19, 2019

David and the Phoenix by Edward Ormondroyd

David and the PhoenixDavid and the Phoenix by Edward Ormondroyd

My rating: 5 of 5 stars


As with other reviewers, this charming story is a childhood favorite of mine. David is a boy of ten or so who has just moved into a new house at the foot of a mountain. He explores the mountain and discovers The Phoenix, a huge talking bird who is vain, pretentious, and adventure-loving. He and David become fast friends. Since it’s summer vacation David spends every day climbing the mountain and going on adventures with the Phoenix. They meet a witch, gryffens, a faun, and other mythical creatures. The book has very much the same feel as the song Puff the Magic Dragon by Peter, Paul, and Mary. The Phoenix is being pursued by The Scientist, who, unfortunately, is not given a sympathetic treatment. The book was a Weekly Reader Children’s Book Club selection. Although aimed at children, the vocabulary is surprisingly advanced. It would make an excellent read for or to a child of David’s age. At some point I must have mentioned this book to my wife, as she obtained a copy from the local school district some time in the past and was able to locate it on our shelves when I remarked about it. I owned a copy as a child, but that one is long gone and this one is not it. It’s probably not available in your local library, but it is at Amazon in both Kindle and hard cover versions.


View all my reviews


The post David and the Phoenix by Edward Ormondroyd appeared first on OnWords.

1 like ·   •  1 comment  •  flag
Share on Twitter
Published on January 19, 2019 09:36

January 18, 2019

Baby Names – Regional trends

In my last post I discussed recent trends in baby names, focusing on why some have come into or gone out of fashion. Today I want to look at which names are regional, and speculate why that is. These tables might be useful for authors choosing names for their characters. I selected several boys’ and girls’ names that show marked regional preferences. See the table:





Name
Sex
Region
States where most popular


Isaac
M
Mormon
UT, NV, AZ


Clyde
M
Appalachia
WV, TN, NC, KY


Anthony
M
Italian
NY, NJ, RI


Lars
M
Scandinavian
WA, MN, CA


Horace
M
South
GA, AL, SC


Clifton
M
Deep South
MS, NC, VA, LA


Noel
M
Big population states
TX, CA, NY



The ethnic names are pretty easy to analyze for regional preferences. Similarly, Old Testament names are very popular among Mormons both for boys and girls. The other names show the regional preferences in the chart, but I’m not sure why. Clifton is an English name. It’s not very popular these days, but historically, it’s been a southern name for some reason. I remember the old song Wolverton Mountain and its fearsome character Clifton Clowers, which was set in Arkansas. I never thought of Horace as a southern name, but it clearly is one. Of course it’s the name of a Roman poet. The name Clyde is Scottish and that can probably explain why it’s popular in Appalachia where Scots-Irish settled heavily in early America, probably due to their mining experience. I have a pretty good idea why Noel is markedly more popular in the states with big populations. See notes of methodology below. The list of states in the table, by the way, are in the order of how popular the names are (or were, since the data covers from 1910 to 2017). Most of the regional preferences have moderated in recent decades, presumably due to travel being easier now and populations mix more.


Now for the girls.





Name
Sex
Region
States where most popular


Gretchen
F
German/Scandinavian
MN, IA, WI


Madonna
F
Upper Midwest
IA, IN, SD


Aliyah
F
Arab? Spanish?
NV, AZ, FL


Dolly
F
Appalachia
WV,  KY, VA


Elaine/Elena
F
Elaine: Northern Half, Elena: SW
Elaine: evenly distributed, Elena: NM, AZ, CA, TX


Annie
F
Deep South
AL, MS, GA, SC, NC


Latoya
F
African-American
DC, MS, LA



Gretchen and Latoya can pretty much be explained by ethnicity. I haven’t identified a reason for Madonna’s and Dolly’s regional trends. Aliyah is very popular among Arabs according to websites I visited, yet its preference is in largely Hispanic states. It must also be popular among Spanish speakers. Most surprising of all for me, however, was Annie. That name has a very pronounced popularity in the Deep South compared to the rest of the country, the most extreme regionality of any of the names I found, yet I was not aware it was a southern name. It was popular throughout all the South. Similarly Elaine was popular throughout the northern half rather evenly distributed, yet not at all in the South. Elena can perhaps be explained as a Spanish name, but I thought it was curious how these two near-identical names split the country on a north-south basis.


I tried to find non-ethnic names that showed regional preference, in some of the other areas, like the West, Florida, etc. My own name, Russ, does prefer the Northwest: WA, OR, CA; but it wasn’t as stark a difference as the names in the charts. Constance was strongly regional to New England (ME, RI, NH) up through the 1950s, but is rare now and evenly distributed.


A note on methodology. The data is from the U.S. Census, which releases baby names for every state every year. My data covers 1910 – 2017. The popularity numbers are based on percentage of babies with the name, not the count. Because the U.S. Census Bureau for privacy reasons only publishes the names which occurred five or more times in a year in each state I had to adjust the percentages. I was able to obtain the total number of babies (names not listed) born in each state each year and by comparing the totals of named babies to total babies I could determine accurate percentages for babies whose names appeared in all states. For less common names where some years they didn’t appear five times or more in some or all states, I have no data, or only data from populous states and those rankings are not accurate. That probably explains Noel. I found it surprising that in some states some years over half the babies born did not make the five minimum cutoff. Bear in mind, too, that the popularity varied over time and may not be accurate for the current day.


The post appeared first on OnWords.

1 like ·   •  1 comment  •  flag
Share on Twitter
Published on January 18, 2019 10:47

January 16, 2019

Baby Names – recent trends

Recent trends in baby names can only be tracked through 2017 since U.S. Census data has published only that far. There are some interesting trends, though. If you just want to know what’s popular these days, you can go to the census site. I’m more interested in what has changed significantly upward or downward and why. Take a look at these charts for the male names Theodore and Colby.


Rise and Fall of Colby – NOTE: charts represent percentage of all births of that sex, not absolute numbers


Resurgence of Theodore


I’m not sure why Colby (and its variant Kolby) first became moderately popular in the 1970s, but the spectacular jump in 2001 I traced to the success of a contestant on the TV show Survivor at that time. The name hasn’t surfaced in pop culture since then that I could find, which is no doubt why it has subsided since then. Theodore, of course, was first popular when our president bore that name. It’s not clear to me why a gradual resurgence began around 2010. Although it’s gradual, it’s quite substantial. Such a slow climb is not typical of a pop culture cause, and is rare among traditional names such as Theodore. The name Winston  has a somewhat similar resurgence, beginning about that same time. Is there a new interest in historical figures?


1940’s surge due to Churchill, but why now?


Now let’s examine girl’s names.


Samara – three jumps


Dolly Parton made this name popular twice


Girl’s names tend to be more influenced by pop culture than boy’s names. Jolene (1973) was Dolly Parton’s most popular song in terms of how often it was recorded by others. She also did a popular cover with the band Pentatonix in 2016, no doubt accounting for the surge then. I’m having more trouble attributing those spikes in Samara’s profile. Actress Samara Weaving might be the cause of the most recent one since she’s had major roles in recent movies and the TV series SMILF, but I haven’t been able to track down anything for 2003 where it first jumped. I examined where the name Jolene was most popular during these different time frames. Prior to 1973 the three states in which the name was most popular were Utah, Iowa, and Nebraska. During 1973 – 1977 it was the Dakotas and Alaska (country music territory), and after 2010, West Virginia, Ohio, and Missouri (also country music territory). It may be possible to track demographic movements this way. Much has been written recently about the steroid “crisis” centered on West Virginians moving into Ohio. See my review of Hillbilly Elegy as a good example.


Other names that have increased quite a bit in the last few years are Matias for boys and Ophelia for girls.


Oddly, or perhaps not, negative publicity about a name, such as an assassin, child molester, or despicable TV character does not seem to result in a precipitous drop in a name’s popularity. Some names do drop, though, and it’s seldom clear why. Colby is perhaps the exception, but it’s clearly not due to negativity, only the absence of the preexisting  media boost. Why do long-popular names drop?


The post appeared first on OnWords.

 •  0 comments  •  flag
Share on Twitter
Published on January 16, 2019 15:14