Conversation
seb231
left a comment
There was a problem hiding this comment.
Only reviewed projection_charts.clj, but I've got a good start on getting a handle on what's going on.
Looks like a really good body of work and am keen to test it out.
A few things I'd like clarified, a few discussion points that we might consider and maybe one what I assume is a typo
| (map (fn [x] [(:setting x) (:setting x)])) | ||
| census) | ||
| needs-lookup (into {} | ||
| (map (fn [x] [(:setting x) (:setting x)])) |
| needs-lookup (into {} | ||
| (map (fn [x] [(:setting x) (:setting x)])) | ||
| census) | ||
| output-ay (future |
There was a problem hiding this comment.
okay, so this means the code will start processing output-ay and move on to output-count without waiting for output-ay to finish, as it's not dependent
| (vis.oay/output-ay (str output-dir "/" vis.oay/output-ay-file))))) | ||
| output-count (future | ||
| (vis.ocount/chart | ||
| "2020 Baseline" |
There was a problem hiding this comment.
This probably wants to be an argument somehow, rather than a fixed (magic) string. And I can see it elsewhere but won't add more comments
| general-population (future (vis.gp/charts gen-pop-data))] | ||
|
|
||
| (a/thread | ||
| ;; (run! (partial wsc/save-chart-by-title (str output-dir "/charts/ay-")) @output-ay) |
There was a problem hiding this comment.
So is this because you don't want the "raw" pngs outside of the spreadsheet? Maybe it should be an option or just removed? Or even another function that can do it instead?
| setting-titles-and-sets) | ||
| general-population (future (vis.gp/charts gen-pop-data))] | ||
|
|
||
| (a/thread |
There was a problem hiding this comment.
So this is using thread because it is dependent on output-ay but you still want it to run on a new, unsued thread correct? And I guess all of this parallelisation (is that even what it actually is?) speed is only achieved based on how many cores you provide to the process. Does Clojure just make use of how ever many you provide it. I know some other languages you still have to make it much clearer how you want the resources to be used.
For validation and projections.
Currently using old structure of code and getting to the output in two different ways. It would be good to choose one of them and I think the flow of the validation code is a bit better.