{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","width":400,"height":400,"data":{"url":"https://raw.githubusercontent.com/faiqhilman13/datavisdata/main/london_combined_new.csv"},"encoding":{"x":{"field":"room_type","axis":{"labelAngle":0},"title":"Room types: 0=entire home/apartment, 1= private room, 2=shared room"},"y":{"field":"realSum","type":"quantitative","axis":null},"tooltip":[{"field":"guest_satisfaction_overall","title":"Guest rating"},{"field":"realSum","title":"Room prices"}],"color":{"field":"realSum","type":"quantitative","scale":{"scheme":"purples","domainMid":300,"domainMax":700,"domainMin":10},"title":"Room prices"}},"mark":"bar"}

{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","data":{"url":"https://raw.githubusercontent.com/faiqhilman13/datavisdata/main/london_combined_new.csv"},"repeat":["person_capacity","bedrooms"],"spec":{"width":300,"encoding":{"x":{"field":{"repeat":"repeat"},"type":"quantitative"},"y":{"field":"realSum","type":"quantitative","title":"","axis":{"values":[5000]}},"color":{"field":"realSum","type":"quantitative","scale":{"scheme":"purples","domainMid":600,"domainMax":3000,"domainMin":10}},"tooltip":[{"field":"guest_satisfaction_overall","title":"Guest rating"},{"field":"realSum","title":"Room prices"}]},"mark":"circle","config":{"view":{"stroke":null},"axis":{"ticks":false,"domain":false}}}}

{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","data":{"url":"https://raw.githubusercontent.com/faiqhilman13/datavisdata/main/london_combined_new.csv"},"repeat":["attr_index","rest_index"],"spec":{"width":300,"encoding":{"x":{"field":{"repeat":"repeat"},"type":"quantitative"},"y":{"field":"realSum","type":"quantitative","title":"","axis":{"values":[3500]}},"color":{"field":"realSum","type":"quantitative","scale":{"scheme":"purples","domainMid":600,"domainMax":5000,"domainMin":10}},"tooltip":[{"field":"guest_satisfaction_overall","title":"Guest rating"},{"field":"realSum","title":"Room prices"}]},"mark":"circle"}}

{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","data":{"url":"https://raw.githubusercontent.com/faiqhilman13/datavisdata/main/london_combined_new.csv"},"repeat":{"row":["realSum","metro_dist","rest_index","attr_index"],"column":["realSum","metro_dist","rest_index","attr_index"]},"spec":{"width":150,"height":150,"mark":{"type":"circle","opacity":0.1},"encoding":{"x":{"field":{"repeat":"column"},"type":"quantitative","scale":{"zero":false}},"y":{"field":{"repeat":"row"},"type":"quantitative","scale":{"zero":false}},"color":{"condition":{"param":"mySelection","empty":false,"field":"room_type","scale":{"domain":["0","1","2"],"range":["rgb(118,0,157)","rgb(255,207,51)","hsl(0,70%,50%)"]}},"value":"gray"},"opacity":{"condition":{"param":"mySelection","empty":false,"value":1},"value":0.1},"tooltip":[{"field":"guest_satisfaction_overall","title":"Guest rating"},{"field":"realSum","title":"Room prices"}]}},"params":[{"name":"mySelection","bind":{"input":"radio","name":"Type of listings","options":["0","1","2"]},"select":{"type":"point","fields":["room_type"]}}]}

{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","width":600,"data":{"url":"https://raw.githubusercontent.com/faiqhilman13/datavisdata/main/london_combined_new.csv"},"repeat":{"row":["realSum","rest_index_norm","metro_dist","dist","attr_index_norm"],"column":["realSum","rest_index_norm","metro_dist","dist","attr_index_norm"]},"spec":{"width":150,"height":150,"mark":{"type":"circle","opacity":0.2},"encoding":{"x":{"field":{"repeat":"column"},"type":"quantitative","scale":{"zero":false}},"y":{"field":{"repeat":"row"},"type":"quantitative","scale":{"zero":false}},"color":{"condition":{"param":"mySelection","empty":false,"field":"bedrooms","scale":{"domain":["1","2","3","4","5","8"],"range":["hsl(0,70%,50%)","rgb(255,207,51)","hsl(252,51%,53%)","hsl(0,51%,0%)","hsl(90,100%,53%)","hsl(0,51%,53%)"]}},"value":"gray"},"opacity":{"condition":{"param":"mySelection","empty":false,"value":1},"value":0.1},"tooltip":[{"field":"guest_satisfaction_overall","title":"Guest rating"},{"field":"realSum","title":"Room prices"}]}},"params":[{"name":"mySelection","bind":{"input":"radio","name":"Number of bedrooms","options":["1","2","3","4","5","8"]},"select":{"type":"point","fields":["bedrooms"]}}]}

{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","config":{"view":{"stroke":null}},"width":600,"height":300,"data":{"url":"https://raw.githubusercontent.com/faiqhilman13/datavisdata/main/london_combined_new.csv"},"transform":[{"window":[{"as":"index","op":"count"}]},{"fold":["attr_index","dist","cleanliness_rating","host_is_superhost"],"as":["features","magnitude"]},{"joinaggregate":[{"op":"min","field":"magnitude","as":"min"},{"op":"max","field":"magnitude","as":"max"}],"groupby":["features"]},{"calculate":"(datum.magnitude - datum.min) / (datum.max-datum.min)","as":"normVal"}],"layer":[{"encoding":{"x":{"field":"features","axis":{"labelAngle":0,"domain":false}},"y":{"field":"normVal","type":"quantitative","axis":null},"color":{"field":"room_type","scale":{"domain":["0","1","2"],"range":["rgb(118,0,157)","rgb(255,207,51)","hsl(0,70%,50%)"]}},"detail":{"field":"index"},"tooltip":[{"field":"guest_satisfaction_overall","title":"Guest rating"},{"field":"realSum","title":"Room prices"}]},"mark":{"type":"line","opacity":0.1}},{"encoding":{"x":{"field":"features","title":""},"detail":{"aggregate":"count"}},"mark":{"type":"rule","color":"#ccc"}}]}