text: # -*- coding: utf-8 -*-
  """data 4 toynbee final.ipynb
  
  Automatically generated by Colaboratory.
  
  Original file is located at
      https://colab.research.google.com/drive/1O-NGfcV5UiY3IDrwYVGDHHWRTSr0eaSN
  """
  
  import matplotlib.pyplot as plt #to define plot parameters
  import seaborn as sns #to graphical plots
  import numpy as np #to math
  import pandas as pd
  
  df = pd.read_csv('https://raw.githubusercontent.com/research-at-toynbee-hall/datathons/master/datasets/datathon-2019-04-24/youth_homelessness/raw/Copy%20of%20Databank_LAs_2012-13_2017-18.csv')
  
  #trying to clean the data
  for k in range(len(df)):
      if(df.loc[k, 'presenting'] != df.loc[k, 'presenting']):
          df.loc[k, 'presenting'] = 0
      elif('less than' in df.loc[k, 'presenting']):
          df.loc[k, 'presenting'] = 2.5
      df.loc[k, 'year'] = int(df.loc[k, 'year'][0:4])
      df.loc[k, 'presenting'] = int(df.loc[k, 'presenting'])
  
  plt.style.use('ggplot')
  
  sns.lmplot(x = 'presenting', y = 'year', data = df, fit_reg = False, hue = 'Country', markers = '.', x_bins = None, x_ci = 0, size = 2.5, aspect = 4)
  