• Monday

    • Private work.
    • Remember USDC depegged to $0.87 briefly in the wake of SVB.
    • Continued melodysheep (after end of time) with their 3-part series Life Beyond.
      • Inevitable that aliens exist. There are more habitable (distance to star, elements, liquid) planets/moons in our universe than grains of sand on earth.
      • Big bang ~14B years ago. Life on earth started developing ~4B years ago. We have ~100T years until the last star dies and life is extinguished. We’re only at the very beginning. Much more time for primal life to develop, intelligent life to get better at travel/communication, etc.
      • Also gets into the museum of alien life, what they could be like. Our planet (earth) has ~10B people.
      • Our solar system has 8 planets. Our galaxy (milky way) has ~100B stars. Our universe has ~1T galaxies.
      • Kardashev scale, type 1/2/3 civilization. 1 = you can capture all the energy available to your planet. 2 = you can harvest all the energy from your star. 3 = your entire galaxy.
      • If the whole universe is an ocean, we’ve searched about a cup of it. There are some corners we can never reach because of the expanding universe.
    • Pandas refresher.
    • Tabular data. Rows and cols.
    • Read and write. Import and export.
    • Select and query. Some for iterating/dev. Faster alts for prod.
    • Join.
    • Plot.
    • Computed columns.
    • Aggregations. Summaries. Statistics.
    • Reshaping. Lots of functions to moved data and relations around.
    • Numpy is a bit faster and more memory efficient. Pandas has more high-level functionality. Numpy does support named axes (structured arrays), but in general pandas is better at multidimensional.
    • SBSC.
    • Little annoying that you can’t just set the width of the bars in plotly for horizontal bar charts, and then let height automatically adjust: https://community.plotly.com/t/can-you-scale-the-dcc-graph-height-automatically-to-content/45471/3. Computing height is easy, but you have to include the top section for title and such.
    • Added vlines for the average of ALL traces, not just the first.
    • categoryorder is pretty cool (https://plotly.com/python/reference/layout/xaxis/#layout-xaxis-categoryorder), but I’m doing a sort across all traces so I can’t just do a single sort with knowledge of only the keys.
    • As much as possible, frontend views try to match database views. Little to zero modification. So the results module is mostly just querying the sqla objects, very slight calc wrappers on the data (rollups, payouts, etc), then serializing to the app. The stats module, on the other hand, is purely meant for statistical analysis. So it uses numpy and pandas, then serializes to json (with layout/config) and passes to the frontend for plotly to render.