File:Reykjavik population graph 1889-2016.svg

Summary

Description
English: Graph that shows the population of Reykjavík over time.
Íslenska: Graf sem sýnir íbúafjölda Reykjavíkur á milli áranna.
Date
Source Own work
Author Árni Dagur
SVG development
InfoField
Source code
InfoField

Python code

import pandas as pd
import matplotlib.pyplot as plt

print('Styles:', plt.style.available)
plt.rcdefaults()
plt.style.use('seaborn-white')

plt.rcParams['lines.linewidth'] = 2
plt.rcParams['lines.color'] = 'red'
plt.rcParams['font.family'] = 'serif'
plt.rcParams['font.serif'] = 'Ubuntu'
plt.rcParams['font.monospace'] = 'Ubuntu Mono'
plt.rcParams['font.size'] = 16
plt.rcParams['axes.labelsize'] = 16
plt.rcParams['axes.labelweight'] = 'bold'
plt.rcParams['axes.titlesize'] = 16
plt.rcParams['xtick.labelsize'] = 13
plt.rcParams['ytick.labelsize'] = 12
plt.rcParams['legend.fontsize'] = 15
plt.rcParams['figure.titlesize'] = 14
plt.rcParams['figure.figsize'] = 8, 5

df = pd.read_csv('data.csv', sep=',').set_index('Year')['Value']

fig, ax = plt.subplots()

ticks = []
for n in range(1896,2017,10):
    ticks.append(n)

ax.set_xticks(ticks)
ax.plot(df, 'royalblue')

ax.tick_params(axis='both', direction='in', color='black', top=False, right=False, width=1, length=5)
ax.grid(linestyle='-', linewidth=1, alpha=0.5)

plt.gcf().autofmt_xdate()
plt.tight_layout()


plt.savefig('Reykjavik_population_graph_1889-2016.svg')

Data source: Statistics Iceland

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#Reykjavik%20population%20graph%201889-2016.svgCategory:Self-published work
Category:People of Reykjavík Category:Temporal population graphs of Iceland
Category:CC-Zero Category:People of Reykjavík Category:Self-published work Category:Temporal population graphs of Iceland Category:Valid SVG created with Matplotlib code