User talk:Dan PolanskyWelcome!Hiya, Dan Polansky, and welcome to Wikipedia! I hope you like the place and decide to stay. Here are some pages that you might find helpful:
I hope you enjoy editing here and being a Wikipedian! Please sign your name on talk pages using four tildes (~~~~); this will automatically produce your name and the date. If you need help, check out Wikipedia:Questions, come by and post a question for me on my talk page, or place
Recreated as per request. Kind regards Buckshot06(prof) 16:30, 16 January 2009 (UTC) Hi Dan, I notice you haven't been active much recently, but I thought you might be interested in the discussion at Talk:SMART criteria#Requested move, since you have contributed quite a bit to the article in the past. Yaris678 (talk) 22:17, 19 June 2013 (UTC)
Covid cases per capitaAn updated version of the script is at Commons:File talk:COVID-19 Outbreak World Map Total Deaths per Capita.svg. I created a quick script that takes data maintaned in Wikipedia (List of countries and dependencies by population, Template:2019–20 coronavirus pandemic data) and outputs covid cases per capita and covid deaths per capita: from __future__ import print_function, division
import sys, urllib, re, math
from datetime import datetime
# Limitations:
# - The regions of the two sources may have some cases of poor correspondence.
# This should be eventually addressed.
regionNameCanonizationMap = {
"Congo, Democratic Republic of the": "DR Congo",
"Cote d'Ivoire": "Ivory Coast",
"Hong Kong (China)": "Hong Kong",
"Korea, Republic of": "South Korea",
"Macau (China)": "Macau",
"Macao": "Macau",
"Republic of the Congo": "Congo",
"Russian Federation": "Russia",
"Saint Vincent and the Grenadines": "St. Vincent and the Grenadines",
"State of Palestine": "Palestine",
"United States of America": "United States",
}
def main():
covidCasesPerCapita, covidDeathsPerCapita = grabAndCalcCovidPerCapita()
grabAndSaveSvg(covidCasesPerCapita, covidDeathsPerCapita)
def grabAndCalcCovidPerCapita():
capita = grapCapitaFromWpTable()
covid = grabCovidDataFromWpTemplate()
countries = sorted(set(capita.keys()) & set(covid.keys()))
covidCasesPerCapita = {}
covidDeathsPerCapita = {}
for country in countries:
covidCasesPerCapita[country] = covid[country][0] / float(capita[country])
for country in countries:
covidDeathsPerCapita[country] = covid[country][1] / float(capita[country])
covidNotCapita = sorted(set(covid.keys()) - set(capita.keys()))
print("\nRegion names with covid data but not capita:")
for item in covidNotCapita:
print(item)
print("\nPopulation:")
for key in sorted(capita):
print(key, capita[key])
print("\nConfirmed cases, deaths and recoveries:")
for key in sorted(covid):
print(key, covid[key])
print("\nTotal confirmed cases per capita:")
for country in sorted(countries):
print(country, "%.2g" % covidCasesPerCapita[country])
print("\nDeaths per capita:")
for country in sorted(countries):
print(country, "%.2g" % covidDeathsPerCapita[country])
print("\nDeaths per total reported cases:")
deathsPerCases = calcDeathsPerCases(covid)
deathsPerCasesSorted = sorted(deathsPerCases.items(), key=lambda x: x[1], reverse=True)
for key, value in deathsPerCasesSorted:
print("%-15s %.2g" % (key, value))
print("\nTop 100 total confirmed cases per million people:")
casesPerCapSorted = sorted(covidCasesPerCapita.items(), key=lambda x: x[1], reverse=True)
for key, value in casesPerCapSorted[0:100]:
value = value * 1E6
if value >= 1000:
print("%-15s %i" % (key, value))
else:
print("%-15s %.3g" % (key, value))
print("\nTop 50 deaths per million people:")
deathsSorted = sorted(covidDeathsPerCapita.items(), key=lambda x: x[1], reverse=True)
for key, value in deathsSorted[0:50]:
value = value * 1E6
if value >= 1000:
print("%-15s %i" % (key, value))
else:
print("%-15s %.3g" % (key, value))
print("Current time (UTC)", datetime.utcnow())
return covidCasesPerCapita, covidDeathsPerCapita
def calcDeathsPerCases(covidData):
# covidData: dict: region name --> triple (a list)
deathsPerCases = {}
for regionName in covidData:
deaths, cases = covidData[regionName][1], covidData[regionName][0]
if cases >= 100:
deathsPerCases[regionName] = deaths / cases
return deathsPerCases
def cleanAndSetupHtmlForTableExtraction(allLines):
allLines = re.sub("</table.*", "", allLines)
allLines = re.sub("<(th|td)[^>]*>", r"<td>", allLines)
allLines = re.sub("</?(span|img|a|sup)[^>]*>", "", allLines)
allLines = re.sub("</(th|td|tr)[^>]*>", "", allLines)
allLines = re.sub("[.*?]", "", allLines)
allLines = re.sub(",", "", allLines)
allLines = re.sub("<small>.*?</small>;?", "", allLines)
allLines = re.sub("</?(i|b)>", "", allLines)
allLines = re.sub(" ", " ", allLines)
return allLines
def grapCapitaFromWpTable():
url = "https://en.wikipedia.org/wiki/List_of_countries_and_dependencies_by_population"
allLines = []
for line in urllib.urlopen(url):
allLines.append(line.rstrip())
allLines = " ".join(allLines)
allLines = re.sub("^.*Country (or dependent territory).*</tr>", "", allLines)
allLines = cleanAndSetupHtmlForTableExtraction(allLines)
outData = {}
rows = allLines.split("<tr> ")
for row in rows:
try:
if "Population" in row: continue
cols = row.split("<td>")
country = cols[2].strip()
country = ensureCanonicalRegionName(country)
population = int(cols[3])
except Exception as ex:
print(ex)
continue
outData[country] = population
return outData
def grabCovidDataFromWpTemplate():
# Returns a dictionary where country names are keys and
# the values are lists of column values, for 3 columns
url = "https://en.wikipedia.org/wiki/Template:2019%E2%80%9320_coronavirus_pandemic_data"
allLines = []
for line in urllib.urlopen(url):
allLines.append(line.rstrip())
allLines = " ".join(allLines)
allLines = re.sub("^.*jquery-tablesorter", "", allLines)
allLines = cleanAndSetupHtmlForTableExtraction(allLines)
outData = {}
rows = allLines.split("<tr> ")
for row in rows:
try:
if "Location" in row: continue
cols = row.split("<td>")
country = cols[2].strip()
country = ensureCanonicalRegionName(country)
if re.match("^ *[0-9,]* *$", country): continue # Not a country but totals
cols = cols[3:6]
cols = [int(col) if re.match("^ *[0-9]* *$", col) else None for col in cols]
except Exception as ex:
print(ex)
continue
outData[country] = cols
return outData
def extractRegionCodeToTitleFromSvg(svgLines):
regionTitles = {}
openedRegion = ""
for line in svgLines:
match = re.match(".*<(g|path) id=\"(.*?)\"", line)
if match:
openedRegion = match.group(2)
elif openedRegion != "" and "<title>" in line:
line = re.sub(".*<title>", "", line)
line = re.sub("</title>.*", "", line)
regionTitles[openedRegion] = ensureCanonicalRegionName(line)
else:
openedRegion = ""
return regionTitles
def ensureCanonicalRegionName(name):
if name in regionNameCanonizationMap:
name = regionNameCanonizationMap[name]
name = re.sub(",.*", "", name)
return name
def createSvgStyles(regionTitles, covidCasesPerCapita, forDeaths=False):
regionTitleToCode = {v: k for k, v in regionTitles.iteritems()}
colorsForCases = [
"#FDD5C1", "#ffC0C0", "#ee7070", "#c80200", "#900000", "#510000",
]
colorsForDeaths = [
#"#eeccee", "#cc99cc", "#aa77aa", "#885588", "#663366", "#441144",
#"#eeccee", "#cc99cc", "#aa77aa", "#885588", "#663366", "#000000",
#"#f1eef6", "#d4b9da", "#c994c7", "#df65b0", "#dd1c77", "#980043",
# ^ https://colorbrewer2.org/#type=sequential&scheme=PuRd&n=6
"#e1e0f6", "#d4b9da", "#c994c7", "#df65b0", "#dd1c77", "#980043", # Mod.of above
#"#edf8fb", "#bfd3e6", "#9ebcda", "#8c96c6", "#8856a7", "#810f7c",
# ^ https://colorbrewer2.org/#type=sequential&scheme=BuPu&n=6
]
colors = colorsForDeaths if forDeaths else colorsForCases
def appendStyleForRegion(styleLines, regionName, colorIndex):
if regionName in regionTitleToCode:
regionCode = regionTitleToCode[regionName]
styleLines.append("/* " + regionName + " */")
styleLines.append("." + regionCode)
styleLines.append("{")
styleLines.append(" fill:%s;" % colors[colorIndex])
styleLines.append("}")
styleLines.append("")
else:
print("WARNING: region name not found in name-to-code mapping:", regionName)
styleLines = []
for regionName in covidCasesPerCapita:
count = covidCasesPerCapita[regionName]
if count == 0:
continue
countLog = int(math.log(count, 10))
colorIndex = countLog + (8 if forDeaths else 8)
colorIndex = min(colorIndex, 5)
colorIndex = max(colorIndex, 0)
appendStyleForRegion(styleLines, regionName, colorIndex)
return styleLines
def insertStyleLines(allLines, styleLines):
# Find index of </style> and place svgStyleLines before that.
styleLines.reverse()
styleEndIndex = allLines.index(" </style>")
for line in styleLines:
allLines.insert(styleEndIndex, line)
def grabAndSaveSvg(covidCasesPerCapita, covidDeathsPerCapita):
url = "https://upload.wikimedia.org/wikipedia/commons/4/4d/BlankMap-World.svg"
allLines = []
for line in urllib.urlopen(url):
allLines.append(line.rstrip())
allLinesBackup = allLines[:]
regionTitles = extractRegionCodeToTitleFromSvg(allLines)
styleLines = createSvgStyles(regionTitles, covidCasesPerCapita)
insertStyleLines(allLines, styleLines)
with open("COVID-19 Outbreak World Map Total Cases per Capita.svg", "w") as outfile:
for line in allLines:
outfile.write(line)
outfile.write("\n")
allLines = allLinesBackup
styleLines = createSvgStyles(regionTitles, covidDeathsPerCapita, forDeaths=True)
insertStyleLines(allLines, styleLines)
with open("COVID-19 Outbreak World Map Total Deaths per Capita.svg", "w") as outfile:
for line in allLines:
outfile.write(line)
outfile.write("\n")
main()
For instance, for Italy it outputs 0.00041 cases per capita, consistent with worldometers.info, which has 409.3 cases per million population for Italy. Now I need to change and expand the script to work with country codes instead of country names, and to output colored SVG map. To run the script yourself, you do not need to be a programmer:
--Dan Polansky (talk) 13:26, 16 March 2020 (UTC) I published output of the script at B:User:Dan Polansky/COVID-19, total cases per capita and total deaths per capita. The results for cases per capita are very similar what worldometers has. --Dan Polansky (talk) 13:51, 16 March 2020 (UTC)
The WP:Refactor was to keep the discussion going for othersI’m happy and interested to keep the academic discussion going between us on our talk pages but it was too long and circular for others. Do you get what I mean?—Almaty (talk) 09:40, 17 March 2020 (UTC)
(outdent) I do not discuss good or bad faith of the above editor; I merely ask them to undo their inappropriate censorship and editing of other people's comments. Let me pick just one pair of responses (Special:Diff/945981338): WAS:
IS:
That is really hugely inappropriate; it is a misrepresentation of the communication that took place, and it must be undone. --Dan Polansky (talk) 10:20, 17 March 2020 (UTC)
as stated it wasn’t to change the meaning but to summarise, that’s how refactoring works. And you are allowed to summarise your statements too. —Almaty (talk) 11:39, 17 March 2020 (UTC)
Well I used that guideline wirth success. I removed personal attacks and repetitive assertions that I work for the WHO. I feel targeted by this editor as he has somehow convinced that’s what I am. I tired to make a joke about it, I tried to tactfully remind him to be civil, but basically he blatantly attacks me as a “WHO censor” and this has led to my wikbreak for my sanity Almaty (talk) 14:54, 17 March 2020 (UTC) To declare I am doing a masters of public health and political comms, and I feel I’ve contributed quite a lot of the current texts especially quite important words to have clear outbreak communication. If this badgering continues I will report to ANI. Almaty (talk) 14:56, 17 March 2020 (UTC) and the section of refactoring I did was
COVID-19 cases per capita tableHi Dan! As you know, I want you to succeed with getting the per capita table integrated, but I have to tell you I don't think your most recent insertion is going to go well. You still haven't addressed the formatting issues I previously mentioned that make the table stylistically inferior to the totals table. Until you do, it's very likely to just get removed again, since people are going to find it easier to delete it than to fix it. If you want it inserted that badly, which it seems you do, you need to put in the effort to make it ready for that. And I think once you do you'll find it surprisingly welcome. {{u|Sdkb}} talk 09:13, 3 May 2020 (UTC)
COVID-19 deaths per day on Sweden pageHello Dan, why did you undo the updated graph for deaths per day on https://en.wikipedia.org/wiki/COVID-19_pandemic_in_Sweden. Your comment says "undo anonymous edits that added the most recent daily death data, which creates a misleading idea in the mind of readers". What is misleading in the face of updated official data? Balance66 (talk) 13:21, 25 May 2020 (UTC)
Sorry I didn't notice the talk page on the entry itself. Only the individual user talks. I found it though. As I said - the chart will smooth as the new data comes in (or not), but as long as official numbers are coming out, if the chart is there it should extend the existing set. But we can't assume "the mind of the reader". — Preceding unsigned comment added by Balance66 (talk • contribs) 16:48, 25 May 2020 (UTC)
Do people take covid-19 seriousCovid-19 LisaFifa (talk) 01:04, 29 May 2020 (UTC) Readable prose sizeInstead of ignoring the fact that I'm just a new user still getting the hang of some things and suggesting some sort of ulterior motive on my part, maybe you can actually, you know, educate me on how readable prose size is calculated? I actually asked about this on the talk page for COVID-19 pandemic in Sweden and I still haven't heard back from anyone about it. Love of Corey (talk) 10:21, 6 August 2020 (UTC)
All causes deaths tablesNoticed you added all-causes-deaths tables to several articles. This might not be WP:NPOV. I'm also not sure why we need to use lots of screen space on detailed death rates for prior years. This causes the interesting part of the graph to be compressed at the right edge. Perhaps a one year graph with the various years' data overlaid - prior years in various shades of gray, and the current (partial) year a vivid color. EphemeralErrata (talk) 23:04, 8 August 2020 (UTC)
All-cause death chartsIt's your edits the ones being disputed. Probably YOU should have sought a consensus when you were first reverted rather than keeping pressing for your edits. These are in violation of several policies and guidelines (like WP:RAWDATA and WP:PRIMARYSOURCE, for example). Wikipedia is not an indiscriminate collection of information or of generic data tables. Impru20talk 18:39, 11 August 2020 (UTC)
Admissibility of primary sourcesFor my reference: the use of primary sources is not forbidden, as per WP:No original research:
I made that point in Talk:COVID-19 pandemic in the United Kingdom#All-cause death charts. One should not put one's own analysis of the primary source into the article, though. --Dan Polansky (talk) 10:07, 12 August 2020 (UTC) Verifiability, not truthThere is Wikipedia:Verifiability, not truth, and its status is essay, not a policy or guideline. I find the idea to be dangerous nonsense. The objective of verification is to make as sure as possible that the sentences are true. If, on the other hand, I know positively sentence S is untrue, I should not run around inserting S into an encyclopedia and finding sources for it that some poor souls might accept as "reliable". The objective is to accumulate knowledge, not myth or "reliably" sourced misinformation. By contrast, Wikipedia:Verifiability has the status of a policy. In Popperian vein, one might want to have another essay: Falsifiability, not verifiability. That would be more interesting. But that would belong to the area of real, original research. --Dan Polansky (talk) 06:53, 4 September 2020 (UTC) September 2020Your recent editing history at COVID-19 pandemic in the United States shows that you are currently engaged in an edit war; that means that you are repeatedly changing content back to how you think it should be, when you have seen that other editors disagree. To resolve the content dispute, please do not revert or change the edits of others when you are reverted. Instead of reverting, please use the talk page to work toward making a version that represents consensus among editors. The best practice at this stage is to discuss, not edit-war. See the bold, revert, discuss cycle for how this is done. If discussions reach an impasse, you can then post a request for help at a relevant noticeboard or seek dispute resolution. In some cases, you may wish to request temporary page protection. Being involved in an edit war can result in you being blocked from editing—especially if you violate the three-revert rule, which states that an editor must not perform more than three reverts on a single page within a 24-hour period. Undoing another editor's work—whether in whole or in part, whether involving the same or different material each time—counts as a revert. Also keep in mind that while violating the three-revert rule often leads to a block, you can still be blocked for edit warring—even if you do not violate the three-revert rule—should your behavior indicate that you intend to continue reverting repeatedly. - MrX 🖋 13:01, 7 September 2020 (UTC)
- MrX 🖋 13:32, 7 September 2020 (UTC)
ArbCom 2020 Elections voter messageArbCom 2021 Elections voter messagePurpose redirect to dabI restored your redirect to the dab page after initially reverting it. Viriditas (talk) 22:53, 14 August 2022 (UTC) Package link in "Further reading" section?Why did you add a package download link to a commercial (freemium) download site? Why did you add a package download link to a "Further reading" section? Is there something there to (further) read other than the labels on the controls used to download the software? Thx. +package link -------- (talk) 15:38, 28 November 2022 (UTC)
ArbCom 2022 Elections voter messageHello! Voting in the 2022 Arbitration Committee elections is now open until 23:59 (UTC) on Monday, 12 December 2022. All eligible users are allowed to vote. Users with alternate accounts may only vote once. The Arbitration Committee is the panel of editors responsible for conducting the Wikipedia arbitration process. It has the authority to impose binding solutions to disputes between editors, primarily for serious conduct disputes the community has been unable to resolve. This includes the authority to impose site bans, topic bans, editing restrictions, and other measures needed to maintain our editing environment. The arbitration policy describes the Committee's roles and responsibilities in greater detail. If you wish to participate in the 2022 election, please review the candidates and submit your choices on the voting page. If you no longer wish to receive these messages, you may add Disambiguation link notification for December 19Hi. Thank you for your recent edits. An automated process has detected that when you recently edited Technological singularity, you added a link pointing to the disambiguation page The Physics of Immortality. Such links are usually incorrect, since a disambiguation page is merely a list of unrelated topics with similar titles. (Read the FAQ • Join us at the DPL WikiProject.) It's OK to remove this message. Also, to stop receiving these messages, follow these opt-out instructions. Thanks, DPL bot (talk) 06:02, 19 December 2022 (UTC) Ontology (Information Science)please revert the redirect from Ontology (Information Science) to Ontology (Information Science) and not Ontology (Computer science). The move is not sufficiently motivated by the "evidence" in wikidata. may I ask what has motivated your actions here? — Preceding unsigned comment added by Neumarcx (talk • contribs) 08:43, 6 June 2023 (UTC)
ArbCom 2023 Elections voter messageHello! Voting in the 2023 Arbitration Committee elections is now open until 23:59 (UTC) on Monday, 11 December 2023. All eligible users are allowed to vote. Users with alternate accounts may only vote once. The Arbitration Committee is the panel of editors responsible for conducting the Wikipedia arbitration process. It has the authority to impose binding solutions to disputes between editors, primarily for serious conduct disputes the community has been unable to resolve. This includes the authority to impose site bans, topic bans, editing restrictions, and other measures needed to maintain our editing environment. The arbitration policy describes the Committee's roles and responsibilities in greater detail. If you wish to participate in the 2023 election, please review the candidates and submit your choices on the voting page. If you no longer wish to receive these messages, you may add ArbCom 2024 Elections voter messageHello! Voting in the 2024 Arbitration Committee elections is now open until 23:59 (UTC) on Monday, 2 December 2024. All eligible users are allowed to vote. Users with alternate accounts may only vote once. The Arbitration Committee is the panel of editors responsible for conducting the Wikipedia arbitration process. It has the authority to impose binding solutions to disputes between editors, primarily for serious conduct disputes the community has been unable to resolve. This includes the authority to impose site bans, topic bans, editing restrictions, and other measures needed to maintain our editing environment. The arbitration policy describes the Committee's roles and responsibilities in greater detail. If you wish to participate in the 2024 election, please review the candidates and submit your choices on the voting page. If you no longer wish to receive these messages, you may add |