Munroe numbers
From Geohashing
This page shows some statistics on the meetup graph including all finite Munroe numbers and all finite Thomcat numbers. The heavy lifting is being done by Hijackal, who provides a machine-readable version of the meetup graph, and by Graphviz's dijkstra tool.
Maximum distance
This table shows the maximum distance from any geohasher to any other geohasher on the interconnected part of the meetup graph. It is a measure of how central a geohasher is on that graph. Randall Munroe is not the best center, the maximum Munroe number is 10. A better center is Thomcat, with the maximum Thomcat number being 6.
Munroe Numbers
Thomcat Numbers
Source code
The following program generates this page:
#!/bin/bash # Copyright 2022 Fippe # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. dir="/tmp/geohashingstats/munroenumbers" main="$dir/meetup_graph_main.dot" light="$dir/meetup_graph_light.dot" mkdir -p "$dir" test -r "$main" || curl -so "$main" "https://becktob.gitlab.io/meetup_graph/meetup_graph_main.dot" # Thank you, Hijackal sed -e "s/\[.*\]//g" "$main" > "$light" grep "fillcolor" "$main" | cut -d "[" -f 1 | tr -d '"' | while read -r line do dijkstra "$line" "$light" | grep -o "maxdist=[^\.]*" | cut -d "=" -f 2 | tr "\n" "#" && echo "$line" done | sort -g > "$dir/maxdistance.txt" minmaxdist=$(cut -d "#" -f 1 "$dir/maxdistance.txt" | sort -g | head -n1) bestcenter=$(sort -g "$dir/maxdistance.txt" | cut -d "#" -f 2 | head -n1) munroemaxdistance=$(grep "#xkcd$" "$dir/maxdistance.txt" | cut -d "#" -f 1) function main { echo "This page shows some statistics on the [[meetup graph]] including all finite [[Munroe number]]s and all finite $bestcenter numbers. The heavy lifting is being done by [[User:Hijackal|Hijackal]], who provides a [https://becktob.gitlab.io/meetup_graph/ machine-readable version of the meetup graph], and by [[wikipedia:Graphviz|Graphviz]]'s ''dijkstra'' tool." echo echo "==Maximum distance==" echo "This table shows the maximum distance from any geohasher to any other geohasher on the interconnected part of the [[meetup graph]]. It is a measure of how central a geohasher is on that graph. [[User:xkcd|Randall Munroe]] is not the best center, the maximum Munroe number is $munroemaxdistance. A better center is [[User:$bestcenter|$bestcenter]], with the maximum $bestcenter number being $minmaxdist." echo "{|class=\"wikitable\"" echo '! Max. dist. !! People' cat "$dir/maxdistance.txt" | cut -d "#" -f 1 | sort -gu | while read -r number do echo "|-" echo -n "|$number||" grep "^$number#" "$dir/maxdistance.txt" | cut -d "#" -f 2- | while read -r user do echo -n "[[User:$user|$user]], " done | head -c -2 echo done | sed -e "s/|xkcd]/|'''xkcd''']/g" echo "|}" for center in xkcd "$bestcenter" do echo "==$center Numbers==" | sed -e "s/xkcd/Munroe/g" echo "{| class=\"wikitable sortable\"" echo '! Number !! via !! People' echo "|-" echo "|0||||<span id=\"${center}_via_$center\">[[User:$center|$center]]</span>" echo "|-" dijkstra -p "$center" "$light" | tr "\n\t" "#" | sed -e "s/.000,###/;/g" -e "s/#\[dist=/;/g" | tr "#" "\n" | grep ";prev=" | tr -d '"' | sed -e "s/prev=\(.*\)\];/\1/g" | sort -t ';' -nk2 > "$dir/${center}_numbers.txt" cut -d ";" -f 2 "$dir/${center}_numbers.txt" | sort -gu | while read -r number do grep ";$number;" "$dir/${center}_numbers.txt" | cut -d ";" -f 1,3 > "$dir/${center}_number_$number.txt" rowspan=$(cut -d ";" -f 2 "$dir/${center}_number_$number.txt" | sort -u | wc -l) echo -n "|rowspan=\"$rowspan\"|$number|" cut -d ";" -f 2 "$dir/${center}_number_$number.txt" | sort -u | while read -r via do echo -n "|[[#${center}_via_${via// /_}|$via]]||" grep ";$via$" "$dir/${center}_number_$number.txt" | cut -d ";" -f 1 | while read -r user do echo -n "<span id=\"${center}_via_${user// /_}\">[[User:$user|$user]]</span>, " done | head -c -2 echo echo "|-" done echo "|-" done echo "|}" done echo "==Source code==" echo "The following program generates this page:<pre"">$(cat "$0")</pre"">" echo "[[Category:Fun stuff]]" } main | tee "$dir/output.wiki"