|
hace 6 años | |
---|---|---|
.. | ||
.pytest_cache | hace 6 años | |
data | hace 6 años | |
images | hace 6 años | |
Development.ipynb | hace 6 años | |
Fitting.ipynb | hace 6 años | |
Medium Stats Analysis.ipynb | hace 6 años | |
Time Series Analysis.ipynb | hace 6 años | |
Work In Progress.ipynb | hace 6 años | |
bargraphs.py | hace 6 años | |
data-science-writing-2018.ipynb | hace 6 años | |
readme.md | hace 6 años | |
retrieval.py | hace 6 años | |
view_extraction.py | hace 6 años | |
visuals.py | hace 6 años |
The Medium stats Python toolkit is a suite of tools for retrieving, analyzing, predicting, and visualizing
your Medium article stats. You can also run on my Medium statistics
which are located in data/
Note: running on Mac may first require setting
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
from the command line to enable parallel processing
For complete usage refer to Medium Stats Analysis
Data retrieval code lives in retrieval.py
Visualization and analysis code is in visuals.py
See also the Medium article "Medium Analysis in Python"
Contributions are welcome and appreciated
For help contact wjk68@case.edu or twitter.com/@koehrsen_will
stats.html
in the data/
directory. You can also save the responses to do a similar analysis.If you don't do this, you can still go to the next step and use the provided data!
medium/
directory
and runfrom retrieval import get_data
df = get_data(fname='stats.html')
Medium Stats Analysis
on NBviewer)All plots can be opened in the plotly online editor to finish up for publication
Histogram: make_hist(df, x, category=None)
Cumulative plot: make_cum_plot(df, y, category=None, ranges=False)
Scatter plots: make_scatter_plot(df, x, y, fits=None, xlog=False, ylog=False, category=None, scale=None, sizeref=2, annotations=None, ranges=False, title_override=None)
Scatter plot with three variables: pass in category
or scale
to make_scatter_plot
Univariate Linear Regression: make_linear_regression(df, x, y, intercept_0)
Univariate polynomial fitting: make_poly_fits(df, x, y, degree=6)
Multivariate Linear Regression: pass in list of x
to make_linear_regression
Future extrapolation: make_extrapolation(df, y, years, degree=4)
More methods will be coming soon!
Submit pull requests with your own code, or open issues for suggestions!