<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.0">Jekyll</generator><link href="https://honggekang.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://honggekang.github.io/" rel="alternate" type="text/html" /><updated>2022-03-06T22:57:21+00:00</updated><id>https://honggekang.github.io/feed.xml</id><title type="html">Gekang</title><subtitle>This is my attempt to explore the data world and analyze some interesting topics with data analytic skills.</subtitle><author><name>Nick Kang</name></author><entry><title type="html">The Recovery of U.S Restaurant Industry In 2021</title><link href="https://honggekang.github.io/2021/12/28/COVID-19_restaurant-recovery.html" rel="alternate" type="text/html" title="The Recovery of U.S Restaurant Industry In 2021" /><published>2021-12-28T00:00:00+00:00</published><updated>2021-12-28T00:00:00+00:00</updated><id>https://honggekang.github.io/2021/12/28/COVID-19_restaurant-recovery</id><content type="html" xml:base="https://honggekang.github.io/2021/12/28/COVID-19_restaurant-recovery.html">&lt;div class=&quot;col-lg-8 col-md-10 mx-auto&quot;&gt;
  &lt;p&gt;U.S Restaurant industry of all could be affected by the pandemic the most due to the nature of the industry. It would be interesting to see how well the restaurant industry is recovering from Covid-19, more importantly, what is helping its recovery?&lt;/p&gt;

  &lt;h3 id=&quot;data&quot;&gt;&lt;strong&gt;Data&lt;/strong&gt;&lt;/h3&gt;

  &lt;p&gt;Data of restaurant open for seated dinner is released by OpenTable. It is collected from restaurants of its own platform. The data is starting from Jan 28th, 2020 to  Oct 28th, 2021. Over 50 restaurants are recorded and the result is calculated into a percentage by comparing its year over year comparison.&lt;/p&gt;

  &lt;p&gt;For example, of all restaurants that are recorded on OpenTable, the number of restaurants that are open for seated dinner on Jan 28th, 2019 is divided by the number of restaurants that are open for seated dinner on Jan 28th, 2020 and 2021. 0 % means that the same amount of restaurants are open on that day comparing to the same day in 2019.&lt;/p&gt;

  &lt;h3 id=&quot;findings&quot;&gt;&lt;strong&gt;Findings&lt;/strong&gt;&lt;/h3&gt;

  &lt;p&gt;By comparing time series data of restaurant open for seated dinner, COVID-19 positive test cases and vaccination, I am
able to&lt;/p&gt;
  &lt;ul&gt;
    &lt;li&gt;
      &lt;p&gt;Identify &lt;strong class=&quot;covid&quot;&gt;crucial moments&lt;/strong&gt; when the recovery happens in different states.&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;p&gt;Discover that the U.S restaurant industry is &lt;strong class=&quot;covid&quot;&gt;slowly recovering &lt;/strong&gt; from the pandemic, but the &lt;strong class=&quot;covid&quot;&gt; impact of it is severe&lt;/strong&gt;.&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;p&gt;&lt;strong class=&quot;covid&quot;&gt;Vaccinations&lt;/strong&gt; greatly boost the confidence for owners to reopen but the policy of mask order during the pandemic does not seem to affect the industry significantly.&lt;/p&gt;
    &lt;/li&gt;
  &lt;/ul&gt;

  &lt;p&gt;&lt;img src=&quot;/img/posts/restaurant_covid/fig_1.png&quot; alt=&quot;U.S restaurant industy in recovery overivew&quot; title=&quot;U.S restaurant overview&quot; /&gt;&lt;/p&gt;

  &lt;p&gt;From the figure, the daily test positive cases does not show a dramatic increase, it does indicate that it is the start of the pandemic season. Then at the end of 2020, the restaurant industry is taking another hit while the whole country is experiencing its worst impact. Throughout the whole 2020, the trend of daily positive test cases is &lt;strong class=&quot;covid&quot;&gt;increasing&lt;/strong&gt; and the trend of restaurants reopen is &lt;strong class=&quot;uber&quot;&gt;decreasing&lt;/strong&gt;. There is no doubt that the whole industry is &lt;strong class=&quot;covid&quot;&gt;heavily damaged&lt;/strong&gt; by the virus since the daily open percentage is never even close to what it was in 2019 at any given day in 2020. However, the trend changes in 2021 with &lt;strong class=&quot;covid&quot;&gt;help of vaccinations&lt;/strong&gt;. By comparing all three line charts, the pandemic has another peak in September but the recovery of the industry is more stable comparing to last year. It could be the reason that more than half of people are vaccinated and are confident that the virus can be under control over the time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;col-md-6 smallimg&quot;&gt;
  &lt;p&gt;&lt;img src=&quot;/img/posts/restaurant_covid/fig_2.png&quot; alt=&quot;California&quot; title=&quot;California&quot; /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;col-md-6 smallimg&quot;&gt;
  &lt;p&gt;&lt;img src=&quot;/img/posts/restaurant_covid/fig_3.png&quot; alt=&quot;Texas&quot; title=&quot;Texas&quot; /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;col-lg-8 col-md-10 mx-auto&quot;&gt;
&lt;p&gt;
  &lt;button class=&quot;btn btn-primary&quot; type=&quot;button&quot; data-toggle=&quot;collapse&quot; data-target=&quot;#collapseExample&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapseExample&quot;&gt;
    View Code Snippets
  &lt;/button&gt;
&lt;/p&gt;
&lt;div class=&quot;collapse&quot; id=&quot;collapseExample&quot;&gt;
  &lt;div class=&quot;card card-body&quot;&gt;
      &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;```
# California
fig = plt.figure(figsize=(30,18))

spec = gridspec.GridSpec(ncols=2, nrows=2, width_ratios=[7,1], wspace=0.001,hspace=0.05)
ax0 = fig.add_subplot(spec[0])
ax1 = fig.add_subplot(spec[1])
ax2 = fig.add_subplot(spec[2])
ax3 = fig.add_subplot(spec[3])

y = p_t5['population']/1000000
y1 = [covid_tc.loc['2021/10/28']['California']/1000000,covid_tc.loc['2021/10/28']['Texas']/1000000
,covid_tc.loc['2021/10/28']['Florida']/1000000, covid_tc.loc['2021/10/28']['Illinois']/1000000
  ,covid_tc.loc['2021/10/28']['Georgia']/1000000]

for state in top_5_tc:
  s = top_5_tc[0]
  ax0.plot(res.index, res[state],color='dimgrey', linewidth=1)
  ax0.plot(res.index, res[s],color='crimson', linewidth=3.5)
  ax0.axhline(y=0, color='crimson', alpha = 0.5, linewidth=5, linestyle = ':') 
  ax0.text('2020/5/5', 100 , 'California',
       fontsize=25,color= 'crimson',  weight='bold')
  ax0.text('2020/5/5', 85 , 'Daily Restaurants open for reservations',
       fontsize=15,color= 'dimgrey',  weight='bold')
  ax0.text('2020/5/5', 75 , 'percentage comparing to 2019',
       fontsize=15,color= 'dimgrey',  weight='bold')
  ax0.text('2020/1/15', 5 , '0%', fontsize=20 ,color= 'dimgrey', weight='bold')
  ax0.text('2021/9/1', 100 , 'Population:', fontsize=20 ,color= 'dimgrey', weight='bold')
  ax0.text('2021/9/1', 90 , '37,254,519', fontsize=20 ,color= 'crimson', weight='bold')
  ax1.barh(p_t5.index,p_t5['population']/1000000, color='darkgrey')
  ax1.barh(s,p_t5.loc[s][0]/1000000, color='crimson')
  ax2.plot(covid_nc.index, covid_nc[state],color='dimgrey' , linewidth=1)
  ax2.plot(covid_nc.index, covid_nc[s],color='crimson' , linewidth=3.5) 
  ax2.text('2020/5/5', 60000 , 'Daily Covid Confirmed Positive Test',
       fontsize=18,color= 'dimgrey',  weight='bold')
  ax2.text('2021/6/10', 60000 , 'Total Confirmed Positive Test:',
     fontsize=20,color= 'dimgrey',  weight='bold')
  ax2.text('2021/8/15', 57000 , '4,885,289',
       fontsize=20,color= 'crimson',  weight='bold')
  ax3.barh(state,covid_tc[state]/1000000, color='darkgrey')
  ax3.barh(s,covid_tc[s]/1000000, color='crimson')

for a in [ax0, ax1, ax2, ax3]:

  a.spines['top'].set_visible(False)
  a.spines['right'].set_visible(False)
  a.spines['bottom'].set_visible(False)
  a.spines['left'].set_visible(False)
  a.set_yticks([])
  a.xaxis.set_major_locator(mdates.MonthLocator())

for i, v in enumerate(y):
  ax1.text(v , i, r_t5[i], color='white', fontweight='bold', fontsize=13, ha='right', va='center')

for i, v in enumerate(y1):
  ax3.text(v , i, top_5_tc[i] , color='white', fontweight='bold', fontsize=13, ha='right', va='center')

ax0.axvspan(dt.date(2020, 3, 1), dt.date(2020, 5, 1), facecolor='crimson', alpha=0.2)
ax0.axvspan(dt.date(2020, 11, 1), dt.date(2021, 3, 1), facecolor='crimson', alpha=0.2)
ax2.axvspan(dt.date(2020, 3, 1), dt.date(2020, 5, 1), facecolor='crimson', alpha=0.2)   
ax2.axvspan(dt.date(2020, 11, 1), dt.date(2021, 3, 1), facecolor='crimson', alpha=0.2)

plt.savefig('fig_2.png')
plt.show()
```
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;col-md-6 smallimg&quot;&gt;
  &lt;p&gt;&lt;img src=&quot;/img/posts/restaurant_covid/fig_4.png&quot; alt=&quot;Nebraska&quot; title=&quot;Nebraska&quot; /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;col-md-6 smallimg&quot;&gt;
  &lt;p&gt;&lt;img src=&quot;/img/posts/restaurant_covid/fig_5.png&quot; alt=&quot;Rhode Island&quot; title=&quot;Rhode Island&quot; /&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;div class=&quot;col-lg-8 col-md-10 mx-auto&quot;&gt;
  &lt;p&gt;Considering the difference of population in different states, I have picked two states from &lt;strong class=&quot;covid&quot;&gt;top 5 most populated states&lt;/strong&gt; that have corresponding restaurant open data and those two are &lt;strong class=&quot;covid&quot;&gt;California&lt;/strong&gt; and &lt;strong class=&quot;covid&quot;&gt;Texas&lt;/strong&gt;. I have also picked two states from the &lt;strong class=&quot;uber&quot;&gt;bottom 5 least populated states&lt;/strong&gt; that have corresponding restaurant open data and those two are &lt;strong class=&quot;uber&quot;&gt;Nebraska&lt;/strong&gt; and &lt;strong class=&quot;uber&quot;&gt;Rhode Island&lt;/strong&gt;. All four states’ restaurants open trend comparing to their daily positive test cases. From bar plots of all four graphs, they indicate that population rank is almost the &lt;strong class=&quot;covid&quot;&gt;same&lt;/strong&gt; as the test positive cases rank. It could mean that more people are in a state, more infected case there is. It could also mean that none of them impose any effective methods to stop the pandemic.&lt;/p&gt;

  &lt;p&gt;All four states’ industries suffer a big drop at the start of the pandemic even though positive test cases does not show a drastic increase right away. And during the &lt;strong class=&quot;covid&quot;&gt;winter in 2020&lt;/strong&gt;, the restaurant industry of all four states are at another bottom. However, having less population seems to have a faster recovery speed for the industry especially during the year of 2020. In 2021, however, four different states show different patterns due to various reasons.  Except California, the other three states show that the restaurant industry is recovering to almost the same level as in 2019, which can be considered to be &lt;strong class=&quot;covid&quot;&gt;back to normal&lt;/strong&gt;. By having the most population of all  states in the country, &lt;strong class=&quot;covid&quot;&gt;California&lt;/strong&gt; restaurant industry is still slowly climbing back to the normal stage.&lt;/p&gt;

  &lt;p&gt;&lt;img src=&quot;/img/posts/restaurant_covid/fig_6.png&quot; alt=&quot;The mask order&quot; title=&quot;The mask order&quot; /&gt;&lt;/p&gt;

  &lt;p&gt;Another potential reason could be &lt;strong class=&quot;policy&quot;&gt;policy&lt;/strong&gt; imposed by different states. Figure shows&lt;strong class=&quot;covid&quot;&gt; the difference of vaccination rate and mask order in four different states&lt;/strong&gt;. California, having the most population and the most vaccinated population, is still the slowest for the recovery process; it is also the only state that imposes Mask Order throughout the whole time. It is clear that the vaccination rate in all four states has over 50% and it provides a &lt;strong class=&quot;covid&quot;&gt; huge boost&lt;/strong&gt; for the restaurant industry. On the other hand, the mask order does not seem to affect the industry recovery at all, rather it shows the state of the pandemic. More importantly, the difference between California and Texas shows that there are some other reasons that delay the restaurant recovery.&lt;/p&gt;

  &lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;

  &lt;blockquote&gt;
    &lt;p&gt;Python pacakges that are used:&lt;/p&gt;
    &lt;ul&gt;
      &lt;li&gt;pandas&lt;/li&gt;
      &lt;li&gt;matplotlib&lt;/li&gt;
      &lt;li&gt;seaborn&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;&lt;a href=&quot;/pdf/project_python_code.pdf&quot; target=&quot;_blank&quot;&gt;Python code&lt;/a&gt;&lt;/p&gt;
  &lt;/blockquote&gt;
&lt;/div&gt;</content><author><name>Nick Kang</name></author><summary type="html">U.S Restaurant industry of all could be affected by the pandemic the most due to the nature of the industry. It would be interesting to see how well the restaurant industry is recovering from Covid-19, more importantly, what is helping its recovery?</summary></entry><entry><title type="html">How Long Does It Take To Finish College?</title><link href="https://honggekang.github.io/2021/12/27/College-completion-rate.html" rel="alternate" type="text/html" title="How Long Does It Take To Finish College?" /><published>2021-12-27T00:00:00+00:00</published><updated>2021-12-27T00:00:00+00:00</updated><id>https://honggekang.github.io/2021/12/27/College-completion-rate</id><content type="html" xml:base="https://honggekang.github.io/2021/12/27/College-completion-rate.html">&lt;div class=&quot;col-lg-8 col-md-10 mx-auto&quot;&gt;

  &lt;p&gt;College completion rate is tied to multiple factors and it is related more to my personal life since I am in my last academic year for master degree studying. I will inspect &lt;strong&gt;gender, family income, race, tuition fee and SAT,ACT score&lt;/strong&gt; as if they would affect college completion rate.&lt;/p&gt;

  &lt;h3&gt; Findings &lt;/h3&gt;

  &lt;p&gt;The linear regression model shows that&lt;/p&gt;

  &lt;ul&gt;
    &lt;li&gt;
      &lt;p&gt;&lt;strong class=&quot;covid&quot;&gt;Tuition fee&lt;/strong&gt; is postively correlated with college completion rate.&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;p&gt;&lt;strong class=&quot;covid&quot;&gt;SAT/ACT score&lt;/strong&gt; is postively correlated with college completion rate.&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;p&gt;&lt;strong class=&quot;covid&quot;&gt;Alien&lt;/strong&gt; of all race categories has the highest college completion rate.&lt;/p&gt;
    &lt;/li&gt;
  &lt;/ul&gt;

  &lt;h3&gt; Data  &lt;/h3&gt;

  &lt;p&gt;I am able to retrieve the data from College Scorecard University/College level data about school and its student cohorts and I mainly focus on the latest dataset which is from 2016 to 2017.&lt;/p&gt;

  &lt;p&gt;&lt;img src=&quot;/img/posts/college/output_3_1.png&quot; alt=&quot;map&quot; title=&quot;map&quot; /&gt; 
&lt;img src=&quot;/img/posts/college/output_4_0.png&quot; alt=&quot;histogram&quot; title=&quot;histogram&quot; /&gt;
&lt;img src=&quot;/img/posts/college/his_1.jpg&quot; alt=&quot;distribution&quot; title=&quot;distribution&quot; /&gt;&lt;/p&gt;

  &lt;p&gt;There is a huge difference between different states and the range is from 0 to 700.  &lt;strong class=&quot;covid&quot;&gt;California&lt;/strong&gt; contains the most numbers of institutions in the whole country. However, it is hard to compare the difference between the majority of the states. The distribution of institutions are not even,  &lt;strong class=&quot;covid&quot;&gt;majority of the states&lt;/strong&gt; only have less than or about 200 institutions.  &lt;strong class=&quot;covid&quot;&gt;6 states&lt;/strong&gt; have more than 300 institutions. And among them, state of California has around 700.&lt;/p&gt;

  &lt;p&gt;&lt;img src=&quot;/img/posts/college/line_2.jpg&quot; alt=&quot;SAT&quot; title=&quot;SAT&quot; /&gt;&lt;/p&gt;

  &lt;p&gt;And the test score reflects on the academic ability that a student is capable of. Thus, a student having a higher test score, student will likely to perform well in the college level. According to the graph, the correlation between the two is really high. It indicates that when a student has a higher SAT score, he will be likely to have a higher score in ACT as well.&lt;/p&gt;

  &lt;p&gt;&lt;img src=&quot;/img/posts/college/his2.jpg&quot; alt=&quot;Race&quot; title=&quot;Race&quot; /&gt;&lt;/p&gt;

  &lt;p&gt;In order to show the comparison more clear between four cohorts. State of Massachusetts and state of Rhode Islands are chosen to be on the graph. Since these two states have relatively the highest completion rate in all groups comparing to other states. And it shows that &lt;strong class=&quot;covid&quot;&gt;alien&lt;/strong&gt; and&lt;strong class=&quot;covid&quot;&gt; white&lt;/strong&gt; cohorts have the higher completion rate.&lt;/p&gt;

  &lt;p&gt;&lt;img src=&quot;/img/posts/college/hist2.jpg&quot; alt=&quot;Tuition&quot; title=&quot;Tuition&quot; /&gt;&lt;/p&gt;

  &lt;p&gt;The graph shows a high linear correlation between the two. But surprisingly, it shows a positive correlation which can be interpreted as the higher the tuition fee is, the higher college completion rate the state will have. It would be strange because if the tuition fee is high, less people will be able to afford it, thus less completion rate due to this reason. Some further analysis is needed from the linear regression.&lt;/p&gt;

  &lt;p&gt;Last but not least, the regression model is tested and the R square of the model is 69.3 percent and it means that these regressors could represent almost &lt;strong class=&quot;covid&quot;&gt;70% &lt;/strong&gt;of the dependent variable.&lt;/p&gt;

  &lt;p&gt;The p value for average SAT score is 0.751, which is larger than 0.05 and it might not be a suitable independent variable for completion rate. It might due to the reason that SAT score illustrates the ability prior to college and individual could change a lot during the 4 years of development. Therefore, the SAT score is not really helpful for the model.&lt;/p&gt;

  &lt;p&gt;However, all the other regressors are &lt;strong class=&quot;covid&quot;&gt;significant&lt;/strong&gt;. The coefficient for tuition is positive and it might be the reason that a higher tuition fee is due to the quality of the college; it might select the students who are already more suitable to embrace the more intense competition. And the dummy variables show that alien cohort, comparing to white cohort, aliens will have a higher completion rate and black cohort as well as unknow cohort will have a lower completion rate comparing to the white cohort.&lt;/p&gt;

  &lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;

  &lt;blockquote&gt;
    &lt;p&gt;Python pacakges that are used:&lt;/p&gt;
    &lt;ul&gt;
      &lt;li&gt;pandas&lt;/li&gt;
      &lt;li&gt;matplotlib&lt;/li&gt;
      &lt;li&gt;seaborn&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;&lt;a href=&quot;/pdf/store.pdf&quot; target=&quot;_blank&quot;&gt;Python code&lt;/a&gt;&lt;/p&gt;
  &lt;/blockquote&gt;
&lt;/div&gt;</content><author><name>Nick Kang</name></author><summary type="html"></summary></entry><entry><title type="html">What Are Some Essential Retail Store KPIs?</title><link href="https://honggekang.github.io/2021/12/26/store.html" rel="alternate" type="text/html" title="What Are Some Essential Retail Store KPIs?" /><published>2021-12-26T00:00:00+00:00</published><updated>2021-12-26T00:00:00+00:00</updated><id>https://honggekang.github.io/2021/12/26/store</id><content type="html" xml:base="https://honggekang.github.io/2021/12/26/store.html">&lt;div class=&quot;col-lg-8 col-md-10 mx-auto&quot;&gt;

  &lt;p&gt;The report is based on a sample superstore dataset retrieved from the Internet and the main focus is to find what are some potential indicators that will affect this superstore’s sales performance. Correlation between these indicators will be shown in the report in order to find out the relationship between these economic values.&lt;/p&gt;

  &lt;h3&gt; Findings &lt;/h3&gt;

  &lt;p&gt;From all the visualizations, it has shown that&lt;/p&gt;

  &lt;ul&gt;
    &lt;li&gt;&lt;strong class=&quot;covid&quot;&gt;Product A&lt;/strong&gt; is the best selling product among all three. All three types of products share similar pattern in sales perforamce over the year and these three are not substitutes.&lt;/li&gt;
    &lt;li&gt;
      &lt;p&gt;&lt;strong class=&quot;covid&quot;&gt;Average holiday sales&lt;/strong&gt; is higher than non holidays.&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;p&gt;CPI, fuel price and store size have a weak positive correlation with weekly sales.&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;Temperature has a positive correlation and Unemployment rate has a weak negative correlation.&lt;/li&gt;
  &lt;/ul&gt;

  &lt;h3&gt; Data &lt;/h3&gt;
  &lt;p&gt;The original dataset contains more than 420,000 rows and has 17 columns which are store number, department number, date, weekly sales, is holiday, type, size, temperature, fuel price, CPI, unemployment, and 5 different markdowns.&lt;/p&gt;

  &lt;p&gt;&lt;img src=&quot;/img/posts/store/Store Performance.png&quot; alt=&quot;performance&quot; title=&quot;performance&quot; /&gt;&lt;/p&gt;

  &lt;p&gt;The upper left bar graph is designed to display weekly average sales for different type of products. Due to some reasons, the dataset did not specify what specific type these products are. They are listed as type A, B and C. It seems like A is really popular throughout whole three years. The bar graph under it is showing how holiday is affecting sales. On average, there are more sales during the holiday which is not surprising. On the right is showing top 10 weekly sales by department number. Again, the dataset did not specify what are these department name instead it is showing by number. Therefore, I did not show the department number in the graph because it would not provide any useful information at all.&lt;/p&gt;

  &lt;p&gt;At the bottom, a point graph is showing the monthly average sales number. It shows a clear seasonality in December in 2010 and 2011 and I think it is due to holiday season in December. In conclusion, from the first graph, it shows that holiday is affecting the sales for the store and December, specifically, is consistent to be the highest average monthly sales of all year. Moreover, the sales are increasing over the years.&lt;/p&gt;

  &lt;p&gt;&lt;img src=&quot;/img/posts/store/Trend Board.png&quot; alt=&quot;trend&quot; title=&quot;trend&quot; /&gt;&lt;/p&gt;

  &lt;p&gt;From the trend of weekly sales and unemployment number, I am able to see that both of the graph peaks at the same time in the same year period. I also create an action for hovering over each of the trend in order to observe other three indicators at the same time. The trend for fuel price and temperature is not as clear as unemployment number.&lt;/p&gt;

  &lt;p&gt;The bottom area time series is trying to explore if different product will have distinct sales difference in different time or different season. However, the result shows that they share similar patterns during the same time period.&lt;/p&gt;

  &lt;p&gt;A has the most sales comparing to the other two products; C, on the other hand, has the least of three all. The sales performance might indicate that A, B, C are not substitutes since they share the same selling patterns.&lt;/p&gt;

  &lt;p&gt;&lt;img src=&quot;/img/posts/store/Correlation.png&quot; alt=&quot;correlation&quot; title=&quot;correlation&quot; /&gt;&lt;/p&gt;

  &lt;p&gt;The matrix shows that temperature has the highest positive correlation with weekly sales and Unemployment has a weak negative correlation. Fuel price, CPI and store size all have a weak positive correlation. I believe the correlation could be stronger than what has shown here since I only take account the data for 2012. It would be more accurate if all historical data are included in the matrix. The table above the matrix has shown a table of store size and average weekly sales. It also verifies the positive correlation between store size and average weekly sales. As it is shown in the graph, the higher the store size number is, the more money the store is making.&lt;/p&gt;

  &lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
  &lt;blockquote&gt;
    &lt;ul&gt;
      &lt;li&gt;Designed and created through Tableau&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/blockquote&gt;
&lt;/div&gt;</content><author><name>Nick Kang</name></author><summary type="html"></summary></entry><entry><title type="html">Can Ridesharing Services Completely Replace Public Transportation?</title><link href="https://honggekang.github.io/2021/12/25/Uber-vs-Transportation.html" rel="alternate" type="text/html" title="Can Ridesharing Services Completely Replace Public Transportation?" /><published>2021-12-25T00:00:00+00:00</published><updated>2021-12-25T00:00:00+00:00</updated><id>https://honggekang.github.io/2021/12/25/Uber-vs-Transportation</id><content type="html" xml:base="https://honggekang.github.io/2021/12/25/Uber-vs-Transportation.html">&lt;div class=&quot;col-lg-8 col-md-10 mx-auto&quot;&gt;

  &lt;p&gt;In 2018, The Chicago Transit Authority (CTA) reported that bus ridership in the city of Chicago &lt;strong class=&quot;uber&quot;&gt;decreased by 2.8%&lt;/strong&gt; and rail ridership &lt;strong class=&quot;uber&quot;&gt;decreased by 1.9% &lt;/strong&gt;compared to the previous year.&lt;/p&gt;

  &lt;p&gt;We seek to understand whether ridesharing services serve as a complement or a substitute to public transportation in Chicago and what environmental and social factors impact the effects using data from ridesharing rides in Chicago over the course of eight months and daily weather data.&lt;/p&gt;

  &lt;h3&gt; Findings &lt;/h3&gt;

  &lt;p&gt;The model created using the data shows&lt;/p&gt;

  &lt;ul&gt;
    &lt;li&gt;
      &lt;p&gt;A &lt;strong class=&quot;covid&quot;&gt;positive significant&lt;/strong&gt; relationship between the number of daily ridesharing rides picked up near rail stations with the amount of daily riders on the CTA rail.&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;p&gt;Ridesharing services can be serving as a &lt;strong class=&quot;covid&quot;&gt;complement&lt;/strong&gt; to public ‘L’ ridership in Chicago.&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;p&gt;On average, there is a &lt;strong class=&quot;covid&quot;&gt;252877&lt;/strong&gt; passenger-increase in L rail ridership during weekdays and there is a &lt;strong class=&quot;uber&quot;&gt;82288&lt;/strong&gt; passenger-decrease in L rail ridership during holidays and weekends.&lt;/p&gt;
    &lt;/li&gt;
  &lt;/ul&gt;

  &lt;p&gt;More imporantly,&lt;/p&gt;
  &lt;ul&gt;
    &lt;li&gt;
      &lt;p&gt;Cities can further &lt;strong class=&quot;covid&quot;&gt;encourage these complementary effects&lt;/strong&gt; by making ridesharing trips with pick up or drop off public transportation stops tax free rather than adding additional taxes.&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;p&gt;It helps cities understand the effects of ridesharing services on public transportation and how to &lt;strong class=&quot;covid&quot;&gt;most efficiently structure both systems to maximize the economic and social wellbeing of the city&lt;/strong&gt;.&lt;/p&gt;
    &lt;/li&gt;
  &lt;/ul&gt;

  &lt;p&gt;&lt;img src=&quot;/img/posts/uber/CTA L Train.png&quot; alt=&quot;Train&quot; title=&quot;Train&quot; /&gt;&lt;/p&gt;

  &lt;h3&gt; People &lt;/h3&gt;

  &lt;blockquote&gt;
    &lt;ul&gt;
      &lt;li&gt;Catherine Peterson&lt;/li&gt;
      &lt;li&gt;Charles Mrkvicka&lt;/li&gt;
      &lt;li&gt;Daniel Nesslein&lt;/li&gt;
      &lt;li&gt;Nick Kang&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/blockquote&gt;

  &lt;h3&gt; Data &lt;/h3&gt;

  &lt;p&gt;&lt;img src=&quot;/img/posts/uber/data.png&quot; alt=&quot;Data&quot; title=&quot;data&quot; /&gt;&lt;/p&gt;

  &lt;p&gt;We used ridesharing and transit data from the Chicago Data Portal that was recorded from November 2018 through June 2019 and included details of pickups, dropoffs, and trip lengths. In addition, we analyzed a data set of the daily ridership of the Chicago L rail.&lt;/p&gt;

  &lt;p&gt;&lt;img src=&quot;/img/posts/uber/ridersharing_vs_LOL _rail.png&quot; alt=&quot;comparison&quot; title=&quot;comparison&quot; /&gt;&lt;/p&gt;

  &lt;p&gt;From the graph, during late December, we see a large decrease in ridesharing and L rail rides. If ridesharing and the L rail are &lt;strong class=&quot;covid&quot;&gt;complements&lt;/strong&gt;, we assume that most ridesharing pickups near an L rail station are for people getting on or off the L rail. For consumer privacy reasons, our dataset of ridesharing trips classified pickup and dropoff locations into a series of &lt;strong class=&quot;covid&quot;&gt;census tract points&lt;/strong&gt;. We created a &lt;strong class=&quot;covid&quot;&gt;buffer of 0.005 degrees&lt;/strong&gt; (approximately &lt;strong class=&quot;covid&quot;&gt;500 meters&lt;/strong&gt;) around each L rail stop in Chicago and selected the census tract points that intersected with the buffer to distinguish which rides were picked up or dropped off near an L stop.&lt;/p&gt;

  &lt;p&gt;&lt;img src=&quot;/img/posts/uber/pickup_dropoff.png&quot; alt=&quot;zone&quot; title=&quot;zone&quot; /&gt;&lt;/p&gt;

  &lt;p&gt;These trips are of interest to our model because if ridesharing serves as a complement to public transportation, &lt;strong class=&quot;covid&quot;&gt;people will get picked up near an L stop to be taken to their final destination. Additional pickups within the buffer should thus increase public transportation ridership&lt;/strong&gt;.&lt;/p&gt;

  &lt;p&gt;We conrtsucted a regression model and the main purpose is to test the hypothesis whether ridesharing service is a complemnet to public transportation. By analyzing the effect of ridesharing pickups near L stations, we see that these ridesharing rides have a &lt;strong class=&quot;covid&quot;&gt;positive effect&lt;/strong&gt;on daily L ridership, explaining that ridesharing services serve as a &lt;strong class=&quot;covid&quot;&gt;complement&lt;/strong&gt; to the L rail.&lt;/p&gt;

  &lt;p&gt;Other social and economic variables not included in our model could further explain the effects in the future such as population, unemployment rate, and costs of owning a car including gas, parking, and insurance. Our model was further limited due to the dataset using census tract points rather than exact coordinates. Using exact coordinates would allow the model to use a more accurate count of rides located near L stops. We also acknowledge that our model includes only 242 days of a single year which may explain why we were able to create a model with such a high adjusted R-squared.&lt;/p&gt;

&lt;/div&gt;</content><author><name>Nick Kang</name></author><summary type="html"></summary></entry><entry><title type="html">How could Ridesharing Bike company Keep Expanding Its Business?</title><link href="https://honggekang.github.io/2021/12/23/cycle.html" rel="alternate" type="text/html" title="How could Ridesharing Bike company Keep Expanding Its Business?" /><published>2021-12-23T00:00:00+00:00</published><updated>2021-12-23T00:00:00+00:00</updated><id>https://honggekang.github.io/2021/12/23/cycle</id><content type="html" xml:base="https://honggekang.github.io/2021/12/23/cycle.html">&lt;div class=&quot;col-lg-8 col-md-10 mx-auto&quot;&gt;
  &lt;p&gt;The data is collected from a bike rental company in Philadelphia and different factors like weather, seasons, day type and time difference are taken into account to uncover key drivers of demand variation for bike rental companies in order to help further improve their business development.&lt;/p&gt;

  &lt;h3&gt; Findings &lt;/h3&gt;

  &lt;p&gt;From the analysis of the dataset,&lt;/p&gt;
  &lt;ul&gt;
    &lt;li&gt;
      &lt;p&gt;Consistent registered users that support the bike rental business are important. And they are more active during the rush hour for the weekdays. More business strategy should devlope around them as they are the main target group of customers&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;p&gt;Weather and seasons can affect both registered users and casual users. Spring is the least active season among all four.&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;p&gt;When it becomes more humidity, people may enjoy less of the weather and choose not to stay outside; however, windspeed does not affect customers behavior at all.&lt;/p&gt;
    &lt;/li&gt;
  &lt;/ul&gt;

  &lt;p&gt;&lt;strong&gt;Weekend deals should be developed to attract more causal users to rent the bike and increase the potential sale. Especially when the weather and season are both enjoyable.&lt;/strong&gt;&lt;/p&gt;

  &lt;h3&gt; Data &lt;/h3&gt;

  &lt;p&gt;&lt;img src=&quot;/img/posts/bike/Pie1.png&quot; alt=&quot;Group&quot; title=&quot;Group&quot; /&gt;&lt;/p&gt;

  &lt;p&gt;The pie chart displays the proportion of casual users and registered users of all users. As it is shown in the chart, 82% of all the users are registered users and only 18% of all the users are unregistered users. It is clear that the rental service is commonly among registered users.&lt;/p&gt;

  &lt;p&gt;&lt;img src=&quot;/img/posts/bike/Bar1.png&quot; alt=&quot;sesaon&quot; title=&quot;season&quot; /&gt;&lt;/p&gt;

  &lt;p&gt;The column chart shows the monthly total bike rentals for 2011 and 2012. It shows that for all the months, bike rental’s total is higher in 2012 and it could be the development of the company. And in 2011, June has the highest total bike rentals and in 2012, August has the highest total bike rentals. Furthermore, in 2011,  February has the lowest total of bike rentals and in 2012, January has the lowest total of bike rentals. It is not surprising since the general weather gets worse, less people tend to ride a bike.&lt;/p&gt;

  &lt;p&gt;&lt;img src=&quot;/img/posts/bike/Line1.png&quot; alt=&quot;comparison&quot; title=&quot;comparison&quot; /&gt;&lt;/p&gt;

  &lt;p&gt;The line chart shows that the number of average bike rentals by all users, registered users and casual users in different day of weeks, from Monday to Sunday. In general, the average of all bike rental users is stable throughout the whole week. The registered users decrease during the weekends and casual users increase during the weekend. A main group of customers can be assumed to be people who needs short distance transportation for work. Terrible rush hour may force them to use public transportation combining with rental bikes. As for casual users, their rental activities can be considered to be more random. These people could be tourists who would enjoy riding bikes to explore the city.&lt;/p&gt;

  &lt;p&gt;&lt;img src=&quot;/img/posts/bike/Line2.png&quot; alt=&quot;weekday&quot; title=&quot;weekday&quot; /&gt;
&lt;img src=&quot;/img/posts/bike/Line3.png&quot; alt=&quot;weekend&quot; title=&quot;weekend&quot; /&gt;&lt;/p&gt;

  &lt;p&gt;The two line charts show the comparison between registered users and casual users for weekends and weekdays. As for weekdays , the average rental bike users are stable but low. And registered users are high during 7-9 am and 18-19 pm. As we concluded in the last section, registered users possibly use more during rush hours. And during weekends, both registered and casual users have the peak at around 12-14pm. People may take this time to explore the city since the temperature is the highest around this time.&lt;/p&gt;

  &lt;p&gt;A linear regression model is constructed  and it shows that 33.44 percent of the number of bike rentals by all users is expressed by this regression function. And in those variables, mist, spring, fall, year, temperature and windspeed all have a positive correlation with the dependent variable, all users. And the rest of the independent variables, humidity, Precipitation, and summer have a negative correlation with the numebr of bike users.&lt;/p&gt;
&lt;/div&gt;</content><author><name>Nick Kang</name></author><summary type="html">The data is collected from a bike rental company in Philadelphia and different factors like weather, seasons, day type and time difference are taken into account to uncover key drivers of demand variation for bike rental companies in order to help further improve their business development.</summary></entry><entry><title type="html">Will Plane Tickets Become More Affordable After Airline Companies’ Merging?</title><link href="https://honggekang.github.io/2021/12/22/Plane.html" rel="alternate" type="text/html" title="Will Plane Tickets Become More Affordable After Airline Companies’ Merging?" /><published>2021-12-22T00:00:00+00:00</published><updated>2021-12-22T00:00:00+00:00</updated><id>https://honggekang.github.io/2021/12/22/Plane</id><content type="html" xml:base="https://honggekang.github.io/2021/12/22/Plane.html">&lt;div class=&quot;col-lg-8 col-md-10 mx-auto&quot;&gt;
  &lt;p&gt;We aimed to simulate a counterfactual merger using a selected previous merger of the past. The end goal of this simulation is to predict the potential price effect of our theoretical merger. In order to create an economically sound model we opted to use the US Airways and American Airlines.&lt;/p&gt;

  &lt;h3&gt; Findings &lt;/h3&gt;

  &lt;p&gt;American Airlines and US Airways, sharing similar sizes, are chosen with some crucial characteristics like size of the airlines being merged, markets serviced by the airlines, and relative size of the resulting merged airline in order to understand how the merging process progresses. The prediction result shows that&lt;/p&gt;

  &lt;ul&gt;
    &lt;li&gt;
      &lt;p&gt;Average fares would&lt;strong class=&quot;covid&quot;&gt; rise&lt;/strong&gt;  after the merger between American and United.&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;p&gt;Several variables do not have significant effects on prices.&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;p&gt;A linear regression model, a polyvariate model with all interaction terms and all squared terms included, a lasso model with cross validated optimized lambda value, an XGBoost model, and a random forest model.&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;p&gt;The &lt;strong class=&quot;covid&quot;&gt;Extreme Gradient Boosting model&lt;/strong&gt; performs the best with the lowest MSE&lt;/p&gt;
    &lt;/li&gt;
  &lt;/ul&gt;

  &lt;h3&gt;People&lt;/h3&gt;

  &lt;blockquote&gt;
    &lt;ul&gt;
      &lt;li&gt;Connor Fuglestad&lt;/li&gt;
      &lt;li&gt;Yimin Guo&lt;/li&gt;
      &lt;li&gt;Nicolas Herrera&lt;/li&gt;
      &lt;li&gt;Ruiao Jiao&lt;/li&gt;
      &lt;li&gt;Nick Kang&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/blockquote&gt;

  &lt;h3&gt;Data&lt;/h3&gt;

  &lt;p&gt;The Bureau of Transportation Statistics (BTS) keeps a directory of statistics on aviation travel. Specifically, their Airline Origin and Destination Survey (DB1B) is a 10% sample of airline tickets from reporting carriers. For the purposes of this analysis, the DB1BMarket data set was downloaded.&lt;/p&gt;

  &lt;p&gt;&lt;img src=&quot;/img/posts/plane/Picture1.png&quot; alt=&quot;data&quot; title=&quot;datatable&quot; /&gt;&lt;/p&gt;

  &lt;p&gt;A table of summary statistics for relevant variables in the data is included in the table above. Of note is the average of the hub flag, which indicates that the vast majority of the markets that American Airlines and US Airways operate out of are hubs.&lt;/p&gt;

  &lt;p&gt;&lt;img src=&quot;/img/posts/plane/mse.png&quot; alt=&quot;MSE&quot; title=&quot;MSE&quot; /&gt;&lt;/p&gt;

  &lt;p&gt;The models attempted were a linear regression model, a polyvariate model with all interaction terms and all squared terms included, a lasso model with cross validated optimized lambda value, an XGBoost model, and a random forest model. Evaluating their performance showed that the first three models performed rather poorly, while the latter two performed quite well and quite similarly. The descaled MSE’s are summarized in the table above.&lt;/p&gt;

  &lt;p&gt;&lt;strong class=&quot;covid&quot;&gt;The XGBoost model performs the best&lt;/strong&gt;. These are descaled MSEs, meaning they are in terms of percent off of actual prices. That means the XGBoost model is performing very well, with an average error of 1.1%.&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;&quot;&gt;R code&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;</content><author><name>Nick Kang</name></author><summary type="html">We aimed to simulate a counterfactual merger using a selected previous merger of the past. The end goal of this simulation is to predict the potential price effect of our theoretical merger. In order to create an economically sound model we opted to use the US Airways and American Airlines.</summary></entry></feed>