Skip to content

A series of various data visualizations built with matplotlib and plotly

jb49088/data_visualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

data_visualization

This is a series of various data visualizations built with matplotlib, plotly, and requests.

Code Statistics

-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
JSON                             1              0              0           6359
CSV                              3              0              0           1517
Python                          11            114             39            326
Markdown                         1             53              4             87
-------------------------------------------------------------------------------
SUM:                            16            167             43           8289
-------------------------------------------------------------------------------

Project Structure

data_visualization
├── dice
│   ├── dice_visual_d6d10.py
│   ├── dice_visual.py
│   ├── die.py
│   └── die_visual.py
├── github
│   └── github_repos_visual.py
├── natural_disasters
│   ├── data
│   │   ├── earthquakes.geojson
│   │   └── volcanos.csv
│   ├── earthquake_visual.py
│   └── volcano_visual.py
├── random_walk
│   ├── random_walk.py
│   └── random_walk_visual.py
├── README.md
└── weather
    ├── data
    │   ├── death_valley_2021.csv
    │   └── sitka_2021.csv
    ├── highs_lows_visual.py
    └── precipitation_visual.py

8 directories, 16 files

random_walk

A random walk is a path that’s determined by a series of simple decisions, each of which is left entirely to chance. Random walks have practical applications in nature, physics, biology, chemistry, and economics.

Screenshot 2025-09-12 034354

The chart above is an example of a random walk generated by random_walk.py and visualized with rw_visual.py. The walk begins at the green point and ends at the red point. This example contains a total of 50,000 points.

dice

A dice roller simulates the outcomes of rolling one or more dice and records the frequency of each result. This allows us to visualize probability distributions and compare how different dice behave. Dice simulations are widely used in probability theory, statistics, and game design.

newplot

The chart above is an example of rolling a six-sided die (D6) 1,000 times, generated and visualized by die_visual.py. The histogram shows how often each face (1–6) appeared. With a large number of rolls, the distribution approaches uniform, where each outcome is equally likely.

newplot(1)

The chart above shows the results of rolling two six-sided dice (D6 + D6) 1,000 times, generated by die.py and visualized with dice_visual.py. The bar chart shows the frequency of each possible total, ranging from 2 (snake eyes) to 12 (double sixes).

Unlike the uniform distribution of a single die, this histogram forms a triangular distribution:

  • 7 is the most common outcome, because there are six different combinations that sum to 7 (1+6, 2+5, 3+4, etc.).

  • The extremes (2 and 12) are the rarest outcomes, since there is only one way to roll each.

With more rolls, the frequencies converge even closer to the theoretical probabilities, forming the classic bell-shaped curve of two-dice sums.

newplot(2)

The chart above shows the results of rolling a D6 and a D10 50,000 times, generated by die.py and visualized with dice_visual_d6d10.py. The possible sums range from 2 (1+1) to 16 (6+10).

Unlike rolling two identical dice, this distribution is not symmetric. The D10 introduces more variability, but the most common results are still clustered around the middle values (7 through 11). Each of these totals has six different combinations that can produce it, making them equally likely.

The extremes (2 and 16) remain the rarest results, since there’s only one way to roll each. With more rolls, the distribution smooths into a plateau around the center, reflecting the ways the smaller die (D6) limits the possible combinations compared to the larger die (D10).

weather

Weather visualizations show daily high and low temperatures and precipitation patterns from real-world datasets. They make it easy to compare different climates, such as the mild, rainy conditions of Sitka, Alaska, and the extreme heat of Death Valley, California.

sitka_highs_lows

The chart above shows daily high (red) and low (blue) temperatures for Sitka, Alaska in 2021. Sitka’s climate stays relatively mild year-round, with summer highs peaking around 70–80°F and winter lows rarely dropping far below freezing. This visualization was generated with highs_lows.py.

death_valley_highs_lows

The chart above shows daily high (red) and low (blue) temperatures for Death Valley, California in 2021. Unlike Sitka, Death Valley experiences extreme heat, with summer highs exceeding 120°F and only modest cooling at night. Seasonal shifts are also more dramatic, with very hot summers and relatively mild winters. This visualization was generated with highs_lows.py.

sitka_precipitation

The chart above shows daily precipitation levels for Sitka, Alaska in 2021. Since Sitka is located in a temperate rainforest, it receives frequent rainfall throughout the year, with many small and moderate events and occasional large spikes exceeding 2 inches in a single day. This visualization was generated with precipitation.py.

death_valley_precipitation

The chart above shows daily precipitation levels in Death Valley, CA during 2021. Most days recorded little to no rainfall, with only a few spikes throughout the year. Compared to Sitka, Death Valley’s precipitation is sparse and infrequent, highlighting its desert climate. This visualization was generated with precipitation.py.

natural_disasters

Natural disaster visualizations show patterns of catastrophic events from real-world datasets. They make it easy to explore trends in earthquakes and volcanic eruptions, including their frequency, magnitude, and locations.

newplot(2)

The chart above shows global earthquake activity from March 5, 2022, to April 4, 2022. Most events were low to moderate in magnitude, with only a few larger quakes recorded during the month. This visualization highlights patterns in earthquake frequency and intensity worldwide. This visualization was generated with earthquake_map.py.

newplot(1)

The chart above shows significant volcanic eruptions worldwide from the year 1000 to 2020. Each eruption meets criteria such as causing fatalities, significant damage, or having a high Volcanic Explosivity Index (VEI). The visualization highlights the locations, types, and elevations of these volcanoes, providing a clear view of global volcanic activity over the last millennium. This visualization was generated with volcano_map.py.

github

GitHub visualizations explore repository statistics like stars and forks using the GitHub REST API. They make it easy to compare the popularity and activity of different projects, either across all repositories or filtered by a specific programming language.

newplot

The chart above shows the most-starred repositories on GitHub, generated with github_repos_visual.py. Each bar represents a repository, with interactive hover text revealing details like the project owner and description.

newplot(1)

The chart above shows the most-starred C repositories on GitHub, generated with github_repos_visual.py. Each bar represents a repository, with interactive hover text revealing details like the project owner and description.

newplot(2)

The chart above shows the most-forked repositories on GitHub, generated with github_repos_visual.py. Each bar represents a repository, with interactive hover text revealing details like the project owner and description.

newplot(3)

The chart above shows the most-forked Python repositories on GitHub, generated with github_repos_visual.py. Each bar represents a repository, with interactive hover text revealing details like the project owner and description.

About

A series of various data visualizations built with matplotlib and plotly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages