Method: Nyaplot::MapPlot#fill_map_with_df

Defined in:
lib/mapnya/plot.rb

#fill_map_with_df(df, id_column, fill_by_column) ⇒ Object

Fill countries in different colors according to some data

Parameters:

  • df (DataFrame)
  • id_column (Symbol)

    the column that includes cca3

  • fill_by_column (Symbol)

    the column that includes some values

See Also:



59
60
61
62
63
64
# File 'lib/mapnya/plot.rb', line 59

def fill_map_with_df(df, id_column, fill_by_column)
  cca3(id_column)
  fill_by(fill_by_column)
  df_id(df.name)
  DataBase.instance.add(df)
end