File talk:Template map of U.S. states and District of Columbia.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Note: This is the talk page for the old template. Leave comments and questions below.
Note: For instructions for the old template go here.
Note: For instructions for the new template see: File talk:Template map of US states and District of Columbia.svg/Instructions.


Make values font larger and/or bold?[edit]

Cmglee. Would it be possible to bump up the font size of the value text (not the state names)? And/or make that value font bold?

I tried bumping up the font size from 18 to 19, but that made the state text too big.

font-size="19"

But it did make the values more legible. And there seemed to be room for that change. --Timeshifter (talk) 05:09, 29 April 2023 (UTC)[reply]

@Timeshifter: I added text styles so you can edit or add your own CSS code in the <style> part. In the 09:13, 29 April 2023 version, I had to reduce the font size of the state names and apply only bold to the values to avoid overlapping text. Cheers, cmɢʟee ⋅τaʟκ 09:17, 29 April 2023 (UTC)[reply]
Cmglee. This is great. Thanks. I started a beta testing file on another wiki in order to see what the maps look like at smaller sizes.
https://weedwiki.fandom.com/wiki/File:Template_map_of_usa_states_and_dc._Beta.svg
Is there a way to show earlier versions at smaller sizes without reverting back to them temporarily?
I can create a "Beta 2" file on the wiki if you want a place to experiment, after logging in.
I removed the percentage symbols in one test. When bold they were bumping up against the preceding number.
In tests it seems that the place to watch is between Virginia and W. Virginia.
Lots more to do.
--Timeshifter (talk) 23:48, 29 April 2023 (UTC)[reply]
@Timeshifter: My pleasure. What's the reason you're doing your tests on Fandom instead of Wikimedia? Please adhere to the Creative Common licence (e.g. CC-BY-SA) of any files you transfer there.
To get thumbnails of previous versions of an image, right-click or tap-and-hold on the relevant thumbnail in the File History table of its file page and select Open image in new tab or similar in the pop-up menu.
In the new tab, edit its URL to specify the width in pixels that you want (the height is automatically chosen to maintain aspect ratio). For example, one could change
https://upload.wikimedia.org/wikipedia/commons/thumb/archive/e/e2/20230314043227%21Template_map_of_usa_states_and_dc.svg/120px-Template_map_of_usa_states_and_dc.svg.png
to
https://upload.wikimedia.org/wikipedia/commons/thumb/archive/e/e2/20230314043227%21Template_map_of_usa_states_and_dc.svg/200px-Template_map_of_usa_states_and_dc.svg.png
.
In the template, I'd rather keep the percent symbols to show that units e.g. "°", or "m", "b" etc (for million, billion etc) can be added to the value text. Cheers, cmɢʟee ⋅τaʟκ 01:42, 30 April 2023 (UTC)[reply]
Cmglee. I added a CC-BY-SA link on Fandom. It seems like the thumbs for previous revisions on both the Commons and Fandom are very blurry. Your links at 200px and 400px:
https://upload.wikimedia.org/wikipedia/commons/thumb/archive/e/e2/20230314043227%21Template_map_of_usa_states_and_dc.svg/200px-Template_map_of_usa_states_and_dc.svg.png
https://upload.wikimedia.org/wikipedia/commons/thumb/archive/e/e2/20230314043227%21Template_map_of_usa_states_and_dc.svg/400px-Template_map_of_usa_states_and_dc.svg.png
I don't know a place to do tests on the Commons. I do a lot of tests via .txt and .svg conversions. Maybe if there was a way to set the px width inside the SVG code? At least for tests. Then I wouldn't have to upload to Fandom or the Commons to see the maps at the size they are found in articles: 300px, 400px, etc.. --Timeshifter (talk) 04:51, 30 April 2023 (UTC)[reply]
The thumbnails are generated by en:librsvg. Guess it doesn't handle small thumbnails very well. In particular, it may not do en:font hinting.
Thanks for checking the thumbnails at various sizes. I don't know what Fandom provides, but find SVGedit useful. Its librsvg renderer is broken, so I use http://svgcheck.toolforge.org as a workaround, though it doesn't handle text perfectly. cmɢʟee ⋅τaʟκ 09:21, 30 April 2023 (UTC)[reply]

Cmglee. Firefox, Chrome, and Edge on my Win 10 Pro PC show the SVG files well. But only at the large sizes. All 3 browsers show the 400 px thumb with very blurry text. Is that what you are seeing too? So as you say, that is coming from Wikimedia poorly converting them to PNG. Though Wikimedia produces quality PNG thumbs of any size in articles.

I want to bypass all that. Is it possible to add a user-editable way to set a thumb size in the SVG code? So that the browsers show the actual SVG file and not PNG. No routing through Wikimedia at all. It would be a temporary setting, and not what I would upload to the Commons or Fandom. SVGedit is beyond my skill level with the limited time I have, and multiple projects going on. --Timeshifter (talk) 12:12, 30 April 2023 (UTC)[reply]

@Timeshifter: One can set width and height in the svg tag, but it's overridden by the wikitext that places thumbnails in articles.
Client-side rendering has been continuously requested for many years. The Description section on its ticket, http://phabricator.wikimedia.org/T5593 explains why it has not been done.
May I confirm that you are viewing the PNG http://upload.wikimedia.org/wikipedia/commons/thumb/e/e2/Template_map_of_usa_states_and_dc.svg/400px-Template_map_of_usa_states_and_dc.svg.png at 100% zoom? If so, I expect all browsers will show the image the same way as there is no further interpolation. I've opened your query to our resident experts on http://en.wikipedia.org/w/index.php?title=Wikipedia:SVG_help&diff=prev&oldid=1153632629 . Let's continue the discussion there.
Cheers,
cmɢʟee ⋅τaʟκ 12:32, 7 May 2023 (UTC)[reply]
Have been busy. Here is the thread:
Wikipedia:WP:SVG help#Text doesn't seem hinted on thumbnail
I will update the link when it is archived.
I will be using the zooming method that Redrose64 and I discussed.
I will explain it at File talk:Template map of usa states and dc.svg/Instructions. So that I and others can start experimenting with US maps for other purposes besides minimum wages and urban populations.
--Timeshifter (talk) 22:09, 27 May 2023 (UTC)[reply]

Is Google Sheet functional?[edit]

Cmglee. I updated the instructions after redoing my steps for preparing the list for the minimum wage map.

I now have another list ready to go: en:User:Timeshifter/Sandbox199. This one is for poverty rates in the US by state.

But the Google Sheets page does not seem to be working for me.

Here is what I see whether I am logged in or not:

Click it to enlarge it. --Timeshifter (talk) 23:32, 2 June 2023 (UTC)[reply]

Oh, I didn't realise that my Gmail account being full precludes use of the sheet. I'll have to free up some space this weekend. Please bear with me, cmɢʟee ⋅τaʟκ 08:36, 3 June 2023 (UTC)[reply]
@Timeshifter: I believe it's working again. ✓ Done cmɢʟee ⋅τaʟκ 19:48, 6 June 2023 (UTC)[reply]
cmglee. Yes it is! Thanks. I continued on my path of duplicating all steps to make a minimum wage map. While updating the instructions. And the OUTPUT looks right for pasting over the same code in the SVG template file. --Timeshifter (talk) 02:17, 7 June 2023 (UTC)[reply]

Cmglee. I am getting the same message again: "The file is view-only. No edits can be made to this file. Contact file owner for details." I can't do anything there. I have map data ready for another map. --Timeshifter (talk) 19:14, 16 July 2023 (UTC)[reply]

Sorry about that. My Drive filled up, and I've cleared about 100 MB. Please try again. Cheers, cmɢʟee ⋅τaʟκ 15:36, 17 July 2023 (UTC)[reply]

Option to show 2-letter state abbreviations on map[edit]

I would like an option to show 2-letter state abbreviations on the map. That would allow me to experiment with larger text sizes for values or states. Without bumping into other text. People would be better able to read the maps at article size. Without having to expand the map.

I like being able to use alphabetical full-name lists, though, to enter the data. Most sources use full names.

The template map SVG code where that data is entered uses the 2-letter state abbreviations. It is alphabetized though according to the full-name alphabetization. Which is perfect for ease of data entry.

I would think it would be possible to use those 2-letter state abbreviations on the map. Since they are already in the SVG code. --Timeshifter (talk) 19:11, 4 June 2023 (UTC)[reply]

Just edit the part of the SVG file with the names:
  <g transform="translate(125,505)"><text class="name" y="-2ex">Alaska</text            ><use class="value" xlink:href="#AK"/></g>
  <g transform="translate(652,442)"><text class="name" y="-2ex">Alabama</text           ><use class="value" xlink:href="#AL"/></g>
  <g transform="translate(545,375)"><text class="name" y="-2ex">Arkansas</text          ><use class="value" xlink:href="#AR"/></g>
  <g transform="translate(200,380)"><text class="name" y="-2ex">Arizona</text           ><use class="value" xlink:href="#AZ"/></g>
  <g transform="translate( 80,325)"><text class="name" y="-2ex">California</text        ><use class="value" xlink:href="#CA"/></g>
  <g transform="translate(320,290)"><text class="name" y="-2ex">Colorado</text          ><use class="value" xlink:href="#CO"/></g>
  <g transform="translate(900,280)"><text class="name" y="-2ex">Connecticut</text       ><use class="value" xlink:href="#CT"/></g>
  <g transform="translate(900,360)"><text class="name" y="-2ex">Delaware</text          ><use class="value" xlink:href="#DE"/></g>
  <g transform="translate(765,525)"><text class="name" y="-2ex">Florida</text           ><use class="value" xlink:href="#FL"/></g>
  <g transform="translate(718,430)"><text class="name" y="-2ex">Georgia</text           ><use class="value" xlink:href="#GA"/></g>
  <g transform="translate(280,580)"><text class="name" y="-2ex">Hawaii</text            ><use class="value" xlink:href="#HI"/></g>
  <g transform="translate(520,230)"><text class="name" y="-2ex">Iowa</text              ><use class="value" xlink:href="#IA"/></g>
  <g transform="translate(190,170)"><text class="name" y="-2ex">Idaho</text             ><use class="value" xlink:href="#ID"/></g>
  <g transform="translate(595,275)"><text class="name" y="-2ex">Illinois</text          ><use class="value" xlink:href="#IL"/></g>
  <g transform="translate(645,260)"><text class="name" y="-2ex">Indiana</text           ><use class="value" xlink:href="#IN"/></g>
  <g transform="translate(440,310)"><text class="name" y="-2ex">Kansas</text            ><use class="value" xlink:href="#KS"/></g>
  <g transform="translate(680,318)"><text class="name" y="-2ex">Kentucky</text          ><use class="value" xlink:href="#KY"/></g>
  <g transform="translate(562,485)"><text class="name" y="-2ex">Louisiana</text         ><use class="value" xlink:href="#LA"/></g>
  <g transform="translate(730,120)"><text class="name" y="-2ex">Massachusetts</text     ><use class="value" xlink:href="#MA"/></g>
  <g transform="translate(900,400)"><text class="name" y="-2ex">Maryland</text          ><use class="value" xlink:href="#MD"/></g>
  <g transform="translate(895,100)"><text class="name" y="-2ex">Maine</text             ><use class="value" xlink:href="#ME"/></g>
  <g transform="translate(665,200)"><text class="name" y="-2ex">Michigan</text          ><use class="value" xlink:href="#MI"/></g>
  <g transform="translate(510,110)"><text class="name" y="-2ex">Minnesota</text         ><use class="value" xlink:href="#MN"/></g>
  <g transform="translate(540,310)"><text class="name" y="-2ex">Missouri</text          ><use class="value" xlink:href="#MO"/></g>
  <g transform="translate(595,415)"><text class="name" y="-2ex">Mississippi</text       ><use class="value" xlink:href="#MS"/></g>
  <g transform="translate(280,110)"><text class="name" y="-2ex">Montana</text           ><use class="value" xlink:href="#MT"/></g>
  <g transform="translate(780,348)"><text class="name" y="-2ex">N.Carolina</text        ><use class="value" xlink:href="#NC"/></g>
  <g transform="translate(412,110)"><text class="name" y="-2ex">North&#8201;Dakota</text><use class="value" xlink:href="#ND"/></g>
  <g transform="translate(425,240)"><text class="name" y="-2ex">Nebraska</text          ><use class="value" xlink:href="#NE"/></g>
  <g transform="translate(730, 40)"><text class="name" y="-2ex">New Hampshire</text     ><use class="value" xlink:href="#NH"/></g>
  <g transform="translate(900,320)"><text class="name" y="-2ex">New Jersey</text        ><use class="value" xlink:href="#NJ"/></g>
  <g transform="translate(300,390)"><text class="name" y="-2ex">New Mexico</text        ><use class="value" xlink:href="#NM"/></g>
  <g transform="translate(130,250)"><text class="name" y="-2ex">Nevada</text            ><use class="value" xlink:href="#NV"/></g>
  <g transform="translate(730,160)"><text class="name" y="-2ex">New York</text          ><use class="value" xlink:href="#NY"/></g>
  <g transform="translate(700,248)"><text class="name" y="-2ex">Ohio</text              ><use class="value" xlink:href="#OH"/></g>
  <g transform="translate(460,375)"><text class="name" y="-2ex">Oklahoma</text          ><use class="value" xlink:href="#OK"/></g>
  <g transform="translate( 90,135)"><text class="name" y="-2ex">Oregon</text            ><use class="value" xlink:href="#OR"/></g>
  <g transform="translate(780,228)"><text class="name" y="-2ex">Pennsylvania</text      ><use class="value" xlink:href="#PA"/></g>
  <g transform="translate(900,240)"><text class="name" y="-4ex">Rhode<tspan
                                                 x="0" y="-2ex">Island</tspan></text    ><use class="value" xlink:href="#RI"/></g>
  <g transform="translate(760,395)"><text class="name" y="-2ex">S.Carolina</text        ><use class="value" xlink:href="#SC"/></g>
  <g transform="translate(415,175)"><text class="name" y="-2ex">South&#8201;Dakota</text><use class="value" xlink:href="#SD"/></g>
  <g transform="translate(655,359)"><text class="name" y="-2ex">Tennessee</text         ><use class="value" xlink:href="#TN"/></g>
  <g transform="translate(430,460)"><text class="name" y="-2ex">Texas</text             ><use class="value" xlink:href="#TX"/></g>
  <g transform="translate(215,275)"><text class="name" y="-2ex">Utah</text              ><use class="value" xlink:href="#UT"/></g>
  <g transform="translate(785,305)"><text class="name" y="-2ex">Virginia</text          ><use class="value" xlink:href="#VA"/></g>
  <g transform="translate(730, 80)"><text class="name" y="-2ex">Vermont</text           ><use class="value" xlink:href="#VT"/></g>
  <g transform="translate(115, 70)"><text class="name" y="-2ex">Washington</text        ><use class="value" xlink:href="#WA"/></g>
  <g transform="translate(575,170)"><text class="name" y="-2ex">Wisconsin</text         ><use class="value" xlink:href="#WI"/></g>
  <g transform="translate(735,285)"><text class="name" y="-2ex">W.Virginia</text        ><use class="value" xlink:href="#WV"/></g>
  <g transform="translate(295,200)"><text class="name" y="-2ex">Wyoming</text           ><use class="value" xlink:href="#WY"/></g>
  <g transform="translate(900,440)"><text class="name" y="-2ex">D. C.</text             ><use class="value" xlink:href="#DC"/></g>
accordingly. I'd recommend saving to a different name, though, in case someone prefers original. Cheers, cmɢʟee ⋅τaʟκ 19:56, 6 June 2023 (UTC)[reply]
Yes, it would be a good idea to have separate files for full state names versus abbreviations. Similarly, it might be a good idea to have a separate template for abbreviations. I assume in the above list one substitutes AK for Alaska, and so on down the list? --Timeshifter (talk) 22:02, 6 June 2023 (UTC)[reply]
Yes, though making a multilingual SVG is, I think, a better solution. See my reply below. cmɢʟee ⋅τaʟκ 23:30, 26 June 2023 (UTC)[reply]

Separate template for state abbreviations?[edit]

cmglee. I created another map from the template. See:

It's a work in progress. I would like to upload another version with 2-letter state abbreviations to a different file name.

Can I create another template for this? Do I just copy the existing template and make the substitutions I asked about in my previous post? --Timeshifter (talk) 09:00, 9 June 2023 (UTC)[reply]

I just thought of another method which prevents the files going out of sync: use a multilingual SVG. This method also allows state names (and other labels) to be displayed in other languages, where appropriate.
I recommend the language named simple for the abbreviations, but the renderer is broken at the moment. I've asked for help on en:Wikipedia:SVG help. We could hack the language code Old English (ang) or no linguistic content (zxx) for this in the meantime. cmɢʟee ⋅τaʟκ 22:27, 26 June 2023 (UTC)[reply]
Yes, one template file sounds better than two, if that is possible. --Timeshifter (talk) 11:41, 27 June 2023 (UTC)[reply]

Change values on map to one decimal place[edit]

Cmglee. Sometime 1 decimal place is enough for the values on the map.

Using the toolbar command I can do that for column C, but not column D here:

I did it manually for File:Poverty rates by state. US map.svg. It only took a minute to do it directly in the SVG code since I did not have to round the numbers. In other words the second decimal place was zero for all values.

But if I need to round up or down, then it would be nice if the template could do it. --Timeshifter (talk) 07:24, 17 June 2023 (UTC)[reply]

I've added a parameter in cell A54. Entering 1 (and pressing Enter) shows 1 decimal place, 0 rounds to nearest integer, -1 rounds to nearest 10, and so forth. cmɢʟee ⋅τaʟκ 22:19, 26 June 2023 (UTC)[reply]
Another great addition. I need to update the instructions. And I noticed it rounds up and down correctly. --Timeshifter (talk) 11:43, 27 June 2023 (UTC)[reply]
Glad to hear. I just used the rounding function on Google Sheets. Thanks for updating the instructions. cmɢʟee ⋅τaʟκ 11:51, 27 June 2023 (UTC)[reply]

"Form responses 1" tab in the Google Sheet[edit]

Cmglee. What is the purpose of the "Form responses 1" tab in the Google Sheet?:

I don't remember what it was used for. Is it necessary now? Can it be removed? --Timeshifter (talk) 08:55, 9 June 2023 (UTC)[reply]

Apparently someone created a blank form and linked it to the spreadsheet. I've unlinked and deleted this sheet. cmɢʟee ⋅τaʟκ 21:46, 26 June 2023 (UTC)[reply]

States without data. How to enter into Google Sheet?[edit]

Cmglee. I am working on a US map for maternal mortality rates. But several states have no data. See:

The map will go in this article:

I updated the 2 main tables in that article.

Google Sheet:

I have tried pasting in several versions of the list. Versions with blank spaces, dashes, and asterisks. None of those worked. Any ideas?

The Google Sheet still works for the example list here:

--Timeshifter (talk) 09:16, 26 June 2023 (UTC)[reply]

If I remember correctly, for states without data, just omit the line similar to
   <use xlink:href="#AL2" fill-opacity="0.736"/><text id="AL">16.30</text>
I've modified the spreadsheet so that input lines without numbers are treated this way. Does it work? cmɢʟee ⋅τaʟκ 22:09, 26 June 2023 (UTC)[reply]
cmglee. Yes, it works great! Thanks! I uploaded this map with some states with no data:
File:Maternal mortality rates per 100,000 births by state. US map.svg
States with no data show up as blank lines in OUTPUT on the Google Sheet. I will update the instructions page.
I copied OUTPUT into the template and it worked fine whether I deleted the blank lines or not from the SVG code.
--Timeshifter (talk) 11:36, 27 June 2023 (UTC)[reply]
My pleasure. I've uploaded a new version and updated the spreadsheet to "lighten and add n/a to states without data". The string "n/a" can be changed by amending cell A53. cmɢʟee ⋅τaʟκ 12:13, 27 June 2023 (UTC)[reply]
P.S. If you were editing the page, sorry I might have overwritten your changes. I was surprised to see most of the page blank and thought I made a mistake so did multiple undos until I saw the page changing again, so I redid my changes. If it's messed up, you could use Google Sheets' Version history (clock icon in top right) to see the changes. cmɢʟee ⋅τaʟκ 12:17, 27 June 2023 (UTC)[reply]
cmglee. I like the lighter color for the states with no data. I will fine tune the maternal mortality rates map later. I also like the ability to choose verbiage for the states without data. Though I am happy with no verbiage added too.
I don't think I edited the Google Sheet other than to paste in and clear lists in the left column. At least I hope that is all I was doing. I copy the OUTPUT results right away, and so feel free to clear any list I happen to leave. I will try to clear the form when I am done, so it doesn't interfere with others later. --Timeshifter (talk) 12:52, 27 June 2023 (UTC)[reply]
Thanks, though no problem leaving the data as is as an example.
I've used the Duplicate command in the dropdown menu at the bottom to make a copy of the Maternal_mortality_rates_per_100,000_births_by_state._US_map.svg data, renamed Sheet1 to WORKING and suggest making a new sheet for each new image. I suppose sheets risk going out of sync when new features are added but they are consistent with the SVG uploaded at the time. cmɢʟee ⋅τaʟκ 13:46, 27 June 2023 (UTC)[reply]

I can't envisage needing old sheets. My data list for each map is always in a separate permanent sandbox for each map. I link to the sandbox from the file description page. Saves me from feeling the need to put the data list farther down the file description page. Plus I will worry about the old sheets being messed up by bugs, updates, other people.

But others may appreciate being able to come back to their work another day to finish it up. And the examples are useful to others. --Timeshifter (talk) 14:50, 27 June 2023 (UTC)[reply]

Font problems listed in Commons SVG file checker[edit]

cmglee. File:Template map of usa states and dc.svg - it has this font family:

font-family="Arial,Helvetica,sans-serif"

I ran the current template file through the 3 file checkers list here:

WMF Labs SVG check says: "No issues found."

The w3.org validator has a long list of problems. I have no idea if any of them are important.

The Commons SVG Checker lists 2 font problems:

HINT in <g>: Font type Arial is not available in Wikimedia software. It has been substituted with a metric equivalent. It will be rendered with minor differences by Wikimedia's SVG renderer. See https://commons.wikimedia.org/wiki/Help:SVG#fallback for details.

WARNING in <g>: Font type Helvetica is not available in Wikimedia software. It will be rendered with minor differences by Wikimedia's SVG renderer. See https://meta.wikimedia.org/wiki/SVG_fonts for details.

I am concerned about those font problems. I had a problem with one of the map files on another wiki (Fandom wiki). The map caption was too long. It extended past the edge of the image, and so the text was cut off on both sides. I had to lessen the font size of the caption for File:Maternal mortality rates per 100,000 births by state. US map.svg. See July 5, 2023 upload comment: "Lessen title font size to shorten title. Problems on other wikis with title being too long in article size image."

My understanding is that every user agent (this being Fandom's) can be different in their font substitutions for SVG files. I would like maximum compatibility so that these SVG files can be shared widely. I maximize the map caption font size so that it is visible at article thumbnail sizes. Since few people will enlarge an image if they can avoid it.

en:Wikipedia:SVG help#font-family property says (I quote):

One can specify a generic font-family such as "sans-serif", "serif", or "monospace", but this can lead to inconsistent rendering. It is better to specify a font available on Wikipedia (such as Liberation Sans) with fallback fonts such as: font-family="Liberation Sans,Arial,Helvetica,sans-serif", in which you define a font-list with similar fonts that at least contain one font for each Operating System such as Wikimedia (e.g. Liberation Sans), Windows (e.g. Arial), Linux (e.g. Liberation Sans), Mac (e.g. Helvetica).

--Timeshifter (talk) 03:33, 17 July 2023 (UTC)[reply]

You're right that about the font. I should perhaps specify "Liberation Sans" but assumed it would automatically fall back as on http://meta.wikimedia.org/wiki/SVG_fonts#Fallback . Note that it's just a "warning" not an "error", though. I chose Helvetica and Arial as they are more likely to be available on Mac and Windows then Liberation Sans. cmɢʟee ⋅τaʟκ 23:20, 17 July 2023 (UTC)[reply]
cmglee. The US SVG map fonts:
font-family="Arial,Helvetica,sans-serif"
These fonts below all have about the same line length (A-Z, 0-9, etc.) in File:SVG Text Font Test.svg
font-family="Liberation Sans,Nimbus Sans L,Arial,Helvetica,sans-serif"
Except for sans-serif which could use any sans-serif font the user agent in a wiki is set for.
I like having multiple free Sans fonts listing in the font family if they have similar line lengths A-Z. This allows more opportunity for the user agent to find something.
--Timeshifter (talk) 10:29, 18 July 2023 (UTC)[reply]
Feel free to update the SVG accordingly. Arial and Liberation Sans were designed to have similar metrics to Helvetica so that text laid out for Helvetica doesn't overrun when Helvetica is missing and these fonts are substituted. The last font should be sans-serif as a fallback in case all the named fonts are unavailable. cmɢʟee ⋅τaʟκ 15:44, 18 July 2023 (UTC)[reply]
cmglee. I updated the template fonts. Currently it is this:
font-family="Liberation Sans,Arial,Helvetica,sans-serif"
I removed "Nimbin Sans L". SVG file check says: "Nimbus Sans L is not available in Wikimedia software."
When I added it to the font-family list for a map it caused little squares to show up on a Shoutwiki map. Instead of characters. So I removed it from all the maps. --Timeshifter (talk) 20:11, 24 July 2023 (UTC)[reply]

Can't change text size of states[edit]

Cmglee. I tried various text sizes for the state names. It didn't work until I changed .state to .name in the template SVG here:

.title  { font-size:32px; letter-spacing:0; }
.legend { font-size:18px; }
.state  { font-size:17px; }
.value  { font-size:18px; font-weight:bold; }

--Timeshifter (talk) 06:49, 23 July 2023 (UTC)[reply]

Well spotted. I may have decided to change the identifier but forgot to update the CSS. Cheers, cmɢʟee ⋅τaʟκ 07:05, 23 July 2023 (UTC)[reply]
Cmglee. I went ahead and changed class="name" to class="state" in the template SVG. I uploaded it. --Timeshifter (talk) 10:32, 23 July 2023 (UTC)[reply]

Template range starts at 0% instead of 35.1%[edit]

Cmglee. I noticed that the range in the template map is from 0% to 100%.

I recalculated it from scratch using the Google sheet, and the range is 35.1% to 100%. See: en:User:Timeshifter/Sandbox217. I uploaded it here:

That version also has all my currently preferred text sizes. Text sizes: 30-28-17-17px. See file history and version info.
https://static.wikia.nocookie.net/cannabis/images/1/1f/Template_map_of_U.S._states_and_DC._Beta.svg/revision/latest?cb=20230724201546

Note the thumbnail size tests farther down the page. Muddiness occurs for thumbs around 500px wide or lower. And the title expands left and right. Compared to the 550px-wide thumb with the sharp text and narrower title. --Timeshifter (talk) 20:36, 24 July 2023 (UTC)[reply]

@Timeshifter: please keep the range from 0 to 100% for the template to demonstrate the opacity technique without involving the Google Sheet. Maps derived from it can use their appropriate ranges. Feel free to change the text size to suit. Thanks, cmɢʟee ⋅τaʟκ 23:42, 24 July 2023 (UTC)[reply]
Cmglee. OK. I uploaded a template map on the Commons with these text sizes: 30-28-17-17px. From top to bottom of list in SVG code. No bolding. Text outlines remain.
I am doing experiments with the version on Fandom. I noticed that starting at O on the legend limited the range of colors. With both the old and new palette. See file history.
Ooops. I forgot that Fandom messed up their image pages. In their infinite wisdom they don't allow non-logged-in people to access the standard file description pages. Only logged-in users can see them.
The thumbs I discussed previously can be accessed here:
https://weedwiki.fandom.com/wiki/User:Timeshifter/Sandbox37
--Timeshifter (talk) 06:24, 25 July 2023 (UTC)[reply]
If you feel that the urbanization example should not start with 0, please upload it as a separate file. I'd like to keep the template from 0 to 100 to show how the percentage maps to opacity. Alternatively, can you please suggest a realistic example which uses the full 0–100 range? Thanks, cmɢʟee ⋅τaʟκ 10:57, 25 July 2023 (UTC)[reply]
OK, Cmglee. The separate template files are the ones on Fandom and Shoutwiki (if I create one there). I will have to think of some percentage measurement for the US that uses the whole range from 0 to 100%. --Timeshifter (talk) 15:56, 25 July 2023 (UTC)[reply]

"The source code of this SVG is invalid due to 2 errors."[edit]

Cmglee. What does this mean?: "The source code of this SVG is invalid due to 2 errors." Here is the "invalid" link:

What do the results mean? And how does one know what parameters to use when placing this on an SVG file page?:

other fields={{Igen|U|2|+|%|s=m}}

It seems that the results it gets are more focused than from here:

--Timeshifter (talk) 13:09, 27 July 2023 (UTC)[reply]

It's just being very fussy about not explicitly naming the result of the previous SVG filter operation and stating it in in2:
Error Line 9, Column 32: SVG element feBlend is missing required attribute in2.
   <feBlend in="SourceGraphic"/>

Error Line 10, Column 32: SVG element feBlend is missing required attribute in2.
   <feBlend in="SourceGraphic"/>
I haven't seen a browser or rsvg fail because of it: all assume the operations are to be done sequentially. Cheers, cmɢʟee ⋅τaʟκ 18:20, 27 July 2023 (UTC)[reply]

Reverted to previous map[edit]

Reverted to remove Catalan language switch. Reverted to version as of 25 July 2023. This file is a template for other maps and needs to remain simple.

Upload Catalan-switch version as a new file. See Commons:Overwriting existing files: "When in doubt, or to resolve inter-user conflicts, upload as a new file."

I uploaded the 2 versions one after the other to a sandbox. I put pre tags around both so that they were treated as text files. Around 11 KB of text was added according to the revision history.

See diff at en:User:Timeshifter/Sandbox237. The diff between the 2 shows what has been changed. --Timeshifter (talk) 13:25, 11 January 2024 (UTC)[reply]