Пример #1
0
 def update_us_map(chosen_date, val, location, pop):
     if location == 'US':
         return build_us_map(df_projections, pop_info, chosen_date, val,
                             pop)
     else:
         return build_continent_map(df_projections, pop_info, chosen_date,
                                    val, location, pop)
Пример #2
0
 def build_tom_us_map():
     tomorrow = datetime.date.today() + datetime.timedelta(days=1)
     df_projections = pd.read_csv('data/predicted/Global.csv',
                                  sep=",",
                                  parse_dates=['Day'])
     df_projections.loc[:, 'Day'] = pd.to_datetime(df_projections['Day'],
                                                   format='y%m%d').dt.date
     df_projections = df_projections.loc[df_projections['Day'] == tomorrow]
     pop_info = pd.read_csv('data/predicted/WorldPopulationInformation.csv',
                            sep=",")
     return build_continent_map(df_projections, pop_info, tomorrow)
Пример #3
0
 def build_tom_us_map():
     tomorrow = datetime.date.today() + datetime.timedelta(days=1)
     return build_continent_map(tomorrow)
Пример #4
0
def update_us_map(chosen_date, val, location, pop):
    if location == 'US':
        return build_us_map(chosen_date, val, pop)
    else:
        return build_continent_map(chosen_date, val, location, pop)