place-heatmap-2022 icon indicating copy to clipboard operation
place-heatmap-2022 copied to clipboard

Handle change to larger canvas

Open lloydowen8 opened this issue 2 years ago • 6 comments

As is, the script will process the images as:

original canvas -> original canvas area of new (larger) canvas -> new canvas area of new (larger) canvas

When transitioning to the new larger canvas it should show these images side by side (in the same window preferably)

lloydowen8 avatar Apr 03 '22 19:04 lloydowen8

I actually had to deal with a similar problem to this a couple years ago when writing a COVID case statistics Twitter bot. I was generating graphs of case histories, and had to find a way to stitch the graphs together into a single image.

I'll see if I can adapt my old code to work for this use case once I'm caught up with my university work. :)

memmam avatar Apr 07 '22 02:04 memmam

This would involve changing the way the images are processed altogether.

Just now they are processed sequentially and in order by canvas tile.

So all of the top-left canvas tiles are processed first, then all the top-right, and so on...

An easier solution would be moving to the full canvas images that can be found here: https://rplace.space/combined/

lloydowen8 avatar Apr 07 '22 17:04 lloydowen8

How much time is there between the rplace.space snapshots? r/Place's timeline scrubber exposes frames for every 1s of time via the API endpoint, so depending on which has more frames, it may be worth using that instead. I know someone on the Place Atlas Discord who is working on scraping that data.

Edit: I just looked, this is INCREDIBLY less than the 1sec deltas the Reddit timeline exposes. I'll follow up with Scaevolus about getting that set of canvas images.

memmam avatar Apr 07 '22 17:04 memmam

Re: the above, I'm scraping the Reddit timeline right now. Once I'm done I'll see if the images are already composited into full-canvas images (can't tell right now because I'm still downloading frames from before the first board expansion), and if they aren't, I'll do that. Then I'll update the code to handle 2k x 2k images instead of the thatguyalex dataset, either the rplace.space combined images or the scraped Reddit timeline.

memmam avatar Apr 07 '22 19:04 memmam

The only objection I'd have to using the data from the timeline scrubber is that it is a hell of a lot of data. For users with limited/slow internet access its going to take a very long time to download that data. The computational cost of the heatmap processing will also increase significantly when processing the full 2k x 2k images.

Either the process would need to become multithreaded (splitting the canvas into 500 x 500 tiles with 8 parallel worker threads) or compute shaders would need to be considered.

lloydowen8 avatar Apr 07 '22 20:04 lloydowen8

@lloydowen8 if this works the way I expect, then it should work with any stitched 2k x 2k subset of the data, including the rplace.space data. I'm getting the timeline data for my own purposes.

Edit: I see you've already made the changes in the standalone script to handle the rplace.space stitched dataset. At the very least I think the option for supplying your own dataset should be there, for people who want to use data from other sources.

memmam avatar Apr 07 '22 21:04 memmam