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.
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.
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.
--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
rank | name | lowestPrice |
1 | Hotel Apex Resort | 1 |
2 | J Hotel Tokyo Gio | 1 |
3 | Business Hotel Taiyo <Osaka> | 1 |
4 | Astil Hotel Juso Precious | 1 |
5 | Hotel Sun City Ikebukuro | 1 |
6 | Mykonos Resort Southwind | 1 |
7 | Hotel Santagas Ueno | 1 |
8 | Hotel New Park | 1 |
9 | Hostel Okinawa Little Asia Guest House | 1 |
10 | LOHAS VILLA | 1 |
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.