How to use

  • Select Canada, États-Unis, or any of the province/territory/state.
  • Click the Download button.
  • Locate the file on your computer and drag that file over the Quick Import section on the mapshaper pane below. If you dropped the file in the first section, click the Import button.
  • Click on Basemap. Select any of the two choices. Close the small window.
  • Select the icon of the right side.
  • You can now mouse-over on any polygons to view its information, the name of the area is under CSDNAME in the left window.

How to get the KML data

Canada

  • The original file is located on Statistics Cannada - 2021 Census – Boundary files [Link].
  • Boundary files options
    • Language: English
    • Type: Cartographic Boundary Files (CBF)
    • Administrative boundaries: Census subdivisions
    • Format: Geopraphy Markup Language (.gml)
  • After pressing Continue, you should be able to download the file lcd_000b21g_e.zip. Download it.
  • Extract the .zip file, you will get a .gml file.

  • We convert the .gml file to a .kml file using MyGeodata Converter [Link]. It is not a free service.
  • Backup the .kml file in Prosomo's Google Drive.
  • The file will contain all the provinces and territories.
  • The file is massive, so we will reduce the amounts of coordinates so it will be faster.

  • We will use mapshaper [Link]
    • Install node.js [Link] on your computer.
    • Install mapshaper by folowing the instruction on GitHub.
    • Use this command line to reduce the file to 6%.
      mapshaper-xl lcd_000b21g_e.kml -simplify dp 6% -o precision=0.00001 lcd_000b21g_e_reduced.kml.
  • You can now seperate the file into provinces and territories.
    • Every <Placemark> has a PRUID <SimpleData name="PRUID">10</SimpleData>, here is the list of the PRUID codes:
      • 10 - NL
      • 11 - PE
      • 12 - NS
      • 13 - NB
      • 24 - QC
      • 35 - ON
      • 46 - MB
      • 47 - SK
      • 48 - AB
      • 59 - BC
      • 60 - YT
      • 61 - NT
      • 62 - NU

États-Unis

  • The original file is located on U.S. Census Bureau - 2020 Cartographic Boundary Files [Link].
  • Boundary files options
    • Year: 2020
    • Geography: Counties
    • Resolution: 1:500,000 (500k)
    • Format: Shapefile (.shp)
  • Direct download: cb_2020_us_county_500k.zip [Link].
  • Extract the .zip file, you will get a shapefile (.shp, .shx, .dbf, .prj, .cpg).
  • Backup the shapefile in Prosomo's Google Drive.
  • Unlike the Canadian file, no GML→KML conversion is needed — mapshaper reads shapefiles natively.
  • The file contains all 50 states, DC, and 5 territories (~3,234 counties).
  • We use mapshaper [Link] to filter out territories, rename the county-name field to match the Canadian schema, simplify, and split per state:
    • Combined file (all 50 states + DC, ~4 MB):
      mapshaper-xl cb_2020_us_county_500k.shp -filter 'STATEFP<"57"' -rename-fields CSDNAME=NAMELSAD -simplify dp 6% -o precision=0.00001 United_States.kml format=kml
    • Per state, loop over the postal codes and filter by STUSPS:
      mapshaper-xl cb_2020_us_county_500k.shp -filter "STUSPS==='CA'" -rename-fields CSDNAME=NAMELSAD -simplify dp 6% -o CA.kml precision=0.00001 format=kml
  • Splitting per state uses the STUSPS 2-letter postal abbreviation (AL, AK, AZ, …, WY). Territories filtered out have STATEFP ≥ 57 (60=AS, 66=GU, 69=MP, 72=PR, 78=VI).
  • The county-name field NAMELSAD (e.g. Bulloch County) is renamed to CSDNAME so the mouse-over UI shows the same field across both countries.