Skip to content

Instantly share code, notes, and snippets.

View jtrive84's full-sized avatar

James Triveri jtrive84

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtrive84
jtrive84 / distance-to-coastline.ipynb
Created October 14, 2024 21:14
Distance to coastline notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtrive84
jtrive84 / 2023-cciw-adjacency.csv
Created October 2, 2024 13:15
2023 CCIW football results adjacency matrix
Augustana Carroll Carthage Elmhurst Illinois Wesleyan Millikin North Central North Park Washington U. Wheaton
Augustana 0 1 1 1 1 1 0 1 1 0
Carroll 0 0 0 1 1 1 0 1 0 0
Carthage 0 1 0 1 0 1 0 0 0 0
Elmhurst 0 0 0 0 0 1 0 0 0 0
Illinois Wesleyan 0 0 1 1 0 1 0 0 0 0
Millikin 0 0 0 0 0 0 0 0 0 0
North Central 1 1 1 1 1 1 0 1 1 1
North Park 0 0 1 1 1 1 0 0 0 0
Washington U. 0 1 1 1 1 1 0 1 0 0
@jtrive84
jtrive84 / 2023-cciw-rankings.csv
Created October 2, 2024 13:12
2023 CCIW football regular season rankings
team wins losses
North Central 9 0
Wheaton 8 1
Augustana 7 2
Washington U. 6 3
Carroll 4 5
North Park 4 5
Carthage 3 6
Illinois Wesleyan 3 6
Elmhurst 1 8
@jtrive84
jtrive84 / 2023-big-12-rankings.csv
Created October 2, 2024 12:54
2023 Big 12 football rankings
team conf_wins conf_losses overall_wins overall_losses conf_win_pct overall_win_pct
Texas 8 1 12 2 0.889 0.857
Oklahoma State 7 2 10 4 0.778 0.714
Oklahoma 7 2 10 3 0.778 0.769
Iowa State 6 3 7 6 0.667 0.538
Kansas State 6 3 9 4 0.667 0.692
West Virginia 6 3 9 4 0.667 0.692
Texas Tech 5 4 7 6 0.556 0.538
Kansas 5 4 9 4 0.556 0.692
UCF 3 6 6 7 0.333 0.462
@jtrive84
jtrive84 / 2023-big-12-adjacency.csv
Last active October 5, 2024 01:52
2023 Big 12 football results adjacency matrix
Baylor BYU Cincinnati Houston Iowa State Kansas Kansas State Oklahoma Oklahoma State TCU Texas Texas Tech UCF West Virginia
Baylor 0 0 1 0 0 0 0 0 0 0 0 0 1 0
BYU 0 0 1 0 0 0 0 0 0 0 0 1 0 0
Cincinnati 0 0 0 1 0 0 0 0 0 0 0 0 0 0
Houston 1 0 0 0 0 0 0 0 0 0 0 0 0 1
Iowa State 1 1 1 0 0 0 1 0 1 1 0 0 0 0
Kansas 0 1 1 0 1 0 0 1 0 0 0 0 1 0
Kansas State 1 0 0 1 0 1 0 0 0 1 0 1 1 0
Oklahoma 0 1 1 0 1 0 0 0 0 1 1 0 1 1
Oklahoma State 0 1 1 1 0 1 1 1 0 0 0 0 0 1
@jtrive84
jtrive84 / mcmc-introduction.ipynb
Created September 18, 2024 14:50
MCMC Introduction
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtrive84
jtrive84 / rejection.ipynb
Created September 3, 2024 18:20
Rejection sampling
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtrive84
jtrive84 / pinmap.py
Created August 21, 2024 14:05
Simple Dash pinmap application
import datetime
import io
import os
import os.path
import sys
import time
import dash
from dash.dependencies import Input, Output
@jtrive84
jtrive84 / nagpd.py
Created August 20, 2024 15:58
Color polygons with NA as white with black borders.
fig, ax = plt.subplots(figsize=(10, 8), tight_layout=True)
ax.set_title("SAM claims by county", fontsize=10)
dd.plot(
ax=ax, column="n", edgecolor="black", linewidth=.50,
cmap="rainbow", alpha=1, legend=True,
legend_kwds={"label": "number of claims", "orientation": "vertical", "shrink": .35},
missing_kwds={"facecolor": "#FFFFFF", "edgecolor": "#000000", "linewidth": .25}
)
ax.axis("off")
plt.show()