Moicko

I researched Japanese hotels. 1 yen per night?

Cover Image for I researched Japanese hotels. 1 yen per night?

Overview

I researched data on Japanese hotels registered with Rakuten Travel, one of Japan's largest lodging reservation sites.
The data was collected by scraping using puppeteer. As a result, I found several findings.

How the data was collected

The data was collected using puppeteer, a library that can be programmed to control Chrome. I ran Puppeteer automatically to obtain data on hotels in Japan. The rough code is as follows.

export async function scrapeAndSave() {
  const browser = await pupeteer.launch({ headless: true });
  const page = await browser.newPage();

  try {
    const hotels: Hotel[] = [];

    for (const prefecture of prefectures) {
      let url:
        | string
        | null = `https://search.travel.rakuten.co.jp/ds/yado/${prefecture}`;

      while (url) {
        await page.goto(url);
        const h = await scrapeHotelsOnPage(page);
        hotels.push(...h);
        url = await getNextPageUrlOrNull(page);
        await sleep(1000);
      }
    }

    const filepath = `hotels.json`;
    fs.writeFileSync(filepath, JSON.stringify(hotels));
  } catch (err) {
    console.error(err);
  } finally {
    await browser.close();
  }
}

The function scrapeHotelsOnPage collects hotel data from elements on the page.
It was also necessary to remove useless decorations from the retreved strings.

The properties of the collected data look like this

  • prefecture: Prefecture
  • lowestPrice: Lowest price
  • star: Star average
  • voice: Number of reviews posted

Number of Hotels by Prefecture

The number of hotels in each prefecture was examined. number of hotels Roughly speaking, hotels are concentrated either in famous tourist destinations in Japan or in business hubs such as Tokyo.
Nagano Prefecture, in fourth place, was a surprise. Nagano is the 16th most populous prefecture in Japan. It also has the 18th largest GDP.
It doesn't seem like a particularly remarkable prefecture. Perhaps there are many hotels for wintertime skiers.

The code used is simple.

import pandas as pd
df = pd.read_json('hotels.json')
df = df.groupby("prefecture")
df = df.count()["name"]
df = df.sort_values(ascending=True)
df.plot.barh(figsize=(12, 9))

Percentage of each room charge

I looked at the "lowestPrice" for each hotel.
Most hotels seem to be able to stay for less than 10,000yen.
by price range However, there are a few things to note.
Many of "lowestPrice" are weekday rates. Rates on Saturdays and consecutive holidays should be much higher.
Also, "lowestPrice" often does not include meals.
Additionally, it may be the amount per person for a multiple person stay.

I want to stay at a hotel like this.
i want to stay --Hotel in Kyoto

Here is the code used.
Displayed in pie chart after aggregation by price range.

import pandas as pd
df = pd.read_json('hotels.json')
df = df.dropna()
df['price_rank']=df['lowestPrice'].apply(lambda x:math.floor(x/5000)*5000)
counted = df.groupby("price_rank")["lowestPrice"].count()
counted = counted.sort_values(ascending=False)

num = 5
data = counted[:num]
others_sum = counted[num:].sum()
data.loc['others'] = others_sum
labels = ["0-4999yen", "5000-9999yen", "10000-14999yen", "15000-19999yen", "20000-24999yen",  "others"]
plt.figure(figsize=(12,9))
plt.pie(data, labels=labels, startangle=90, counterclock=False, autopct='%.f%%')

Top 10 Lowest Prices

ranknamelowestPrice
1Hotel Apex Resort1
2J Hotel Tokyo Gio1
3Business Hotel Taiyo <Osaka>1
4Astil Hotel Juso Precious1
5Hotel Sun City Ikebukuro1
6Mykonos Resort Southwind1
7Hotel Santagas Ueno1
8Hotel New Park1
9Hostel Okinawa Little Asia Guest House1
10LOHAS VILLA1

Increbibly, I found a number of hotels where you can stay at 1 yen per night. I suspected that the data was wrong, but it seems not.

1 yen per night for birthday

In many cases, the 1 yen per night stay is limited to stays on the day of the birthday. Many of them are also for seniors above a certain age. There are a few, but not many, that do not have age restrictions, and these seem to be shared room.

1 yen per night for consecutive stays

Some hotels offered 1 yen for a non-birthday stay, but you need to stay consecutive nights. For example, at J Hotel Tokyo Gio, it seems that you can only make reservations for a plan of 4 nights or more. In other words, one night is 1 yen, but the remaining three nights are at the regular rate.