I’ve made so much progress since I last revised my schema in Nov 2017. Most of that progress has been in the last week — two weeks at the very most. The Mobile Web Specialist nanodegree program I’m in as a Google Udacity Scholar via a Grow With Google scholarship has made my skillset and confidence go all supernova.
This query fetches only socialist candidates (excluding Hillary Clinton in one state where she’s actually on the ballot as a socialist — she’s not included because then she’d win all the states … until I fix my query by, hopefully, finally completing the affiliations table below) to see who among would “win” among the socialist candidates.
Here’s the new schema … I still haven’t added a stateAbbr column to the affiliations2016 table which, I think, is the reason for a problem I’m having with my first major query.
I need some buttons to change what results are fetched and displayed including but not limited to:
Results if all the “left-ish” third parties voted for a single candidate — would that candidate have beaten Trump?
If all the right-ish votes went to Trump, would he have have won the popular vote?
Learning so much in the Mobile Web Specialist nanodegree. My Dev Tools skills have exploded. For example, I’ve struggled for hours (all together over the course of many days) to figure out what’s making my pretty new album chart display with either way too much margin:
or, when I tried (among other “fixes”) the fix that did anything remotely desirable, up against the left with no margin:
Well, today, I used my little web app to look something (Iron Maiden related — see below if you’re interested) up and — a combination of irritation and actually having the time — I fought with it until I fixed it.
The chart is in a DIV with
No matter what style in CSS or property in D3 I changed, nothing seemed to work. I also tried removing various DIVs and, opened my dev tools and saw that the page was still seeing a style for #forChart I’d commented out a while back. Even though the page file itself was being updated when I refreshed, the CSS wasn’t!
Once that was fixed by clearing my cache, it was better but still didn’t look right so I uncommented the “container” DIV I’d commented out while debugging and that added some huge margins again. I was back to having Yucky Version A …
or Yucky Version B.
Just to make sure — because I was going insane — I at least identified the culprit was something in Bootstrap by removing all the Bootstrap:
I went back to Dev Tools and, while I couldn’t see anything affecting the margins, I scrolled all the way down to the little diagram showing the margins and padding. When you click the components inside, it highlights them in the browser so I could see there was a buttload of margins — I just had to figure out where. Then I realized that when I clicked in the code (the Elements tab of DevTools), it showed much more specific information under the Styles tab.
Then I finally got to do one of the coolest things Dev Tools can do which is hack around in the code to change what’s displayed. So I could test it “live” without uploading, refreshing, testing, changing the code again, etc. … OH MY GOD what a time saver!
Once it was beautiful, I copied the new CSS fromt the Styles tab, pasted it into my CSS file, uploaded, and viola! Awesomeness.
What made me visit my little app today was this … the sort of nerdy curiosity about data that inspired the app in the first place.
Geeky (Geekier) Iron Maiden Data
I was celebrating yesterday’s purchase of Iron Maiden‘s Live After Death by pricing some of the other albums on Amazon — in particular, Brave New World because it is my second favorite album of theirs and it has a wicked cool cover similar to Live After Death.
And this nonsense is what I saw …
“Blood Brothers” — obviously the best song on the album, has like zero popularity. I couldn’t even hum what Amazon says are the most popular tracks from memory. I almost lost my faith in humanity. So, I went to my little app to see how the song rated on Spotify.
First I sorted all their tracks by Track Name.
Various versions of “Blood Brothers” do seem to be a bit low on the curve. For comparison, I sorted by popularity. Here are their top tracks as of last Sunday.
Then I sorted by album so I could see how the song placed compared to other tracks on the album — the way Amazon showed them.
On Spotify, it is the second most popular track on the album and by a decent margin.
After lots of hard work, I have D3 not only working with my database but have album art to go with the albums. It took me a while — even after I got the album covers to appear — to get the covers to display where I wanted them. I had to do math a lot. Still not “done,” but this is a big, big deal. This is my #BadAssTakeover.
I have cron jobs that regularly reach out to Spotify and store the popularity of artists, albums, and tracks. Here is a sampling of the bar graphs I can now do. Albums are in chronological order and the numbers are the popularity scores as of Sunday, April 22, 2018. Their popularity scores are relative to all albums on Spotify but I don’t know how they work … I don’t know if an album’s popularity takes into consideration the tracks’ popularity.
Click all images for full size
Alice has tons of compilations which is frustrating for multiple reasons. He’s one of the artists that makes me think a vertical graph might be better.
As you might expect, Bowie has a ton of albums even without compilations.
I’m not sure what the albums without art are … their titles are visible in a sortable table on a different page but I’m busy at the moment …
I chose them as a sample for a couple reasons. One, they have relatively few albums and two, they were played last night on IntenseRadio during The Great Scott Diversion.
I really don’t like Deliverance but a lot of people do and they have a new album out.
I feel like I should like Iron Maiden more than I do. Today was a bad Iron Maiden day for me. I’ve been trying to find a relatively inexpensive used copy of Live After Death (on vinyl) and finally found one at a local used record shop but they wouldn’t sell it to me because it wasn’t priced yet. How do I know it was relatively inexpensive if it wasn’t priced yet? The cover was in horrible condition.
I chose them because I wanted to show some really tall columns … all that “gray space” in the screen shots is how high up the columns could go.
Led Zeppelin is another reason my recent … I’ve started buying records again — for the first time in over 30 years — and it’s a lot less fun than I thought it would be.
I think all those blank spaces are compilations. He’s like Alice that way. Ew.
Mortification, like Deliverance, are in my database because I wanted a health selection of thrash and black metal and similar artists to compare to each other.
One Bad Pig
Because I love them.
They only have four albums which is sad. Well, they’ve also got a demo and a live album but those aren’t on Spotify.
Resurrection Band/Rez Band/Rez/Resurrection Band
For some reason, there’s at least one … wait … it does say Resurrection Band … I thought Ampendectomy was a Glenn Kaiser solo album. Can you believe Lament isn’t their most popular album? People are dumb.
I don’t want to go against all the advice in books like The Secret and You Are a Badass but I just answered a post in the Grow With Google Udacity Mobile Web Developer forums about what we’ll do if we don’t get selected to continue on with a nanodegree scholarship. Here are my “backup” plans in some sort of order of priority:
Google’s Data Journalism course
Data Journalism training/resources I found at ProPublica
Continue work on personal project using Spotify Web API – adding D3
Return to FreeCodeCamp to resume algorithms and start D3
Finish a couple other courses I’ve started at Udacity.
My wife’s Christmas present to me was 2-3 courses at Udemy so those are waiting.
Use all my new knowledge to rebuild-from-scratch an app I made for a client but could make much better now.
Also, continue After Effects courses at Lynda so I can crank up the quality of the videos and other eLearning I do at my day job until I find … let’s just say, “someplace else.” Some sections of the GWG course were pretty inspiring in this way …
They’re probably not that impressive because the screenshots are still images and taken out of context but I believe — unlike a former employer — it’s a no-brainer that appropriate animation adds a tremendous amount of value to any course especially what are otherwise powerpoint-based page-turners.
I just popped into a course at Khan Academy this morning while checking for something and saw this as well.
In that case, the combination of animation with video probably didn’t actually add much to knowledge transfer but planted some seeds I’ll water and nurture. I do think there’s value in Over-the-Shoulder (or “all around his head”) graphics to enhance a talking head but, in this case, I think it was more eye-candy to keep peoples’ attention and, yes, there’s value in that too. Mostly, it was cool-looking and aesthetically done well so I wanted to remember it by placing it here.
Should green squares and StackOverflow reputation be my highest priority?
Sometimes, they are. Not that you can tell by looking at my StackOverflow reputation.
My FreeCodeCamp timeline is completely empty because I started focusing on actual development with personal projects. I haven’t abandoned it. I just haven’t returned for quite a while.
A return to learning (the Grow With Google challenge course), however, has had a similar effect on my GitHub “personal projects” timeline which had become, IMHO, rather respectable.
Having said all of that, I’ve shown great improvement on the timeline only God sees for commits to my wife and children. And I still feel guilty. Like, someday, I’ll have this great job that I say is for my family (what we might call the Walter White Work Ethic) but by the time I get it, they’ll have moved out and I spent all my time preparing to be a good father some day instead of … being a good father. So, while far from perfect, I am mindful of that. I hate how hard it is to tear myself away from work (not my sill day job — real work on stuff like this) to spend time with them. Ugh.
What I do find is that the more time I spend with them the happier I am, the less anxious I am to improve my quality of life, the less I feel compelled to escape my day job, and the less painful that job feels. So, there’s that.
Update:After the initial learning in the GWG course, I started applying that knowledge and …
… while STILL keeping my policy of never saying no twice in a row. What does that mean? I give myself one “I can’t right now, I’m working” but the next time one of my children asks to play — no matter what — I give all of us the gift of playing together.