<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.transpeopletogether.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AResourcePlaceClassifier</id>
	<title>Module:ResourcePlaceClassifier - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.transpeopletogether.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AResourcePlaceClassifier"/>
	<link rel="alternate" type="text/html" href="https://www.transpeopletogether.org/w/index.php?title=Module:ResourcePlaceClassifier&amp;action=history"/>
	<updated>2026-04-19T05:45:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://www.transpeopletogether.org/w/index.php?title=Module:ResourcePlaceClassifier&amp;diff=2075&amp;oldid=prev</id>
		<title>Admin at 00:25, 23 May 2025</title>
		<link rel="alternate" type="text/html" href="https://www.transpeopletogether.org/w/index.php?title=Module:ResourcePlaceClassifier&amp;diff=2075&amp;oldid=prev"/>
		<updated>2025-05-23T00:25:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:25, 22 May 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l7&quot;&gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     local pages = mw.text.split(input, &amp;quot;;&amp;quot;, true)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     local pages = mw.text.split(input, &amp;quot;;&amp;quot;, true)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     if string.find(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pages&lt;/del&gt;, &quot;Pacific Northwest&quot;) and not string.find(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pages&lt;/del&gt;, &quot;United States of America&quot;) then&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     if string.find(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;input&lt;/ins&gt;, &quot;Pacific Northwest&quot;) and not string.find(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;input&lt;/ins&gt;, &quot;United States of America&quot;) then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         return &amp;quot;Pacific Northwest&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         return &amp;quot;Pacific Northwest&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key tpt_wiki:diff:1.41:old-2074:rev-2075:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://www.transpeopletogether.org/w/index.php?title=Module:ResourcePlaceClassifier&amp;diff=2074&amp;oldid=prev</id>
		<title>Admin at 00:24, 23 May 2025</title>
		<link rel="alternate" type="text/html" href="https://www.transpeopletogether.org/w/index.php?title=Module:ResourcePlaceClassifier&amp;diff=2074&amp;oldid=prev"/>
		<updated>2025-05-23T00:24:43Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:24, 22 May 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l6&quot;&gt;Line 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     -- split and trim input into individual page titles&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     -- split and trim input into individual page titles&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     local pages = mw.text.split(input, &amp;quot;;&amp;quot;, true)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     local pages = mw.text.split(input, &amp;quot;;&amp;quot;, true)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    if string.find(pages, &quot;Pacific Northwest&quot;) and not string.find(pages, &quot;United States of America&quot;) then&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;        return &quot;Pacific Northwest&quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    end&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     -- flags for global classification checks&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     -- flags for global classification checks&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://www.transpeopletogether.org/w/index.php?title=Module:ResourcePlaceClassifier&amp;diff=2044&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;-- Module:PNWClassifier local p = {}  function p.classify(frame)     local input = frame.args[1] or &quot;&quot;     -- split and trim input into individual page titles     local pages = mw.text.split(input, &quot;;&quot;, true)      -- flags for global classification checks     local hasOutside, hasOregon, hasWashington = false, false, false     local isPortlandCandidate, isSeattleCandidate = true, true     local sawPortlandCounty, sawSeattleCounty = false, false      -- set of the four Po...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.transpeopletogether.org/w/index.php?title=Module:ResourcePlaceClassifier&amp;diff=2044&amp;oldid=prev"/>
		<updated>2025-05-22T17:09:29Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;-- Module:PNWClassifier local p = {}  function p.classify(frame)     local input = frame.args[1] or &amp;quot;&amp;quot;     -- split and trim input into individual page titles     local pages = mw.text.split(input, &amp;quot;;&amp;quot;, true)      -- flags for global classification checks     local hasOutside, hasOregon, hasWashington = false, false, false     local isPortlandCandidate, isSeattleCandidate = true, true     local sawPortlandCounty, sawSeattleCounty = false, false      -- set of the four Po...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Module:PNWClassifier&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.classify(frame)&lt;br /&gt;
    local input = frame.args[1] or &amp;quot;&amp;quot;&lt;br /&gt;
    -- split and trim input into individual page titles&lt;br /&gt;
    local pages = mw.text.split(input, &amp;quot;;&amp;quot;, true)&lt;br /&gt;
&lt;br /&gt;
    -- flags for global classification checks&lt;br /&gt;
    local hasOutside, hasOregon, hasWashington = false, false, false&lt;br /&gt;
    local isPortlandCandidate, isSeattleCandidate = true, true&lt;br /&gt;
    local sawPortlandCounty, sawSeattleCounty = false, false&lt;br /&gt;
&lt;br /&gt;
    -- set of the four Portland-area counties (without “, Oregon” suffix)&lt;br /&gt;
    local portlandCounties = {&lt;br /&gt;
        [&amp;quot;Multnomah County&amp;quot;] = true,&lt;br /&gt;
        [&amp;quot;Clackamas County&amp;quot;] = true,&lt;br /&gt;
        [&amp;quot;Washington County&amp;quot;] = true,&lt;br /&gt;
        [&amp;quot;Clark County&amp;quot;] = true&lt;br /&gt;
    }&lt;br /&gt;
    local seattleCountyName = &amp;quot;King County&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    for _, raw in ipairs(pages) do&lt;br /&gt;
        local titleText = mw.text.trim(raw)&lt;br /&gt;
&lt;br /&gt;
        -- run an SMW inline query to fetch state &amp;amp; county for this title&lt;br /&gt;
        local query = {&lt;br /&gt;
            &amp;quot;[[&amp;quot; .. titleText .. &amp;quot;]]&amp;quot;,&lt;br /&gt;
            &amp;quot;?Has state=state&amp;quot;,&lt;br /&gt;
            &amp;quot;?Has county=county&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
        local results = mw.smw.ask(query) or {}&lt;br /&gt;
        local state, county = nil, nil&lt;br /&gt;
        if #results &amp;gt; 0 then&lt;br /&gt;
            local row = results[1]&lt;br /&gt;
            state  = row.state&lt;br /&gt;
            county = row.county&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        -- track which states we see&lt;br /&gt;
        if state == &amp;quot;Oregon&amp;quot; then&lt;br /&gt;
            hasOregon = true&lt;br /&gt;
        elseif state == &amp;quot;Washington&amp;quot; then&lt;br /&gt;
            hasWashington = true&lt;br /&gt;
        else&lt;br /&gt;
            hasOutside = true&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        -- if there&amp;#039;s no county, it&amp;#039;s a state-only page → disqualify metro-area&lt;br /&gt;
        if not county or county == &amp;quot;&amp;quot; then&lt;br /&gt;
            isPortlandCandidate = false&lt;br /&gt;
            isSeattleCandidate  = false&lt;br /&gt;
        else&lt;br /&gt;
            -- strip off the “, State” to get just the county name&lt;br /&gt;
            local c = county:match(&amp;quot;^(.-),&amp;quot;)&lt;br /&gt;
            if portlandCounties[c] then&lt;br /&gt;
                sawPortlandCounty = true&lt;br /&gt;
            else&lt;br /&gt;
                isPortlandCandidate = false&lt;br /&gt;
            end&lt;br /&gt;
            if c == seattleCountyName then&lt;br /&gt;
                sawSeattleCounty = true&lt;br /&gt;
            else&lt;br /&gt;
                isSeattleCandidate = false&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- now classify in precedence order&lt;br /&gt;
    if hasOutside then&lt;br /&gt;
        return &amp;quot;Outside PNW&amp;quot;&lt;br /&gt;
    elseif hasOregon and hasWashington then&lt;br /&gt;
        return &amp;quot;Pacific Northwest&amp;quot;&lt;br /&gt;
    elseif isPortlandCandidate and sawPortlandCounty then&lt;br /&gt;
        return &amp;quot;Portland Area&amp;quot;&lt;br /&gt;
    elseif isSeattleCandidate and sawSeattleCounty then&lt;br /&gt;
        return &amp;quot;Seattle Area&amp;quot;&lt;br /&gt;
    elseif hasOregon and not hasWashington then&lt;br /&gt;
        return &amp;quot;Other Oregon&amp;quot;&lt;br /&gt;
    elseif hasWashington and not hasOregon then&lt;br /&gt;
        return &amp;quot;Other Washington&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- fallback (shouldn’t happen)&lt;br /&gt;
    return &amp;quot;Unknown&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>