-
-
Save mdfarragher/683669c431569b5fc9981f206c2c0f80 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get an array of housing data | |
houses = context.Data.CreateEnumerable<HouseBlockData>(data, reuseRowObject: false).ToArray(); | |
// plot median house value by median income | |
chart = Chart.Plot( | |
new Graph.Scattergl() | |
{ | |
x = houses.Select(v => v.MedianIncome), | |
y = houses.Select(v => v.MedianHouseValue), | |
mode = "markers" | |
} | |
); | |
chart.WithXTitle("Median Income"); | |
chart.WithYTitle("Median House Value"); | |
chart.WithTitle("Median house value by income"); | |
chart.Width = 600; | |
chart.Height = 600; | |
display(chart); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment