Ironhack-data-bcn-oct-2022 / project-II-pipelines

0 stars 2 forks source link

Sergi Portolés #3

Open sborto86 opened 1 year ago

sborto86 commented 1 year ago

https://github.com/sborto86/project-II-pipelines

samuelTAIronhack commented 1 year ago

storytelling (README.md)

Clear overall, but there is space for improvement. see if you can add more comments in the readme under all the graphs. This way information of some of the first graphs is forgotten after looking at al the other ones.

Code

`# Groupping data by region regions = hotel_country.groupby("continent_name")[['agoda_num','booking_num']].sum()

Creating a new column region

regions["Region"] = list(regions.index)

Renaming columns

regions = regions.rename(columns={"agoda_num": "Agoda", "booking_num": "Booking"}) regions = regions.sort_values(by='Booking', ascending=False)

Flattering table for plotting "each platform will generate a new row"

regions2 = pd.melt(regions, id_vars=["Region"], value_name="Number of Hotels")

Plotting data

regions2 = regions2.rename(columns={"variable":"Platform"}) regions_graph=sns.barplot(data=regions2, x="Number of Hotels", y="Region", hue="Platform", hue_order= ["Booking", "Agoda"]) plt.xticks(rotation=45) regions_graph.set(title = 'Number of Hotels by Region') plt.ticklabel_format(style='plain', axis='x')`

Graphs

Organisation

Files are all well organised but maybe you can move the enriching-and-cleaning.ipynb to the src folder also.

In general good work! Keep it up!

sborto86 commented 1 year ago

Thank you Sam really appreciate the comments. I will try to improve the project once I have a little time