For SnowMap, I have to assign my own unique identifier to each of the mountains. Then I have to map that identifier to some data sources I am crawling. This makes it hard if I ever have to change the identifier. Also, some mountains are very complicated, like Sugadaira, Niseko and Shiga Kogen.

Sugadaira itself is known as a ski resort, but within it is 3 areas, Pine Beak, Taro, Davos. Taro and Davos are connected via a short tunnel under a road (or you can also walk across the road), and is also marketed as Sugadaira Hare. Pine Beak itself is a 5 min drive from the other two resorts, but it’ll appear on the same map. So, how are you supposed to represent this or count it? There doesn’t seem to be a consensus on other sites that aggregate Japanese ski resorts.

Shiga Kogen is even more complicated. Itself contains 18 different logical ski resorts, and it’s split between four areas — Yakebitaiyama Okushiga, Central, Yokote and Kumanoyu. Though, Yakebitaiyama, Okushiga and Central are connected together so you can ski across the whole area. Yokote and Kumanoyu are 10 mins drive away from them, they’re loosely connected, I think there’s a traverse between them, but it’s also a 5 min walk. So do you count Shiga Kogen as one resort or 4 resorts or 18 resorts?

Niseko be contrast is more simple, four distinct resorts, Hanazono, Grand Hirafu, Niseko Village, Annupuri. When you hear from people saying that they’re going to Niseko, I usually assume they’re going to Grand Hirafu (the most popular and largest part), but you could be staying at the foot of any of those, and you can buy a ticket to just one area.

One way to slice these is whether you can buy a ticket for an area. For Shiga Kogen, you can buy an all-mountain ticket, or a lift ticket for just one part of the resort. If that’s the determination, then Shiga Kogen could be split into 5 areas, Okushiga, Yakebitaiyama, Central (includes 12 resorts), Yokote and Kumanoyu. I’m not sure whether that is the best way to split these


Back to what I was working on. The way the resorts are named on the Snow Map are not entirely consistent. Some sources of data treat multiple slopes as one resort, some treat them separately. So I created some logical resorts like “Niseko United” which encompasses all four of the Niseko mountain resorts. Skipping some of the details, this means I needed to rename the identifiers of the mountains and all the subsequently generated data.

I have a lot of crawled data indexed by identifier names that’s on Google Cloud Storage, so I needed to rename them with the new identifiers. My first attempt at using bucket.getFiles didn’t end well because there were too many files in my GCS, leading to out of memory in Node JS. So instead, I wrote a simple progressive renamer that used pagination to rename the files