Beispiel #1
0
def main(arguments):

    print('\n\n<< Starting pipeline >>\n')

    # Data acquisition
    mac.acquire_db_data(arguments.path)
    # mac.api_request_job_codes()
    mac.country_codes()

    # Data wrangling
    mwr.wrangle()

    # Data analysis
    df_poll = man.analysis_settings(arguments.country)
    man.analyze_ch1(df_poll)
    man.analysis_ch2(df_poll)
    man.analysis_ch3(df_poll)

    # Data reporting
    mre.graph_reporting(arguments.country)
    mre.pdf_reporting()
    mre.email_reporting(arguments.email)
    mre.tweets(arguments.hashtag)

    print(
        '\n\n========== Pipeline is complete. You may find the results in the folder ./data/results ========='
    )
def main(country):
    print('Starting pipe line')
    df_acq = m_acquisition.data_df()
    print('Cleaning retrieved data!')
    df_wrang= m_wrangling.wrangle(df_acq)
    print('Analysing data!')
    df_analysis=m_analysis.analyze(df_wrang,country)
def main(some_args):
    data = mac.acquire()
    filtered = mwr.wrangle(data, year)
    results = man.analyze(filtered)
    fig = mre.plotting_function(results, title, arguments)
    mre.save_viz(fig, title)
    print(
        '========================= Pipeline is complete. You may find the results in the folder ./data/results ========================='
    )
def main(path, country, unknown):
    print('Starting Pipeline...')
    df_with_dates_raw = mac.acquire(path)
    df_with_dates_clean = mwr.wrangle(df_with_dates_raw, country, unknown)
    df_analyze = man.analyze(df_with_dates_clean)
    mre.save_df(df_analyze, country, unknown)

    print(f'The results of the country -{country}- are: ')
    print(df_analyze)
    print('Finished Pipeline')
def main(country=None):

    start = time.time()
    print(f'Starting pipeline for {country}')
    df = m_acquisition.acquire()
    print('This may take around 80 seconds..')
    wrangling_ = m_wrangling.wrangle(df)
    print('Wrangling done, lets save the table')
    analysis_ = m_analysis.analyse(wrangling_, country)
    print(analysis_)
    print(f'Task {country} done')

    end = time.time()
    print(end - start, str("seconds"))
Beispiel #6
0
def main(arguments):

    data = mac.acquire(arguments.path)
    filtered = mwr.wrangle(data, arguments.unemployed)
    results = man.analyze(filtered)
    reporting = mre.reporting(results, arguments.country)

    reporting.to_csv('./data/results/Results.csv')

    print(reporting)

    print(
        '\n\n======================|    Pipeline is complete. You may find the results in the folder ./data/results     |==============================\n\n'
    )
Beispiel #7
0
def main():
    print('======== Starting pipeline... ========')

    assets, cf_liabs = mac.acquire_inputs()

    combined_orig_cf, cf_liabs = mwr.wrangle(assets, cf_liabs)

    assets_sell, assets_purchase, final_cf_combined = man.analyze_gaps(
        assets, combined_orig_cf, cf_liabs)

    mre.save_results(assets_sell, assets_purchase, final_cf_combined)

    print(
        '========================= Pipeline is complete. You may find the results in the folder ./data/results ========================='
    )
Beispiel #8
0
def main(arg1, arg2):
    data_personal_info = mac.acquire_personal_info(arg1)
    print('A dataframe with personal info was created')
    clean_gender = mwr.wrangle(data_personal_info)
    country_names = mac.fetch_country()
    print('A dataframe with country info was created')
    career_info = mac.acquire_career_info(arg1)
    print('A dataframe with career info was created')
    job_titles = mac.fetch_job_titles(career_info)
    print('Job titles successfully retrieved')
    country_info = mac.acquire_country_info(arg1)
    main_df = mwr.merge_dfs(country_info, career_info, clean_gender,
                            job_titles, country_names)
    print('Main dataframe retreived')
    final_table = man.analyze(main_df)
    print(
        'Final table with the results has been created in /data/results folder'
    )
    table_country = man.filter_country(arg2, final_table)
    table_country.to_csv(r'data/results/final_table.csv',
                         index=False,
                         header=True)
def main(scrape):
    print('Starting Pipeline...')
    mac.acquire(scrape)
    mwr.wrangle(scrape)
    print('Finished Pipeline')
Beispiel #10
0
def main(scrape, download, model):
    print('Starting Pipeline...')
    mac.acquire(scrape)
    mwr.wrangle(scrape, download)
    man.analyze(model)
    print('Finished Pipeline')