Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update physical exposure and social fabric maps #41

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

anthonyfok
Copy link
Member

Public sent an email notifying us of discrepancies between maps on OpenDRR GitHub Pages and data on FGP. Upon further discovery, the maps were linking to an older version of ESRI REST layer and not the newest version.

Special thanks to the member of the general public for the report, and to William Chow (@wkhchow) for the investigation and diagnostics.

Fixes OpenDRR/opendrr.github.io#32, #40

Public sent an email notifying us of discrepancies between maps on OpenDRR
GitHub Pages and data on FGP.  Upon further discovery, the maps were linking
to an older version of ESRI REST layer and not the newest version.

Special thanks to the member of the general public for the report,
and to William Chow (@wkhchow) for the investigation and diagnostics.

Fixes OpenDRR/opendrr.github.io#32, OpenDRR#40
Copy link
Collaborator

@wkhchow wkhchow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I compared on your personal page the maps in both EN/FR and compared a few spot checks on the NRCan REST site.

@anthonyfok anthonyfok force-pushed the update-physical-exposure-and-social-fabric-maps branch 2 times, most recently from 780f568 to e5c638e Compare February 6, 2025 22:32
Fixes the following error that occurs with the latest ubuntu-latest
(now ubuntu-24.04, was probably ubuntu-22.04 or even ubuntu-20.04):

Installing Bundler
  /opt/hostedtoolcache/Ruby/2.6.7/x64/bin/gem install bundler -v ~> 2 --no-document
  ERROR:  Error installing bundler:
        The last version of bundler (~> 2) to support your Ruby & RubyGems was 2.4.22. Try installing it with `gem install bundler -v 2.4.22`
        bundler requires Ruby version >= 3.1.0. The current ruby version is 2.6.7.197.
  Took  14.29 seconds
Error: The process '/opt/hostedtoolcache/Ruby/2.6.7/x64/bin/gem' failed with exit code 1
@anthonyfok anthonyfok force-pushed the update-physical-exposure-and-social-fabric-maps branch 6 times, most recently from 1075dc7 to 272bd75 Compare February 7, 2025 05:27
@anthonyfok
Copy link
Member Author

anthonyfok commented Feb 7, 2025

The following additional changes were made so that Lychee the link checker no longer fails:

1. Update GitHub actions in build_check_links.yml workflow

Fixes the following error that occurs with the latest ubuntu-latest (now ubuntu-24.04, was probably ubuntu-22.04 or even ubuntu-20.04):

Installing Bundler
  /opt/hostedtoolcache/Ruby/2.6.7/x64/bin/gem install bundler -v ~> 2 --no-document
  ERROR:  Error installing bundler:
        The last version of bundler (~> 2) to support your Ruby & RubyGems was 2.4.22. Try installing it with `gem install bundler -v 2.4.22`
        bundler requires Ruby version >= 3.1.0. The current ruby version is 2.6.7.197.
  Took  14.29 seconds
Error: The process '/opt/hostedtoolcache/Ruby/2.6.7/x64/bin/gem' failed with exit code 1

2. Change how Jekyll and Lychee are run in build_check_links.yml

according to https://github.com/lycheeverse/lychee-action and https://github.com/actions/starter-workflows/blob/main/pages/jekyll-gh-pages.yml

Also, to allow Lychee to pass without errors:

3. Fix issues that cause broken links or Lychee to fail otherwise

4. Add <br clear="both"> to fix anchor scroll position on Firefox

On desktop versions of Mozilla Firefox browser, clicking on "Social Fabric" (English) or "Tissu social" (French):

would jumped to the wrong position, near the Data Resources heading of the previous Physical Exposure section. Apparently, Firefox’s Gecko handles the layout after uncleared floating images differently than Chrome’s Blink engine.

See also https://stackoverflow.com/questions/4673671/floating-elements-br-clear-both-in-a-better-css-way


Thank you @drotheram for the feedback!

according to https://github.com/lycheeverse/lychee-action and
https://github.com/actions/starter-workflows/blob/main/pages/jekyll-gh-pages.yml

Also, to allow Lychee to pass without errors:

- add " --exclude '^https://www\.canada\.ca/'" as tests of all URLs to Canada.ca
  timed out even if I were to set the user agent to that of Firefox.
- add "--fallback-extensions html" to handle "pretty" URLs;
  see https://lychee.cli.rs/recipes/pretty-urls/
- remove "--exclude https://opendrr.github.io/assets/fontawesome/css/all.min.css"
  as a proper fix has been found and applied in the next commit.
- Fix link to Font Awesome CSS in docs/_includes/resources-inc/head.html
  by using {{ "/assets/fontawesome/css/all.min.css" | prepend: site.baseurl }}
  so it works for all web pages at different directory levels.
  Credit: https://stackoverflow.com/a/27408774/3451096
- Exclude api-publique.md and docker-compose.yml which were erroneously
  uploaded to GitHub Pages
- Replace old link to https://www1.canada.ca/en/newsite.html with
  https://www.canada.ca/en/government/about.html, etc.
- Append trailing slash to URLs where appropriate
On desktop versions of Mozilla Firefox browser, clicking on
"Social Fabric" (English) or "Tissu social" (French):

- https://opendrr.github.io/national-human-settlement/en/index.html#nhsl_social_fabric_indicators-a
- https://opendrr.github.io/national-human-settlement/fr/#nhsl_social_fabric_indicators-a

would jumped to the wrong position, near the Data Resources heading of
the previous Physical Exposure section.  Apparently, Firefox’s Gecko
handles the layout after uncleared floating images differently than
Chrome’s Blink engine.

See also https://stackoverflow.com/questions/4673671/floating-elements-br-clear-both-in-a-better-css-way
@anthonyfok anthonyfok force-pushed the update-physical-exposure-and-social-fabric-maps branch from 272bd75 to 20e66d5 Compare February 7, 2025 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update physical exposure / social fabric map
2 participants