@@ -4,7 +4,7 @@ package com.sparkTutorial.sparkSql
4
4
object HousePriceProblem {
5
5
6
6
/* 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.
8
8
9
9
The houses dataset contains a collection of recent real estate listings in San Luis Obispo county and
10
10
around it.
@@ -25,17 +25,16 @@ object HousePriceProblem {
25
25
26
26
Sample output:
27
27
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
+ |................|.................|
40
39
*/
41
40
}
0 commit comments