Ted Petrou Profile picture
15 Dec, 14 tweets, 3 min read
Sweden's two-year mortality rate in 2019-2020 is one of the lowest in the last 10 years.

I even overestimated 2020 deaths by 2-3%.

Share this to everyone you know who tries to point at Sweden as an example of covid policy failure.

Their strategy has been a huge success.
Data is directly from Statistics Sweden - scb.se/en
Overall deaths have grown slightly but not in proportion to the population, so mortality rates have decreased.
2020 will have more deaths than 2019, but 2019 was an anomalously low year for mortality rate (about a 5% drop from 2018). 2020 will be about a 5-7% increase compared to 2018, essentially cancelling out the drop in 2019.
2019 might have had an abnormally low death winter season, pushing the most likely to die into 2020.
Continuing - it took me a while to realize that comparing mortality by year is a poor metric. January deaths are 15-25% higher in the US than July and more variable.

Example: Jan 2018 (bad flu season) had 30% more deaths than July 2017
Is it really fair to penalize 2018 by its flu season? Bad cold flu seasons seem to run on 2-4 year cycles, so aggregating 2 years (or more) should more fairly account for the varying degrees of winter deaths
Going further, it may be better to track deaths by year beginning from July 1 through June 30 to capture entire winter seasons.

Counting deaths from Jan 1 to Dec 31 counts two different halves of winter death seasons.
If I were to take this analysis further, I would count deaths over 2-4 year periods where the year begins July 1. Perhaps using a rolling average to see a more accurate depiction of death trends.
Since this thread is getting some traction, I'd like to shamelessly let everyone know more about me.

I'm an independent python data science educator and author of several books - Master Data Analysis with Python - being the most popular.

dunderdata.com/master-data-an…
I've spent about 500+ hours modeling covid cases and deaths throughout the world and have built a forecasting dashboard that is quite accurate

coronavirus.dunderdata.com
I also teach live classes (sadly not in-person this year) and have an upcoming introductory python and data analysis course starting in January.

I'm still running my Black Friday special to get 50% through the new year.

dunderdata.com/live-online-co…
I also teach customized private classes for corporations and schools. If you are interested, let me know! ted@dunderdata.com
This plot just got me permanently banned from the dataisbeautiful subreddit - their narrative is so fragile, they cant even handle a simple plot

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Ted Petrou

Ted Petrou Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @TedPetrou

2 Mar
Explanation of matplotlib "inches" - a tutorial thread

Inches is a relative term. You must know the figure dpi (dots per inch) and your screen's dpi to make sense of it. Default inline dpi is 72. Below figure is 5 x 2 "figure inches" or 360 x 144 pixels.
Using a screen ruler program (Onde Rulers) it actually measures as 2.2 x .98 "screen inches" on my screen and 324 x 144 pixels
Why not 360 x 144 pixels? Because figures are displayed in the notebook with setting bbox_inches set to 'tight' which trims some of the figure.
Read 9 tweets
22 May 19
There are many types of scikit-learn Estimators. The most common are:
Regressors
Classifiers
Clusterers
Transformers
Meta-estimators

Read their exact definition in the glossary scikit-learn.org/stable/glossar…

They all follow the same three-step process - import, instantiate, fit
Here are examples of each one. They all look the same

# Regressor
from sklearn.linear_model import LinearRegression
lr = LinearRegression()
lr.fit(X, y)
# Classifier
from sklearn.tree import DecisionTreeClassifier
dtc = DecisionTreeClassifier()
dtc.fit(X, y)
Read 6 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!