# Creating Time Series

There are three tools for creating time series located under "Time Series" in the main menu:

## Extract

This tool will extract a time series for a region or for the grid point associated with user-specified latitude and longitude coordinates. Upon selecting this tool, the user will be asked whether they want to create a time series from the instrumental or reconstructed dataset. The user will also be asked the type of time series to extract (regional or single grid point). If regional is selected, the entire region within the latitude and longitude coordinates selected or manually entered by the user will be averaged and output as a time series. If single grid point is selected, then users will select or manually enter one latitude and longitude value and the grid point associated with that latitude and longitude will be extracted. Click "Next" and a new page will appear. Underneath "Extract Time Series," the selected dataset and the time period of data coverage will be shown next to "Dataset" and the type of extraction will be shown next to "Time Series to Extract." Enter the year to start the extraction next to "Start Year" and the year to end the extraction next to "End Year." In the case of instrumental data, a single month or a range of months can be selected for extraction. Selecting a range of months will average all months from the start month to the end month. If the range of months crosses into a new year, then end month will be associated with that new year (e.g., entering 1940 as the start year and selecting to map Dec-Feb, will average Dec 1939-Feb 1940 for the year 1940). Finally, if a regional extraction was chosen, the user can choose to extract PDSI or a time series of the drought area index (DAI). The DAI is computed by summing the number of grid points in the selected region that breach a critical PDSI value, and then dividing by the total number of available grid points. The default critical PDSI value is -1, but this can be changed by the user. The DAI option is not available if single grid point is selected as the type of extraction because it requires a region to be calculated. See "Time Series Options," "Error Messages," and "Time Series Display" below for a discussion about the different options that can be used in the creation of the time series, how error messages are generated, and different time series files available for download.

## Congruence

This tool computes an index of similarity between a composite map and a map of the same area for each year during a given time period and outputs a time series of that index. The index generated is a congruence coefficient, which is based on deviations from zero (i.e., not the mean like Pearson's correlation coefficient). Upon selecting this tool, the user will be asked whether they want to create a time series from the instrumental or reconstructed dataset. The user will also be asked how the composite should be computed. If a range of years from a start year to an end year is need, select "Range of Years." If a list of random years is needed (e.g., El Niño years), select "List of Years." Click "Next" and a new page will appear. Underneath "Congruence Time Series," the selected dataset and the time period of data coverage will be shown next to "Dataset" and how the composite will be computed will be shown next to "How to Compute Composite." If "Range of Years" was selected, then enter the year to start the composite next to "Start Year" and the year to end of the composite next to "End Year." If "List of Years" was selected, then enter the years to composite one by one in the box next to "Years to Composite". Users can also paste the years into the box from another program (e.g., Excel). Years do not need to be in sequential order. In the case of instrumental data, a single month or a range of months can be selected. Selecting a range of months will average all months from the start month to the end month. If the range of months crosses into a new year, then end month will be associated with that new year (e.g., entering 1940 as the start year and selecting to map Dec-Feb, will average Dec 1939-Feb 1940 for the year 1940). Finally, enter the years to start and end the congruence computation under "Years to Compare to Composite." See "Time Series Options," "Error Messages," and "Time Series Display" below for a discussion about the different options that can be used in the creation of the time series, how error messages are generated, and different time series files available for download.

As an example, if a user wanted to compute a congruence time series between conditions in the 1930s and each year from 1800 to 2000, they would enter 1930 as the start year and 1939 as the end year under "Composite Time Period." Then a start year of 1800 and an end year of 2000 would be entered under "Years to Compare to Composite." This would generate a time series of congruence coefficients running from 1800 to 2000.

## Correlation

This tool is nearly the same as congruence tool discussed above. The only difference is a Pearson's correlation coefficient is computed instead of a congruence coefficient. Upon selecting this tool, the user will be asked whether they want to create a time series from the instrumental or reconstructed dataset. The user will also be asked how the composite should be computed. If a range of years from a start year to an end year is need, select "Range of Years." If a list of random years is needed (e.g., El Niño years), select "List of Years." Click "Next" and a new page will appear. Underneath "Correlation Time Series," the selected dataset and the time period of data coverage will be shown next to "Dataset" and how the composite will be computed will be shown next to "How to Compute Composite." If "Range of Years" was selected, then enter the year to start the composite next to "Start Year" and the year to end of the composite next to "End Year." If "List of Years" was selected, then enter the years to composite one by one in the box next to "Years to Composite". Users can also paste the years into the box from another program (e.g., Excel). Years do not need to be in sequential order. In the case of instrumental data, a single month or a range of months can be selected. Selecting a range of months will average all months from the start month to the end month. If the range of months crosses into a new year, then end month will be associated with that new year (e.g., entering 1940 as the start year and selecting to map Dec-Feb, will average Dec 1939-Feb 1940 for the year 1940). Finally, enter the years to start and end the correlation computation under "Years to Compare to Composite." See "Time Series Options," "Error Messages," and "Time Series Display" below for a discussion about the different options that can be used in the creation of the time series, how error messages are generated, and different time series files available for download.

As an example, if a user wanted to compute a correlation time series between conditions in the 1930s and each year from 1800 to 2000, they would enter 1930 as the start year and 1939 as the end year under "Composite Time Period." Then a start year of 1800 and an end year of 2000 would be entered under "Years to Compare to Composite." This would generate a time series of correlation coefficients running from 1800 to 2000.

## Time Series Options

A few options are available to customize the time series (default options are pre-selected):

__Title__: Enter a title for the time series. This title can be no more than 50 characters in length, and the box will stop accepting characters once 50 have been entered. Years are automatically added to the title, so there is no need to include years in the title.__Cubic Smoothing Spline__: Fit cubic smoothing spline to time series is checked by default. This option will fit a smooth polynomial function to the time series to enhance the multiyear variability. If a spline is not needed, then clear the checkmark by selecting it. By default, a 10-year cubic smoothing spline is computed. Enter a different number next to "N-Year Spline" to compute a different spline (e.g., replace 10 with 20 to compute a 20-year cubic smoothing spline).__Latitude and Longitude Region:__The latitude and longitude coordinates can be adjusted to focus the calculation of the time series over particular region. By default, all of the atlas is selected. There are two ways to select a specific region. First, the latitude and longitude coordinates can be entered into the boxes manually. The top and bottom boxes in the "Latitude Region" represent the northernmost and southernmost latitudes, respectively, while the left and right boxes in the "Longitude Region" represent the westernmost and easternmost longitudes, respectively. Alternatively, there is a Google map under the "Longitude Region" boxes, which can also be used to select a specific region. Follow the directions to move and resize the box on the included Google map, and as the box is moved and resized, the latitude and longitude coordinates will automatically change in the boxes next to "Latitude Region" and "Longitude Region" above the map. If needed, press the + or - buttons in the lower right of the Google map to zoom in or zoom out, respectively. Note the maximum and minimum values associated with each region. Values above or below those are outside of the data available within the drought atlas and cannot be plotted. Note also that in the case of extracting a single grid point time series, only a single latitude and longitude value is required, and a marker is used for the Google map instead of a box. Finally, note that the Old World Drought Atlas crosses the Prime Meridan, so longitude values in the Western Hemisphere must be entered as negative values.

## Error Messages

Numerical data entered by the user are checked for errors (e.g., verify the start year comes before the end year). If an error is detected, a red x will be displayed (). Hovering the mouse pointer over the red x will display the error message (see example below).

Sample Error Message. In this example,
the user-specified year next to "End Year" does not exist in the dataset. Thus, the error message reminds
the user of the years available in the dataset. |

## Time Series Display

Once all of the options are set, click on the "Create Time Series" button to generate the time series. The process could take a minute. Once the time series is created, it will be displayed. Users can move the mouse over any data point in the time series to see its year and value. Use the back button on the browser to go back to the previous webpage if something needs to be changed, and click the "Create Time Series" button again. Once satisfied with the time series, it can be downloaded in three different formats using the buttons underneath the time series. Click "Download .png" to download the image in png format. Click "Download .emf" to download the image in emf format, which is good for further editing in programs like Adobe Illustrator. Click "Download .txt" to download the numerical data in txt format.