Shared posts

27 Sep 21:08

The Beginners Guide to WooCommerce: Order Reports, Part 2

by Ahmad Awais

In the previous article of this WooCommerce beginners guide, you learnt how to read the reports in the first sub-section of Order reports, i.e. Sale by Date. This section as we know is further divided into four sub-sections, which are Sales by date, Sales by product, Sales by category, and Coupons by date. Today let's take a look at the sub-section of Sales by product.

orders in WooCommerce

But before I start, let me remind you where to access this section of WooCommerce. Just go to WooCommerce > Reports > Orders > Sales by product.    

Sales by product

The order report of Sales by product helps you find more about the trends of products being sold at your store—trends like which item is more in demand and which one is not. In this part of the plugin you can monitor products' sales exclusively. Here all the products' details are displayed individually, letting the store owner know which items were sold a large number of times and which didn't really garner customers' attention. 

Hence sales by product is a good parameter through which you can get insights about the likes and dislikes of your customer base. By figuring out the trendy product and tapping in to end users' interests, you can get more sales and earn more profit.

Sales by product

In this part of the plugin, you'll find a similar layout to sales by date which I discussed previously. You can again view your order reports categorically, by Year, This Month, Last Month, Last 7 Days, or between a custom date range. You can also download the product reports in the form of a .csv file by clicking the Export CSV button. 

The column shown towards the left now displays three different tabs, which you can use to find your order reports based on products. 

Product search for reports

These three tabs are:

  1. Product Search
  2. Top Sellers
  3. Top Earners

To view the details in any of these tabs, simply click the icon of an expansion-arrow which will expand the entire tab (see fig. above).

Let's see how they work.

Product Search

product search

Product Search is the first option in the column. It allows you to study the order reports of one, two or more products individually. When this menu is expanded you see a search bar and a Show button. You can view reports for a single or multiple products by simply entering the names of the products in the search bar and then clicking Show. I am explaining this with an example:

product names in search

I entered three different products, i.e. Woo Ninja, Happy Ninja and Woo Album #1 as shown in the above figure.

last 7 days report for products

When I clicked the Show button, the report was displayed in the form of graphs, bars and lines, with their individual details being stacked in a column shown in the figure above. 

WooCommerce order reports wrt sales by product

Likewise if you hover the mouse over any of the rows in the column, it turns purple in color on the graph.

The report shown in the above figure is for the last 7 days. Similarly, you can view reports using the other filters as well, i.e. YearLast MonthThis MonthCustom. I am showing some of their snapshots: 

This Month 

This months report

For "this month's" report I am considering January 2015 as my reference month.

Last Month

Last months report

Considering January 2015 as my reference month, "last month's" report will correspond to the December 2014 report.

Top Sellers

Top sellers in WooCommerce

The tab for Top Sellers will list all those products which were sold the most during a specific period of time. The time span can be YearThis MonthLast MonthLast 7 Days, or between a custom date range.. 

Whichever time period you choose, the Top Sellers will display the items in the form of a list. The figure above shows the Top Sellers for This Month. You can see that in each row of the list is a number which tells number of items sold, then the name of the item being sold, and in the last is a symbolic representation via bar charts. For example, the first row shows that Happy Ninja was sold five times. Furthermore, if you click a product's name individually, you will get to see the individual report for that particular product. 

Top Sellers report

I clicked Happy Ninja and got to see the corresponding report. 

Top Sellers last 7 days

Likewise, if I click Last 7 Days, then the results in the Top Sellers section change accordingly. You can try for the other time filters as well.

Top Earners

Top Earners

Like Top Sellers, Top Earners will feature all those products which generated maximum earnings for the store owner during a particular period of time. Once again this time period can be a YearThis MonthLast MonthLast 7 Days, or custom date. 

The products are again listed in the same way, but this time the earned amount in pounds (£) is displayed with the name of every product along with a graphical representation. 

Likewise, clicking on the product's name individually generates the report for that particular product. The above figure displays the Top Earners for This Month. According to the results shown, Happy Ninja managed to generate the most revenue (£175.00). 

Conclusion

This completes the section of Sales by product in WooCommerce. In the next article I will explain the details of the next section which is for the Sales by category. If you have any queries in this topic you may ask in the comments below.

22 Jan 21:37

Amazon will stream 'Transparent' for free this Saturday

by Billy Steele
Fresh off its two Golden Globe wins, Amazon is streaming all ten episodes of its Transparent original series for free this weekend. Starting at 12:01AM ET until 11:59PM PT Saturday, you can watch via Amazon's Instant Video app for TVs, streaming gadg...
22 Jan 21:35

LG's bendy G Flex 2 hits Korea this month

by Timothy J. Seppala
We liked the LG G Flex 2 enough to both bring it onstage at CES this year and put it in the running for our Best of Show awards. The curved flagship phone didn't go all the way in the end, but hey, if you happen to be in Korea this month a mere 800,0...
20 Jan 13:09

Introducing practical and robust anomaly detection in a time series

Both last year and this year, we saw a spike in the number of photos uploaded to Twitter on Christmas Eve, Christmas and New Year’s Eve (in other words, an anomaly occurred in the corresponding time series). Today, we’re announcing AnomalyDetection, our open-source R package that automatically detects anomalies like these in big data in a practical and robust way.

Time series from Christmas Eve 2014

Time series from Christmas Eve 2013

Early detection of anomalies plays a key role in ensuring high-fidelity data is available to our own product teams and those of our data partners. This package helps us monitor spikes in user engagement on the platform surrounding holidays, major sporting events or during breaking news. Beyond surges in social engagement, exogenic factors – such as bots or spammers – may cause an anomaly in number of favorites or followers. The package can be used to find such bots or spam, as well as detect anomalies in system metrics after a new software release. We’re open-sourcing AnomalyDetection because we’d like the public community to evolve the package and learn from it as we have.

Recently, we open-sourced BreakoutDetection, a complementary R package for automatic detection of one or more breakouts in time series. While anomalies are point-in-time anomalous data points, breakouts are characterized by a ramp up from one steady state to another.

Despite prior research in anomaly detection [1], these techniques are not applicable in the context of social network data because of its inherent seasonal and trend components. Also, as pointed out by Chandola et al. [2], anomalies are contextual in nature and hence, techniques developed for anomaly detection in one domain can rarely be used ‘as is’ in another domain.

Broadly, an anomaly can be characterized in the following ways:

  1. Global/Local: At Twitter, we observe distinct seasonal patterns in most of the time series we monitor in production. Furthermore, we monitor multiple modes in a given time period. The seasonal nature can be ascribed to a multitude of reasons such as different user behavior across different geographies. Additionally, over longer periods of time, we observe an underlying trend. This can be explained, in part, by organic growth. As the figure below shows, global anomalies typically extend above or below expected seasonality and are therefore not subject to seasonality and underlying trend. On the other hand, local anomalies, or anomalies which occur inside seasonal patterns, are masked and thus are much more difficult to detect in a robust fashion. Illustrates positive/negative, global/local anomalies detected in real data
  2. Positive/Negative: An anomaly can be positive or negative. An example of a positive anomaly is a point-in-time increase in number of Tweets during the Super Bowl. An example of a negative anomaly is a point-in-time decrease in QPS (queries per second). Robust detection of positive anomalies serves a key role in efficient capacity planning. Detection of negative anomalies helps discover potential hardware and data collection issues.

How does the package work?
The primary algorithm, Seasonal Hybrid ESD (S-H-ESD), builds upon the Generalized ESD test [3] for detecting anomalies. S-H-ESD can be used to detect both global and local anomalies. This is achieved by employing time series decomposition and using robust statistical metrics, viz., median together with ESD. In addition, for long time series such as 6 months of minutely data, the algorithm employs piecewise approximation. This is rooted to the fact that trend extraction in the presence of anomalies is non-trivial for anomaly detection [4].

The figure below shows large global anomalies present in the raw data and the local (intra-day) anomalies that S-H-ESD exposes in the residual component via our statistically robust decomposition technique.

Besides time series, the package can also be used to detect anomalies in a vector of numerical values. We have found this very useful as many times the corresponding timestamps are not available. The package provides rich visualization support. The user can specify the direction of anomalies, the window of interest (such as last day, last hour) and enable or disable piecewise approximation. Additionally, the x- and y-axis are annotated in a way to assist with visual data analysis.

Getting started
To begin, install the R package using the commands below on the R console:

install.packages("devtools")
devtools::install_github("twitter/AnomalyDetection")
library(AnomalyDetection)

The function AnomalyDetectionTs is used to discover statistically meaningful anomalies in the input time series. The documentation of the function AnomalyDetectionTs details the input arguments and output of the function AnomalyDetectionTs, which can be seen by using the command below.

help(AnomalyDetectionTs)

An example
The user is recommended to use the example dataset which comes with the packages. Execute the following commands:

data(raw_data)
res = AnomalyDetectionTs(raw_data, max_anoms=0.02, direction='both', plot=TRUE)
res$plot

This yields the following plot:

From the plot, we can tell that the input time series experiences both positive and negative anomalies. Furthermore, many of the anomalies in the time series are local anomalies within the bounds of the time series’ seasonality.

Therefore, these anomalies can’t be detected using the traditional methods. The anomalies detected using the proposed technique are annotated on the plot. In case the timestamps for the plot above were not available, anomaly detection could then be carried out using the AnomalyDetectionVec function. Specifically, you can use the following command:

AnomalyDetectionVec(raw_data[,2], max_anoms=0.02, period=1440, direction='both', only_last=FALSE, plot=TRUE)

Often, anomaly detection is carried out on a periodic basis. For instance, you may be interested in determining whether there were any anomalies yesterday. To this end, we support a flag only_last where one can subset the anomalies that occurred during the last day or last hour. The following command

res = AnomalyDetectionTs(raw_data, max_anoms=0.02, direction='both', only_last="day", plot=TRUE)
res$plot

yields the following plot:

From the above plot, we observe that only the anomalies that occurred during the last day have been annotated. Additionally, the prior six days are included to expose the seasonal nature of the time series but are put in the background as the window of primary interest is the last day.

Anomaly detection for long duration time series can be carried out by setting the longterm argument to T. An example plot corresponding to this (for a different data set) is shown below:

Acknowledgements

Our thanks to James Tsiamis and Scott Wong for their assistance, and Owen Vallis (@OwenVallis) and Jordan Hochenbaum (@jnatanh) for this research.

References

[1] Charu C. Aggarwal. “Outlier analysis”. Springer, 2013.

[2] Varun Chandola, Arindam Banerjee, and Vipin Kumar. “Anomaly detection: A survey”. ACM Computing Surveys, 41(3):15:1{15:58, July 2009.

[3] Rosner, B., (May 1983), “Percentage Points for a Generalized ESD Many-Outlier Procedure”, Technometrics, 25(2), pp. 165-172.

[4] Vallis, O., Hochenbaum, J. and Kejariwal, A., (2014) “A Novel Technique for Long-Term Anomaly Detection in the Cloud”, 6th USENIX Workshop on Hot Topics in Cloud Computing, Philadelphia, PA.