I can’t tell you how many times I’ve tried to “learn” d3.js. I end up making it maybe a third of the way through a book before giving up and just looking through bl.ocks or Observable Notebooks because I want to make a plot now, not once I’ve read a text book.
I’m writing this blog post because I am absolutely in LOVE with Amelia Wattenberger’s Fullstack Data Visualization with D3.
I’ve broken down this introduction into 8 pieces:
Step 1: Create a template Step 2: Edit the template Step 3: Understanding components Step 4: Understanding main.
I’m reading Sarah Drasner’s SVG Animations book and thought that blogging a summary of each chapter will help cement what I learn… but then went down a viewbox rabbit hole trying to understand the anatomy of an SVG.
An Example The book starts off with an <svg> element which has
x where to start the svg canvass x coordinate y where to start the svg canvass y coordinate width where to end the svg canvass x coordinate height where to end the svg canvass y coordinate viewBox given the same attibutes as x, y, 450, 100 <svg x="0px" y="0px" width="450px" height="100px" viewBox="0 0 450 100"> <rect x="10" y="5" fill="white" stroke="black" width="90" height="90"/> <circle fill="white" stroke="black" cx="170" cy="50" r="45"/> <polygon fill="white" stroke="black" points="279,5 294,35 328,40 303,62 309,94 279,79 248,94 254,62 230,39 263,35"/> <line fill="none" stroke="black" x1="410" y1="95" x2="440" y2="6"/> <line fill="none" stroke="black" x1="360" y1="6" x2="360" y2="95"/> </svg> We see that the elements take up the height and width of our viewBox:
selectInput("inputID", "Name to Display", choices = c("Red Circle", "Yellow Circle", "Blue Circle")) Because we can envision use cases to be beyond clicking on simple shapes, I wanted to use SVGs, which was my first learning curve.
Yesterday I interviewed for a position maintaining and creating ShinyApps. To call that a JOB is crazy to me. I love developing reactive web applications, the fact that you can get paid to do that is still mind blowing. I’m realizing that having fun at work is actually a possibility!
That said, the data scientist position usually includes a live coding portion. I went into it trying to treat my first one as practice, but every second I didn’t spend typing spanned an eternity.