Closed rodrihgh closed 3 years ago
It seems we are pushing the limits of Jekyll on this project. I made a few amendments, now it should work, but if we want to add new languages (that means more pages and more build time, leading to the error) we may change the building strategy:
_pages
folder) is about 1Mb. It seems that this is too much for Jekyll on GH pages. I have reduce the resolution of the countries to 60M (lowering the borders definition). This is less points to plot and less size of the page at the end. Countries are polygons, and polygons are points, and each point of each country is written in _pages
. Lowering the resolution from 20M (previous) to 60M (current) reduced the size of each page from ~1.5 MB to 1Mb.Instead on relying on GH pages engine, we could use this action to run the build: https://github.com/dieghernan/RKI-Corona-Atlas/blob/master/.github/workflows/build-gh-pages.yml. This won't cause any timeout issues, but there are two caveats:
Now we are still on "old" strategy (GH engine) with lower boundary resolution, and page build is coming from master branch.
If we want to move to the new strategy (new languages, more resolution on maps, page from gh-pages branch) I can make it work, but expect some delay between scrapping and page update. For your information, the action https://github.com/dieghernan/RKI-Corona-Atlas/blob/master/.github/workflows/build-gh-pages.yml is currently disabled as we are still in "old" mode.
@rodrihgh I added the new languages to the navbar, feel free to amend/modify/improve
Thank you for taking the time to tackle the issue. However, I think the current state is too involved, so I have quarantined the French and Polish languages. You are welcome to roll back everything else on your side, too. @dieghernan
Let me make an alternative suggestion...
I would strongly prefer a solution where we do not duplicate the same map with every new language. As a matter of fact, we are using the same polygons with different text, so I think we should try a different approach:
It is still unclear how to work with the said plugin, e.g. whether translations should happen at "nuclear" level (country names, dates, idioms...) or "block" level (information blocks per country). If we cannot make the plugin work, I would still prefer to keep the "iframe" approach with English information in ES, FR, PL & Co.
If you like this idea, I will take a look at the plugin and see what it can do.
I have worked out a page that loads GeoJSON on Javascript and glues it together with the corresponding risk colors and labels. I have taken the code from Raruto's repo above, so the styling does not look like ours yet:
@dieghernan I would let you style the map as you want on the Javascript code (you may also need to change the scripts on the header, too:
Once you are done, I can insert the map in all the different pages with the corresponding text.
Done!
For you to know how things now are done:
risk.js
, with a JSON object containing the risk level codes of all countries, and locale_*.js
with the information in the different languages.assets/geo/country_shapes.geojson
db_scraped.csv
drops the information in German
Currently working in Polish and French