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"))
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' )
def main(country, job): data = mac.acquire() relevant_data = mwr.transform_data(data) clean_data, countries_codes = mwr.country_name_import(relevant_data) select_job, key_uuid = mwr.job_data(clean_data, job) filtered_data = mwr.job_filtering(clean_data, select_job, key_uuid) filtered_data = man.country_filtering(filtered_data, country, countries_codes) result = man.analyze(filtered_data, job, clean_data) mre.visualizing_histogram(result['Age'], country, job) mre.reporting(result) print( '======= Pipeline is complete. You may find the results in the folder ./data/results =======' )
def main(args): print('Starting pipeline and retrieving information...') print('Getting information from database analysed...') df_m1 = mac.acquire(args.path) df_m2 = mwr.wrangling(df_m1) if args.country is None: print('retrieving information for all countries...') df_m3 = man.analysis(df_m2, 'all') else: df_m3 = man.analysis(df_m2, args.country) print( '********************* Pipeline is complete, you can find the results in the data results folder *********************' )
def main(arguments): print('starting pipeline...') prices_dfs = mac.acquire(arguments.path, arguments.key) stocks = mwr.build_data(prices_dfs) returns = man.compute_returns(stocks) risk_ratios = man.compute_risk_ratio(returns) top_return_risk_companies = risk_ratios.nlargest(10, 'Ratio') returns_corr = man.compute_corr( returns[top_return_risk_companies['Company'].to_list()]) mre.report(top_return_risk_companies, returns_corr) print( '========================= Pipeline is complete. You may find the results in the folder ' './data/results =========================')
def main(args): print('starting pipeline...') print('Getting the data from database...') raw_data = mac.acquire(args.path) print('Data from database is there!...') print('Dealing with data...') data = mwr.wrangling(raw_data) print('Data dealt!') print('analysing the data...') molins = man.analysis(data, args.country) print(molins) print('Data analysed!...') # Data reporting print('Lets create the report...') mre.graph_reporting(molins) mre.pdf_reporting() mre.email_reporting(arguments.email) print('Report created!') print( '========================= Pipeline is complete. You may find the results in the folder ' './data/results =========================')
def main(arguments): print('Starting pipeline...', end='') time.sleep(1) print('....', end='') time.sleep(1) print('....') df_project = mac.acquire(arguments.path) data_merged = mwr.wrangling(df_project) data_merged.to_csv('./data/processed/data_merged_info.csv') data_project_analysed = man.analyce_data(data_merged, arguments.country) data_project_analysed.to_csv('./data/results/country_gender_analysed.csv') print(data_project_analysed) # Bonus 1: print('Getting Opinions...') data_opinions = man.judgement(df_project) data_opinions.to_csv('./data/results/Bonus1-Data_Opinions.csv') print(data_opinions) print( '========================= Pipeline is complete. You may find the results in the folder ' './data/results =========================')
def main(scrape): print('Starting Pipeline...') mac.acquire(scrape) mwr.wrangle(scrape) print('Finished Pipeline')
def main(df_coste, df_indicadores): # mra.raw_cesel() mac.acquire(df_coste, df_indicadores) # mphl.pivot() mg.graphic()
def main(arguments): rural = mac.acquire() rural_processed = mwr.wrangling(rural) rural_analysed = man.analyze(rural_processed, arguments.country) return rural_analysed
def main(scrape, download, model): print('Starting Pipeline...') mac.acquire(scrape) mwr.wrangle(scrape, download) man.analyze(model) print('Finished Pipeline')