In [9]:
import plotly.plotly as py
import cufflinks as cf
import pandas as pd
import numpy as np
import plotly.graph_objs as go
In [54]:
df=pd.read_csv('/Users/Eszti/Downloads/data_v04.csv', sep=";")
df = df.set_index('year')

#df2 = df.pivot_table(index='pub_year',columns='keyword',aggfunc=sum)
#df2.columns = ["big data", "computational social science", "data mining", "data science", 
#               "methods","natural language processing", "text analysis"]
df.head()
Out[54]:
journals
year
1892 1
1893 2
1895 3
1891 1
1894 2
In [55]:
labels = [1890, 1900, 1910, 1920, 1930, 1940, 1950, 1960, 1970, 1980, 1990, 2000, 2010, 2020]

hx=129/13

tickvals = [1890, 1900, 1910, 1920, 1930, 1940, 1950, 1960, 1970, 1980, 1990, 2000, 2010, 2020, df.index.max()]

layout = go.Layout(
    title='Folyóiratok száma évenként',
     xaxis=go.layout.XAxis(
        tickvals=tickvals,
        ticktext=labels,
        #title='x Axis',
        titlefont=dict(
            size=14,
            color='#7f7f7f'
        )
    ),
    yaxis=dict(
        title='number of journals',
        titlefont=dict(
            size=12,
            color='#7f7f7f'
        )
    )
)

fig = df.iplot(asFigure=True, kind='area', fill=True, layout=layout, dimensions=(800,500))
df.iplot(kind='area', fill=True, layout=layout, dimensions=(800,500))
Out[55]:
In [35]:
py.plot(fig, filename='viz3.html')
Out[35]:
'https://plot.ly/~EszterKatona/255'