Thursday, January 23, 2020

IslandT: Create a project to track total sales at different locations with the Python program

In the previous posts, we have gone through a project which will receive the user input and commit those data into the earning table. This program has been further modified to include the plotting of a bar chart to indicate the total sales of various inventories in various locations.

This project has been uploaded to this site, you can download the source code of this project for free through this link. If you like this project, don’t forget to award me with stars on the same project page or share the project page with friends!

Once you have downloaded the files, run the ui.py file and play around with the program.

I am using the Pandas module to plot the graph.

# begin plotting the bar chart
            s = pd.Series(index=label_x, data=label_y)
            s.plot(color="green", kind="bar", title = cc + " Sales for January at " + location)
            plt.show()
The bar chart of total sales for each inventory

Below are the steps to use the program, under the Shoe Sale and Shirt Sale section, select either the type of shoe or the shirt, then select the amount under earning and select a place under location. Just go ahead and pressed the submit button beside the shoe sale’s Combobox or else pressed the submit button beside the shirt sale’s Combobox to commit the data to the earning table!

The data we have entered are inside the earning table

In order to display the bar chart, all you need to do is to select the location under the plotting graph section and then pressed either the shoe or the shirt button within that same section.

There are more to come, you can edit the program as you wish to suit your needs. Enjoy!



from Planet Python
via read more

No comments:

Post a Comment

TestDriven.io: Working with Static and Media Files in Django

This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...