├── .gitignore ├── advanced ├── accumulator │ ├── StackOverFlowSurvey.py │ └── StackOverFlowSurveyFollowUp.py └── broadcast │ ├── UkMakerSpaces.py │ └── UkMakerSpacesWithoutBroadcast.py ├── commons └── Utils.py ├── in ├── 2016-stack-overflow-survey-responses.csv ├── RealEstate.csv ├── airports.text ├── nasa_19950701.tsv ├── nasa_19950801.tsv ├── prime_nums.text ├── uk-makerspaces-identifiable-data.csv ├── uk-postcode.csv ├── uppercase.text └── word_count.text ├── pairRdd ├── aggregation │ ├── combinebykey │ │ └── AverageHousePriceSolution.py │ └── reducebykey │ │ ├── WordCount.py │ │ └── housePrice │ │ ├── AverageHousePriceProblem.py │ │ ├── AverageHousePriceSolution.py │ │ └── AvgCount.py ├── create │ ├── PairRddFromRegularRdd.py │ └── PairRddFromTupleList.py ├── filter │ ├── AirportsNotInUsaProblem.py │ └── AirportsNotInUsaSolution.py ├── groupbykey │ ├── AirportsByCountryProblem.py │ ├── AirportsByCountrySolution.py │ └── GroupByKeyVsReduceByKey.py ├── join │ └── JoinOperations.py ├── mapValues │ ├── AirportsUppercaseProblem.py │ └── AirportsUppercaseSolution.py └── sort │ ├── AverageHousePriceSolution.py │ ├── SortedWordCountProblem.py │ └── SortedWordCountSolution.py ├── rdd ├── WordCount.py ├── airports │ ├── AirportsByLatitudeProblem.py │ ├── AirportsByLatitudeSolution.py │ ├── AirportsInUsaProblem.py │ └── AirportsInUsaSolution.py ├── collect │ └── CollectExample.py ├── count │ └── CountExample.py ├── nasaApacheWebLogs │ ├── SameHostsProblem.py │ ├── SameHostsSolution.py │ ├── UnionLogProblem.py │ └── UnionLogSolutions.py ├── persist │ └── PersistExample.py ├── reduce │ └── ReduceExample.py ├── sumOfNumbers │ ├── SumOfNumbersProblem.py │ └── SumOfNumbersSolution.py └── take │ └── TakeExample.py └── sparkSql ├── HousePriceProblem.py ├── HousePriceSolution.py ├── RddDataframeConversion.py ├── StackOverFlowSurvey.py └── join └── UkMakerSpaces.py /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle/ 2 | *.iml 3 | *.ipr 4 | *.iws 5 | out/ 6 | build/ 7 | -------------------------------------------------------------------------------- /advanced/accumulator/StackOverFlowSurvey.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.insert(0, '.') 3 | from pyspark import SparkContext, SparkConf 4 | from commons.Utils import Utils 5 | 6 | if __name__ == "__main__": 7 | conf = SparkConf().setAppName('StackOverFlowSurvey').setMaster("local[*]") 8 | sc = SparkContext(conf = conf) 9 | total = sc.accumulator(0) 10 | missingSalaryMidPoint = sc.accumulator(0) 11 | responseRDD = sc.textFile("in/2016-stack-overflow-survey-responses.csv") 12 | 13 | def filterResponseFromCanada(response): 14 | splits = Utils.COMMA_DELIMITER.split(response) 15 | total.add(1) 16 | if not splits[14]: 17 | missingSalaryMidPoint.add(1) 18 | return splits[2] == "Canada" 19 | 20 | responseFromCanada = responseRDD.filter(filterResponseFromCanada) 21 | print("Count of responses from Canada: {}".format(responseFromCanada.count())) 22 | print("Total count of responses: {}".format(total.value)) 23 | print("Count of responses missing salary middle point: {}" \ 24 | .format(missingSalaryMidPoint.value)) 25 | -------------------------------------------------------------------------------- /advanced/accumulator/StackOverFlowSurveyFollowUp.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.insert(0, '.') 3 | from pyspark import SparkContext, SparkConf 4 | from commons.Utils import Utils 5 | 6 | if __name__ == "__main__": 7 | conf = SparkConf().setAppName('StackOverFlowSurvey').setMaster("local[*]") 8 | sc = SparkContext(conf = conf) 9 | 10 | total = sc.accumulator(0) 11 | missingSalaryMidPoint = sc.accumulator(0) 12 | processedBytes = sc.accumulator(0) 13 | responseRDD = sc.textFile("in/2016-stack-overflow-survey-responses.csv") 14 | 15 | def filterResponseFromCanada(response): 16 | processedBytes.add(len(response.encode('utf-8'))) 17 | splits = Utils.COMMA_DELIMITER.split(response) 18 | total.add(1) 19 | if not splits[14]: 20 | missingSalaryMidPoint.add(1) 21 | return splits[2] == "Canada" 22 | responseFromCanada = responseRDD.filter(filterResponseFromCanada) 23 | 24 | print("Count of responses from Canada: {}".format(responseFromCanada.count())) 25 | print("Number of bytes processed: {}".format(processedBytes.value)) 26 | print("Total count of responses: {}".format(total.value)) 27 | print("Count of responses missing salary middle point: {}".format(missingSalaryMidPoint.value)) 28 | -------------------------------------------------------------------------------- /advanced/broadcast/UkMakerSpaces.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.insert(0, '.') 3 | from pyspark import SparkContext, SparkConf 4 | from commons.Utils import Utils 5 | 6 | def loadPostCodeMap(): 7 | lines = open("in/uk-postcode.csv", "r").read().split("\n") 8 | splitsForLines = [Utils.COMMA_DELIMITER.split(line) for line in lines if line != ""] 9 | return {splits[0]: splits[7] for splits in splitsForLines} 10 | 11 | def getPostPrefix(line: str): 12 | splits = Utils.COMMA_DELIMITER.split(line) 13 | postcode = splits[4] 14 | return None if not postcode else postcode.split(" ")[0] 15 | 16 | if __name__ == "__main__": 17 | conf = SparkConf().setAppName('UkMakerSpaces').setMaster("local[*]") 18 | sc = SparkContext(conf = conf) 19 | 20 | postCodeMap = sc.broadcast(loadPostCodeMap()) 21 | 22 | makerSpaceRdd = sc.textFile("in/uk-makerspaces-identifiable-data.csv") 23 | 24 | regions = makerSpaceRdd \ 25 | .filter(lambda line: Utils.COMMA_DELIMITER.split(line)[0] != "Timestamp") \ 26 | .filter(lambda line: getPostPrefix(line) is not None) \ 27 | .map(lambda line: postCodeMap.value[getPostPrefix(line)] \ 28 | if getPostPrefix(line) in postCodeMap.value else "Unknow") 29 | 30 | for region, count in regions.countByValue().items(): 31 | print("{} : {}".format(region, count)) 32 | -------------------------------------------------------------------------------- /advanced/broadcast/UkMakerSpacesWithoutBroadcast.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.insert(0, '.') 3 | from pyspark import SparkContext, SparkConf 4 | from commons.Utils import Utils 5 | 6 | def loadPostCodeMap(): 7 | lines = open("in/uk-postcode.csv", "r").read().split("\n") 8 | splitsForLines = [Utils.COMMA_DELIMITER.split(line) for line in lines if line != ""] 9 | return {splits[0]: splits[7] for splits in splitsForLines} 10 | 11 | def getPostPrefix(line: str): 12 | splits = Utils.COMMA_DELIMITER.split(line) 13 | postcode = splits[4] 14 | return None if not postcode else postcode.split(" ")[0] 15 | 16 | if __name__ == "__main__": 17 | conf = SparkConf().setAppName('UkMakerSpaces').setMaster("local[*]") 18 | sc = SparkContext(conf = conf) 19 | postCodeMap = loadPostCodeMap() 20 | makerSpaceRdd = sc.textFile("in/uk-makerspaces-identifiable-data.csv") 21 | 22 | regions = makerSpaceRdd \ 23 | .filter(lambda line: Utils.COMMA_DELIMITER.split(line)[0] != "Timestamp") \ 24 | .map(lambda line: postCodeMap[getPostPrefix(line)] \ 25 | if getPostPrefix(line) in postCodeMap else "Unknow") 26 | 27 | for region, count in regions.countByValue().items(): 28 | print("{} : {}".format(region, count)) 29 | -------------------------------------------------------------------------------- /commons/Utils.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | class Utils(): 4 | 5 | COMMA_DELIMITER = re.compile(''',(?=(?:[^"]*"[^"]*")*[^"]*$)''') 6 | -------------------------------------------------------------------------------- /in/RealEstate.csv: -------------------------------------------------------------------------------- 1 | MLS,Location,Price,Bedrooms,Bathrooms,Size,Price SQ Ft,Status 2 | 132842,Arroyo Grande,795000.00,3,3,2371,335.30,Short Sale 3 | 134364,Paso Robles,399000.00,4,3,2818,141.59,Short Sale 4 | 135141,Paso Robles,545000.00,4,3,3032,179.75,Short Sale 5 | 135712,Morro Bay,909000.00,4,4,3540,256.78,Short Sale 6 | 136282,Santa Maria-Orcutt,109900.00,3,1,1249,87.99,Short Sale 7 | 136431,Oceano,324900.00,3,3,1800,180.50,Short Sale 8 | 137036,Santa Maria-Orcutt,192900.00,4,2,1603,120.34,Short Sale 9 | 137090,Santa Maria-Orcutt,215000.00,3,2,1450,148.28,Short Sale 10 | 137159,Morro Bay,999000.00,4,3,3360,297.32,Short Sale 11 | 137570,Atascadero,319000.00,3,2,1323,241.12,Short Sale 12 | 138053,Santa Maria-Orcutt,350000.00,3,2,1750,200.00,Short Sale 13 | 138730,Santa Maria-Orcutt,249000.00,3,2,1400,177.86,Short Sale 14 | 139291,Arroyo Grande,299000.00,2,2,1257,237.87,Short Sale 15 | 139427,Santa Maria-Orcutt,235900.00,3,2,1400,168.50,Short Sale 16 | 139461,Santa Maria-Orcutt,348000.00,3,2,1600,217.50,Short Sale 17 | 139661,Paso Robles,314000.00,4,3,1794,175.03,Short Sale 18 | 139918,Los Alamos,399000.00,4,2,1850,215.68,Short Sale 19 | 139932,San Miguel,599000.00,3,3,2950,203.05,Short Sale 20 | 140044,Paso Robles,299000.00,3,2,1719,173.94,Short Sale 21 | 140073,San Luis Obispo,425000.00,3,3,1472,288.72,Short Sale 22 | 140077,Morro Bay,1100000.00,4,3,4168,263.92,Short Sale 23 | 140080,Cayucos,1500000.00,3,3,3880,386.60,Short Sale 24 | 140113,Santa Maria-Orcutt,110000.00,2,1,1000,110.00,Short Sale 25 | 140395,Santa Maria-Orcutt,200000.00,3,2,1139,175.59,Short Sale 26 | 140460,Santa Maria-Orcutt,134900.00,3,1,1080,124.91,Short Sale 27 | 140703,Santa Maria-Orcutt,250000.00,4,3,2000,125.00,Short Sale 28 | 140720,Pismo Beach,950000.00,3,4,1920,494.79,Short Sale 29 | 140731,Santa Maria-Orcutt,239950.00,4,2,1348,178.00,Short Sale 30 | 141188,Santa Maria-Orcutt,170000.00,3,2,1280,132.81,Short Sale 31 | 141212,Santa Maria-Orcutt,285000.00,3,2,2400,118.75,Short Sale 32 | 141232,Santa Maria-Orcutt,279000.00,3,3,1700,164.12,Short Sale 33 | 141529,Santa Maria-Orcutt,219000.00,3,2,1600,136.88,Short Sale 34 | 141541,Santa Maria-Orcutt,155000.00,3,2,1050,147.62,Short Sale 35 | 141737,Atascadero,389000.00,3,2,1415,274.91,Short Sale 36 | 141847,Nipomo,340000.00,3,1,1110,306.31,Short Sale 37 | 141869,Guadalupe,95000.00,2,1,797,119.20,Short Sale 38 | 142216,Santa Maria-Orcutt,140000.00,2,2,1100,127.27,Short Sale 39 | 142340,Pismo Beach,1100000.00,3,3,2602,422.75,Short Sale 40 | 142442,Santa Maria-Orcutt,360000.00,4,3,2351,153.13,Short Sale 41 | 142528,Morro Bay,415000.00,3,3,1350,307.41,Short Sale 42 | 142539,Santa Maria-Orcutt,250000.00,4,2,1206,207.30,Short Sale 43 | 142585,Santa Maria-Orcutt,559000.00,3,3,2628,212.71,Short Sale 44 | 142818,Nipomo,525000.00,3,3,2365,221.99,Short Sale 45 | 142829,Los Osos,779000.00,3,3,2990,260.54,Short Sale 46 | 142870,Arroyo Grande,595000.00,3,2,1750,340.00,Short Sale 47 | 142977,Templeton,1150000.00,4,5,5500,209.09,Short Sale 48 | 143037,Templeton,550000.00,3,2,1852,296.98,Short Sale 49 | 143155,Grover Beach,500000.00,3,2,2100,238.10,Short Sale 50 | 143170,Santa Maria-Orcutt,279000.00,4,3,2580,108.14,Short Sale 51 | 143178,Santa Maria-Orcutt,375000.00,4,2,1963,191.03,Short Sale 52 | 143217,Santa Maria-Orcutt,330000.00,3,3,1900,173.68,Short Sale 53 | 143252,Santa Maria-Orcutt,199000.00,3,3,1450,137.24,Short Sale 54 | 143255,Santa Maria-Orcutt,165000.00,2,2,1000,165.00,Short Sale 55 | 143436,Templeton,1399000.00,4,3,6500,215.23,Foreclosure 56 | 143507,Santa Maria-Orcutt,255000.00,3,2,1218,209.36,Short Sale 57 | 143524,Cambria,325000.00,2,2,893,363.94,Short Sale 58 | 143534,Morro Bay,789000.00,3,3,2100,375.71,Foreclosure 59 | 143540,Nipomo,498000.00,4,3,2341,212.73,Short Sale 60 | 143884,Nipomo,430000.00,4,2,2168,198.34,Short Sale 61 | 143946,Paso Robles,539900.00,4,3,3032,178.07,Short Sale 62 | 144204,Pismo Beach,499000.00,3,2,1293,385.92,Short Sale 63 | 144238,Los Osos,275000.00,3,2,1200,229.17,Short Sale 64 | 144312,Santa Maria-Orcutt,499000.00,3,4,2250,221.78,Short Sale 65 | 144314,Morro Bay,899000.00,3,3,2430,369.96,Foreclosure 66 | 144316,Morro Bay,1045000.00,3,3,2100,497.62,Foreclosure 67 | 144318,Morro Bay,774000.00,2,2,1550,499.35,Foreclosure 68 | 144370,Santa Maria-Orcutt,239000.00,3,3,1800,132.78,Short Sale 69 | 144380,Santa Maria-Orcutt,195000.00,3,2,1218,160.10,Short Sale 70 | 144788,Grover Beach,325000.00,2,1,768,423.18,Short Sale 71 | 144815,Nipomo,320000.00,4,2,1929,165.89,Short Sale 72 | 144896,Santa Maria-Orcutt,275000.00,4,3,1877,146.51,Short Sale 73 | 145087,Paso Robles,329000.00,3,2,1700,193.53,Short Sale 74 | 145138,Santa Maria-Orcutt,140000.00,3,2,1080,129.63,Short Sale 75 | 145309,Paso Robles,409000.00,4,3,2192,186.59,Short Sale 76 | 145448,Santa Maria-Orcutt,167900.00,3,2,1296,129.55,Foreclosure 77 | 145471,Nipomo,325000.00,7,5,2688,120.91,Short Sale 78 | 145726,Santa Maria-Orcutt,119000.00,1,1,900,132.22,Short Sale 79 | 145745,Santa Maria-Orcutt,245000.00,4,2,1482,165.32,Short Sale 80 | 145789,Santa Maria-Orcutt,259900.00,3,2,1726,150.58,Short Sale 81 | 145850,Arroyo Grande,495000.00,3,2,1486,333.11,Short Sale 82 | 145952,San Luis Obispo,399000.00,4,2,1543,258.59,Short Sale 83 | 146040,Santa Maria-Orcutt,329700.00,4,2,1367,241.19,Short Sale 84 | 146110,Atascadero,199000.00,1,1,712,279.49,Short Sale 85 | 146130,Santa Maria-Orcutt,149000.00,3,2,1040,143.27,Short Sale 86 | 146144,Paso Robles,225000.00,3,2,1456,154.53,Short Sale 87 | 146149,Santa Maria-Orcutt,195000.00,2,1,811,240.44,Short Sale 88 | 146212,Paso Robles,359900.00,3,3,1951,184.47,Short Sale 89 | 146223,Templeton,799000.00,4,4,3100,257.74,Short Sale 90 | 146282,San Luis Obispo,595000.00,3,2,2117,281.06,Short Sale 91 | 146302,Paso Robles,89000.00,3,2,1560,57.05,Short Sale 92 | 146310,Santa Maria-Orcutt,129900.00,3,1,1042,124.66,Short Sale 93 | 146320,Los Osos,375000.00,3,3,1519,246.87,Short Sale 94 | 146423,Atascadero,599000.00,3,2,2774,215.93,Short Sale 95 | 146496,Paso Robles,235000.00,3,2,1340,175.37,Short Sale 96 | 146537,Santa Maria-Orcutt,255900.00,3,2,1440,177.71,Foreclosure 97 | 146544,Santa Maria-Orcutt,148900.00,5,2,1064,139.94,Short Sale 98 | 146581,Arroyo Grande,749000.00,3,2,2145,349.18,Short Sale 99 | 146597,Santa Maria-Orcutt,189900.00,3,2,1472,129.01,Foreclosure 100 | 146649,Paso Robles,183000.00,3,1,888,206.08,Short Sale 101 | 146667,Santa Maria-Orcutt,232600.00,3,3,1582,147.03,Short Sale 102 | 146773,Cambria,520000.00,3,2,1680,309.52,Short Sale 103 | 146790,Solvang,355000.00,3,3,1702,208.58,Foreclosure 104 | 146797,Pismo Beach,275000.00,0,1,398,690.95,Short Sale 105 | 146888,Santa Maria-Orcutt,225000.00,4,3,1940,115.98,Short Sale 106 | 146986,Santa Maria-Orcutt,161900.00,3,2,1200,134.92,Short Sale 107 | 147094,Santa Maria-Orcutt,249999.00,3,3,2013,124.19,Short Sale 108 | 147167,Santa Maria-Orcutt,208000.00,2,1,1267,164.17,Short Sale 109 | 147214,Guadalupe,135000.00,3,1,1100,122.73,Short Sale 110 | 147216,San Luis Obispo,385000.00,2,3,1389,277.18,Short Sale 111 | 147240,Atascadero,750000.00,4,4,3387,221.43,Foreclosure 112 | 147241,Atascadero,810000.00,4,3,3305,245.08,Foreclosure 113 | 147249,Atascadero,890000.00,4,5,4229,210.45,Foreclosure 114 | 147253,Atascadero,895000.00,4,3,3676,243.47,Foreclosure 115 | 147374,San Miguel,229900.00,3,2,1458,157.68,Short Sale 116 | 147440,Grover Beach,240000.00,2,2,1020,235.29,Short Sale 117 | 147450,Atascadero,429000.00,4,3,2513,170.71,Foreclosure 118 | 147570,Santa Maria-Orcutt,399000.00,4,3,2800,142.50,Short Sale 119 | 147586,Santa Maria-Orcutt,385000.00,3,2,2000,192.50,Short Sale 120 | 147603,Paso Robles,294900.00,3,2,1316,224.09,Foreclosure 121 | 147611,Paso Robles,399000.00,3,2,1220,327.05,Short Sale 122 | 147620,Santa Maria-Orcutt,269000.00,3,3,1780,151.12,Short Sale 123 | 147654,Cambria,449000.00,3,3,2120,211.79,Short Sale 124 | 147761,Arroyo Grande,555900.00,5,3,2947,188.63,Foreclosure 125 | 147767,Paso Robles,319900.00,4,2,2135,149.84,Foreclosure 126 | 147819,Cambria,332000.00,4,4,1872,177.35,Foreclosure 127 | 147876,Bradley,499000.00,4,5,3400,146.76,Short Sale 128 | 147948,Paso Robles,432000.00,4,3,3113,138.77,Short Sale 129 | 148070,Arroyo Grande,199000.00,2,1,827,240.63,Short Sale 130 | 148168,Santa Maria-Orcutt,29000.00,2,2,1500,19.33,Foreclosure 131 | 148195,Atascadero,299000.00,3,2,1270,235.43,Short Sale 132 | 148289,Santa Maria-Orcutt,259000.00,4,3,1857,139.47,Short Sale 133 | 148318,Los Osos,99000.00,1,1,538,184.01,Short Sale 134 | 148324,Avila Beach,779000.00,2,2,1223,636.96,Foreclosure 135 | 148325,Avila Beach,839000.00,2,2,1223,686.02,Foreclosure 136 | 148384,Santa Ynez,525000.00,3,2,1746,300.69,Short Sale 137 | 148399,Santa Ynez,795000.00,3,2,2092,380.02,Short Sale 138 | 148472,Santa Maria-Orcutt,337000.00,4,2,2000,168.50,Short Sale 139 | 148519,Oceano,164900.00,2,1,750,219.87,Foreclosure 140 | 148622,San Luis Obispo,449000.00,2,3,1650,272.12,Short Sale 141 | 148624,Guadalupe,94000.00,2,2,797,117.94,Foreclosure 142 | 148638,Pismo Beach,899000.00,3,3,2266,396.73,Short Sale 143 | 148736,Santa Maria-Orcutt,180000.00,3,2,1280,140.63,Short Sale 144 | 148744,Bradley,194900.00,3,2,1092,178.48,Foreclosure 145 | 148757,Los Osos,350000.00,3,2,1509,231.94,Short Sale 146 | 148806,King City,167770.00,3,3,1793,93.57,Foreclosure 147 | 148842,Creston,309900.00,3,2,1705,181.76,Foreclosure 148 | 148881,Templeton,479000.00,2,3,2100,228.10,Short Sale 149 | 148961,Los Alamos,350000.00,3,2,1582,221.24,Short Sale 150 | 149001,Grover Beach,350000.00,3,2,1470,238.10,Short Sale 151 | 149024,Santa Maria-Orcutt,275000.00,3,2,1424,193.12,Short Sale 152 | 149039,Paso Robles,379000.00,4,3,2277,166.45,Short Sale 153 | 149069,King City,155900.00,4,2,3368,46.29,Foreclosure 154 | 149105,San Miguel,229000.00,3,2,1458,157.06,Short Sale 155 | 149193,Pismo Beach,604995.00,2,3,1749,345.91,Foreclosure 156 | 149207,Pismo Beach,599000.00,3,3,1996,300.10,Short Sale 157 | 149230,Morro Bay,359000.00,3,2,1008,356.15,Short Sale 158 | 149275,Lompoc,199000.00,4,2,1527,130.32,Foreclosure 159 | 149287,Paso Robles,164900.00,3,2,1440,114.51,Short Sale 160 | 149307,Coalinga,179000.00,3,2,1815,98.62,Short Sale 161 | 149317,Paso Robles,370000.00,4,2,2064,179.26,Short Sale 162 | 149324,Santa Ynez,999000.00,5,4,2402,415.90,Short Sale 163 | 149369,Paso Robles,365000.00,3,3,2136,170.88,Short Sale 164 | 149401,San Miguel,345000.00,3,2,1498,230.31,Short Sale 165 | 149412,Paso Robles,299000.00,2,1,1068,279.96,Short Sale 166 | 149439,Pismo Beach,519500.00,2,1,634,819.40,Short Sale 167 | 149470,Buellton,645000.00,4,4,3000,215.00,Short Sale 168 | 149482,Santa Maria-Orcutt,242500.00,3,2,1218,199.10,Foreclosure 169 | 149514,Santa Maria-Orcutt,259900.00,3,3,1300,199.92,Short Sale 170 | 149604,Santa Maria-Orcutt,310000.00,4,3,2014,153.92,Short Sale 171 | 149612,Atascadero,450000.00,2,2,1463,307.59,Short Sale 172 | 149615,Santa Maria-Orcutt,220000.00,2,2,1541,142.76,Short Sale 173 | 149616,San Luis Obispo,585000.00,3,2,1268,461.36,Short Sale 174 | 149633,Santa Maria-Orcutt,324000.00,5,4,2400,135.00,Short Sale 175 | 149666,Cambria,375000.00,1,1,551,680.58,Short Sale 176 | 149700,Paso Robles,329000.00,3,2,1420,231.69,Short Sale 177 | 149752,Paso Robles,599900.00,5,3,2764,217.04,Foreclosure 178 | 149791,Santa Maria-Orcutt,74900.00,2,2,1014,73.87,Short Sale 179 | 149797,Los Osos,285000.00,3,2,1120,254.46,Short Sale 180 | 149813,Santa Maria-Orcutt,751900.00,3,3,3400,221.15,Foreclosure 181 | 149829,Santa Maria-Orcutt,295000.00,3,2,1386,212.84,Short Sale 182 | 149839,Coalinga,170000.00,3,2,1320,128.79,Short Sale 183 | 149841,Santa Maria-Orcutt,197000.00,3,2,1376,143.17,Short Sale 184 | 149860,Oceano,1250000.00,3,3,2586,483.37,Short Sale 185 | 149864,Paso Robles,249000.00,3,2,1662,149.82,Short Sale 186 | 149869,Nipomo,179000.00,2,2,1033,173.28,Short Sale 187 | 149877,Santa Maria-Orcutt,132000.00,3,1,1050,125.71,Short Sale 188 | 149882,Lockwood,425000.00,3,2,1500,283.33,Short Sale 189 | 149890,Santa Maria-Orcutt,290000.00,5,3,2500,116.00,Short Sale 190 | 149909,Los Osos,150000.00,2,2,896,167.41,Short Sale 191 | 149911,Los Osos,150000.00,2,2,896,167.41,Short Sale 192 | 149914,Los Osos,150000.00,2,2,896,167.41,Short Sale 193 | 149915,Los Osos,150000.00,2,2,896,167.41,Short Sale 194 | 149916,Los Osos,150000.00,2,2,896,167.41,Short Sale 195 | 149917,Los Osos,205000.00,2,2,1388,147.69,Short Sale 196 | 149919,Atascadero,599000.00,4,3,3120,191.99,Short Sale 197 | 149922,Paso Robles,269000.00,3,3,1352,198.96,Short Sale 198 | 149948,Santa Maria-Orcutt,249000.00,4,3,1963,126.85,Short Sale 199 | 149956,Santa Maria-Orcutt,235000.00,3,3,1541,152.50,Short Sale 200 | 149961,Grover Beach,469000.00,4,3,2449,191.51,Foreclosure 201 | 149989,Nipomo,159000.00,4,2,1660,95.78,Short Sale 202 | 149994,King City,69900.00,3,1,936,74.68,Foreclosure 203 | 150143,Arroyo Grande,1499000.00,5,7,6800,220.44,Short Sale 204 | 150194,Atascadero,239000.00,3,2,1022,233.86,Short Sale 205 | 150199,Atascadero,399500.00,3,2,1665,239.94,Short Sale 206 | 150240,Paso Robles,299900.00,3,2,1209,248.06,Foreclosure 207 | 150256,Lompoc,275000.00,3,2,1700,161.76,Short Sale 208 | 150262,Morro Bay,395000.00,4,2,1736,227.53,Short Sale 209 | 150283,Santa Maria-Orcutt,105000.00,1,1,731,143.64,Short Sale 210 | 150290,Santa Maria-Orcutt,179999.00,3,2,1086,165.74,Short Sale 211 | 150294,Santa Maria-Orcutt,219000.00,3,2,1131,193.63,Short Sale 212 | 150308,Solvang,325000.00,3,3,1500,216.67,Short Sale 213 | 150317,Atascadero,829900.00,4,3,3827,216.85,Short Sale 214 | 150335,Santa Maria-Orcutt,165000.00,2,1,1100,150.00,Short Sale 215 | 150360,Santa Maria-Orcutt,179000.00,3,2,1398,128.04,Short Sale 216 | 150390,Paso Robles,279000.00,3,2,1381,202.03,Short Sale 217 | 150392,Atascadero,820000.00,4,4,3387,242.10,Foreclosure 218 | 150394,Paso Robles,399000.00,2,1,1250,319.20,Short Sale 219 | 150407,San Miguel,164900.00,3,1,965,170.88,Short Sale 220 | 150424,Santa Maria-Orcutt,235000.00,4,2,1860,126.34,Short Sale 221 | 150439,Arroyo Grande,1900000.00,4,5,5411,351.14,Short Sale 222 | 150455,Nipomo,289000.00,3,2,1367,211.41,Short Sale 223 | 150470,Paso Robles,355000.00,3,2,1640,216.46,Short Sale 224 | 150477,Santa Maria-Orcutt,199000.00,3,2,1269,156.82,Short Sale 225 | 150482,Santa Maria-Orcutt,209000.00,3,2,1275,163.92,Short Sale 226 | 150493,Lompoc,186900.00,3,1,912,204.93,Foreclosure 227 | 150501,Santa Maria-Orcutt,240000.00,4,2,1460,164.38,Short Sale 228 | 150513,Nipomo,515000.00,2,2,2000,257.50,Short Sale 229 | 150543,Santa Maria-Orcutt,215000.00,4,2,1750,122.86,Short Sale 230 | 150556,Santa Maria-Orcutt,399900.00,4,4,3050,131.11,Short Sale 231 | 150571,Paso Robles,369000.00,4,3,2371,155.63,Short Sale 232 | 150572,Paso Robles,250000.00,2,2,1292,193.50,Short Sale 233 | 150588,Paso Robles,259000.00,3,2,1640,157.93,Short Sale 234 | 150611,Santa Maria-Orcutt,180000.00,2,2,1082,166.36,Short Sale 235 | 150636,Solvang,399900.00,3,2,1522,262.75,Short Sale 236 | 150638,Arroyo Grande,385000.00,3,2,1535,250.81,Short Sale 237 | 150669,Santa Maria-Orcutt,154000.00,2,2,1100,140.00,Short Sale 238 | 150732,San Luis Obispo,254900.00,2,2,966,263.87,Foreclosure 239 | 150744,Paso Robles,315000.00,4,2,1653,190.56,Short Sale 240 | 150746,Santa Maria-Orcutt,437500.00,3,3,2523,173.40,Short Sale 241 | 150751,Santa Maria-Orcutt,299900.00,3,3,2511,119.43,Short Sale 242 | 150773,Arroyo Grande,399000.00,3,3,1772,225.17,Short Sale 243 | 150823,Paso Robles,330000.00,3,3,1889,174.70,Short Sale 244 | 150827,Arroyo Grande,279000.00,2,2,880,317.05,Short Sale 245 | 150844,Santa Maria-Orcutt,248000.00,3,2,1400,177.14,Short Sale 246 | 150857,Santa Maria-Orcutt,209000.00,3,3,1494,139.89,Short Sale 247 | 150879,Los Osos,729000.00,3,2,1844,395.34,Short Sale 248 | 150903,Atascadero,454500.00,4,3,1900,239.21,Foreclosure 249 | 150929,Paso Robles,249000.00,3,2,1176,211.73,Short Sale 250 | 150949,Nipomo,1700000.00,3,5,4463,380.91,Short Sale 251 | 150966,Grover Beach,349000.00,3,2,1635,213.46,Short Sale 252 | 150969,Grover Beach,575000.00,3,3,2095,274.46,Short Sale 253 | 150980,Santa Maria-Orcutt,185000.00,3,2,1300,142.31,Short Sale 254 | 150981,Santa Maria-Orcutt,165000.00,3,2,1200,137.50,Short Sale 255 | 150987,Morro Bay,311900.00,0,1,910,342.75,Foreclosure 256 | 151000,Santa Maria-Orcutt,175000.00,3,2,1600,109.38,Short Sale 257 | 151005,Lompoc,180000.00,4,2,1332,135.14,Short Sale 258 | 151009,Santa Maria-Orcutt,78000.00,2,2,1680,46.43,Short Sale 259 | 151021,Oceano,142900.00,2,1,1313,108.83,Foreclosure 260 | 151071,Atascadero,850000.00,4,4,3744,227.03,Foreclosure 261 | 151078,Paso Robles,389000.00,3,2,1998,194.69,Short Sale 262 | 151080,Santa Maria-Orcutt,641900.00,3,3,2714,236.51,Foreclosure 263 | 151083,Templeton,305000.00,4,2,1797,169.73,Short Sale 264 | 151084,Paso Robles,260000.00,3,3,1687,154.12,Short Sale 265 | 151085,Paso Robles,320000.00,3,2,1663,192.42,Short Sale 266 | 151097,Atascadero,199000.00,2,1,792,251.26,Short Sale 267 | 151107,Santa Maria-Orcutt,299000.00,2,2,1410,212.06,Short Sale 268 | 151114,Buellton,289000.00,2,2,1085,266.36,Short Sale 269 | 151126,Santa Maria-Orcutt,229900.00,3,3,1900,121.00,Short Sale 270 | 151138,Atascadero,865000.00,4,3,3305,261.72,Foreclosure 271 | 151186,Atascadero,900000.00,4,4,3962,227.16,Short Sale 272 | 151187,Atascadero,199000.00,2,3,1260,157.94,Short Sale 273 | 151213,Santa Maria-Orcutt,160000.00,2,3,1200,133.33,Short Sale 274 | 151227,Santa Maria-Orcutt,299000.00,3,3,2400,124.58,Short Sale 275 | 151228,Oceano,300000.00,3,3,1265,237.15,Short Sale 276 | 151232,Santa Maria-Orcutt,270000.00,4,2,1460,184.93,Short Sale 277 | 151246,Nipomo,490000.00,3,3,1894,258.71,Short Sale 278 | 151249,Santa Maria-Orcutt,295000.00,3,3,1800,163.89,Short Sale 279 | 151257,Paso Robles,225000.00,3,2,1550,145.16,Short Sale 280 | 151277,Atascadero,324900.00,2,2,1426,227.84,Short Sale 281 | 151293,Santa Maria-Orcutt,165000.00,3,2,1110,148.65,Short Sale 282 | 151296,Santa Maria-Orcutt,157900.00,3,2,1075,146.88,Short Sale 283 | 151304,Nipomo,299000.00,3,2,1756,170.27,Short Sale 284 | 151308,Paso Robles,369000.00,3,3,2150,171.63,Short Sale 285 | 151373,Santa Maria-Orcutt,233000.00,4,2,1650,141.21,Short Sale 286 | 151395,Santa Maria-Orcutt,109900.00,2,2,1200,91.58,Foreclosure 287 | 151402,Paso Robles,309000.00,3,2,1488,207.66,Short Sale 288 | 151419,Pismo Beach,1799000.00,4,4,3609,498.48,Foreclosure 289 | 151441,Santa Maria-Orcutt,209900.00,2,2,1113,188.59,Short Sale 290 | 151443,Solvang,499000.00,3,2,1600,311.88,Short Sale 291 | 151451,Arroyo Grande,525000.00,4,2,1961,267.72,Short Sale 292 | 151454,Los Osos,650000.00,3,3,3249,200.06,Short Sale 293 | 151470,Morro Bay,529000.00,3,3,1510,350.33,Short Sale 294 | 151498,Santa Maria-Orcutt,179000.00,3,2,1300,137.69,Short Sale 295 | 151521,Lompoc,282000.00,3,3,1736,162.44,Short Sale 296 | 151527,Templeton,899000.00,4,3,3008,298.87,Short Sale 297 | 151534,Santa Maria-Orcutt,130000.00,3,2,1850,70.27,Short Sale 298 | 151636,Santa Maria-Orcutt,205000.00,3,2,1146,178.88,Short Sale 299 | 151640,Santa Maria-Orcutt,180900.00,2,2,1100,164.45,Short Sale 300 | 151647,Atascadero,409900.00,4,4,2135,191.99,Short Sale 301 | 151648,Atascadero,409900.00,4,4,2135,191.99,Short Sale 302 | 151678,Grover Beach,469000.00,3,2,1827,256.70,Short Sale 303 | 151681,Arroyo Grande,289000.00,3,1,1005,287.56,Short Sale 304 | 151690,Santa Maria-Orcutt,99999.00,2,3,1800,55.56,Short Sale 305 | 151700,Santa Maria-Orcutt,445000.00,5,3,3307,134.56,Foreclosure 306 | 151711,Atascadero,640000.00,3,3,2160,296.30,Short Sale 307 | 151724,San Miguel,185000.00,3,2,1062,174.20,Short Sale 308 | 151732,Santa Maria-Orcutt,210000.00,4,2,1102,190.56,Short Sale 309 | 151772,Santa Maria-Orcutt,199900.00,3,2,1215,164.53,Short Sale 310 | 151805,Santa Maria-Orcutt,225000.00,3,2,1600,140.63,Short Sale 311 | 151816,Paso Robles,369900.00,4,2,2161,171.17,Foreclosure 312 | 151824,Santa Maria-Orcutt,120000.00,3,2,1686,71.17,Short Sale 313 | 151826,Paso Robles,199000.00,2,1,1000,199.00,Short Sale 314 | 151832,Arroyo Grande,520000.00,3,3,2600,200.00,Short Sale 315 | 151837,Paso Robles,579000.00,5,3,3150,183.81,Foreclosure 316 | 151854,Santa Maria-Orcutt,300000.00,4,2,1257,238.66,Short Sale 317 | 151857,Arroyo Grande,325000.00,3,2,1171,277.54,Short Sale 318 | 151864,Santa Maria-Orcutt,225000.00,3,2,1144,196.68,Short Sale 319 | 151870,Atascadero,395000.00,2,1,1160,340.52,Short Sale 320 | 151871,Santa Maria-Orcutt,399000.00,4,3,2300,173.48,Short Sale 321 | 151876,Lompoc,165000.00,3,2,1144,144.23,Short Sale 322 | 151882,Arroyo Grande,374900.00,3,2,1368,274.05,Short Sale 323 | 151903,Santa Maria-Orcutt,199900.00,3,2,1238,161.47,Short Sale 324 | 151913,Arroyo Grande,365000.00,3,1,1056,345.64,Short Sale 325 | 151925,Santa Maria-Orcutt,222900.00,2,2,1086,205.25,Short Sale 326 | 151932,Los Osos,249900.00,2,1,720,347.08,Foreclosure 327 | 151934,Paso Robles,290000.00,3,2,1426,203.37,Short Sale 328 | 151940,Santa Maria-Orcutt,170500.00,4,2,1361,125.28,Short Sale 329 | 151942,Atascadero,560000.00,3,3,2344,238.91,Short Sale 330 | 151952,Nipomo,339900.00,4,2,1925,176.57,Short Sale 331 | 151967,Nipomo,550000.00,4,3,2600,211.54,Short Sale 332 | 151991,San Miguel,269900.00,4,2,1601,168.58,Short Sale 333 | 151994,Paso Robles,350000.00,3,2,1395,250.90,Short Sale 334 | 151996,Los Osos,214000.00,2,2,1042,205.37,Foreclosure 335 | 152002,Santa Maria-Orcutt,299900.00,3,2,1200,249.92,Short Sale 336 | 152003,Nipomo,139500.00,2,2,1248,111.78,Foreclosure 337 | 152006,Lompoc,360000.00,4,3,3000,120.00,Short Sale 338 | 152014,Paso Robles,315000.00,3,2,1300,242.31,Short Sale 339 | 152019,Paso Robles,279900.00,3,2,1244,225.00,Foreclosure 340 | 152024,Paso Robles,399000.00,4,2,2139,186.54,Short Sale 341 | 152036,Atascadero,475000.00,4,3,2450,193.88,Short Sale 342 | 152037,Santa Maria-Orcutt,65900.00,2,2,840,78.45,Foreclosure 343 | 152048,Coalinga,212000.00,4,3,1878,112.89,Short Sale 344 | 152068,San Miguel,180000.00,3,2,1350,133.33,Short Sale 345 | 152075,Santa Maria-Orcutt,210000.00,4,2,1377,152.51,Short Sale 346 | 152078,Buellton,375000.00,3,3,1475,254.24,Short Sale 347 | 152109,Atascadero,106900.00,2,2,894,119.57,Foreclosure 348 | 152116,Paso Robles,221830.00,3,2,1550,143.12,Short Sale 349 | 152122,Nipomo,239000.00,3,2,1106,216.09,Short Sale 350 | 152131,Atascadero,187500.00,1,1,594,315.66,Short Sale 351 | 152137,Los Alamos,445000.00,5,3,3200,139.06,Short Sale 352 | 152139,Santa Maria-Orcutt,309000.00,3,2,1906,162.12,Short Sale 353 | 152152,Santa Maria-Orcutt,315000.00,3,2,2004,157.19,Short Sale 354 | 152154,Santa Maria-Orcutt,191100.00,3,1,1200,159.25,Foreclosure 355 | 152163,Cambria,699900.00,5,3,1818,384.98,Foreclosure 356 | 152190,Nipomo,189500.00,2,2,1040,182.21,Short Sale 357 | 152191,Santa Maria-Orcutt,199000.00,4,2,1400,142.14,Short Sale 358 | 152196,Santa Maria-Orcutt,359000.00,4,3,2209,162.52,Short Sale 359 | 152203,Atascadero,264450.00,3,1,1030,256.75,Short Sale 360 | 152213,Templeton,459000.00,3,2,1999,229.61,Short Sale 361 | 152227,Santa Maria-Orcutt,150000.00,3,2,1316,113.98,Short Sale 362 | 152228,Pismo Beach,875000.00,3,3,2200,397.73,Short Sale 363 | 152233,Pismo Beach,599000.00,2,2,1200,499.17,Short Sale 364 | 152263,Atascadero,250000.00,3,3,1261,198.26,Short Sale 365 | 152265,Lompoc,165000.00,3,2,1120,147.32,Short Sale 366 | 152272,Santa Maria-Orcutt,229900.00,4,3,1857,123.80,Short Sale 367 | 152277,Santa Maria-Orcutt,229900.00,3,2,1400,164.21,Short Sale 368 | 152291,Paso Robles,269900.00,3,2,1139,236.96,Short Sale 369 | 152298,Santa Maria-Orcutt,245000.00,5,3,6098,40.18,Short Sale 370 | 152320,Santa Maria-Orcutt,165000.00,3,2,1300,126.92,Short Sale 371 | 152326,Lompoc,429000.00,3,3,2041,210.19,Short Sale 372 | 152340,Santa Maria-Orcutt,309900.00,4,3,2248,137.86,Short Sale 373 | 152351,Arroyo Grande,265000.00,2,1,972,272.63,Foreclosure 374 | 152359,Santa Maria-Orcutt,169900.00,4,2,1500,113.27,Short Sale 375 | 152360,Santa Maria-Orcutt,380900.00,3,2,2000,190.45,Short Sale 376 | 152384,Santa Maria-Orcutt,315000.00,4,3,1939,162.45,Short Sale 377 | 152393,Lompoc,260000.00,3,2,1413,184.01,Short Sale 378 | 152395,Santa Maria-Orcutt,119900.00,3,2,1312,91.39,Short Sale 379 | 152396,Santa Maria-Orcutt,211500.00,3,2,1275,165.88,Foreclosure 380 | 152401,Santa Maria-Orcutt,149000.00,2,1,854,174.47,Short Sale 381 | 152405,San Luis Obispo,890000.00,3,3,3474,256.19,Short Sale 382 | 152410,Cambria,289900.00,3,2,1380,210.07,Foreclosure 383 | 152459,Santa Maria-Orcutt,289000.00,4,3,2100,137.62,Short Sale 384 | 152487,Oceano,399900.00,3,2,1487,268.93,Short Sale 385 | 152491,Santa Maria-Orcutt,125000.00,3,2,900,138.89,Short Sale 386 | 152496,Nipomo,359900.00,5,3,3036,118.54,Short Sale 387 | 152515,Santa Maria-Orcutt,239000.00,3,3,1800,132.78,Short Sale 388 | 152525,Santa Maria-Orcutt,199900.00,3,3,1600,124.94,Short Sale 389 | 152533,Santa Maria-Orcutt,179900.00,4,3,2150,83.67,Short Sale 390 | 152565,Santa Maria-Orcutt,195000.00,3,2,1300,150.00,Short Sale 391 | 152570,San Luis Obispo,299000.00,2,2,896,333.71,Foreclosure 392 | 152581,Santa Maria-Orcutt,265000.00,2,3,1700,155.88,Short Sale 393 | 152586,Nipomo,699000.00,3,2,1700,411.18,Foreclosure 394 | 152597,Grover Beach,275000.00,2,2,1194,230.32,Short Sale 395 | 152617,Paso Robles,169990.00,3,2,1465,116.03,Foreclosure 396 | 152619,Santa Maria-Orcutt,189000.00,3,3,1530,123.53,Short Sale 397 | 152638,Santa Ynez,695000.00,4,2,2032,342.03,Foreclosure 398 | 152670,Santa Maria-Orcutt,105000.00,2,2,1088,96.51,Short Sale 399 | 152675,Santa Maria-Orcutt,365000.00,4,4,4000,91.25,Short Sale 400 | 152677,Paso Robles,335900.00,3,3,1296,259.18,Foreclosure 401 | 152683,Lompoc,170000.00,3,2,944,180.08,Short Sale 402 | 152705,Santa Maria-Orcutt,339900.00,4,2,2100,161.86,Short Sale 403 | 152716,Santa Maria-Orcutt,359900.00,3,3,2340,153.80,Short Sale 404 | 152718,Santa Maria-Orcutt,143000.00,3,2,1080,132.41,Short Sale 405 | 152720,Santa Maria-Orcutt,199000.00,3,2,1196,166.39,Short Sale 406 | 152727,San Luis Obispo,374800.00,3,3,1365,274.58,Short Sale 407 | 152757,Los Osos,499000.00,3,2,2120,235.38,Short Sale 408 | 152764,Atascadero,138900.00,2,1,1055,131.66,Foreclosure 409 | 152768,Avila Beach,1999000.00,4,5,5307,376.67,Short Sale 410 | 152771,Paso Robles,359000.00,3,2,1774,202.37,Short Sale 411 | 152772,Santa Maria-Orcutt,294900.00,4,2,1856,158.89,Short Sale 412 | 152773,Atascadero,299500.00,4,2,1836,163.13,Foreclosure 413 | 152778,Santa Maria-Orcutt,427900.00,4,3,2367,180.78,Short Sale 414 | 152781,Nipomo,269000.00,3,2,1181,227.77,Short Sale 415 | 152784,Bradley,449000.00,3,3,2563,175.19,Short Sale 416 | 152792,Santa Maria-Orcutt,144900.00,2,2,1130,128.23,Foreclosure 417 | 152794,Santa Maria-Orcutt,345000.00,3,3,2020,170.79,Short Sale 418 | 152800,Paso Robles,239000.00,4,2,1240,192.74,Short Sale 419 | 152805,Los Osos,310000.00,2,1,780,397.44,Short Sale 420 | 152806,Santa Maria-Orcutt,225000.00,3,3,1800,125.00,Short Sale 421 | 152809,Paso Robles,695000.00,5,6,3750,185.33,Short Sale 422 | 152820,Nipomo,242500.00,3,3,1650,146.97,Short Sale 423 | 152844,Arroyo Grande,249250.00,2,1,728,342.38,Short Sale 424 | 152849,Grover Beach,479000.00,3,2,1462,327.63,Short Sale 425 | 152854,Lompoc,169900.00,3,2,1150,147.74,Foreclosure 426 | 152856,Santa Maria-Orcutt,219900.00,3,3,1660,132.47,Short Sale 427 | 152887,Paso Robles,150000.00,2,2,1440,104.17,Short Sale 428 | 152888,Nipomo,649000.00,4,2,1814,357.77,Foreclosure 429 | 152890,Santa Maria-Orcutt,285000.00,4,3,2100,135.71,Short Sale 430 | 152893,Paso Robles,163999.00,3,2,1488,110.21,Short Sale 431 | 152897,Nipomo,349000.00,4,2,1718,203.14,Short Sale 432 | 152900,Buellton,409900.00,3,2,1716,238.87,Foreclosure 433 | 152906,Los Osos,275000.00,3,2,1320,208.33,Short Sale 434 | 152912,Santa Maria-Orcutt,179900.00,3,2,1200,149.92,Foreclosure 435 | 152914,Oceano,789000.00,3,3,2218,355.73,Short Sale 436 | 152937,Santa Maria-Orcutt,299000.00,4,3,1768,169.12,Short Sale 437 | 152948,Arroyo Grande,850000.00,5,4,3588,236.90,Foreclosure 438 | 152964,Santa Maria-Orcutt,295900.00,3,2,1776,166.61,Short Sale 439 | 152967,Santa Maria-Orcutt,199000.00,4,3,1467,135.65,Short Sale 440 | 152969,Santa Maria-Orcutt,199900.00,3,3,1950,102.51,Short Sale 441 | 152978,Santa Maria-Orcutt,179900.00,3,2,1288,139.67,Foreclosure 442 | 152987,Atascadero,290000.00,3,3,1733,167.34,Short Sale 443 | 152989,Santa Maria-Orcutt,168000.00,3,2,1128,148.94,Short Sale 444 | 152998,Santa Maria-Orcutt,270000.00,3,3,1900,142.11,Short Sale 445 | 152999,Los Osos,1249000.00,6,7,5103,244.76,Foreclosure 446 | 153000,Santa Maria-Orcutt,240000.00,3,2,1255,191.24,Short Sale 447 | 153014,Coalinga,219500.00,5,2,1802,121.81,Short Sale 448 | 153032,Santa Maria-Orcutt,235000.00,4,3,2336,100.60,Short Sale 449 | 153036,San Luis Obispo,239800.00,2,2,1190,201.51,Foreclosure 450 | 153042,Santa Maria-Orcutt,269000.00,3,3,1800,149.44,Short Sale 451 | 153047,Paso Robles,319200.00,4,3,2006,159.12,Foreclosure 452 | 153052,Paso Robles,402500.00,3,2,2446,164.55,Foreclosure 453 | 153068,Paso Robles,425000.00,3,2,2114,201.04,Short Sale 454 | 153084,Atascadero,669000.00,3,3,2600,257.31,Short Sale 455 | 153085,Atascadero,369000.00,3,2,1514,243.73,Short Sale 456 | 153088,Paso Robles,239900.00,3,2,1080,222.13,Foreclosure 457 | 153095,Grover Beach,249500.00,2,2,1088,229.32,Short Sale 458 | 153116,Solvang,557000.00,4,2,1809,307.90,Short Sale 459 | 153119,Santa Maria-Orcutt,339900.00,6,3,2053,165.56,Foreclosure 460 | 153127,Nipomo,149900.00,2,2,969,154.70,Short Sale 461 | 153133,Arroyo Grande,849900.00,3,4,3375,251.82,Short Sale 462 | 153134,Lompoc,307000.00,3,2,1594,192.60,Foreclosure 463 | 153157,Santa Maria-Orcutt,259000.00,4,3,1900,136.32,Short Sale 464 | 153160,Santa Maria-Orcutt,165000.00,3,2,1050,157.14,Short Sale 465 | 153168,Santa Maria-Orcutt,289900.00,3,2,1414,205.02,Foreclosure 466 | 153175,Nipomo,879000.00,3,4,3698,237.70,Short Sale 467 | 153179,Santa Maria-Orcutt,220000.00,3,2,1200,183.33,Short Sale 468 | 153185,Atascadero,309000.00,3,3,1685,183.38,Short Sale 469 | 153197,Paso Robles,580000.00,3,3,2271,255.39,Short Sale 470 | 153207,Santa Maria-Orcutt,459900.00,2,2,1150,399.91,Short Sale 471 | 153214,Santa Maria-Orcutt,299000.00,5,3,2481,120.52,Short Sale 472 | 153230,Santa Maria-Orcutt,309900.00,4,3,1600,193.69,Short Sale 473 | 153234,Paso Robles,287000.00,3,2,1269,226.16,Short Sale 474 | 153259,Grover Beach,310000.00,3,2,1200,258.33,Short Sale 475 | 153264,Atascadero,229900.00,3,2,1198,191.90,Foreclosure 476 | 153268,Buellton,377000.00,3,2,1363,276.60,Foreclosure 477 | 153276,Lompoc,295000.00,4,2,1973,149.52,Short Sale 478 | 153288,Santa Maria-Orcutt,225000.00,3,2,1516,148.42,Short Sale 479 | 153294,Santa Maria-Orcutt,130000.00,3,2,1080,120.37,Short Sale 480 | 153314,Santa Maria-Orcutt,169990.00,2,1,920,184.77,Short Sale 481 | 153327,Santa Maria-Orcutt,145000.00,3,2,1027,141.19,Foreclosure 482 | 153343,Greenfield,184800.00,4,2,2018,91.58,Foreclosure 483 | 153370,Santa Maria-Orcutt,189900.00,3,2,1253,151.56,Foreclosure 484 | 153371,Santa Maria-Orcutt,249000.00,3,2,1062,234.46,Short Sale 485 | 153377,Santa Maria-Orcutt,185000.00,4,2,1934,95.66,Short Sale 486 | 153382,Atascadero,145000.00,2,2,1041,139.29,Short Sale 487 | 153384,Paso Robles,429000.00,5,3,2700,158.89,Foreclosure 488 | 153406,Arroyo Grande,419000.00,2,2,1587,264.02,Short Sale 489 | 153411,Santa Maria-Orcutt,245000.00,3,3,1859,131.79,Short Sale 490 | 153425,Santa Maria-Orcutt,289900.00,4,3,2400,120.79,Short Sale 491 | 153428,Santa Maria-Orcutt,175000.00,3,2,1110,157.66,Short Sale 492 | 153432,Santa Maria-Orcutt,139000.00,3,2,1075,129.30,Short Sale 493 | 153442,Arroyo Grande,514900.00,4,3,2035,253.02,Foreclosure 494 | 153447,Pismo Beach,549000.00,3,2,1858,295.48,Short Sale 495 | 153464,Atascadero,235000.00,3,3,1261,186.36,Short Sale 496 | 153480,Atascadero,399000.00,6,3,2628,151.83,Foreclosure 497 | 153500,Los Osos,259900.00,3,2,1120,232.05,Short Sale 498 | 153513,Lompoc,350900.00,3,2,1686,208.13,Foreclosure 499 | 153516,Nipomo,1399900.00,4,4,5190,269.73,Short Sale 500 | 153543,Santa Maria-Orcutt,399000.00,3,2,1840,216.85,Short Sale 501 | 153547,Solvang,399000.00,3,2,1204,331.40,Short Sale 502 | 153552,Atascadero,199000.00,2,1,973,204.52,Short Sale 503 | 153556,Santa Maria-Orcutt,350000.00,3,2,1622,215.78,Short Sale 504 | 153565,Nipomo,296800.00,4,2,2125,139.67,Foreclosure 505 | 153570,Santa Maria-Orcutt,165000.00,3,2,1204,137.04,Short Sale 506 | 153576,Santa Maria-Orcutt,210000.00,3,3,1750,120.00,Short Sale 507 | 153606,San Miguel,229000.00,3,2,1458,157.06,Short Sale 508 | 153633,San Miguel,199500.00,3,2,1184,168.50,Short Sale 509 | 153639,Santa Maria-Orcutt,110000.00,3,2,1000,110.00,Short Sale 510 | 153647,Paso Robles,264900.00,3,3,1197,221.30,Foreclosure 511 | 153656,Atascadero,449900.00,3,3,2135,210.73,Foreclosure 512 | 153668,Santa Maria-Orcutt,159900.00,3,2,1114,143.54,Short Sale 513 | 153692,Paso Robles,429000.00,4,2,1870,229.41,Short Sale 514 | 153693,Grover Beach,265000.00,1,1,566,468.20,Short Sale 515 | 153697,Nipomo,279900.00,2,2,1134,246.83,Short Sale 516 | 153710,Santa Maria-Orcutt,174900.00,3,2,1100,159.00,Foreclosure 517 | 153719,Lompoc,158900.00,4,2,1144,138.90,Foreclosure 518 | 153734,Santa Maria-Orcutt,150000.00,3,2,1349,111.19,Short Sale 519 | 153738,Buellton,269000.00,3,3,1281,209.99,Short Sale 520 | 153746,Atascadero,489900.00,3,3,1957,250.33,Foreclosure 521 | 153757,Santa Maria-Orcutt,256000.00,4,2,1174,218.06,Short Sale 522 | 153768,Atascadero,335000.00,4,3,2400,139.58,Short Sale 523 | 153769,Morro Bay,435000.00,3,2,1236,351.94,Short Sale 524 | 153774,Santa Maria-Orcutt,280000.00,3,3,1910,146.60,Short Sale 525 | 153779,Paso Robles,409000.00,4,2,2064,198.16,Foreclosure 526 | 153780,Paso Robles,409000.00,4,2,2064,198.16,Foreclosure 527 | 153781,Paso Robles,399000.00,4,3,1888,211.33,Foreclosure 528 | 153783,Paso Robles,389000.00,4,2,1862,208.92,Foreclosure 529 | 153785,Nipomo,222600.00,3,2,1106,201.27,Foreclosure 530 | 153791,Santa Maria-Orcutt,140000.00,3,2,1200,116.67,Short Sale 531 | 153799,Soledad,220000.00,5,3,2408,91.36,Foreclosure 532 | 153800,Nipomo,650000.00,3,3,2703,240.47,Short Sale 533 | 153802,Lompoc,405000.00,3,2,1728,234.38,Short Sale 534 | 153807,Paso Robles,409000.00,3,2,1960,208.67,Foreclosure 535 | 153828,Santa Maria-Orcutt,164900.00,3,2,1092,151.01,Foreclosure 536 | 153839,Santa Margarita,59900.00,1,1,628,95.38,Foreclosure 537 | 153850,Santa Maria-Orcutt,199900.00,3,2,1275,156.78,Short Sale 538 | 153864,Atascadero,95000.00,2,1,756,125.66,Foreclosure 539 | 153865,Oceano,170000.00,2,2,885,192.09,Short Sale 540 | 153866,San Miguel,720000.00,4,4,3531,203.91,Foreclosure 541 | 153872,Santa Maria-Orcutt,204000.00,3,2,1712,119.16,Short Sale 542 | 153876,Santa Maria-Orcutt,220000.00,3,2,1100,200.00,Short Sale 543 | 153881,Buellton,498900.00,4,3,1500,332.60,Foreclosure 544 | 153900,Santa Maria-Orcutt,229900.00,3,2,1671,137.58,Short Sale 545 | 153915,San Luis Obispo,531905.00,3,2,1668,318.89,Foreclosure 546 | 153923,Santa Maria-Orcutt,114900.00,2,1,775,148.26,Foreclosure 547 | 153927,Guadalupe,145000.00,3,2,1200,120.83,Short Sale 548 | 153939,Lompoc,191330.00,4,2,1237,154.67,Foreclosure 549 | 153944,Lompoc,199900.00,4,2,1338,149.40,Short Sale 550 | 153949,Santa Maria-Orcutt,266800.00,4,3,2100,127.05,Short Sale 551 | 153953,San Miguel,84900.00,2,2,1222,69.48,Foreclosure 552 | 153955,Santa Maria-Orcutt,250000.00,3,2,1807,138.35,Short Sale 553 | 153960,Santa Maria-Orcutt,220000.00,4,2,1352,162.72,Short Sale 554 | 153971,Lompoc,227900.00,3,2,1503,151.63,Foreclosure 555 | 153997,Buellton,384900.00,4,2,1571,245.00,Foreclosure 556 | 154005,Paso Robles,529000.00,4,3,2502,211.43,Short Sale 557 | 154006,Santa Maria-Orcutt,159900.00,3,2,1526,104.78,Foreclosure 558 | 154010,Atascadero,199000.00,3,2,1007,197.62,Short Sale 559 | 154015,Lompoc,125000.00,3,3,1306,95.71,Foreclosure 560 | 154028,Bakersfield,91500.00,3,2,1313,69.69,Short Sale 561 | 154034,Santa Maria-Orcutt,155000.00,3,2,1593,97.30,Short Sale 562 | 154038,Paso Robles,409000.00,3,3,2203,185.66,Short Sale 563 | 154044,Atascadero,949000.00,5,4,5200,182.50,Short Sale 564 | 154048,Atascadero,90000.00,2,1,756,119.05,Short Sale 565 | 154058,Santa Maria-Orcutt,300000.00,3,3,2328,128.87,Foreclosure 566 | 154060,Santa Maria-Orcutt,179900.00,3,2,1008,178.47,Short Sale 567 | 154066,Grover Beach,349000.00,3,2,1346,259.29,Short Sale 568 | 154071,Nipomo,220000.00,3,2,1112,197.84,Foreclosure 569 | 154074,Santa Maria-Orcutt,155000.00,3,2,1340,115.67,Short Sale 570 | 154075,Paso Robles,390000.00,4,2,2236,174.42,Short Sale 571 | 154090,Santa Maria-Orcutt,425000.00,5,4,3039,139.85,Short Sale 572 | 154091,Santa Maria-Orcutt,249900.00,3,2,1733,144.20,Short Sale 573 | 154092,Santa Maria-Orcutt,239000.00,4,3,1947,122.75,Short Sale 574 | 154111,Buellton,395000.00,4,3,1868,211.46,Short Sale 575 | 154113,Buellton,375000.00,3,3,1475,254.24,Short Sale 576 | 154115,Buellton,395000.00,4,3,1868,211.46,Short Sale 577 | 154116,Buellton,395000.00,4,3,1868,211.46,Short Sale 578 | 154119,Santa Maria-Orcutt,230000.00,4,3,1927,119.36,Short Sale 579 | 154131,Santa Maria-Orcutt,189000.00,3,2,1292,146.28,Foreclosure 580 | 154136,Paso Robles,304900.00,3,2,1657,184.01,Foreclosure 581 | 154145,Santa Maria-Orcutt,169900.00,3,2,1300,130.69,Foreclosure 582 | 154147,Santa Maria-Orcutt,286500.00,3,2,1700,168.53,Short Sale 583 | 154153,San Miguel,325000.00,4,2,2400,135.42,Short Sale 584 | 154154,Grover Beach,375000.00,3,2,1278,293.43,Short Sale 585 | 154159,Paso Robles,278000.00,3,2,1396,199.14,Foreclosure 586 | 154161,Paso Robles,149000.00,3,2,1368,108.92,Short Sale 587 | 154167,Santa Maria-Orcutt,209000.00,3,2,1520,137.50,Short Sale 588 | 154169,Santa Maria-Orcutt,95000.00,2,2,900,105.56,Short Sale 589 | 154171,Santa Maria-Orcutt,199900.00,3,2,1407,142.08,Short Sale 590 | 154175,Santa Maria-Orcutt,185000.00,3,2,1170,158.12,Short Sale 591 | 154182,Lompoc,449900.00,4,3,3035,148.24,Foreclosure 592 | 154197,Santa Maria-Orcutt,310000.00,5,4,2900,106.90,Short Sale 593 | 154199,Santa Maria-Orcutt,239900.00,4,2,1656,144.87,Short Sale 594 | 154200,Santa Maria-Orcutt,187900.00,2,2,980,191.73,Foreclosure 595 | 154201,Arroyo Grande,450000.00,3,2,1916,234.86,Short Sale 596 | 154205,San Luis Obispo,440000.00,3,3,1756,250.57,Short Sale 597 | 154223,Santa Maria-Orcutt,260000.00,3,2,1278,203.44,Short Sale 598 | 154233,New Cuyama,40900.00,3,1,1201,34.05,Short Sale 599 | 154241,Paso Robles,249000.00,3,2,1275,195.29,Short Sale 600 | 154242,Atascadero,349000.00,3,3,2000,174.50,Short Sale 601 | 154244,Santa Maria-Orcutt,175000.00,3,2,1200,145.83,Short Sale 602 | 154246,Atascadero,449970.00,3,2,2000,224.99,Foreclosure 603 | 154254,Grover Beach,419000.00,3,2,1902,220.29,Short Sale 604 | 154257,Arroyo Grande,400000.00,3,3,1568,255.10,Short Sale 605 | 154259,Santa Maria-Orcutt,185000.00,3,2,1257,147.18,Short Sale 606 | 154276,Santa Maria-Orcutt,139900.00,2,2,1100,127.18,Short Sale 607 | 154279,Santa Maria-Orcutt,174900.00,3,2,1461,119.71,Foreclosure 608 | 154283,Soledad,165360.00,4,2,1353,122.22,Foreclosure 609 | 154284,Santa Maria-Orcutt,169000.00,3,2,1200,140.83,Short Sale 610 | 154298,Santa Maria-Orcutt,240000.00,3,3,2039,117.70,Short Sale 611 | 154304,Santa Maria-Orcutt,364000.00,4,3,2150,169.30,Short Sale 612 | 154308,Arroyo Grande,250000.00,1,1,748,334.22,Short Sale 613 | 154309,Santa Maria-Orcutt,299900.00,4,3,1969,152.31,Foreclosure 614 | 154311,Santa Maria-Orcutt,281900.00,4,3,2357,119.60,Foreclosure 615 | 154312,Grover Beach,349900.00,3,1,1522,229.89,Short Sale 616 | 154317,Santa Maria-Orcutt,220000.00,3,2,1850,118.92,Short Sale 617 | 154320,Templeton,774800.00,3,4,3123,248.09,Foreclosure 618 | 154322,Santa Maria-Orcutt,135000.00,3,2,1200,112.50,Short Sale 619 | 154325, Lompoc,149900.00,3,1,1000,149.90,Regular 620 | 154327,Paso Robles,599000.00,3,2,2082,287.70,Foreclosure 621 | 154328,Santa Maria-Orcutt,179000.00,3,2,1200,149.17,Foreclosure 622 | 154329,Santa Maria-Orcutt,177000.00,3,2,1500,118.00,Foreclosure 623 | 154329,Santa Maria-Orcutt,177000.00,3,2,1500,118.00,Regular 624 | 154330, Nipomo,122500.00,4,2,1248,98.16,Regular 625 | 154332,Santa Maria-Orcutt,239500.00,3,2,1400,171.07,Short Sale 626 | 154335,Paso Robles,214900.00,3,2,1080,198.98,Foreclosure 627 | 154338,Santa Maria-Orcutt,275000.00,3,2,1460,188.36,Short Sale 628 | 154343, Arroyo Grande,425000.00,3,2,1437,295.76,Regular 629 | 154344,San Simeon,274900.00,2,2,1218,225.70,Foreclosure 630 | 154345, Nipomo,175000.00,2,2,1152,151.91,Regular 631 | 154346, Morro Bay,535000.00,2,2,1410,379.43,Regular 632 | 154347, Pismo Beach,540000.00,2,1,817,660.95,Regular 633 | 154348, Cambria,389000.00,2,2,703,553.34,Regular 634 | 154350,Paso Robles,250000.00,3,2,1425,175.44,Short Sale 635 | 154352, Paso Robles,425000.00,3,2,1807,235.20,Regular 636 | 154353, Out Of Area,1195000.00,5,4,3800,314.47,Regular 637 | 154354, Los Osos,1350000.00,3,3,2502,539.57,Regular 638 | 154356,Santa Maria-Orcutt,78500.00,1,1,800,98.13,Foreclosure 639 | 154357, Paso Robles,549000.00,3,2,2237,245.42,Regular 640 | 154358, Santa Maria-Orcutt,399900.00,4,2,1860,215.00,Regular 641 | 154359,Atascadero,699000.00,10,11,4905,142.51,Short Sale 642 | 154360, Santa Maria-Orcutt,129000.00,2,2,1200,107.50,Regular 643 | 154361, Cambria,480000.00,2,2,1698,282.69,Regular 644 | 154363,Nipomo,189000.00,3,1,1022,184.93,Foreclosure 645 | 154365, Pismo Beach,639900.00,3,2,2080,307.64,Regular 646 | 154366, Santa Maria-Orcutt,699900.00,5,4,3000,233.30,Regular 647 | 154367, Grover Beach,999000.00,3,3,3621,275.89,Regular 648 | 154370, Arroyo Grande,599000.00,3,2,1570,381.53,Regular 649 | 154371, Santa Maria-Orcutt,365000.00,4,2,1860,196.24,Regular 650 | 154372,Cambria,359900.00,3,2,1840,195.60,Foreclosure 651 | 154373, Arroyo Grande,995000.00,4,4,3740,266.04,Regular 652 | 154374,Lompoc,193450.00,4,2,1217,158.96,Foreclosure 653 | 154376,Santa Maria-Orcutt,179900.00,3,3,1520,118.36,Short Sale 654 | 154378,Grover Beach,329900.00,3,2,1240,266.05,Short Sale 655 | 154379, Templeton,509000.00,3,2,1936,262.91,Regular 656 | 154380, Atascadero,995000.00,3,3,2044,486.79,Regular 657 | 154381, Pismo Beach,545000.00,3,2,1946,280.06,Regular 658 | 154382, Pismo Beach,795000.00,3,3,2028,392.01,Regular 659 | 154383, Atascadero,830000.00,4,3,2700,307.41,Regular 660 | 154384, Arroyo Grande,54500.00,2,1,624,87.34,Regular 661 | 154385, Arroyo Grande,149000.00,3,2,1800,82.78,Regular 662 | 154386, Santa Maria-Orcutt,36000.00,2,2,1056,34.09,Regular 663 | 154387, Paso Robles,349000.00,3,2,1467,237.90,Regular 664 | 154389,Santa Maria-Orcutt,299900.00,4,3,2150,139.49,Short Sale 665 | 154390, Morro Bay,469000.00,4,2,2004,234.03,Regular 666 | 154393, Oceano,1195000.00,2,2,1044,1144.64,Regular 667 | 154394,Solvang,419900.00,3,2,1576,266.43,Foreclosure 668 | 154397, Los Osos,189000.00,2,2,1536,123.05,Regular 669 | 154398,Lompoc,163900.00,3,2,1082,151.48,Foreclosure 670 | 154399,Lompoc,163900.00,3,2,1237,132.50,Foreclosure 671 | 154400, Los Osos,648000.00,3,3,2193,295.49,Regular 672 | 154401,Santa Maria-Orcutt,130000.00,3,2,1022,127.20,Short Sale 673 | 154402,Atascadero,264900.00,3,2,1232,215.02,Foreclosure 674 | 154407,Santa Maria-Orcutt,189900.00,4,2,1435,132.33,Foreclosure 675 | 154408,Santa Maria-Orcutt,200000.00,4,2,1430,139.86,Short Sale 676 | 154410, Arroyo Grande,1249000.00,3,3,2480,503.63,Regular 677 | 154412, Cayucos,525000.00,3,3,1832,286.57,Regular 678 | 154413, Cambria,729000.00,3,3,1953,373.27,Regular 679 | 154414,Santa Maria-Orcutt,109900.00,3,2,1100,99.91,Foreclosure 680 | 154415, Santa Maria-Orcutt,850000.00,3,2,2481,342.60,Regular 681 | 154417,Santa Maria-Orcutt,249500.00,3,2,1704,146.42,Short Sale 682 | 154418,Oceano,179900.00,3,2,1161,154.95,Foreclosure 683 | 154419, Los Osos,149000.00,3,2,1440,103.47,Regular 684 | 154420, Creston,549000.00,3,2,1701,322.75,Regular 685 | 154421, Atascadero,435000.00,3,2,1536,283.20,Regular 686 | 154422, Atascadero,299000.00,3,2,1310,228.24,Regular 687 | 154423, Los Osos,625000.00,3,2,2187,285.78,Regular 688 | 154425,Santa Maria-Orcutt,399000.00,4,3,2100,190.00,Short Sale 689 | 154427,Out Of Area,186900.00,4,2,1511,123.69,Regular 690 | 154428, Cambria,1290000.00,3,3,2130,605.63,Regular 691 | 154429,Solvang,264900.00,2,3,1400,189.21,Foreclosure 692 | 154430,Lompoc,198900.00,3,2,1225,162.37,Foreclosure 693 | 154432, Paso Robles,318000.00,3,3,1868,170.24,Regular 694 | 154434, Cambria,2000000.00,4,4,3576,559.28,Regular 695 | 154435, Cambria,598000.00,2,3,2219,269.49,Regular 696 | 154437,Paso Robles,439900.00,3,3,2508,175.40,Foreclosure 697 | 154441, Pismo Beach,920000.00,3,3,2817,326.59,Regular 698 | 154442,Santa Maria-Orcutt,179900.00,3,2,1972,91.23,Short Sale 699 | 154443,Templeton,325000.00,2,1,952,341.39,Short Sale 700 | 154444, Grover Beach,369000.00,3,2,1080,341.67,Regular 701 | 154455, Santa Maria-Orcutt,312900.00,3,2,1454,215.20,Regular 702 | 154461, Atascadero,575000.00,3,3,1961,293.22,Regular 703 | 154462, Santa Maria-Orcutt,26500.00,2,2,1344,19.72,Regular 704 | 154463, San Luis Obispo,2369000.00,5,6,4174,567.56,Regular 705 | 154464, Atascadero,67500.00,2,2,120,562.50,Regular 706 | 154466, San Luis Obispo,1490000.00,3,3,3201,465.48,Regular 707 | 154467, Morro Bay,652000.00,3,2,1427,456.90,Regular 708 | 154468, Atascadero,449000.00,3,3,2100,213.81,Regular 709 | 154469, Morro Bay,982800.00,3,2,2306,426.19,Regular 710 | 154470,Santa Maria-Orcutt,235000.00,4,3,2100,111.90,Short Sale 711 | 154472, Paso Robles,579900.00,4,3,3166,183.16,Regular 712 | 154474,Santa Maria-Orcutt,250000.00,3,2,1280,195.31,Short Sale 713 | 154475,Coalinga,100000.00,3,1,870,114.94,Short Sale 714 | 154476,Coalinga,125000.00,2,1,960,130.21,Short Sale 715 | 154477, Cambria,650000.00,2,2,919,707.29,Regular 716 | 154478,Santa Maria-Orcutt,119900.00,2,2,1034,115.96,Foreclosure 717 | 154479,San Miguel,209900.00,3,2,1356,154.79,Foreclosure 718 | 154481, Paso Robles,524900.00,3,2,2380,220.55,Regular 719 | 154482,Atascadero,349000.00,5,3,3000,116.33,Short Sale 720 | 154482, Atascadero,349000.00,5,3,3000,116.33,Regular 721 | 154483, Cambria,825000.00,2,3,1840,448.37,Regular 722 | 154484,Grover Beach,255000.00,3,2,1189,214.47,Short Sale 723 | 154485,Nipomo,259000.00,4,2,1336,193.86,Short Sale 724 | 154486,Paso Robles,199000.00,2,1,832,239.18,Short Sale 725 | 154487,Santa Maria-Orcutt,410000.00,5,3,2100,195.24,Foreclosure 726 | 154488, Paso Robles,199000.00,3,1,940,211.70,Regular 727 | 154489, Paso Robles,270000.00,3,2,1344,200.89,Regular 728 | 154490, Cayucos,695000.00,2,2,1437,483.65,Regular 729 | 154491, Cambria,2995000.00,5,4,3684,812.98,Regular 730 | 154492, Paso Robles,131900.00,1,2,300,439.67,Regular 731 | 154493, Cambria,995000.00,4,3,2717,366.21,Regular 732 | 154494, Santa Maria-Orcutt,250000.00,4,3,2097,119.22,Regular 733 | 154495,Arroyo Grande,239800.00,5,2,1575,152.25,Foreclosure 734 | 154496, Atascadero,425000.00,6,3,2628,161.72,Regular 735 | 154497, Arroyo Grande,525000.00,3,2,1750,300.00,Regular 736 | 154498, Pismo Beach,459900.00,3,2,1346,341.68,Regular 737 | 154501,Atascadero,229900.00,3,2,1041,220.85,Foreclosure 738 | 154503,Out Of Area,199900.00,3,2,1526,131.00,Regular 739 | 154504, Arroyo Grande,599000.00,4,2,1728,346.64,Regular 740 | 154506,Santa Maria-Orcutt,197600.00,4,2,1378,143.40,Foreclosure 741 | 154508, Santa Maria-Orcutt,355000.00,2,1,1145,310.04,Regular 742 | 154510, Paso Robles,339900.00,3,2,1325,256.53,Regular 743 | 154512, Santa Maria-Orcutt,299000.00,3,3,1850,161.62,Regular 744 | 154513,Soledad,166800.00,4,2,1765,94.50,Foreclosure 745 | 154515,Grover Beach,379000.00,4,2,1631,232.37,Short Sale 746 | 154516,Santa Ynez,1395000.00,4,4,2693,518.01,Short Sale 747 | 154517,Santa Maria-Orcutt,150000.00,3,2,1316,113.98,Short Sale 748 | 154518, San Luis Obispo,475000.00,3,2,1382,343.70,Regular 749 | 154519,Santa Maria-Orcutt,265000.00,4,3,2300,115.22,Foreclosure 750 | 154520,Atascadero,265000.00,3,2,1617,163.88,Short Sale 751 | 154521, Los Osos,225000.00,2,2,1150,195.65,Regular 752 | 154522,Paso Robles,249900.00,2,2,1674,149.28,Foreclosure 753 | 154523, Arroyo Grande,509000.00,3,2,1543,329.88,Regular 754 | 154525, Paso Robles,214900.00,2,2,1351,159.07,Regular 755 | 154526, Arroyo Grande,5499000.00,4,5,5060,1086.76,Regular 756 | 154528, Santa Maria-Orcutt,349900.00,3,2,2000,174.95,Regular 757 | 154530, Solvang,125000.00,2,2,1536,81.38,Regular 758 | 154531,Cambria,549000.00,2,2,924,594.16,Short Sale 759 | 154532, Cambria,865000.00,3,3,1860,465.05,Regular 760 | 154533, Bradley,1600000.00,3,3,2640,606.06,Regular 761 | 154534, Nipomo,1065000.00,4,4,3395,313.70,Regular 762 | 154536,Templeton,625000.00,3,2,1850,337.84,Foreclosure 763 | 154538, Santa Maria-Orcutt,249999.00,3,2,1000,250.00,Regular 764 | 154539, Arroyo Grande,975000.00,4,3,2720,358.46,Regular 765 | 154541,Oceano,204900.00,2,1,992,206.55,Short Sale 766 | 154546, Atascadero,355000.00,3,2,1737,204.38,Regular 767 | 154547,Out Of Area,134900.00,3,3,1435,94.01,Regular 768 | 154548,Santa Maria-Orcutt,199900.00,5,3,1671,119.63,Short Sale 769 | 154550,Santa Maria-Orcutt,349900.00,4,3,2800,124.96,Short Sale 770 | 154553,Santa Maria-Orcutt,99000.00,2,2,900,110.00,Foreclosure 771 | 154554,Coalinga,409000.00,4,3,2507,163.14,Short Sale 772 | 154556, Pismo Beach,339000.00,2,2,1440,235.42,Regular 773 | 154557, San Miguel,595000.00,3,3,2238,265.86,Regular 774 | 154558, Pismo Beach,849500.00,3,3,2725,311.74,Regular 775 | 154559, Paso Robles,399000.00,2,3,1772,225.17,Regular 776 | 154560, Paso Robles,399000.00,4,2,1947,204.93,Regular 777 | 154561, Solvang,525000.00,3,2,1720,305.23,Regular 778 | 154562, Paso Robles,319900.00,3,3,1605,199.31,Regular 779 | 154565, Paso Robles,495000.00,3,2,1877,263.72,Regular 780 | 154566,San Luis Obispo,372000.00,3,2,1104,336.96,Foreclosure 781 | 154575, Arroyo Grande,589000.00,3,2,1975,298.23,Regular 782 | 154580, Cambria,1100000.00,3,3,2392,459.87,Regular 783 | -------------------------------------------------------------------------------- /in/prime_nums.text: -------------------------------------------------------------------------------- 1 | 2 3 5 7 11 13 17 19 23 29 2 | 31 37 41 43 47 53 59 61 67 71 3 | 73 79 83 89 97 101 103 107 109 113 4 | 127 131 137 139 149 151 157 163 167 173 5 | 179 181 191 193 197 199 211 223 227 229 6 | 233 239 241 251 257 263 269 271 277 281 7 | 283 293 307 311 313 317 331 337 347 349 8 | 353 359 367 373 379 383 389 397 401 409 9 | 419 421 431 433 439 443 449 457 461 463 10 | 467 479 487 491 499 503 509 521 523 541 11 | -------------------------------------------------------------------------------- /in/uk-makerspaces-identifiable-data.csv: -------------------------------------------------------------------------------- 1 | Timestamp,Collected by,Name of makerspace,Email address,Postcode,Date your space opened (or plans to open),Date your space closed (if it is no longer running),cost to member/user per month,Sculpture,Do you have a materials shop?,Do you keep a list of members or regular users?,cluster type by size,Have you adopted a code of conduct?,Gender balance of members or regular users [Female],Gender balance of members or regular users [Male],Gender balance of members or regular users [Other],Gender balance of members or regular users [Prefer not to say],What ethnic groups are represented amongst your membership? [White],What ethnic groups are represented amongst your membership? [Mixed or multiple ethnic groups],What ethnic groups are represented amongst your membership? [Asian or Asian British],What ethnic groups are represented amongst your membership? [Other ethnic group],Total visits in November 2014,Unique users in November 2014,User types in November 2014 [Visitors or observers],User types in November 2014 [Hobbyist],User types in November 2014 [Startups],User types in November 2014 [Sole traders/Microbusinesses],User types in November 2014 [SMEs],User types in November 2014 [Students],User types in November 2014 [Teachers],User types in November 2014 [Other / don't know],Purpose of user visits in November 2014 [Introduction to making],Purpose of user visits in November 2014 [Make something specific],Purpose of user visits in November 2014 [Prototype],Purpose of user visits in November 2014 [Make one-off pieces],Purpose of user visits in November 2014 [Small batch production],Purpose of user visits in November 2014 [Socialise],Purpose of user visits in November 2014 [Other (detail below)],Do you produce accounts? 4-Jan-15,Makerspace. Edited by Researcher,Hub Workshop,info@hubworkshop.com,SE15 3SN,,,from 20 - 75,,,Yes,unknown,,Prefer not to say,Prefer not to say,Prefer not to say,Prefer not to say,Don't know,Don't know,Don't know,Don't know,n/a not open,n/a not open,,,,,,,,,,,,,,,, 5-Jan-15,Makerspace. Edited by Researcher,Nottingham Hackspace (Nottinghack),trustees@nottinghack.org.uk,NG3 1JH,,,?,Yes,No,Yes,large,Yes,10-19%,80-89%,<10%,,80-89%,<10%,<10%,<10%,,,,,,,,,,Don't know,,,,,,,, 5-Jan-15,Researcher,Farset Labs,info@farsetlabs.org.uk,BT12 5GH,1/4/12,,,,,,unknown,,,,,,,,,,,,,,,,,,,,,,,,,,, 8-Jan-15,Makerspace,Medway Makers,tomdehavas@gmail.com,ME4 3JE,,,0,,No,Yes,small,No,20-29%,,,,,,,,,,,40-49%,20-29%,,20-29%,20-29%,,,20-29%,,,,,20-29%,, 8-Jan-15,Makerspace,fizzPop,fizzpop.makers@gmail .com,B5 5SR,18/07/2013,,Oct-40,,No,Yes,medium,No,10-19%,70-79%,,,70-79%,,,,,,,,,,,,,Don't know,,,,,,,Don't know,Yes 8-Jan-15,Makerspace. Edited by Researcher,South London Makerspace,trustees@southlondonmakerspace.org,SE24 9AA,28/02/2015,31/07/2014,20,,No,Yes,small,No,10-19%,80-89%,Don't know,Don't know,90-100%,<10%,<10%,<10%,100-250,0-10,10-19%,90-100%,< 10%,< 10%,< 10%,< 10%,< 10%,< 10%,,,,,,20-29%,90-100%,Yes 8-Jan-15,Researcher,Create Space London ,,HA9 6DE,,,,,,,unknown,,,,,,,,,,,,,,,,,,,,,,,,,,, 8-Jan-15,Researcher,FounderHub,info@foundershub.co.uk,CF10 1DY,14/10/2014,,,,,,unknown,,,,,,,,,,,,,,,,,,,,,,,,,,, 8-Jan-15,Researcher,LuneLab Makerspace,contactus@lunelab.org.uk, LA2 6ND,1/4/14,,,,,,unknown,,,,,,,,,,,,,,,,,,,,,,,,,,, 9-Jan-15,Makerspace,The Shed,cstheshed@kent.ac.uk,CT2 7NF,1/10/14,,1,,Yes,Yes,unknown,No,60-69%,40-49%,,,90-100%,,,,250-1000,250-1000,20-29%,,,,,70-79%,40-49%,,20-29%,,40-49%,40-49%,,40-49%,70-79%,Yes 11-Jan-15,Makerspace. Edited by Researcher,Build Brighton,info@buildbrighton.com,BN2 4AB,1/9/11,,5,,Yes,Yes,large,Yes,10-19%,80-89%,<10%,,80-89%,<10%,<10%,<10%,100-250,50-100,50-59%,50-59%,< 10%,< 10%,< 10%,30-39%,10-19%,< 10%,50-59%,20-29%,20-29%,30-39%,10-19%,30-39%,Don't know,Yes 13-Jan-15,Makerspace. Edited by Researcher,Makespace, info@makespace.org,CB2 1RX,1/3/13,,40,,Yes,Yes,large,Yes,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,,100-250,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,<10%,30-39%,30-39%,30-39%,<10%,20-29%,,Yes 15-Jan-15,Makerspace,Swansea Hackspace,info@swansea.hackspace.org.uk,SA1 1DP,23/06/2014,,10,,Yes,Yes,small,Yes,<10%,90-100%,,,90-100%,,,,0-10,10 to 50,< 10%,80-89%,,,,< 10%,,,,,,,,50-59%,,Yes 15-Jan-15,Makerspace. Edited by Researcher,57North (previously Hackerdeen) ,contact@57north.co,AB11 5BN,5/10/13,,20,,No,Yes,small,No,<10%,80-89%,10-19%,<10%,90-100%,,,,50-100,10 to 50,< 10%,80-89%,,,,< 10%,,< 10%,<10%,<10%,90-100%,,,90-100%,,Yes 15-Jan-15,Makerspace,BEC Fab Lab ,Becfablab@gmail.com,CA13 0HT,5/1/14,,,,Yes,Yes,small,Yes,50-59%,50-59%,,,90-100%,,,Don't know,50-100,50-100,10-19%,10-19%,10-19%,10-19%,10-19%,< 10%,< 10%,,10-19%,20-29%,10-19%,10-19%,<10%,Don't know,,Yes 15-Jan-15,Makerspace,Dundee MakerSpace,info@dundeemakerspace.co.uk ,DD1 4QB,1/9/14,,25-May,,Yes,Yes,small,Yes,10-19%,80-89%,,,90-100%,,,,10 to 50,10 to 50,10-19%,50-59%,,,,20-29%,,< 10%,10-19%,10-19%,10-19%,,,10-19%,,Yes 15-Jan-15,Makerspace. Edited by Researcher,EPIK,0208 0993608,CT3 4GP,1/1/13,,,,No,,large,Yes,20-29%,20-29%,60-69%,,80-89%,<10%,<10%,<10%,0-10,0-10,< 10%,< 10%,< 10%,< 10%,< 10%,< 10%,< 10%,< 10%,80-89%,,,,,80-89%,,Yes 15-Jan-15,Makerspace,Fab Lab Nerve Centre,e.durey@nervecentre.org,BT48 6HJ,7/1/12,,,,No,Yes,large,Yes,40-49%,60-69%,,,80-89%,<10%,<10%,,250-1000,,10-19%,40-49%,< 10%,< 10%,< 10%,20-29%,10-19%,20-29%,30-39%,50-59%,20-29%,,<10%,10-19%,,Yes 15-Jan-15,Makerspace. Edited by Researcher,fablab@strathclyde,fablab@strath.ac.uk,G1 1XJ,20/08/2013,,,,Yes,Yes,medium,Yes,,,,<10%,,,,,250-1000,10 to 50,< 10%,10-19%,,,,90-100%,< 10%,,90-100%,90-100%,20-29%,80-89%,10-19%,10-19%,,Yes 15-Jan-15,Makerspace. Edited by Researcher,MakerspaceFY1 (Blackpool Linux user group),admin@pcrecycler.co.uk,FY1 4DY,,,,,No,No,unknown,No,<10%,90-100%,,,,,,,10 to 50,10 to 50,,,,,,,,,,,,,,90-100%,,No 15-Jan-15,Makerspace,piel view hackers,info@octopuscollective.org,LA13 9BD,,,3-Aug,,No,,unknown,No,30-39%,70-79%,,,90-100%,,,,,,,,,,,,,,,,,,,,, 15-Jan-15,Researcher,Leicester Hackspace,info@leicesterhackspace.org.uk,LE1 1SB,1/3/14,,,,,,unknown,,,,,,,,,,,,,,,,,,,,,,,,,,, 15-Jan-15,Researcher,Potteries Hackspace,,ST5 2HN,1/8/14,,,,,,unknown,,,,,,,,,,,,,,,,,,,,,,,,,,, 16-Jan-15,Makerspace,Newport Makers Club,,NP20 1HG,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 16-Jan-15,Makerspace. Edited by Researcher,RARA Cooperative (redundant architects recreation association),rara.ale@gmail.com,E5 9ND,2/9/08,,150,,No,Yes,small,Yes,50-59%,40-49%,,,80-89%,10-19%,<10%,,,,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Yes 16-Jan-15,Makerspace. Edited by Researcher,Open Hub,openhubwrenna@gmail.com,DY1 3PD,3/11/15,,,,No,Yes,medium,No,70-79%,20-29%,,,30-39%,30-39%,<10%,<10%,,10 to 50,< 10%,,,,,,,,,,,,,,<10%,No 16-Jan-15,Makerspace,Lancaster And Morecambe Makers LAMM (lancaster maker lab),,LA1 4XQ,28/03/2015,,,,No,Yes,small,No,10-19%,70-79%,,<10%,90-100%,,,,0-10,0-10,,,,,,,,Don't know,,,,,,,,Yes 16-Jan-15,Makerspace. Edited by Researcher,Makernow,makernow@falmouth.ac.uk,TR10 9EZ,1/9/13,,,,Yes,Yes,medium,Yes,20-29%,60-69%,,,80-89%,<10%,<10%,<10%,10 to 50,10 to 50,,30-39%,< 10%,20-29%,,< 10%,< 10%,,40-49%,<10%,<10%,,,,,Yes 16-Jan-15,Makerspace. Edited by Researcher,Richmond MakerLabs,support@richmond.ml,TW10 7NY,17/09/2013,,,,No,No,small,No,<10%,,,,,,,,10 to 50,0-10,90-100%,90-100%,,,,,,,,,,<10%,<10%,<10%,<10%,No 19-Jan-15,Makerspace. Edited by Researcher,Camden Town Shed,mike@camdentownshed.org,NW1 9XZ,26/04/2011,,,,No,Yes,small,No,,90-100%,,,80-89%,,,,50-100,10 to 50,,90-100%,,,,,,,,,,80-89%,,<10%,,Yes 19-Jan-15,Makerspace,Blackhorse Workshop,info@blackhorseworkshop.co.uk,E17 6BX,1/2/14,,,,No,Yes,large,No,20-29%,80-89%,,,70-79%,<10%,10-19%,10-19%,50-100,10 to 50,< 10%,20-29%,10-19%,30-39%,10-19%,20-29%,< 10%,,20-29%,20-29%,20-29%,30-39%,20-29%,10-19%,,Yes 20-Jan-15,Makerspace. Edited by Researcher,FabLab Cardiff,hello@fablabcardiff.com,CF5 2YB,27/09/2014,,,Available in workshop in same building,Yes,Yes,small,Yes,20-29%,70-79%,,,80-89%,10-19%,,,50-100,10 to 50,70-79%,10-19%,< 10%,10-19%,< 10%,< 10%,,,20-29%,20-29%,40-49%,40-49%,30-39%,10-19%,,Yes 21-Jan-15,Makerspace. Edited by Researcher,Leigh Hackspace,info@leighhack.org,WN7 1DR,31/01/2015,,,,No,Yes,small,No,<10%,90-100%,,,90-100%,<10%,<10%,<10%,0-10,10 to 50,10-19%,< 10%,< 10%,< 10%,< 10%,< 10%,10-19%,< 10%,10-19%,50-59%,10-19%,50-59%,<10%,80-89%,,Yes 23-Jan-15,Makerspace,The Waiting Room,hello@st-botolphs.org,CO1 2PQ,17/08/2013,,,,No,Yes,medium,Yes,60-69%,30-39%,,,,,,,250-1000,100-250,,30-39%,,30-39%,,30-39%,,,10-19%,20-29%,,<10%,,60-69%,,No 26-Jan-15,Makerspace,MadLab (manchester),office@madlab.org.uk,M4 1HN,1/7/09,,,,Yes,Yes,large,No,30-39%,50-59%,,,70-79%,<10%,<10%,,5000+,1000-5000,20-29%,20-29%,20-29%,< 10%,10-19%,10-19%,< 10%,,80-89%,<10%,,,,50-59%,,Yes 27-Jan-15,Makerspace,DoES Liverpool,hello@doesliverpool.com,L1 4LN,,,,,Yes,Yes,medium,Yes,10-19%,80-89%,,,80-89%,<10%,<10%,<10%,100-250,50-100,,,,,,,,,,,,,,,,Yes 27-Jan-15,Makerspace,Manchester FabLab,info@fablabmanchester.org,M4 6BU,1/4/11,,,,Yes,Yes,large,Yes,40-49%,60-69%,,,70-79%,<10%,20-29%,,250-1000,250-1000,,60-69%,< 10%,< 10%,< 10%,20-29%,10-19%,,,30-39%,10-19%,10-19%,<10%,<10%,,Yes 28-Jan-15,Makerspace. Edited by Researcher,resource,info@resource-hwu.org,TD1 3HF,1/4/14,,,,No,Yes,small,No,90-100%,<10%,,,Don't know,,,,50-100,,,< 10%,< 10%,70-79%,,< 10%,,,,60-69%,,,20-29%,,,No 30-Jan-15,Makerspace. Edited by Researcher,So Make It ,join@somakeit.org.uk,SO15 3FQ,1/3/13,,20-May,,No,Yes,medium,Yes,10-19%,80-89%,<10%,<10%,80-89%,<10%,<10%,<10%,100-250,10 to 50,10-19%,80-89%,< 10%,< 10%,< 10%,< 10%,< 10%,< 10%,<10%,30-39%,<10%,10-19%,<10%,40-49%,<10%,Yes 30-Jan-15,Researcher,Access space,,S1 4RG,1/8/10,,,,Yes,,unknown,Yes,,,,,,,,,,,,,,,,,,,,,,,,,, 1-Feb-15,Makerspace,Cheltenham Hackspace,hello@cheltenhamhackspace.org,GL51 7SD,,,0,,No,Yes,small,No,10-19%,90-100%,,,90-100%,,,,50-100,10 to 50,< 10%,80-89%,,,,10-19%,,,,50-59%,50-59%,,,90-100%,,Yes 2-Feb-15,Makerspace. Edited by Researcher,Multi-Skills Workshop,multi-skills@btconnect.com,BN26 6JF,1/5/12,,8 per hour,,Yes,Yes,medium,No,40-49%,60-69%,,,80-89%,,,,100-250,50-100,,70-79%,,< 10%,,20-29%,,,,20-29%,<10%,<10%,<10%,<10%,,Yes 2-Feb-15,Makerspace,Hitchin Hackspace,info@hackhitchin.org.uk,SG5 1RB,5/3/12,,10,,No,Yes,small,No,<10%,90-100%,,,90-100%,<10%,<10%,<10%,250-1000,10 to 50,< 10%,80-89%,10-19%,10-19%,< 10%,10-19%,10-19%,10-19%,70-79%,70-79%,60-69%,30-39%,<10%,40-49%,,No 3-Feb-15,Makerspace. Edited by Researcher,Eagle House Pop-Up Furniture Factory,justin.ricks@kwmc.org.uk,BS4 1NL,1/11/14,,0,,No,Yes,small,No,50-59%,50-59%,,,80-89%,20-29%,,,100-250,10 to 50,80-89%,,10-19%,,,,,,,,,,,,,Yes 3-Feb-15,Makerspace,Coventry Makerspace,coventrymakerspace@gmail.com,CV1 3JQ,,,,,No,Yes,unknown,Yes,,,,,,,,,,,,,,,,,,,,,,,,,,Yes 4-Feb-15,Makerspace. Edited by Researcher,MakeSpace at the Institute of Making,hello@instituteofmaking.org.uk,WC1E 7JE,16/12/2012,,0,,No,Yes,large,Yes,40-49%,50-59%,,,,,,,5000+,,30-39%,< 10%,< 10%,,,30-39%,20-29%,,40-49%,,30-39%,20-29%,,10-19%,,Yes 4-Feb-15,Makerspace,FabLabDevon,hello@fablabdevon.org,EX4 3PQ,22/05/2014,,,,Yes,Yes,unknown,Yes,,,,,,,,,100-250,10 to 50,,,,,,,,,,,,,,,,No 6-Feb-15,Makerspace,Building Bloqs,info@buildingbloqs.com,N18 3QT,1/5/13,,40,,Yes,Yes,medium,No,10-19%,80-89%,,,80-89%,10-19%,<10%,,50-100,,,< 10%,10-19%,70-79%,,10-19%,< 10%,,20-29%,90-100%,<10%,90-100%,10-19%,60-69%,30-39%,Yes 6-Feb-15,Makerspace. Edited by Researcher,Machines Room,machinesroom@limewharf.org,E2 9DQ,1/7/14,,5 - 200,can use cnc machines or 3D printers for creation of 3D models (though cnc's are 3-axis which can prove difficult in recreating a truly 3D object),Yes,Yes,large,Yes,50-59%,50-59%,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,250-1000,10 to 50,10-19%,50-59%,< 10%,20-29%,< 10%,40-49%,< 10%,Don't know,30-39%,20-29%,30-39%,30-39%,20-29%,20-29%,30-39%, 6-Feb-15,Makerspace,Maker Club,hello@makerclub.org,BN1 41J,30/03/2015,,,,No,Yes,small,Yes,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,0-10,0-10,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Yes 6-Feb-15,Makerspace. Edited by Researcher,MakersCAFE,hello@makerscafe.com,E2 8AA,20/08/2014,,,,Yes,Yes,unknown,No,Don't know,Don't know,,,Don't know,Don't know,Don't know,,100-250,50-100,80-89%,,50-59%,70-79%,,80-89%,,,70-79%,80-89%,80-89%,80-89%,80-89%,80-89%,,Yes 7-Feb-15,Makerspace. Edited by Researcher,London Hackspace,contact@london.hackspace.org.uk,E2 9DY,2/11/09,,5,Stoneworking Easel,Yes,Yes,large,Yes,20-29%,60-69%,Don't know,Don't know,50-59%,10-19%,10-19%,10-19%,5000+,250-1000,10-19%,30-39%,20-29%,10-19%,,20-29%,,10-19%,30-39%,60-69%,60-69%,50-59%,30-39%,50-59%,,Yes 8-Feb-15,Makerspace. Edited by Researcher,Derby Makers,chair@derbymakers.com,DE1 3AF,1/11/13,,4,,No,Yes,small,No,30-39%,60-69%,,,,,,,,,,,,,,,,,,,,,,,,Yes 9-Feb-15,Makerspace,Duke Studios,HELLO@DUKE-STUDIOS.COM,LS9 8AG,1/5/11,,,,No,Yes,medium,Yes,40-49%,50-59%,,,Don't know,Don't know,Don't know,Don't know,,,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,Yes 10-Feb-15,Makerspace. Edited by Researcher,API - Arloesi Pontio Innovation,w.griffith@bangor.ac.uk,LL57 1UT,1/3/15,,,,No,Yes,unknown,Yes,,,,,,,,,0-10,0-10,,,,,,,,,,,,,,,,Yes 11-Feb-15,Makerspace,The Goodlife Centre Ltd,alison@thegoodlifecentre.co.uk,SE1 0QL,10/4/10,,,,No,No,unknown,No,,,,,,,,,,,,,,,,,,,90-100%,,,,,,,Yes 11-Feb-15,Makerspace,Tiree Tech Wave,alan@hcibook.com,PA77 6UR,15/03/2011,,,,No,Yes,medium,No,20-29%,80-89%,,,90-100%,<10%,,,0-10,10 to 50,30-39%,10-19%,10-19%,10-19%,< 10%,50-59%,30-39%,,20-29%,20-29%,30-39%,30-39%,<10%,90-100%,50-59%,No 12-Feb-15,Makerspace,Hatch,info@3space.org,OX1 2HF,1/1/15,,,,No,Yes,small,Yes,30-39%,50-59%,,,80-89%,,10-19%,,0-10,0-10,,,50-59%,,,10-19%,,40-49%,,,,,,,,Yes 12-Feb-15,Makerspace,Creative Reuse Centre March,admin@ccorrn.org.uk,PE15 8QP,15/05/2015,,,,Yes,Yes,unknown,Yes,,,,<10%,,,,,,,,,,,,,,,,,,,,,,Yes 13-Feb-15,Makerspace,London Sculpture Workshop,info@londonsculptureworkshop.org,SE1 5SF,1/9/12,,,Variety of tools as detailed previously.,No,Yes,large,No,50-59%,40-49%,,,,90-100%,,,250-1000,100-250,40-49%,50-59%,Don't know,Don't know,Don't know,40-49%,30-39%,20-29%,70-79%,90-100%,80-89%,80-89%,30-39%,<10%,,Yes 13-Feb-15,Makerspace,RLab - Reading Hackspace,matt+rlab@daubers.co.uk,RG1 7BX,12/12/13,,,Chisels,Yes,Yes,medium,Yes,<10%,90-100%,Don't know,Don't know,Don't know,Don't know,Don't know,Don't know,100-250,10 to 50,< 10%,60-69%,< 10%,< 10%,< 10%,20-29%,10-19%,,<10%,50-59%,<10%,<10%,<10%,10-19%,<10%,Yes 13-Feb-15,Makerspace. Edited by Researcher,Creative Work Spaces,Fiona.tarn@carillionservices.co.uk,UB5 5AS,,,20-May,,,,unknown,Yes,,,,,,,,,,,,,,,,,,,,,,,,,, 14-Feb-15,Makerspace,York Hackspace,makers@york.hackspace.org.uk,YO23 1AB,16/09/2011,,,,No,No,small,No,10-19%,80-89%,,,90-100%,,,,0-10,0-10,< 10%,90-100%,< 10%,,,< 10%,,,<10%,,,<10%,,90-100%,,No 15-Feb-15,Makerspace,Bristol Hackspace,info@bristol.hackspace.org.uk,BS3 4EA,1/11/09,,20-Oct,,No,Yes,medium,No,<10%,90-100%,<10%,Don't know,80-89%,<10%,<10%,<10%,50-100,10 to 50,< 10%,80-89%,< 10%,Don't know,Don't know,10-19%,Don't know,10-19%,30-39%,30-39%,Don't know,Don't know,<10%,50-59%,Don't know,Yes 16-Feb-15,Makerspace,Maker Space,http://www.makerspace.org.uk/contact/,NE1 8AW,5/5/12,,,,No,Yes,unknown,No,10-19%,80-89%,,,80-89%,<10%,<10%,<10%,100-250,50-100,50-59%,50-59%,,,,,,,60-69%,60-69%,,,,60-69%,,No 17-Feb-15,Makerspace,Fab Lab London,hello@fablablondon.org,EC2R 8AE,19/09/2014,,36,,Yes,Yes,large,Yes,40-49%,40-49%,,,40-49%,,20-29%,<10%,250-1000,100-250,10-19%,,20-29%,20-29%,,,10-19%,,,10-19%,10-19%,<10%,<10%,10-19%,,Yes 17-Feb-15,Makerspace,Swindon Hackspace,,SN1 1QN,1/7/10,,,,No,Yes,small,No,10-19%,80-89%,<10%,<10%,90-100%,,,,50-100,10 to 50,20-29%,80-89%,,,,< 10%,< 10%,,20-29%,70-79%,70-79%,20-29%,<10%,50-59%,,No 18-Feb-15,Makerspace,FabLab NorthEast / Sunderland,,SR1 3QJ,1/5/15,,,,,Yes,unknown,Yes,,,,,,,,,,,,,,,,,,,,,,,,,, 18-Feb-15,Makerspace,Leeds Hackspace,directors@leedshackspace.org.uk,LS9 7DS,4/5/12,,25,,No,Yes,medium,No,<10%,90-100%,Don't know,Don't know,90-100%,<10%,<10%,Don't know,10 to 50,10 to 50,90-100%,90-100%,< 10%,< 10%,< 10%,50-59%,20-29%,Don't know,30-39%,40-49%,30-39%,50-59%,10-19%,80-89%,Don't know,No 19-Feb-15,Makerspace. Edited by Researcher,Make:Bromyard,info@makebromyard.org.uk,HR7 4DU,19/02/2015,,20,,No,Yes,small,No,30-39%,60-69%,,,90-100%,,,,0-10,0-10,,,,,,,,Don't know,,,,,,,Don't know,Yes 19-Feb-15,Makerspace. Edited by Researcher,Lincoln Hackspace,Lincolnhackspae@live.co.uk,LN6 3RU,31/03/2015,30/11/2013,20,,No,Yes,small,Yes,10-19%,80-89%,,,80-89%,,<10%,,10 to 50,0-10,,80-89%,< 10%,< 10%,,< 10%,,,,50-59%,10-19%,,,90-100%,,No 25-Feb-15,Makerspace. Edited by Researcher,Makerversity,christina@makerversity.org,WC2R 1LA,11/9/13,,,,No,Yes,large,No,,,,,,,,,100-250,10 to 50,,,,,,,,,,,,,,,,Yes 25-Feb-15,Makerspace,Eastbourne Shed,oscarplumley@ageconcerneastbourne.co.uk,BN22 7SP,26/03/2015,,,Wood Carving equipment,Yes,Yes,unknown,Yes,<10%,90-100%,,,90-100%,,,,,,,,,,,,,,,,,,,,,No 26-Feb-15,Makerspace. Edited by Researcher,The Old School Club,info@theoldschoolclub.co.uk,SW11 5QL,10/6/13,,,,Yes,Yes,small,No,90-100%,,,,80-89%,,,,10 to 50,10 to 50,,50-59%,,,,50-59%,,,10-19%,20-29%,,,,50-59%,,Yes 27-Feb-15,Makerspace,Remakery,people@remakery.org,SE5 9HY,6/1/14,,Oct-98,,Yes,Yes,large,Yes,50-59%,50-59%,Don't know,Don't know,50-59%,<10%,<10%,<10%,100-250,50-100,10-19%,20-29%,10-19%,40-49%,< 10%,< 10%,< 10%,< 10%,10-19%,40-49%,10-19%,20-29%,10-19%,40-49%,,Yes 28-Feb-15,Researcher,Men in Sheds MK,info@meninshedsmk.og.uk,MK11 3HB,,,12,,,,small,,,,,,,,,,,,,,,,,,,,,,,,,,, 28-Feb-15,Researcher,Fab Lab Liverpool,,L3 5YD,,,,,,,unknown,,,,,,,,,,,,,,,,,,,,,,,,,,, 28-Feb-15,Researcher,Create Labs Scotland,reception@stepstirling.co.uk,FK7 7RP,,,,,,,unknown,,,,,,,,,,,,,,,,,,,,,,,,,,, 28-Feb-15,Researcher,Surrey & Hampshire Hackspace,,GU14 7SS,,,,,,,unknown,,,,,,,,,,,,,,,,,,,,,,,,,,, 8-Mar-15,Makerspace,GIMPS (Gadlys Inventors Makers & Promulgation Society ),,CF44 8AD,21/10/2014,,,,No,Yes,small,No,,,,,,,,,,,,,,,,,,,,,,,,,, 8-Mar-15,Makerspace. Edited by Researcher,Make Aberdeen,info@make-aberdeen.com,AB10 1JR,,,,,,,unknown,,,,,,,,,,,,,,,,,,,,,,,,,,, 8-Mar-15,Researcher,Edinburgh Hacklab, info@edinburghhacklab.com, EH9 1PL,,,,,,,unknown,,,,,,,,,,,,,,,,,,,,,,,,,,, 8-Mar-15,Researcher,Ellesmere Port Fab lab, info@fablabep.org,CH65 8AB,18/07/2013,,,,Yes,Yes,unknown,,,,,,,,,,,,,,,,,,,,,,,,,,, 8-Mar-15,Researcher,Fab Lab Airedale,Enquiries@fablabairedale.org,BD21 4HQ,1/2/12,,,,Yes,,unknown,,,,,,,,,,,,,,,,,,,,,,,,,,, 8-Mar-15,Researcher,Fab Lab Plymouth,fablab@pca.ac.uk,PL4 8AT,9/12/14,,,,,,unknown,,,,,,,,,,,,,,,,,,,,,,,,,,, 8-Mar-15,Researcher,Electron Club,,G2 3JD,29/07/2006,,,,,,unknown,,,,,,,,,,,,,,,,,,,,,,,,,,, 8-Mar-15,Researcher,hackspace cardiff,hackspace.cardiff@gmail.com,CF5 4AR,27/08/2014,,,,,Yes,small,,<10%,90-100%,,,,,,,,,,,,,,,,,,,,,,,, 8-Mar-15,Researcher,Hackspace Manchester Hack Man,,M4 1HN,1/7/10,,,,No,,unknown,,,,,,,,,,,,,,,,,,,,,,,,,,, 8-Mar-15,Researcher,MakLab,hello@maklab.co.uk,G3 6UJ,9/6/11,,,,,,unknown,,,,,,,,,,,,,,,,,,,,,,,,,,, 8-Mar-15,Researcher,Sheffield Hardware Hackers and Makers,admins@sheffieldhardwarehackers.org.uk,S2 4SJ,20/02/2015,,,,,Yes,unknown,,,,,,,,,,,,,,,,,,,,,,,,,,, 8-Mar-15,Researcher,T-Exchange/Moray Maker Space,,IV36 3YR ,1/1/12,,,,No,Yes,medium,,,,,,,,,,,,,,,,,,,,,,,,,,, 9-Mar-15,Makerspace,Fablab Belfast,patrick.ohare@ashtoncentre.com,BT15 2BP,9/4/12,,,none,Yes,Yes,large,Yes,40-49%,40-49%,10-19%,<10%,80-89%,,<10%,<10%,50-100,50-100,< 10%,50-59%,20-29%,< 10%,< 10%,70-79%,30-39%,,80-89%,80-89%,70-79%,80-89%,20-29%,<10%,,Yes 10-Mar-15,Makerspace. Edited by Researcher,Imperial College Advanced Hackspace,icah@imperial.ac.uk,SW7 2AZ,5/5/14,,,,No,Yes,large,Yes,20-29%,70-79%,,,40-49%,20-29%,10-19%,20-29%,100-250,50-100,,,,,,70-79%,20-29%,< 10%,50-59%,80-89%,80-89%,40-49%,40-49%,20-29%,,Yes 16-Mar-15,Makerspace,Oxhack,,OX1 1NJ,11/7/13,,10,None particularly for this use.,No,Yes,medium,No,<10%,90-100%,,,90-100%,<10%,<10%,<10%,100-250,10 to 50,10-19%,80-89%,10-19%,10-19%,< 10%,< 10%,< 10%,< 10%,10-19%,10-19%,<10%,10-19%,<10%,80-89%,<10%,Yes -------------------------------------------------------------------------------- /in/uppercase.text: -------------------------------------------------------------------------------- 1 | The history of New York begins around 10,000 BC, when the first Native Americans arrived. By 1100 AD, New York's main native cultures, the Iroquoian and Algonquian, had developed. European discovery of New York was led by the French in 1524 and the first land claim came in 1609 by the Dutch. As part of New Netherland, the colony was important in the fur trade and eventually became an agricultural resource thanks to the patroon system. In 1626 the Dutch bought the island of Manhattan from Native Americans.[1] In 1664, England renamed the colony New York, after the Duke of York (later James II & VII.) New York City gained prominence in the 18th century as a major trading port in the Thirteen Colonies. 2 | 3 | New York played a pivotal role during the American Revolution and subsequent war. The Stamp Act Congress in 1765 brought together representatives from across the Thirteen Colonies to form a unified response to British policies. The Sons of Liberty were active in New York City to challenge British authority. After a major loss at the Battle of Long Island, the Continental Army suffered a series of additional defeats that forced a retreat from the New York City area, leaving the strategic port and harbor to the British army and navy as their North American base of operations for the rest of the war. The Battle of Saratoga was the turning point of the war in favor of the Americans, convincing France to formally ally with them. New York's constitution was adopted in 1777, and strongly influenced the United States Constitution. New York City was the national capital at various times between 1785 and 1790, where the Bill of Rights was drafted. Albany became the permanent state capital in 1797. In 1787, New York became the eleventh state to ratify the United States Constitution. 4 | 5 | New York hosted significant transportation advancements in the 19th century, including the first steamboat line in 1807, the Erie Canal in 1825, and America's first regularly scheduled rail service in 1831. These advancements led to the expanded settlement of western New York and trade ties to the Midwest settlements around the Great Lakes. 6 | 7 | Due to New York City's trade ties to the South, there were numerous southern sympathizers in the early days of the American Civil War and the mayor proposed secession. Far from any of the battles, New York ultimately sent the most men and money to support the Union cause. Thereafter, the state helped create the industrial age and consequently was home to some of the first labor unions. 8 | 9 | During the 19th century, New York City became the main entry point for European immigrants to the United States, beginning with a wave of Irish during their Great Famine. Millions came through Castle Clinton in Battery Park before Ellis Island opened in 1892 to welcome millions more, increasingly from eastern and southern Europe. The Statue of Liberty opened in 1886 and became a symbol of hope. New York boomed during the Roaring Twenties, before the Wall Street Crash of 1929, and skyscrapers expressed the energy of the city. New York City was the site of successive tallest buildings in the world from 1913–74. 10 | 11 | The buildup of defense industries for World War II turned around the state's economy from the Great Depression, as hundreds of thousands worked to defeat the Axis powers. Following the war, the state experienced significant suburbanization around all the major cities, and most central cities shrank. The Thruway system opened in 1956, signalling another era of transportation advances. 12 | 13 | Following a period of near–bankruptcy in the late 1970s, New York City renewed its stature as a cultural center, attracted more immigration, and hosted the development of new music styles. The city developed from publishing to become a media capital over the second half of the 20th century, hosting most national news channels and broadcasts. Some of its newspapers became nationally and globallyrenowned. The state's manufacturing base eroded with the restructuring of industry, and the state transitioned into service industries. 14 | 15 | The September 11 attacks of 2001 destroyed the World Trade Center, killing almost 3,000 people; they were the largest terrorist attacks on United States soil. -------------------------------------------------------------------------------- /in/word_count.text: -------------------------------------------------------------------------------- 1 | The history of New York begins around 10,000 BC, when the first Native Americans arrived. By 1100 AD, New York's main native cultures, the Iroquoian and Algonquian, had developed. European discovery of New York was led by the French in 1524 and the first land claim came in 1609 by the Dutch. As part of New Netherland, the colony was important in the fur trade and eventually became an agricultural resource thanks to the patroon system. In 1626 the Dutch bought the island of Manhattan from Native Americans.[1] In 1664, England renamed the colony New York, after the Duke of York (later James II & VII.) New York City gained prominence in the 18th century as a major trading port in the Thirteen Colonies. 2 | 3 | New York played a pivotal role during the American Revolution and subsequent war. The Stamp Act Congress in 1765 brought together representatives from across the Thirteen Colonies to form a unified response to British policies. The Sons of Liberty were active in New York City to challenge British authority. After a major loss at the Battle of Long Island, the Continental Army suffered a series of additional defeats that forced a retreat from the New York City area, leaving the strategic port and harbor to the British army and navy as their North American base of operations for the rest of the war. The Battle of Saratoga was the turning point of the war in favor of the Americans, convincing France to formally ally with them. New York's constitution was adopted in 1777, and strongly influenced the United States Constitution. New York City was the national capital at various times between 1785 and 1790, where the Bill of Rights was drafted. Albany became the permanent state capital in 1797. In 1787, New York became the eleventh state to ratify the United States Constitution. 4 | 5 | New York hosted significant transportation advancements in the 19th century, including the first steamboat line in 1807, the Erie Canal in 1825, and America's first regularly scheduled rail service in 1831. These advancements led to the expanded settlement of western New York and trade ties to the Midwest settlements around the Great Lakes. 6 | 7 | Due to New York City's trade ties to the South, there were numerous southern sympathizers in the early days of the American Civil War and the mayor proposed secession. Far from any of the battles, New York ultimately sent the most men and money to support the Union cause. Thereafter, the state helped create the industrial age and consequently was home to some of the first labor unions. 8 | 9 | During the 19th century, New York City became the main entry point for European immigrants to the United States, beginning with a wave of Irish during their Great Famine. Millions came through Castle Clinton in Battery Park before Ellis Island opened in 1892 to welcome millions more, increasingly from eastern and southern Europe. The Statue of Liberty opened in 1886 and became a symbol of hope. New York boomed during the Roaring Twenties, before the Wall Street Crash of 1929, and skyscrapers expressed the energy of the city. New York City was the site of successive tallest buildings in the world from 1913–74. 10 | 11 | The buildup of defense industries for World War II turned around the state's economy from the Great Depression, as hundreds of thousands worked to defeat the Axis powers. Following the war, the state experienced significant suburbanization around all the major cities, and most central cities shrank. The Thruway system opened in 1956, signalling another era of transportation advances. 12 | 13 | Following a period of near–bankruptcy in the late 1970s, New York City renewed its stature as a cultural center, attracted more immigration, and hosted the development of new music styles. The city developed from publishing to become a media capital over the second half of the 20th century, hosting most national news channels and broadcasts. Some of its newspapers became nationally and globallyrenowned. The state's manufacturing base eroded with the restructuring of industry, and the state transitioned into service industries. 14 | 15 | The September 11 attacks of 2001 destroyed the World Trade Center, killing almost 3,000 people; they were the largest terrorist attacks on United States soil. -------------------------------------------------------------------------------- /pairRdd/aggregation/combinebykey/AverageHousePriceSolution.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext, SparkConf 2 | 3 | if __name__ == "__main__": 4 | conf = SparkConf().setAppName("AverageHousePrice").setMaster("local") 5 | sc = SparkContext(conf = conf) 6 | 7 | lines = sc.textFile("in/RealEstate.csv") 8 | cleanedLines = lines.filter(lambda line: "Bedrooms" not in line) 9 | 10 | housePricePairRdd = cleanedLines.map(lambda line: (line.split(",")[3], float(line.split(",")[2]))) 11 | 12 | createCombiner = lambda x: (1, x) 13 | mergeValue = lambda avgCount, x: (avgCount[0] + 1, avgCount[1] + x) 14 | mergeCombiners = lambda avgCountA, avgCountB: (avgCountA[0] + avgCountB[0], avgCountA[1] + avgCountB[1]) 15 | 16 | housePriceTotal = housePricePairRdd.combineByKey(createCombiner, mergeValue, mergeCombiners) 17 | 18 | housePriceAvg = housePriceTotal.mapValues(lambda avgCount: avgCount[1] / avgCount[0]) 19 | for bedrooms, avgPrice in housePriceAvg.collect(): 20 | print("{} : {}".format(bedrooms, avgPrice)) 21 | -------------------------------------------------------------------------------- /pairRdd/aggregation/reducebykey/WordCount.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext, SparkConf 2 | 3 | if __name__ == "__main__": 4 | conf = SparkConf().setAppName("wordCounts").setMaster("local[3]") 5 | sc = SparkContext(conf = conf) 6 | 7 | lines = sc.textFile("in/word_count.text") 8 | wordRdd = lines.flatMap(lambda line: line.split(" ")) 9 | wordPairRdd = wordRdd.map(lambda word: (word, 1)) 10 | 11 | wordCounts = wordPairRdd.reduceByKey(lambda x, y: x + y) 12 | for word, count in wordCounts.collect(): 13 | print("{} : {}".format(word, count)) 14 | -------------------------------------------------------------------------------- /pairRdd/aggregation/reducebykey/housePrice/AverageHousePriceProblem.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext 2 | 3 | if __name__ == "__main__": 4 | 5 | ''' 6 | Create a Spark program to read the house data from in/RealEstate.csv, 7 | output the average price for houses with different number of bedrooms. 8 | 9 | The houses dataset contains a collection of recent real estate listings in San Luis Obispo county and 10 | around it.  11 | 12 | The dataset contains the following fields: 13 | 1. MLS: Multiple listing service number for the house (unique ID). 14 | 2. Location: city/town where the house is located. Most locations are in San Luis Obispo county and 15 | northern Santa Barbara county (Santa Maria­Orcutt, Lompoc, Guadelupe, Los Alamos), but there 16 | some out of area locations as well. 17 | 3. Price: the most recent listing price of the house (in dollars). 18 | 4. Bedrooms: number of bedrooms. 19 | 5. Bathrooms: number of bathrooms. 20 | 6. Size: size of the house in square feet. 21 | 7. Price/SQ.ft: price of the house per square foot. 22 | 8. Status: type of sale. Thee types are represented in the dataset: Short Sale, Foreclosure and Regular. 23 | 24 | Each field is comma separated. 25 | 26 | Sample output: 27 | 28 | (3, 325000) 29 | (1, 266356) 30 | (2, 325000) 31 | ... 32 | 33 | 3, 1 and 2 mean the number of bedrooms. 325000 means the average price of houses with 3 bedrooms is 325000. 34 | 35 | ''' 36 | -------------------------------------------------------------------------------- /pairRdd/aggregation/reducebykey/housePrice/AverageHousePriceSolution.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.insert(0, '.') 3 | from pyspark import SparkContext, SparkConf 4 | from pairRdd.aggregation.reducebykey.housePrice.AvgCount import AvgCount 5 | 6 | if __name__ == "__main__": 7 | conf = SparkConf().setAppName("avgHousePrice").setMaster("local[3]") 8 | sc = SparkContext(conf = conf) 9 | 10 | lines = sc.textFile("in/RealEstate.csv") 11 | cleanedLines = lines.filter(lambda line: "Bedrooms" not in line) 12 | 13 | housePricePairRdd = cleanedLines.map(lambda line: \ 14 | (line.split(",")[3], AvgCount(1, float(line.split(",")[2])))) 15 | 16 | housePriceTotal = housePricePairRdd \ 17 | .reduceByKey(lambda x, y: AvgCount(x.count + y.count, x.total + y.total)) 18 | 19 | print("housePriceTotal: ") 20 | for bedroom, avgCount in housePriceTotal.collect(): 21 | print("{} : ({}, {})".format(bedroom, avgCount.count, avgCount.total)) 22 | 23 | housePriceAvg = housePriceTotal.mapValues(lambda avgCount: avgCount.total / avgCount.count) 24 | print("\nhousePriceAvg: ") 25 | for bedroom, avg in housePriceAvg.collect(): 26 | print("{} : {}".format(bedroom, avg)) 27 | -------------------------------------------------------------------------------- /pairRdd/aggregation/reducebykey/housePrice/AvgCount.py: -------------------------------------------------------------------------------- 1 | class AvgCount(): 2 | 3 | def __init__(self, count: int, total: float): 4 | self.count = count 5 | self.total = total 6 | 7 | 8 | -------------------------------------------------------------------------------- /pairRdd/create/PairRddFromRegularRdd.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext, SparkConf 2 | 3 | if __name__ == "__main__": 4 | conf = SparkConf().setAppName("create").setMaster("local") 5 | sc = SparkContext(conf = conf) 6 | 7 | inputStrings = ["Lily 23", "Jack 29", "Mary 29", "James 8"] 8 | regularRDDs = sc.parallelize(inputStrings) 9 | 10 | pairRDD = regularRDDs.map(lambda s: (s.split(" ")[0], s.split(" ")[1])) 11 | pairRDD.coalesce(1).saveAsTextFile("out/pair_rdd_from_regular_rdd") 12 | -------------------------------------------------------------------------------- /pairRdd/create/PairRddFromTupleList.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext, SparkConf 2 | 3 | if __name__ == "__main__": 4 | conf = SparkConf().setAppName("create").setMaster("local") 5 | sc = SparkContext(conf = conf) 6 | 7 | tuples = [("Lily", 23), ("Jack", 29), ("Mary", 29), ("James", 8)] 8 | pairRDD = sc.parallelize(tuples) 9 | 10 | pairRDD.coalesce(1).saveAsTextFile("out/pair_rdd_from_tuple_list") 11 | -------------------------------------------------------------------------------- /pairRdd/filter/AirportsNotInUsaProblem.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext 2 | 3 | if __name__ == "__main__": 4 | 5 | ''' 6 | Create a Spark program to read the airport data from in/airports.text; 7 | generate a pair RDD with airport name being the key and country name being the value. 8 | Then remove all the airports which are located in United States and output the pair RDD to out/airports_not_in_usa_pair_rdd.text 9 | 10 | Each row of the input file contains the following columns: 11 | Airport ID, Name of airport, Main city served by airport, Country where airport is located, 12 | IATA/FAA code, ICAO Code, Latitude, Longitude, Altitude, Timezone, DST, Timezone in Olson format 13 | 14 | Sample output: 15 | 16 | ("Kamloops", "Canada") 17 | ("Wewak Intl", "Papua New Guinea") 18 | ... 19 | 20 | ''' 21 | -------------------------------------------------------------------------------- /pairRdd/filter/AirportsNotInUsaSolution.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.insert(0, '.') 3 | from pyspark import SparkContext, SparkConf 4 | from commons.Utils import Utils 5 | 6 | if __name__ == "__main__": 7 | 8 | conf = SparkConf().setAppName("airports").setMaster("local[*]") 9 | sc = SparkContext(conf = conf) 10 | 11 | airportsRDD = sc.textFile("in/airports.text") 12 | 13 | airportPairRDD = airportsRDD.map(lambda line: \ 14 | (Utils.COMMA_DELIMITER.split(line)[1], 15 | Utils.COMMA_DELIMITER.split(line)[3])) 16 | airportsNotInUSA = airportPairRDD.filter(lambda keyValue: keyValue[1] != "\"United States\"") 17 | 18 | airportsNotInUSA.saveAsTextFile("out/airports_not_in_usa_pair_rdd.text") 19 | -------------------------------------------------------------------------------- /pairRdd/groupbykey/AirportsByCountryProblem.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext 2 | 3 | if __name__ == "__main__": 4 | 5 | ''' 6 | Create a Spark program to read the airport data from in/airports.text, 7 | output the the list of the names of the airports located in each country. 8 | 9 | Each row of the input file contains the following columns: 10 | Airport ID, Name of airport, Main city served by airport, Country where airport is located, IATA/FAA code, 11 | ICAO Code, Latitude, Longitude, Altitude, Timezone, DST, Timezone in Olson format 12 | 13 | Sample output: 14 | 15 | "Canada", ["Bagotville", "Montreal", "Coronation", ...] 16 | "Norway" : ["Vigra", "Andenes", "Alta", "Bomoen", "Bronnoy",..] 17 | "Papua New Guinea", ["Goroka", "Madang", ...] 18 | ... 19 | 20 | ''' 21 | 22 | 23 | -------------------------------------------------------------------------------- /pairRdd/groupbykey/AirportsByCountrySolution.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.insert(0, '.') 3 | from pyspark import SparkContext, SparkConf 4 | from commons.Utils import Utils 5 | 6 | if __name__ == "__main__": 7 | 8 | conf = SparkConf().setAppName("airports").setMaster("local[*]") 9 | sc = SparkContext(conf = conf) 10 | 11 | lines = sc.textFile("in/airports.text") 12 | 13 | countryAndAirportNameAndPair = lines.map(lambda airport:\ 14 | (Utils.COMMA_DELIMITER.split(airport)[3], 15 | Utils.COMMA_DELIMITER.split(airport)[1])) 16 | 17 | airportsByCountry = countryAndAirportNameAndPair.groupByKey() 18 | 19 | for country, airportName in airportsByCountry.collectAsMap().items(): 20 | print("{}: {}".format(country, list(airportName))) 21 | -------------------------------------------------------------------------------- /pairRdd/groupbykey/GroupByKeyVsReduceByKey.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext, SparkConf 2 | 3 | if __name__ == "__main__": 4 | conf = SparkConf().setAppName('GroupByKeyVsReduceByKey').setMaster("local[*]") 5 | sc = SparkContext(conf = conf) 6 | 7 | words = ["one", "two", "two", "three", "three", "three"] 8 | wordsPairRdd = sc.parallelize(words).map(lambda word: (word, 1)) 9 | 10 | wordCountsWithReduceByKey = wordsPairRdd \ 11 | .reduceByKey(lambda x, y: x + y) \ 12 | .collect() 13 | print("wordCountsWithReduceByKey: {}".format(list(wordCountsWithReduceByKey))) 14 | 15 | wordCountsWithGroupByKey = wordsPairRdd \ 16 | .groupByKey() \ 17 | .mapValues(len) \ 18 | .collect() 19 | print("wordCountsWithGroupByKey: {}".format(list(wordCountsWithGroupByKey))) 20 | 21 | 22 | -------------------------------------------------------------------------------- /pairRdd/join/JoinOperations.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext, SparkConf 2 | 3 | if __name__ == "__main__": 4 | conf = SparkConf().setAppName("JoinOperations").setMaster("local[1]") 5 | sc = SparkContext(conf = conf) 6 | 7 | ages = sc.parallelize([("Tom", 29), ("John", 22)]) 8 | addresses = sc.parallelize([("James", "USA"), ("John", "UK")]) 9 | 10 | join = ages.join(addresses) 11 | join.saveAsTextFile("out/age_address_join.text") 12 | 13 | leftOuterJoin = ages.leftOuterJoin(addresses) 14 | leftOuterJoin.saveAsTextFile("out/age_address_left_out_join.text") 15 | 16 | rightOuterJoin = ages.rightOuterJoin(addresses) 17 | rightOuterJoin.saveAsTextFile("out/age_address_right_out_join.text") 18 | 19 | fullOuterJoin = ages.fullOuterJoin(addresses) 20 | fullOuterJoin.saveAsTextFile("out/age_address_full_out_join.text") 21 | -------------------------------------------------------------------------------- /pairRdd/mapValues/AirportsUppercaseProblem.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext 2 | 3 | if __name__ == "__main__": 4 | 5 | ''' 6 | Create a Spark program to read the airport data from in/airports.text, generate a pair RDD with airport name 7 | being the key and country name being the value. Then convert the country name to uppercase and 8 | output the pair RDD to out/airports_uppercase.text 9 | 10 | Each row of the input file contains the following columns: 11 | 12 | Airport ID, Name of airport, Main city served by airport, Country where airport is located, IATA/FAA code, 13 | ICAO Code, Latitude, Longitude, Altitude, Timezone, DST, Timezone in Olson format 14 | 15 | Sample output: 16 | 17 | ("Kamloops", "CANADA") 18 | ("Wewak Intl", "PAPUA NEW GUINEA") 19 | ... 20 | 21 | ''' 22 | 23 | 24 | -------------------------------------------------------------------------------- /pairRdd/mapValues/AirportsUppercaseSolution.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.insert(0, '.') 3 | from pyspark import SparkContext, SparkConf 4 | from commons.Utils import Utils 5 | 6 | if __name__ == "__main__": 7 | conf = SparkConf().setAppName("airports").setMaster("local[*]") 8 | sc = SparkContext(conf = conf) 9 | 10 | airportsRDD = sc.textFile("in/airports.text") 11 | 12 | airportPairRDD = airportsRDD.map(lambda line: \ 13 | (Utils.COMMA_DELIMITER.split(line)[1], \ 14 | Utils.COMMA_DELIMITER.split(line)[3])) 15 | 16 | upperCase = airportPairRDD.mapValues(lambda countryName: countryName.upper()) 17 | 18 | upperCase.saveAsTextFile("out/airports_uppercase.text") 19 | -------------------------------------------------------------------------------- /pairRdd/sort/AverageHousePriceSolution.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.insert(0, '.') 3 | from pairRdd.aggregation.reducebykey.housePrice.AvgCount import AvgCount 4 | from pyspark import SparkContext, SparkConf 5 | 6 | if __name__ == "__main__": 7 | conf = SparkConf().setAppName("averageHousePriceSolution").setMaster("local[*]") 8 | sc = SparkContext(conf = conf) 9 | 10 | lines = sc.textFile("in/RealEstate.csv") 11 | cleanedLines = lines.filter(lambda line: "Bedrooms" not in line) 12 | housePricePairRdd = cleanedLines.map(lambda line: \ 13 | ((int(float(line.split(",")[3]))), AvgCount(1, float(line.split(",")[2])))) 14 | 15 | housePriceTotal = housePricePairRdd.reduceByKey(lambda x, y: \ 16 | AvgCount(x.count + y.count, x.total + y.total)) 17 | 18 | housePriceAvg = housePriceTotal.mapValues(lambda avgCount: avgCount.total / avgCount.count) 19 | 20 | sortedHousePriceAvg = housePriceAvg.sortByKey() 21 | 22 | for bedrooms, avgPrice in sortedHousePriceAvg.collect(): 23 | print("{} : {}".format(bedrooms, avgPrice)) 24 | -------------------------------------------------------------------------------- /pairRdd/sort/SortedWordCountProblem.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext 2 | 3 | if __name__ == "__main__": 4 | 5 | ''' 6 | Create a Spark program to read the an article from in/word_count.text, 7 | output the number of occurrence of each word in descending order. 8 | 9 | Sample output: 10 | 11 | apple : 200 12 | shoes : 193 13 | bag : 176 14 | ... 15 | 16 | ''' 17 | -------------------------------------------------------------------------------- /pairRdd/sort/SortedWordCountSolution.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext, SparkConf 2 | 3 | if __name__ == "__main__": 4 | conf = SparkConf().setAppName("wordCounts").setMaster("local[*]") 5 | sc = SparkContext(conf = conf) 6 | 7 | lines = sc.textFile("in/word_count.text") 8 | wordRdd = lines.flatMap(lambda line: line.split(" ")) 9 | 10 | wordPairRdd = wordRdd.map(lambda word: (word, 1)) 11 | wordToCountPairs = wordPairRdd.reduceByKey(lambda x, y: x + y) 12 | 13 | sortedWordCountPairs = wordToCountPairs \ 14 | .sortBy(lambda wordCount: wordCount[1], ascending=False) 15 | 16 | for word, count in sortedWordCountPairs.collect(): 17 | print("{} : {}".format(word, count)) 18 | 19 | -------------------------------------------------------------------------------- /rdd/WordCount.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext, SparkConf 2 | 3 | if __name__ == "__main__": 4 | conf = SparkConf().setAppName("word count").setMaster("local[3]") 5 | sc = SparkContext(conf = conf) 6 | 7 | lines = sc.textFile("in/word_count.text") 8 | 9 | words = lines.flatMap(lambda line: line.split(" ")) 10 | 11 | wordCounts = words.countByValue() 12 | 13 | for word, count in wordCounts.items(): 14 | print("{} : {}".format(word, count)) 15 | 16 | -------------------------------------------------------------------------------- /rdd/airports/AirportsByLatitudeProblem.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext 2 | 3 | if __name__ == "__main__": 4 | 5 | ''' 6 | Create a Spark program to read the airport data from in/airports.text, find all the airports whose latitude are bigger than 40. 7 | Then output the airport's name and the airport's latitude to out/airports_by_latitude.text. 8 | 9 | Each row of the input file contains the following columns: 10 | Airport ID, Name of airport, Main city served by airport, Country where airport is located, IATA/FAA code, 11 | ICAO Code, Latitude, Longitude, Altitude, Timezone, DST, Timezone in Olson format 12 | 13 | Sample output: 14 | "St Anthony", 51.391944 15 | "Tofino", 49.082222 16 | ... 17 | ''' 18 | -------------------------------------------------------------------------------- /rdd/airports/AirportsByLatitudeSolution.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.insert(0, '.') 3 | from pyspark import SparkContext, SparkConf 4 | from commons.Utils import Utils 5 | 6 | def splitComma(line: str): 7 | splits = Utils.COMMA_DELIMITER.split(line) 8 | return "{}, {}".format(splits[1], splits[6]) 9 | 10 | if __name__ == "__main__": 11 | conf = SparkConf().setAppName("airports").setMaster("local[*]") 12 | sc = SparkContext(conf = conf) 13 | 14 | airports = sc.textFile("in/airports.text") 15 | 16 | airportsInUSA = airports.filter(lambda line: float(Utils.COMMA_DELIMITER.split(line)[6]) > 40) 17 | 18 | airportsNameAndCityNames = airportsInUSA.map(splitComma) 19 | 20 | airportsNameAndCityNames.saveAsTextFile("out/airports_by_latitude.text") -------------------------------------------------------------------------------- /rdd/airports/AirportsInUsaProblem.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext 2 | 3 | if __name__ == "__main__": 4 | 5 | ''' 6 | Create a Spark program to read the airport data from in/airports.text, find all the airports which are located in United States 7 | and output the airport's name and the city's name to out/airports_in_usa.text. 8 | 9 | Each row of the input file contains the following columns: 10 | Airport ID, Name of airport, Main city served by airport, Country where airport is located, IATA/FAA code, 11 | ICAO Code, Latitude, Longitude, Altitude, Timezone, DST, Timezone in Olson format 12 | 13 | Sample output: 14 | "Putnam County Airport", "Greencastle" 15 | "Dowagiac Municipal Airport", "Dowagiac" 16 | ... 17 | ''' 18 | -------------------------------------------------------------------------------- /rdd/airports/AirportsInUsaSolution.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.insert(0, '.') 3 | from pyspark import SparkContext, SparkConf 4 | from commons.Utils import Utils 5 | 6 | def splitComma(line: str): 7 | splits = Utils.COMMA_DELIMITER.split(line) 8 | return "{}, {}".format(splits[1], splits[2]) 9 | 10 | if __name__ == "__main__": 11 | conf = SparkConf().setAppName("airports").setMaster("local[*]") 12 | sc = SparkContext(conf = conf) 13 | 14 | airports = sc.textFile("in/airports.text") 15 | airportsInUSA = airports.filter(lambda line : Utils.COMMA_DELIMITER.split(line)[3] == "\"United States\"") 16 | 17 | airportsNameAndCityNames = airportsInUSA.map(splitComma) 18 | airportsNameAndCityNames.saveAsTextFile("out/airports_in_usa.text") 19 | -------------------------------------------------------------------------------- /rdd/collect/CollectExample.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext, SparkConf 2 | 3 | if __name__ == "__main__": 4 | conf = SparkConf().setAppName("collect").setMaster("local[*]") 5 | sc = SparkContext(conf = conf) 6 | 7 | inputWords = ["spark", "hadoop", "spark", "hive", "pig", "cassandra", "hadoop"] 8 | 9 | wordRdd = sc.parallelize(inputWords) 10 | 11 | words = wordRdd.collect() 12 | 13 | for word in words: 14 | print(word) 15 | 16 | -------------------------------------------------------------------------------- /rdd/count/CountExample.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext, SparkConf 2 | 3 | if __name__ == "__main__": 4 | conf = SparkConf().setAppName("count").setMaster("local[*]") 5 | sc = SparkContext(conf = conf) 6 | 7 | inputWords = ["spark", "hadoop", "spark", "hive", "pig", "cassandra", "hadoop"] 8 | 9 | wordRdd = sc.parallelize(inputWords) 10 | print("Count: {}".format(wordRdd.count())) 11 | 12 | worldCountByValue = wordRdd.countByValue() 13 | print("CountByValue: ") 14 | for word, count in worldCountByValue.items(): 15 | print("{} : {}".format(word, count)) 16 | 17 | -------------------------------------------------------------------------------- /rdd/nasaApacheWebLogs/SameHostsProblem.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext 2 | 3 | if __name__ == "__main__": 4 | 5 | ''' 6 | "in/nasa_19950701.tsv" file contains 10000 log lines from one of NASA's apache server for July 1st, 1995. 7 | "in/nasa_19950801.tsv" file contains 10000 log lines for August 1st, 1995 8 | Create a Spark program to generate a new RDD which contains the hosts which are accessed on BOTH days. 9 | Save the resulting RDD to "out/nasa_logs_same_hosts.csv" file. 10 | 11 | Example output: 12 | vagrant.vf.mmc.com 13 | www-a1.proxy.aol.com 14 | ..... 15 | 16 | Keep in mind, that the original log files contains the following header lines. 17 | host logname time method url response bytes 18 | 19 | Make sure the head lines are removed in the resulting RDD. 20 | ''' 21 | -------------------------------------------------------------------------------- /rdd/nasaApacheWebLogs/SameHostsSolution.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext, SparkConf 2 | 3 | if __name__ == "__main__": 4 | conf = SparkConf().setAppName("sameHosts").setMaster("local[1]") 5 | sc = SparkContext(conf = conf) 6 | 7 | julyFirstLogs = sc.textFile("in/nasa_19950701.tsv") 8 | augustFirstLogs = sc.textFile("in/nasa_19950801.tsv") 9 | 10 | julyFirstHosts = julyFirstLogs.map(lambda line: line.split("\t")[0]) 11 | augustFirstHosts = augustFirstLogs.map(lambda line: line.split("\t")[0]) 12 | 13 | intersection = julyFirstHosts.intersection(augustFirstHosts) 14 | 15 | cleanedHostIntersection = intersection.filter(lambda host: host != "host") 16 | cleanedHostIntersection.saveAsTextFile("out/nasa_logs_same_hosts.csv") 17 | -------------------------------------------------------------------------------- /rdd/nasaApacheWebLogs/UnionLogProblem.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext 2 | 3 | if __name__ == "__main__": 4 | 5 | ''' 6 | "in/nasa_19950701.tsv" file contains 10000 log lines from one of NASA's apache server for July 1st, 1995. 7 | "in/nasa_19950801.tsv" file contains 10000 log lines for August 1st, 1995 8 | Create a Spark program to generate a new RDD which contains the log lines from both July 1st and August 1st, 9 | take a 0.1 sample of those log lines and save it to "out/sample_nasa_logs.tsv" file. 10 | 11 | Keep in mind, that the original log files contains the following header lines. 12 | host logname time method url response bytes 13 | 14 | Make sure the head lines are removed in the resulting RDD. 15 | ''' 16 | -------------------------------------------------------------------------------- /rdd/nasaApacheWebLogs/UnionLogSolutions.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext, SparkConf 2 | 3 | def isNotHeader(line: str): 4 | return not (line.startswith("host") and "bytes" in line) 5 | 6 | if __name__ == "__main__": 7 | conf = SparkConf().setAppName("unionLogs").setMaster("local[*]") 8 | sc = SparkContext(conf = conf) 9 | 10 | julyFirstLogs = sc.textFile("in/nasa_19950701.tsv") 11 | augustFirstLogs = sc.textFile("in/nasa_19950801.tsv") 12 | 13 | aggregatedLogLines = julyFirstLogs.union(augustFirstLogs) 14 | 15 | cleanLogLines = aggregatedLogLines.filter(isNotHeader) 16 | sample = cleanLogLines.sample(withReplacement = True, fraction = 0.1) 17 | 18 | sample.saveAsTextFile("out/sample_nasa_logs.csv") 19 | 20 | -------------------------------------------------------------------------------- /rdd/persist/PersistExample.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext, SparkConf, StorageLevel 2 | 3 | if __name__ == "__main__": 4 | conf = SparkConf().setAppName("persist").setMaster("local[*]") 5 | sc = SparkContext(conf = conf) 6 | 7 | inputIntegers = [1, 2, 3, 4, 5] 8 | integerRdd = sc.parallelize(inputIntegers) 9 | 10 | integerRdd.persist(StorageLevel.MEMORY_ONLY) 11 | 12 | integerRdd.reduce(lambda x, y: x*y) 13 | 14 | integerRdd.count() 15 | -------------------------------------------------------------------------------- /rdd/reduce/ReduceExample.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext, SparkConf 2 | 3 | if __name__ == "__main__": 4 | conf = SparkConf().setAppName("reduce").setMaster("local[*]") 5 | sc = SparkContext(conf = conf) 6 | 7 | inputIntegers = [1, 2, 3, 4, 5] 8 | integerRdd = sc.parallelize(inputIntegers) 9 | 10 | product = integerRdd.reduce(lambda x, y: x * y) 11 | print("product is :{}".format(product)) 12 | -------------------------------------------------------------------------------- /rdd/sumOfNumbers/SumOfNumbersProblem.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from pyspark import SparkContext 3 | 4 | if __name__ == "__main__": 5 | 6 | ''' 7 | Create a Spark program to read the first 100 prime numbers from in/prime_nums.text, 8 | print the sum of those numbers to console. 9 | Each row of the input file contains 10 prime numbers separated by spaces. 10 | ''' 11 | -------------------------------------------------------------------------------- /rdd/sumOfNumbers/SumOfNumbersSolution.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext, SparkConf 2 | 3 | if __name__ == "__main__": 4 | conf = SparkConf().setAppName("primeNumbers").setMaster("local[*]") 5 | sc = SparkContext(conf = conf) 6 | 7 | lines = sc.textFile("in/prime_nums.text") 8 | numbers = lines.flatMap(lambda line: line.split("\t")) 9 | 10 | validNumbers = numbers.filter(lambda number: number) 11 | 12 | intNumbers = validNumbers.map(lambda number: int(number)) 13 | 14 | print("Sum is: {}".format(intNumbers.reduce(lambda x, y: x + y))) 15 | 16 | -------------------------------------------------------------------------------- /rdd/take/TakeExample.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkContext, SparkConf 2 | 3 | if __name__ == "__main__": 4 | conf = SparkConf().setAppName("take").setMaster("local[*]") 5 | sc = SparkContext(conf = conf) 6 | 7 | inputWords = ["spark", "hadoop", "spark", "hive", "pig", "cassandra", "hadoop"] 8 | wordRdd = sc.parallelize(inputWords) 9 | 10 | words = wordRdd.take(3) 11 | for word in words: 12 | print(word) 13 | -------------------------------------------------------------------------------- /sparkSql/HousePriceProblem.py: -------------------------------------------------------------------------------- 1 | if __name__ == "__main__": 2 | 3 | ''' 4 | Create a Spark program to read the house data from in/RealEstate.csv, 5 | group by location, aggregate the average price per SQ Ft and sort by average price per SQ Ft. 6 | 7 | The houses dataset contains a collection of recent real estate listings in  8 | San Luis Obispo county and around it.  9 | 10 | The dataset contains the following fields: 11 | 1. MLS: Multiple listing service number for the house (unique ID). 12 | 2. Location: city/town where the house is located. Most locations are in  13 | San Luis Obispo county and northern Santa Barbara county (Santa Maria­Orcutt, Lompoc,  14 | Guadelupe, Los Alamos), but there some out of area locations as well. 15 | 3. Price: the most recent listing price of the house (in dollars). 16 | 4. Bedrooms: number of bedrooms. 17 | 5. Bathrooms: number of bathrooms. 18 | 6. Size: size of the house in square feet. 19 | 7. Price/SQ.ft: price of the house per square foot. 20 | 8. Status: type of sale. Thee types are represented in the dataset: Short Sale,  21 | Foreclosure and Regular. 22 | 23 | Each field is comma separated. 24 | 25 | Sample output: 26 | 27 | +----------------+-----------------+ 28 | | Location| avg(Price SQ Ft)| 29 | +----------------+-----------------+ 30 | | Oceano| 95.0| 31 | | Bradley| 206.0| 32 | | San Luis Obispo| 359.0| 33 | | Santa Ynez| 491.4| 34 | | Cayucos| 887.0| 35 | |................|.................| 36 | |................|.................| 37 | |................|.................| 38 | ''' 39 | 40 | -------------------------------------------------------------------------------- /sparkSql/HousePriceSolution.py: -------------------------------------------------------------------------------- 1 | from pyspark.sql import SparkSession 2 | 3 | PRICE_SQ_FT = "Price SQ Ft" 4 | 5 | if __name__ == "__main__": 6 | 7 | session = SparkSession.builder.appName("HousePriceSolution").master("local[*]").getOrCreate() 8 | 9 | realEstate = session.read \ 10 | .option("header","true") \ 11 | .option("inferSchema", value=True) \ 12 | .csv("in/RealEstate.csv") 13 | 14 | realEstate.groupBy("Location") \ 15 | .avg(PRICE_SQ_FT) \ 16 | .orderBy("avg(Price SQ FT)") \ 17 | .show() 18 | -------------------------------------------------------------------------------- /sparkSql/RddDataframeConversion.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.insert(0, '.') 3 | from pyspark.sql import SparkSession 4 | from commons.Utils import Utils 5 | 6 | def mapResponseRdd(line: str): 7 | splits = Utils.COMMA_DELIMITER.split(line) 8 | double1 = None if not splits[6] else float(splits[6]) 9 | double2 = None if not splits[14] else float(splits[14]) 10 | return splits[2], double1, splits[9], double2 11 | 12 | def getColNames(line: str): 13 | splits = Utils.COMMA_DELIMITER.split(line) 14 | return [splits[2], splits[6], splits[9], splits[14]] 15 | 16 | if __name__ == "__main__": 17 | 18 | session = SparkSession.builder.appName("StackOverFlowSurvey").master("local[*]").getOrCreate() 19 | sc = session.sparkContext 20 | 21 | lines = sc.textFile("in/2016-stack-overflow-survey-responses.csv") 22 | 23 | responseRDD = lines \ 24 | .filter(lambda line: not Utils.COMMA_DELIMITER.split(line)[2] == "country") \ 25 | .map(mapResponseRdd) 26 | 27 | colNames = lines \ 28 | .filter(lambda line: Utils.COMMA_DELIMITER.split(line)[2] == "country") \ 29 | .map(getColNames) 30 | 31 | responseDataFrame = responseRDD.toDF(colNames.collect()[0]) 32 | 33 | print("=== Print out schema ===") 34 | responseDataFrame.printSchema() 35 | 36 | print("=== Print 20 records of responses table ===") 37 | responseDataFrame.show(20) 38 | 39 | for response in responseDataFrame.rdd.take(10): 40 | print(response) -------------------------------------------------------------------------------- /sparkSql/StackOverFlowSurvey.py: -------------------------------------------------------------------------------- 1 | from pyspark.sql import SparkSession 2 | 3 | AGE_MIDPOINT = "age_midpoint" 4 | SALARY_MIDPOINT = "salary_midpoint" 5 | SALARY_MIDPOINT_BUCKET = "salary_midpoint_bucket" 6 | 7 | if __name__ == "__main__": 8 | 9 | session = SparkSession.builder.appName("StackOverFlowSurvey").getOrCreate() 10 | 11 | dataFrameReader = session.read 12 | 13 | responses = dataFrameReader \ 14 | .option("header", "true") \ 15 | .option("inferSchema", value = True) \ 16 | .csv("in/2016-stack-overflow-survey-responses.csv") 17 | 18 | print("=== Print out schema ===") 19 | responses.printSchema() 20 | 21 | responseWithSelectedColumns = responses.select("country", "occupation", 22 | AGE_MIDPOINT, SALARY_MIDPOINT) 23 | 24 | print("=== Print the selected columns of the table ===") 25 | responseWithSelectedColumns.show() 26 | 27 | print("=== Print records where the response is from Afghanistan ===") 28 | responseWithSelectedColumns\ 29 | .filter(responseWithSelectedColumns["country"] == "Afghanistan").show() 30 | 31 | print("=== Print the count of occupations ===") 32 | groupedData = responseWithSelectedColumns.groupBy("occupation") 33 | groupedData.count().show() 34 | 35 | print("=== Print records with average mid age less than 20 ===") 36 | responseWithSelectedColumns\ 37 | .filter(responseWithSelectedColumns[AGE_MIDPOINT] < 20).show() 38 | 39 | print("=== Print the result by salary middle point in descending order ===") 40 | responseWithSelectedColumns\ 41 | .orderBy(responseWithSelectedColumns[SALARY_MIDPOINT], ascending = False).show() 42 | 43 | print("=== Group by country and aggregate by average salary middle point ===") 44 | dataGroupByCountry = responseWithSelectedColumns.groupBy("country") 45 | dataGroupByCountry.avg(SALARY_MIDPOINT).show() 46 | 47 | responseWithSalaryBucket = responses.withColumn(SALARY_MIDPOINT_BUCKET, 48 | ((responses[SALARY_MIDPOINT]/20000).cast("integer")*20000)) 49 | 50 | print("=== With salary bucket column ===") 51 | responseWithSalaryBucket.select(SALARY_MIDPOINT, SALARY_MIDPOINT_BUCKET).show() 52 | 53 | print("=== Group by salary bucket ===") 54 | responseWithSalaryBucket \ 55 | .groupBy(SALARY_MIDPOINT_BUCKET) \ 56 | .count() \ 57 | .orderBy(SALARY_MIDPOINT_BUCKET) \ 58 | .show() 59 | 60 | session.stop() 61 | -------------------------------------------------------------------------------- /sparkSql/join/UkMakerSpaces.py: -------------------------------------------------------------------------------- 1 | from pyspark.sql import SparkSession, functions as fs 2 | 3 | if __name__ == "__main__": 4 | session = SparkSession.builder.appName("UkMakerSpaces").master("local[*]").getOrCreate() 5 | 6 | makerSpace = session.read.option("header", "true") \ 7 | .csv("in/uk-makerspaces-identifiable-data.csv") 8 | 9 | postCode = session.read.option("header", "true").csv("in/uk-postcode.csv") \ 10 | .withColumn("PostCode", fs.concat_ws("", fs.col("PostCode"), fs.lit(" "))) 11 | 12 | print("=== Print 20 records of makerspace table ===") 13 | makerSpace.select("Name of makerspace", "Postcode").show() 14 | 15 | print("=== Print 20 records of postcode table ===") 16 | postCode.select("PostCode", "Region").show() 17 | 18 | joined = makerSpace \ 19 | .join(postCode, makerSpace["Postcode"].startswith(postCode["Postcode"]), "left_outer") 20 | 21 | print("=== Group by Region ===") 22 | joined.groupBy("Region").count().show(200) --------------------------------------------------------------------------------