Open edwardchalstrey1 opened 1 month ago
What if the initial map view was zoomed in and we load the shapes in the viewed bounding box first (first one year, then across all years), then allow zooming out after it has loaded
My Q:
Would it be better to/ is it possible to somehow use shape data directly from file, rather than the db. Perhaps the logic in the view should be moved to the data loading command script, creating a new file. Could the new file be in more efficient "GeoArrow" instead of GeoJSON?
Copilot answer:
Apache Arrow (GeoArrow) is a binary format and is not directly readable in a HTML template. You would need to convert it to a format that can be read in the template, such as GeoJSON. Remember, this approach is not recommended for larger files, as it can lead to performance issues. It's generally better to use a view to handle the file and pass only the necessary data to the template.
For using GeoJSON, basically you would go via a view as we are
Branches
adjust-loading
just does some of the below, see in progress below159 actually has significant speedups by other means than the below, simply reducing for loopage etc
TODO 6th June
adjust-loading
map_view_one_year
againcan we update this such that if thedisplayYear != enteredYear
whilst theworld_map_all
fetch is in progress, we exit that fetch to run themap_view_one_year
again before running theworld_map_all
fetch againadjust-loading
sort of does this, but it doesn't quite work as expected, keep fiddling and see if it could work, bit don't spend long and otherwiseb3c4732a2bd69776fe7ce288d8fef836c5fbe92d
into #159TODO
seshat_id_page_id
andallCapitalsInfo
too?assign_variables_to_shapes
Update: this has already been sped up via refactoring so further speed increases may not be neededAlternatively load these as a separate thing to the shapes and suppress at firstthat's pointless because the issue is running the function, it shouldn't slow down the Python=>JS transition - yes but you could have a separate view that runs this and updates the shapes?154