Firstly, I would suggest putting some information about your project in the README file. Such information being the main idea of your project, what you are trying to solve, what type of data is it, etc. Your code looks great and those results make sense! So good job. Maybe consider adding some graphs for visualization.
Secondly, in the introduction you kind of just jump into the code, without giving your viewers a feel of the data. Like, what does the data record?
Thirdly, (slight bias) you define all your class functions first, then call them at the end. I feel like splitting each function up into their own section, and explaining what you are going to do in each section would be easier to follow.
Also, you don’t really have a clear goal defined. Your project is just answering miscellaneous questions that wouldn’t be helpful (in a sense).
A problem that comes with answering random questions is that you kind of gloss over important data groups. Maybe the average cost for female smokers is higher in the Northwest region compared to the average cost in the Southeast region. Maybe female smokers with 5 children pay more than female non-smokers with 5 children.
Some possible goals could be:
- “How do certain factors affect the charge amount?”
- “What is the impact of certain factors on charge amount for smokers compared to non-smokers?”
Then your analysis is answering these goals, so your research is organized in that front. Making a goal is also beneficial for the viewer, because I’m looking at your analysis… so what? Why does it matter that the average age is 39 years?
When analyzing, you have to consider how this information is going to help to answer (usually) company problems. In regard to goal #2, that information could help inform smokers that your insurance cost will be higher if you smoke- possibly leading to them not smoking anymore. This impact would be especially helpful to a company that wants to reduce the number of underage smokers. They could add this information to their ad campaigns.
Lastly, I suggest adding a summary at the end. This helps to summarize the important points the user can take from your analysis.