mammaldiversity / mammaldiversity.github.io

(work in progress) Mammal Diversity Database website
MIT License
5 stars 9 forks source link

Adding 'country' polygons for the two non-continental US states (Alaska and Hawaii) + continental US only #66

Open n8upham opened 1 week ago

n8upham commented 1 week ago

Hey @jhpoelen -- where did you source some GeoJSON files for countries, and might we similarly get these files for AK and HI? If so, then we can use the existing code, since "Alaska" and "Hawaii" are included in the "countryDistribution" column.

Similarly, we'll need an GeoJSON file for the continental USA only, since the "United States of America" entry has been used to signify continental distributions of species only. Thanks

jhpoelen commented 6 days ago

Hey @jhpoelen -- where did you source some GeoJSON files for countries, and might we similarly get these files for AK and HI? If so, then we can use the existing code, since "Alaska" and "Hawaii" are included in the "countryDistribution" column.

The distribution maps as introduced/ described in #13 are using shapes make available through GADM. They include shapes for country sub-divisions, including Hawaii and Alaska.

As far as I can tell, they support county level shapes also. For instance, here's the shape for Hennepin county in Minnesota. They appear to use full names (e.g., Minnesota, Hennepin) as well as some kind of short hand (e.g., US.MN.HE).

So, if you use these descriptors in your species distribution maps we may be able to get a little more specific. I'd say that best would be to use draw the actual distribution maps instead of administrative boundaries.

I am not aware of a shapefile for the continental us, so you'd probably have to list the 48 states instead. Alternatively, we can make some kind of hack to reference this list.

Let me know how you'd like to proceed.

{
      "type": "Feature",
      "properties": {
        "GID_2": "USA.24.27_1",
        "GID_0": "USA",
        "COUNTRY": "UnitedStates",
        "GID_1": "USA.24_1",
        "NAME_1": "Minnesota",
        "NL_NAME_1": "NA",
        "NAME_2": "Hennepin",
        "VARNAME_2": "NA",
        "NL_NAME_2": "NA",
        "TYPE_2": "County",
        "ENGTYPE_2": "County",
        "CC_2": "NA",
        "HASC_2": "US.MN.HE"

See e.g., https://gadm.org/maps/USA.html . image