官术网_书友最值得收藏!

Simulating Sales Data and Working with Databases

The Food Factory example is about a fictitious company called The Food Factory. They sell custom meals for people looking for healthy food. They allow their customers to choose the macronutrients combinations they want, as well as their protein sources. Macronutrients are the base for any diet, and they are composed of carbohydrates, proteins, and fats. Customers can choose the percentage of each macronutrient, as well as their protein source (fish, chicken, beef, or vegetarian); then, The Food Factory will come up with a tasty meal which fulfills their diet specifications. They have found some great combinations this way, and if they continue to do as well as they have, they will add more meal options, as well as fixed recipes, according to what their customers like most.

The Food Factory has done a good job so far and they have a system in place that allows them to collect a good amount of data across their five store locations, as well as keep track of customer messages. Our job in this example will be to analyze the data to diagnose the current state of the business and propose ways to improve it. To do so, we will use lots of visualizations in Chapter 5, Communicating Sales with Visualizations; perform text analysis on customer reviews in Chapter 6, Understanding Reviews with Text Analysis; and provide automatic diagnosis of the current state of the business in Chapter 7, Developing Automatic Presentations. Sounds good, right? However, before we can do all of that, we need to get a hold of the data, and we don't have it yet. We're going to simulate it! This chapter will show you how to design a non-trivial data simulation to produce the data for the example. Furthermore, The Food Factory, as well as many organizations, doesn't always make our lives easier by providing CSV files, and they often have databases we need to work with. This chapter will also show you how to work with such databases.

Some of the important topics covered in this chapter are:

  • Designing and implementing non-trivial simulations
  • Simulating numbers, categories, strings, and dates
  • Function signatures with parameter objects
  • Reusing functions in different contexts
  • Mixing internal and external data
  • Working with relational databases
主站蜘蛛池模板: 承德市| 哈密市| 邵东县| 望江县| 永济市| 宁波市| 突泉县| 邛崃市| 乌鲁木齐县| 千阳县| 湾仔区| 大邑县| 乌兰浩特市| 霍林郭勒市| 巴林右旗| 佛坪县| 祁东县| 阳东县| 新泰市| 阳高县| 云南省| 阿拉善右旗| 华蓥市| 明星| 宜城市| 齐齐哈尔市| 麻江县| 彩票| 正镶白旗| 安龙县| 长顺县| 阿图什市| 洛川县| 成安县| 灌南县| 新乡市| 遵义县| 芷江| 云和县| 洞口县| 柘荣县|