Christian Metal Bar Graph

My latest “feature” is a bar graph to compare artists’ popularity. Right now, I have separate arrays based on genres and do this manually. I want the user to be able to choose a genre which, at this point, would change the array used by the MySQL query in PHP. I’m having trouble with that, however.

The final goal would be to have a grid of artist images and the user drags and drops them onto the chart area to add them — either in the line chart shown in a previous post or like the one below.

In real life, you can hover over the artist’s image to see the artist’s name. Since you can’t see that in this screenshot, the list of artists (L-R) is beneath the screenshot. I changed it to a numbered list from a bulleted list for easy counting.

Screen Shot 2018-12-22 at 11.58.41 AM.png
What’s especially harsh for Christian artists is so many of them have incomplete discographies on Spotify. Not Spotify’s fault — Christian record companies that released good music during the 80s and 90s disappeared almost as quickly as they started. Metal fares much better than, say, rap.

Sorry — I don’t know why WordPress is so inconsistent about whether it lets you click images to see them full size and/or allows me to place them in such a way that it does that. What you’re able to do when creating and editing posts seems to change with each browser and operating system and I can’t keep track.

  1. Barren Cross
  2. Believer
  3. Bloodgood
  4. Bride
  5. Deliverance
  6. Gold, Frankincense, & Myrrh
  7. Jerusalem
  8. King’s X
  9. Living Sacrifice
  10. Mortification
  11. P.O.D.
  12. Resurrection Band
  13. Saint
  14. Seventh Angel
  15. Stryper
  16. Tourniquet
  17. Trytan
  18. Vengeance Rising
  19. Veni Domine
  20. Whitecross
  21. XL and Death Before Dishonor

For mobile users, I need to make the artists display vertically so the bars go horizontally. These rows of columns (does that make sense?) get really wide really quick which you can see when viewing albums for artists with huge discographies as shown in the screenshot below.

Screen Shot 2018-12-22 at 12.14.27 PM.png

Even with my default width now set to 2400px, David Bowie runs out of room as do artists like the Rolling Stones.

Advertisements

Do I Need to Be Good At Math to Learn Programming?

Frequently asked question. My immediate response is no. I’m sure it shortens the learning curve, however.

The good news is, if you suck at math, learning to program can change that which then does help you become a better programmer.

That’s certainly been the case with me. In high school, I sank from Algebra to Basic Algebra to Remedial Math and then kinda failed out of just about everything my sophomore year. I hated math. Why? Because math class sucked. Why? Because the struggle seemed to have neither end nor hope. As an adult, Star Trek and other fun stuff made me a big astronomy and space geek. I wanted to learn about space travel. It took a single question (and answer) for geometry and physics to have a context in which I could understand them so they made sense. I’m no Stephen Hawking, but trading fear for joy is a big deal to me.

What’s unfortunate for millions and millions of students for decades and decades is their question, “When am I ever going to use this?” is met with blank stares.

Using D3 to create data visualizations has helped me learn algebra. Again, having a practical use for something makes it much easier to learn.

My two recent project challenges and “learning issues” were (please forgive and ignore the lingo):

  • Understanding how to create “padding” or “margins” around an SVG–the black area in the above image containing the above graph, title, and legend (I put those in quotes because they are, in this context, figures of speech and not the padding or margins you may be used to using in HTML and CSS) especially when it came time to use those numbers with scales–the rules for telling data how to accurately display in given dimensions (if that’s gobbledygook, don’t worry about it — just know it was already difficult before the Masters of D3 I was learning from explained it like it was child’s play).
  • Getting the above twenty metal bands to display neatly and in rows. As it turns out, an SVG isn’t like a DIV or TD which can force contents to wrap.

What Made the Math Easy To Learn

I had a practical application. Something I could picture. A context for the numbers and equations in the algorithm (algorithm: a series of steps to solve a problem or complete a task — holy cow! doesn’t sound so mysterious or difficult now, does it?) instead of a bunch of numbers and stuff that I was expected to blindly memorize.

Math is a language. Imagine you’re in Cooking Class and the teacher speaks a foreign language and you’re not allowed to see the ingredients or the process. Then the teacher tells you you’re stupid because you don’t get it. So you get sent to Basic Cooking which is no easier. In fact, it’s worse because none of the other students really want to be there and they feel crummy, too. So you get sent down to Remedial Food which is even worse because the teacher hates their job and the students are all hoodlums.

It doesn’t have to be that way. The teacher could provide examples, real-life application, and show you the utensils, kitchenware, ingredients, and explain why you’re doing what you’re doing.

When you’re programming, you know why you need to know something. You know what you don’t know. Fortunately, if you’re building some type of User Interface or data visualization, you can see the results of your mistakes — see how that thing is too big or too far to the left or the pie is all burned on top? — so mistakes are often learning treasures.

Full Disclosure: So you don’t get discouraged or needlessly frustrated, know that sometimes the best of us can’t figure out why something doesn’t work. For hours. Then someone walking by will say, “you know you forgot a semicolon there, right?” and you wasted hours without learning anything other than, yes, you’re an idiot sometimes. We are all idiots sometimes–but not as much as you might think you are.

Full Disclosure Part 2: Sometimes you can’t figure out why something does work. You can waste just as many hours on that, too. Don’t. Move on. Go learn something else. Or go outside for recess and play with others. You need that.

thrash.png
Approximately one year of popularity data for Mortification, Deliverance, Overkill, Living Sacrifice, Cannibal Corpse*, Pantera, Slayer, Megadeth, Testament, Metallica, Kreator, Gwar, Anthrax, Vengeance Rising, Seventh Angel, Celtic Frost, Venom, Death Angel, Sodom, and Exodus.

Behold:

myMath.png

2018 Books of the Year

  • Data Visualization with Python and Javascript: Scrape, Clean, Explore & Transform Your Data by Kyran Dale
  • Web Scraping with Python: Collecting More Data from the Modern Web 2nd Edition by Ryan E. Mitchell
    2nd edition bigger and even better than the first and the first one was really freaking awesome!
  • LPIC-1 Linux Professional Institute Certification Study Guide: Exam 101-400 and Exam 102-400 by Christine Bresnahan
    How I wish I’d read this book before many other Linux books!
  • Interactive Data Visualization for the Web: An Introduction to Designing with D3
    2nd Edition by Scott Murray
    The more good D3 resources I find, the more mixed my feelings are about this book but it is so packed with awesome stuff I feel morally obligated to keep it on the list.
  • Data Driven Documents: D3.JS Tips and Tricks v4.x by Malcolm Maclean
    Perhaps the best part about this book is he wrote it as he learned so he is sure to keep the learning-person/student in mind as he explains things and offers insights (such as potential mistakes and confusing concepts).
  • Building Progressive Web Apps: Bringing the Power of Native to the Browser by Tal Ater
    I grabbed it at the library because the library is free so there would be no consequences if my low expectations were met. I recommend this book by itself and as a pre-requisite to Archibald’s course below. 
  • Data Journalism Handbook 2 (just released!) from the European Journalism Centre and Google News Initiative

Not Books But Amazing Resources I Was Elbow Deep In Throughout the Year

  • Any video, course, or documentation by Jake Archibald including but not limited to:
  • Udacity — not only did I earn a Mobile Web Specialist nanodegree I actually learned a ton! I won’t link to it, however, because they have autoplay media on the page and I can’t condone or support that.
  • FreeCodeCamp — resumed my coursework there after finishing the above nanodegree and it is better than ever! In particular …
    • Their Data Visualization content rocks my world — I’m not taking anything away from Murray‘s book but FCC certainly explains the foundations much more clearly and concisely so I recommend going through it first even if you don’t move on the projects phase.

Florida Cannibal Corpse Man

Detroit is known for many, many, countless great things — not the least of which is giving the world great music over, and over again.

You’re welcome.

Florida, on the other hand, is known for … 99.999% ridiculous crap and Tom Petty.

One such pride and joy of the Tampa area is Cannibal Corpse. In honor of guitarist Patrick O’Brien’s arrest today, here’s some data viz we’ll compare to any jumps in response to his shenanigans.

Bar chart measuring Cannibal Corpse albums popularity
Popularity of Cannibal Corpse albums per the Spotify API as of Dec 9, 2018. (Click for larger)

For those of you unfamiliar with the band, here are their most popular tracks on Spotify (as of Dec. 9, 2018). “Addicted to Vaginal Skin” is the one that’s stuck with me in the twenty years since I found one of their cassettes in the garbage at college.

Album Title
Track Title
Track Popularity

 

Tomb Of The Mutilated Hammer Smashed Face 51
Torture Scourge of Iron 47
Evisceration Plague Evisceration Plague 45
Tomb Of The Mutilated I Cum Blood 44
Red Before Black Code of the Slashers 43
A Skeletal Domain Kill or Become 41
The Bleeding Stripped, Raped, And Strangled 40
Red Before Black Only One Will Die 40
Red Before Black Red Before Black 39
Kill Make Them Suffer 38
Tomb Of The Mutilated Addicted to Vaginal Skin 35
Red Before Black Shedding My Human Skin 35
Red Before Black Remaimed 33
Evisceration Plague Priests Of Sodom 33
The Bleeding Fucked With A Knife 33

Normally, it really, really bothers me that Spotify only supplies a “popularity” score — a relative number ranking all artists against each other — instead of a more quantifiable and useful “playcount” number but, in this case, it makes for some fun comparisons.

Screen Shot 2018-12-11 at 9.16.19 PM.png

As of yesterday, Cannibal Corpse’s popularity on Spotify is 55. That’s down from 58 one year ago which was their high since I’ve been collecting data on them. It should be noted, though, it is up from their low of 50 for the last three weeks of July 2018.

As I said, by itself those numbers are meaningless until we put them in context. While 55 isn’t as high as Insane Clown Posse‘s (a Detroit export–you’re welcome) current popularity of 58 or Slayer‘s 68, it is definitely higher than … well, we can only assume they are less talented artists judging by poor popularity scores such as

  • Lindsey Buckingham (51)
  • Venom at (48)
  • Gwar at (47)
  • Stryper (46)
  • King’s X (39)
  • Was (not Was) (34)

For further comparison, Queen (97) recently overtook Eminem (95) as the highest popularity score in my database (I don’t collect data on everyone–just those I find interesting).

Pop quiz: Who, according to Spotify, is the more genre-hopping artist of the following?

  • Cannibal Corpse
  • David Bowie
  • Bob Dylan
  • Bruce Springsteen
  • Cyndi Lauper
  • Elton John
  • Jack White

If you guessed either Cannibal Corpse or Bob Dylan, you’d be correct! They are tied at nine genres each. Elton John only crosses over into five and David Bowie into seven. What are these diverse genres Cannibal Corpse finds themselves in?

  • death metal
  • alternative metal
  • brutal death metal
  • speed metal
  • deathgrind
  • groove metal
  • metal
  • nu metal
  • technical death metal

Yeah, I know. I learned this yesterday.

My little app with the clever name Pop Rock (get it?) was built with Javascript, D3, PHP, MySQL, and love.

Dec 19 update: Howard Altman’s story in today’s paper shows the events were far weirder than initially known. As you can see below, after one week, CC‘s popularity spiked a single point for a single day. I’ve never seen a spike and drop like that happen. My guts (see what I did there?) tell me it’s unrelated, however.

spike.png