diff --git a/cave-update-ore-analysis/abs_freq.html b/cave-update-ore-analysis/abs_freq.html new file mode 100644 index 0000000..df51729 --- /dev/null +++ b/cave-update-ore-analysis/abs_freq.html @@ -0,0 +1,18 @@ + + + + + + +
+ \ No newline at end of file diff --git a/cave-update-ore-analysis/index.html b/cave-update-ore-analysis/index.html new file mode 100644 index 0000000..679f30c --- /dev/null +++ b/cave-update-ore-analysis/index.html @@ -0,0 +1,34 @@ +🔗 Back to home page#
+The scripts I've created take advantage of a slightly modified PyAnvilEditor to parse the region files.
+I've replaced the code in the 276
(and everything else under def close(self):
) of the world
class of PyAnvilEditor with true
- this is because I'm not writing to the world file, I only intend to read from it. This saves a large amount of time spent writing that would go to waste.
To generate the graphs I've used Matplotlib and I use mpld3 to convert these graphs into interactive html files for use on my website.
+We load a large section of the world into memory - ideally, you want to set the block size to the maximum as this is quicker than loading small sections of the world repeatedly. Then we iterate through each coordinate in the block - this takes about 90 seconds with a block radius of 128
. At each coordinate we iterate each count for a tile in a particular layer. Once a whole block has been processed, we add it to the total.
The 'sum' represents the total amount of a particular ore block within the whole sample (A 1024*1024 square meter area). The relative frequency represents the proportion of the total amount of a particular ore that occurs at a particular y-level.
+This sample size can be improved on but it would obviously take longer given that my RAM is limited.
diff --git a/cave-update-ore-analysis/rel_freq.html b/cave-update-ore-analysis/rel_freq.html new file mode 100644 index 0000000..91c2355 --- /dev/null +++ b/cave-update-ore-analysis/rel_freq.html @@ -0,0 +1,18 @@ + + + + + + + + \ No newline at end of file diff --git a/index.html b/index.html index 5403d89..83e932f 100644 --- a/index.html +++ b/index.html @@ -30,6 +30,9 @@ Programming ramblings - do not expect clean code here!