{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","data":{"url":"https://didz12.github.io/datavis/tidyAllYears2021.csv"},"params":[{"name":"timeSlider","value":{"year":7},"select":"point","bind":{"input":"range","name":"Month","min":7,"max":12,"step":1}}],"projection":{"type":"transverseMercator","rotate":{"expr":"[2,0,0]"}},"transform":[{"lookup":"GSSCode","from":{"data":{"url":"https://gicentre.github.io/data/geoTutorials/londonBoroughs.json","format":{"type":"topojson","feature":"boroughs"}},"key":"properties.GSSCode"},"as":"geo"},{"filter":"datum.year == timeSlider.year"}],"width":600,"height":400,"encoding":{"shape":{"field":"geo","type":"geojson"},"color":{"field":"crimeRate","type":"quantitative","scale":{"scheme":"reds"},"legend":{"title":["Crime","per borough"],"orient":"none","legendX":600,"legendY":170,"direction":"vertical"}},"tooltip":[{"field":"monthName"},{"field":"borough"},{"field":"crimeRate"}]},"mark":{"type":"geoshape","stroke":"black"},"title":{"text":"Crime Rate 2021 (July - December)"}}
{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","data":{"url":"https://didz12.github.io/datavis/tidyAllYears2022.csv"},"params":[{"name":"timeSlider","value":{"year":1},"select":"point","bind":{"input":"range","name":"Month","min":1,"max":12,"step":1}}],"projection":{"type":"transverseMercator","rotate":{"expr":"[2,0,0]"}},"transform":[{"lookup":"GSSCode","from":{"data":{"url":"https://gicentre.github.io/data/geoTutorials/londonBoroughs.json","format":{"type":"topojson","feature":"boroughs"}},"key":"properties.GSSCode"},"as":"geo"},{"filter":"datum.year == timeSlider.year"}],"width":600,"height":400,"encoding":{"shape":{"field":"geo","type":"geojson"},"color":{"field":"crimeRate","type":"quantitative","scale":{"scheme":"reds"},"legend":{"title":["Crime","per borough"],"orient":"none","legendX":600,"legendY":170,"direction":"vertical"}},"tooltip":[{"field":"monthName"},{"field":"borough"},{"field":"crimeRate"}]},"mark":{"type":"geoshape","stroke":"black"},"title":{"text":"Crime Rate 2022 (January - December)"}}
{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","data":{"url":"https://didz12.github.io/datavis/tidyAllYears2023.csv"},"params":[{"name":"timeSlider","value":{"year":1},"select":"point","bind":{"input":"range","name":"Month","min":1,"max":6,"step":1}}],"projection":{"type":"transverseMercator","rotate":{"expr":"[2,0,0]"}},"transform":[{"lookup":"GSSCode","from":{"data":{"url":"https://gicentre.github.io/data/geoTutorials/londonBoroughs.json","format":{"type":"topojson","feature":"boroughs"}},"key":"properties.GSSCode"},"as":"geo"},{"filter":"datum.year == timeSlider.year"}],"width":600,"height":400,"encoding":{"shape":{"field":"geo","type":"geojson"},"color":{"field":"crimeRate","type":"quantitative","scale":{"scheme":"reds"},"legend":{"title":["Crime","per borough"],"orient":"none","legendX":600,"legendY":170,"direction":"vertical"}},"tooltip":[{"field":"monthName"},{"field":"borough"},{"field":"crimeRate"}]},"mark":{"type":"geoshape","stroke":"black"},"title":{"text":"Crime Rate 2023 (January - June)"}}
{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","width":600,"height":400,"config":{"view":{"stroke":null},"legend":{"orient":"bottom-right","offset":0}},"data":{"url":"https://gicentre.github.io/data/geoTutorials/londonBoroughs.json","format":{"type":"topojson","feature":"boroughs"}},"transform":[{"lookup":"id","from":{"data":{"url":"https://didz12.github.io/datavis/earning2021.csv"},"key":"borough","fields":["earning"]}}],"encoding":{"color":{"field":"earning","type":"quantitative","title":["Average weekly earning","per borough"],"scale":{"scheme":"redyellowgreen"}},"tooltip":[{"field":"id","title":"Borough"},{"field":"earning","title":"Earning per week average"}]},"mark":{"type":"geoshape","stroke":"black"},"title":{"text":"Average weekly earnings 2021"}}
{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","width":600,"height":400,"config":{"view":{"stroke":null},"legend":{"orient":"bottom-right","offset":0}},"data":{"url":"https://gicentre.github.io/data/geoTutorials/londonBoroughs.json","format":{"type":"topojson","feature":"boroughs"}},"transform":[{"lookup":"id","from":{"data":{"url":"https://didz12.github.io/datavis/deprived2019.csv"},"key":"borough","fields":["IMD"]}}],"encoding":{"color":{"field":"IMD","type":"quantitative","title":["IMD Rank","per borough"],"scale":{"scheme":"reds"}},"tooltip":[{"field":"id","title":"Borough"},{"field":"IMD","title":"IMD Rank"}]},"mark":{"type":"geoshape","stroke":"black"},"title":{"text":"Indices of multiple deprivation Rank (IMD) 2019"}}
{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","width":600,"height":400,"config":{"view":{"stroke":null},"legend":{"orient":"bottom-right","offset":0}},"data":{"url":"https://gicentre.github.io/data/geoTutorials/londonBoroughs.json","format":{"type":"topojson","feature":"boroughs"}},"transform":[{"lookup":"id","from":{"data":{"url":"https://didz12.github.io/datavis/diverse2020.csv"},"key":"borough","fields":["IMD"]}}],"encoding":{"color":{"field":"IMD","type":"quantitative","title":["Num. of non-ethnic people","per borough"],"scale":{"scheme":"blues"}},"tooltip":[{"field":"id","title":"Borough"},{"field":"IMD","title":"Number of non-ethnic people"}]},"mark":{"type":"geoshape","stroke":"black"},"title":{"text":"Non ethnic population 2020"}}
{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","config":{"view":{"stroke":null}},"data":{"url":"https://didz12.github.io/datavis/tidyAllYearsTogether.csv"},"transform":[{"lookup":"GSSCode","from":{"data":{"url":"https://gicentre.github.io/data/geoTutorials/londonBoroughs.json","format":{"type":"topojson","feature":"boroughs"}},"key":"properties.GSSCode"},"as":"geo"}],"columns":3,"facet":{"field":"year","header":{"title":"Crime Juxtaposition"}},"spec":{"width":200,"height":400,"encoding":{"shape":{"field":"geo","type":"geojson"},"color":{"field":"crimeRate","type":"quantitative","scale":{"scheme":"reds"}},"tooltip":[{"field":"borough"},{"field":"crimeRate","title":"Num. of Crimes"}]},"mark":{"type":"geoshape","stroke":"black"}}}
{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","width":580,"height":1200,"data":{"url":"https://didz12.github.io/datavis/tidyAllYearsTogether.csv"},"layer":[{"encoding":{"x":{"field":"year","type":"temporal","axis":{"title":"Year","format":"%Y"}},"y":{"field":"crimeRate","type":"quantitative"},"color":{"field":"borough","title":""}},"layer":[{"mark":"line"},{"params":[{"name":"label","select":{"type":"point","nearest":true,"on":"mouseover","encodings":["x"]}}],"encoding":{"opacity":{"condition":{"param":"label","empty":false,"value":1},"value":0}},"mark":"point"}]},{"transform":[{"filter":{"param":"label","empty":false}}],"layer":[{"encoding":{"x":{"field":"year","type":"temporal"}},"mark":{"type":"rule","color":"gray"}},{"encoding":{"x":{"field":"year","type":"temporal","title":""},"y":{"field":"crimeRate","type":"quantitative"},"text":{"field":"crimeRate","type":"quantitative"},"color":{"field":"borough"}},"mark":{"type":"text","align":"left","dx":5,"dy":-5}}]}]}