Beispiel #1
0
from __future__ import print_function, division

import numpy as np
import pandas as pd

import thinkstats2
import matplotlib.pyplot as plt

import random
import string

import statsmodels.formula.api as smf

from iso_country_codes import COUNTRY
for k, v in COUNTRY.items():
    COUNTRY[k] = v.title()
COUNTRY['RU'] = 'Russia'
COUNTRY['GB'] = 'UK'
COUNTRY['CZ'] = 'Czech Rep'


def get_country(code):
    return COUNTRY[code]


# colors by colorbrewer2.org
BLUE1 = '#a6cee3'
BLUE2 = '#1f78b4'
GREEN1 = '#b2df8a'
GREEN2 = '#33a02c'
Beispiel #2
0
from __future__ import print_function, division

import numpy as np
import pandas as pd

import thinkstats2
import matplotlib.pyplot as plt

import random
import string

import statsmodels.formula.api as smf

from iso_country_codes import COUNTRY
for k, v in COUNTRY.items():
    COUNTRY[k] = v.title()
COUNTRY['RU'] = 'Russia'
COUNTRY['GB'] = 'UK'
COUNTRY['CZ'] = 'Czech Rep'

def get_country(code):
    return COUNTRY[code]

# colors by colorbrewer2.org
BLUE1 = '#a6cee3'
BLUE2 = '#1f78b4'
GREEN1 = '#b2df8a'
GREEN2 = '#33a02c'
PINK = '#fb9a99'
RED = '#e31a1c'