File talk:Template map of US states and District of Columbia.svg/Instructions

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Notice Leave questions and comments at File talk:Template map of US states and District of Columbia.svg.
Note. The instructions are in this talk subpage because subpages are not allowed for file pages.
Note. This all started in this long discussion. Which continued here. And then here.
Note. See also: Commons: Map resources.

Purpose[edit]

These SVG maps have user-editable sections (any text editor) to allow creation of more maps on more topics. Just paste in a list of states and values. See examples in this category. Feel free to create map templates for other countries too. Cmglee may be able to help with that.

Latest template map[edit]

File:Template map of US states and District of Columbia.svg - By CMG Lee.

The template map can be used to create US SVG maps by pasting in a list of states with values.

Some maps created with the latest template[edit]

Note: See Category:English-language SVG maps of the United States made with templates for maps made with both templates.

See maps created or updated with the latest template:

Maps created or updated with this template

Old template map and instructions[edit]

Instruction summary. New map template[edit]

  1. Open a template file (or existing file to be amended) in a text editor.
  2. Replace (or amend) parts indicated with relevant data:
    • In the list following the line "const state_space_value...", update the numbers, or add a space and the value after the state name. (If a value is unavailable, leave the value blank.)
    • Headings, colors etc
  3. Delete the !-- on the line with GENERATOR_SCRIPT, and -- on the last line.
  4. Save as a new file (or file to be amended).
  5. Open the file in Firefox or Chrome.
  6. In the web browser, Save As another SVG to upload to Commons.
  7. Upload this file to Commons.

More instructions[edit]

Note: See the old instruction page for the old template for some still-relevant info.

These instructions are for a list of states followed by a space, followed by a value. States can be full names, or USPS 2-letter abbreviations. There can be a mix of them in the list. Multiple spaces do not matter.

Order of states does not matter. States that are missing from the list altogether, or missing data, will show "n/a" on the map.

"DC" or "D.C." in the list works. As does "Washington D.C." or "Washington DC". Do not use "District of Columbia". It breaks the map.

Choose parameter values[edit]

If you are updating an existing map, then these values are already set. In the user editable section you can choose values for the following:

Title and description. Examples are shown. Title is on the map at the top, and on the browser tab. Description is internal and is seen by search engines, etc., and can be longer.

  • const out_title = 'State minimum wages, in dollars. Jan 1, 2024';
  • const out_desc = 'State minimum wages, in dollars. Jan 1, 2024';

How to mark states with no data. Blank, n/a, N/A, etc.:

  • const no_data_value = 'n/a';

Decimal place to show on map. 0, 1, 2, etc.:

  • const decimal_place = 1;

Font sizes:

  • .title { font-size:40px; letter-spacing:0; }
  • .legend { font-size:30px; }
  • .state { font-size:17px; }
  • .value { font-size:17px; }

Colors. Minimum, maximum, n/a:

  • .min { fill:#99ffff; }
  • .max { fill:#ff6600; }
  • .n_a { fill:#eeeeee; }

Possible maps[edit]

Some of the below pages have maps and graphs. They can be copied to the Commons via Template:PD-map and Template:PD-chart. They are in the public domain (read PD template pages). This option is for people who haven't yet figured out the new template to put state-by-state data in numerical form right on a US map.

Some stats from these pages can be used to create US maps:

"More than 800 up-to-date health indicators at the state level can be mapped, ranked, and downloaded":

CDC. Stats of the States:

Map workshops of the Graphic Labs[edit]

You can get help here: