{
  "id": 8459831,
  "title": "From a Messy Spreadsheet to Business Insights: Analyzing a Hotel's Booking Data",
  "url": "https://urgent.news/2026/09/19/from-a-messy-spreadsheet-to-business-insights-analyzing-a-hotels",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-19T12:21:16.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/scarbyte/from-a-messy-spreadsheet-to-business-insights-analyzing-a-hotels-booking-data-7cd"
  },
  "original_language": "en",
  "account": "Tembo Hotel & Suites is a mid-range business hotel located in Nairobi, which has been operating since 2023. The hotel's booking records were previously maintained in a messy spreadsheet, making it challenging to analyze and derive insights. A hotel director tasked the reporter with cleaning the data, loading it into a new database, analyzing it, and presenting the findings to the management team within two days. The focus areas were identifying high-revenue rooms, busiest months, staff performance, and guest satisfaction. The raw dataset consisted of 285 rows, containing various inconsistencies such as inconsistent capitalization, mixed date formats, currency values stored as strings, and duplicate bookings. To address these issues, the solution employed a three-step process. First, the data was staged as text to ensure successful loading, with all validation and type-casting handled downstream. This approach prevented single erroneous rows from affecting the entire import. Next, an audit was conducted to catalog the exact problems present in the data. This involved running diagnostic queries to identify casing inconsistencies, non-standard category labels, dates in different formats, currency symbols and commas, guest ratings outside the valid range, duplicate bookings, and negative values for nights stayed. Based on this audit, the cleaning process targeted specific problems using SQL functions like TRIM, INITCAP, REGEXP_REPLACE, and CASE statements. After cleaning, 278 valid bookings remained from the original 285 rows. The production layer was built by moving the cleaned data into a new table called tembo_bookings and creating a view named vw_clean_bookings. This view adds derived fields necessary for time intelligence and segmentation in Power BI, eliminating the need to recompute them in DAX. Indexes were added to optimize query patterns for time-based revenue filtering, occupancy and cancellation queries, staff analysis, and location queries. The final analysis revealed that revenue was concentrated in the Suite room type, not the most-booked room. The hotel earned a total of KES 7,584,900 across 246 checked-out stays, averaging KES 30,833 per stay. Room type breakdown showed Suite bookings generating the most revenue, followed by Economy and Deluxe rooms. The findings indicated that focusing on Suite room management could potentially boost overall revenue.",
  "summary": "How I cleaned 285 rows of real-world-style hotel data in PostgreSQL and turned it into revenue, occupancy, and guest-satisfaction insights in Power BI. The brief Tembo Hotel & Suites is a mid-range business hotel in Nairobi that has been running since 2023. Like a lot of small hospitality businesses, its booking records are kept in a spreadsheet and the spreadsheet was a mess. The ask from the…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}