Skip to content

Commit 716dc0d

Browse files
authored
Update HousePriceProblem.scala
1 parent f0fa384 commit 716dc0d

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

src/main/scala/com/sparkTutorial/sparkSql/HousePriceProblem.scala

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package com.sparkTutorial.sparkSql
44
object HousePriceProblem {
55

66
/* Create a Spark program to read the house data from in/RealEstate.csv,
7-
group by location, aggregate the average price per SQ Ft and max price, and sort by average price per SQ Ft.
7+
group by location, aggregate the average price per SQ Ft and sort by average price per SQ Ft.
88
99
The houses dataset contains a collection of recent real estate listings in San Luis Obispo county and
1010
around it. 
@@ -25,17 +25,16 @@ object HousePriceProblem {
2525
2626
Sample output:
2727
28-
+----------------+-----------------+----------+
29-
| Location| avg(Price SQ Ft)|max(Price)|
30-
+----------------+-----------------+----------+
31-
| Oceano| 1145.0| 1195000|
32-
| Bradley| 606.0| 1600000|
33-
| San Luis Obispo| 459.0| 2369000|
34-
| Santa Ynez| 391.4| 1395000|
35-
| Cayucos| 387.0| 1500000|
36-
|.............................................|
37-
|.............................................|
38-
|.............................................|
39-
28+
+----------------+-----------------+
29+
| Location| avg(Price SQ Ft)|
30+
+----------------+-----------------+
31+
| Oceano| 95.0|
32+
| Bradley| 206.0|
33+
| San Luis Obispo| 359.0|
34+
| Santa Ynez| 491.4|
35+
| Cayucos| 887.0|
36+
|................|.................|
37+
|................|.................|
38+
|................|.................|
4039
*/
4140
}

0 commit comments

Comments
 (0)