Visualizing a codebase

Uma forma alternativa de visualizar uma árvore de pastas, com círculos

How can we “fingerprint” a codebase to see its structure at a glance? Let’s explore ways to automatically visualize a GitHub repo, and how that could be useful.WHAT’S IT FOR?“Fingerprint” the structure of a GitHub repoSHARE

WHO MADE IT?

Imagine this: you’re looking at a new codebase, and you want to find the code for a specific function.

For example, in the create-react-app codebase,How quickly can you find a test for react-dev-utils?

Tags: , ,

See how California changed in the last decade, right down to your neighborhood

Um relatório com vários tipos de gráficos de comparação das etnias em duas datas distintas

The demographics of California’s communities are changing quickly. Take Alameda County. Today, the share of people who identify as Asian make up 32% of Alameda County — the county’s largest single demographic group. In 2010, that figure was 27%. White people made up 34% of the county back then. Now they are just 28%.

Scroll down to plug in your address to see how your community has changed

Tags: , ,

Repulsive Curves

Um trabalho muito interessante e com muito código sobre os melhores algoritmos para construir curvas que não se sobrepõem

Curves play a fundamental role across computer graphics, physical simulation, and mathematical visualization, yet most tools for curve design do nothing to prevent crossings or self-intersections. This paper develops efficient algorithms for (self-)repulsion of plane and space curves that are well-suited to problems in computational design. Our starting point is the so-called tangent-point energy, which provides an infinite barrier to self-intersection. In contrast to local collision detection strategies used in, e.g., physical simulation, this energy considers interactions between all pairs of points, and is hence useful for global shape optimization: local minima tend to be aesthetically pleasing, physically valid, and nicely distributed in space. A reformulation of gradient descent, based on a Sobolev-Slobodeckij inner product enables us to make rapid progress toward local minima—independent of curve resolution. We also develop a hierarchical multigrid scheme that significantly reduces the per-step cost of optimization. The energy is easily integrated with a variety of constraints and penalties (e.g., inextensibility, or obstacle avoidance), which we use for applications including curve packing, knot untangling, graph embedding, non-crossing spline interpolation, flow visualization, and robotic path planning.

Tags: , ,

Cycle of Many

uma representação original, circular, de um dia na vida dos americanos

By Nathan Yau

This is a 24-hour snapshot for a day in the life of Americans. Each ring represents an activity with a color. More dots means a greater percentage of people doing the respective activity during a certain time of day.

If you start at the top of the circle, you’ll be at 9:00am when most people who work are already working. Move clockwise, and you see the flows of the day. People break for lunch at noon, get off work around 5:00pm, shift to dinner and then relax. Most people are sleeping by midnight but a small percentage of people are work at night.

Focus on the inside rings versus the outer rings for a rough comparison between work life and home life, each with its own responsibilities.

Source

The data comes from the American Time Use Survey 2020, which is run by the Bureau of Labor Statistics. I downloaded microdata via IPUMS.

Tags: , , ,

179 Reasons You Probably Don’t Need to Panic About Inflation

relatório dinâmico com gráficos alto \ baixo

By Josh Bivens and Stuart A. ThompsonAug. 18, 2021Gasoline (all types)March 2019March 2020March 2021Used cars and trucksMarch 2019March 2020March 2021Airline faresMarch 2019March 2020March 2021

Here’s how the price of gasoline changed each month throughout 2019, compared with the previous year. ↑ Red means the price went higher, while ↓ blue means it fell.

The coronavirus gripped the United States by March 2020. The economy halted. Gas prices ↓ plummeted.

This year, things have taken another turn. Gasoline prices have increased sharply, ↑ up 41.8% by July compared with a year earlier.

It’s a similar story for used cars and trucks, with prices ↓ falling during the pandemic shutdown, then ↑ soaring as things reopened.

Tags: , , ,

fishdraw

Estes peixes não existem, são gerado por algoritmos

fishdraw:

procedurally generated fish drawings. Lingdong Huang 2021

Tags: , ,

Race and ethnicity across the nation

Bom relatório com mapa de pontos

By John Keefe, Daniel Wolfe and Sergio Hernandez, CNNPublished Aug. 12, 2021

The United States is more diverse and has more people than ever before, with much of the growth occurring in and around metropolitan areas, according to the 2020 census. By plotting the population onto a map of the country according to density and group, it’s possible to get a bird’s-eye view of where we live and how we identify.

Tags: , ,

aRtsy: Generative Art with R and ggplot2

Um pacote para o R para criar arte generativa

“If you laugh at a joke, what difference does it make if subsequently you are told that the joke was created by an algorithm?” – Marcus du Sautoy, The Creative Code

aRtsy is an attempt at making generative art available for the masses in a simple and standardized format. The package provides various algorithms for creating artworks in ggplot2 that incorporate some form of randomness (depending on the set seed). Each type of artwork is implemented in a separate function.

Good luck hunting for some good seed’s! Feel free to post a comment with your best artworks and the corresponding seed in the GitHub discussions.

Contributions to aRtsy are very much appreciated! If you want to add your own type of artwork to the package so that others can also create them, feel free to make a pull request to the GitHub repository. Don’t forget to adjust generate-artwork.R if you also want the artwork to show up in the ‘Artwork of the day’ category and the twitter feed.

Daily Routine, 2020

Bom exemplo de relatório com gráficos de áreas.

By Nathan Yau

After looking at how much time we spent on daily activities in 2020, let’s look at when we spent our time. Based on data from the American Time Use Survey, the chart below shows the percentage of people doing activities on a non-holiday weekday.

What The New Census Data Shows About Race Depends On How You Look At It

Bom exemplo de relatório com gráficos unitários

Over the past decade, the United States continued to grow more racially and ethnically diverse, according to the results of last year’s national head count that the U.S. Census Bureau released this week.

There are many ways to slice the data and change how the demographic snapshot looks.

Since the 2000 count, participants have been able to check off more than one box when answering the race question on census forms. But breakdowns of the country’s racial and ethnic makeup often don’t reflect a multiracial population that has increased by 276% since the 2010 census. They focus instead on racial groups that are made up of people who marked only one box, with multiracial people sometimes lumped together in a catchall group.

Tags: ,