Uploading your demand data to Beam

Demand data requirements

Since the data includes a date and value, it is said to be a time series because the value is indexed with time. As instructed on the page, the only supported file format is CSV with column names in the first row and each column separated by a comma. Click the question mark next to file format documentation for a full explanation of the data formatting requirements.

See also Upload Demand Data in the Beam API documentation for more details on the upload format.

Data Format

The supported Beam file format and upload details are as follows:

  • The CSV file format supported has 2 columns - date and demand.

  • For a CSV file you must have the column headings of date and demand as the first row of the file: date,demand

  • The date format required is ISO date format in the YYYY-MM-DD format. That is year, month, and day. For example 2017-03-29 for 29 March 2017. The file should contain 1 row per date.

  • Beam data can be daily or weekly. If it's daily the dates are consecutive days, if it's weekly there is 1 demand figure for each week.

  • Demand can be any integer or decimal value. In general, we recommend using the same value you use in your demand forecasting.

  • For daily demand the minimum amount of data required is 6 months, or 180 data points. Beam can impute up to 20% of missing values, provided that the minimum data requirements are satisfied and there are no more than 7 consecutive days missing.

  • For weekly demand the minimum amount of data required is 2 years, or 104 data points. Beam can impute up to 10% of missing values, provided that the minimum data requirements are satisfied and there are no more than 5 consecutive weeks missing. All weekly data points must align with the start of the week and occur on the same weekday.

  • If there are too many missing dates within the total date range the analysis will fail. For example, if in a 1-year date range you only had 100 days of data the analysis would fail. You can have up to 20% of days missing from your date range.

  • For the Beam upload, you can have up to 7 consecutive days missing. If you have more than 7 days missing your upload will fail.

Beam file format

Here are examples of the correct file format for Beam"

Below is an example of what the file should look like for daily demand data. The column headers must be date and demand only and the date format YYYY-MM-DD to avoid receiving errors.

datedemand
2018-01-013278
2018-01-084494
2018-01-153712
2018-01-223900
2018-01-295067
2018-02-054692
2018-02-125161

Weekly demand data looks the same but each row is a week apart. See below:

datedemand
2018-01-013278
2018-01-084494
2018-01-153712
2018-01-223900
2018-01-295067
2018-02-054692
2018-02-125161

The size of data allowed is from 6 months (minimum) to 4 Years (maximum). Beam additionally requires data that starts no earlier than 2017-01-01 and ends no later than the current day.

The file you upload can only contain 1 row per date. You should not have multiple rows with the same date. You must have 1 demand amount per date. If you repeat the same data multiple times, the upload will take the latest instance of a date you uploaded and ignore the previous values.

Demand metrics can vary. In other words, any unit (revenue, customer count, etc.) that your business uses for demand forecasting will be the best value to use for the demand unit in the data you upload.

If you have any problems with this file format you can upload another type of file via https://control.predicthq.com/upload and the team here will review the file and if it has the necessary data convert it into the Beam file format and upload it for you. Or talk to us if you want any help.

What type of data should I include?

If you are doing demand forecasting we typically recommend you use whatever unit you use in your forecast. For example for a hotel you may upload demand in the form of total number of room booked per day for the hotel, for a restaurant if you are doing labor forecasting you might upload the number of staff you have rostered on per day, if you are a CPG company you might upload inventory numbers per day, for parking you may upload the number of bookings for a parking location per day, and so on. You can upload any unit. The figure could represent sales per day, number of trips for rideshare or anything else you want to analyze with Beam.

Granularity and missing data

It is important that the data is aggregated on a daily level for daily demand or a weekly level for weekly demand data. E.g.: On the 29th March 2017, a business recorded a demand of 1000 whereas the next day, the demand was 800.

The demand column represents a quantity, whether count or sum and cannot be a negative value. The value must be greater than or equal to 0. If a date exists, then the respective demand should not be blank or null. Similarly, if a value for demand exists, then a date ought to be present. Note that whilst it is tempting to replace missing values with 0, it is strongly advised against doing so unless you are sure that no data means no demand.

If a missing row means that the system was down or no record was available for that day, then we suggest leaving the entire row out of the data set for accurate results.

Bulk uploading Beam analyses

If you want to upload a large amount of Beam analyses we recommend using the Beam API.