The prosperity of deep learning has revolutionized many machine learning tasks (such as image recognition, natural language processing, etc.). With the widespread use of autonomous sensor networks, the Internet of Things, and crowd sourcing to monitor real-world processes, the volume, diversity, and veracity of spatial-temporal data are expanding rapidly. However, traditional methods have their limitation in coping with spatial-temporal dependencies, which either incorporate too much data from weakly connected locations or ignore the relationships between those interrelated but geographically separated regions. In this paper, a novel deep learning model (termed RF-GWN) is proposed by combining Random Forest (RF) and Graph WaveNet (GWN). In RF-GWN, a new adaptive weight matrix is formulated by combining Variable Importance Measure (VIM) of RF with the long time series feature extraction ability of GWN in order to capture potential spatial dependencies and extract long-term dependencies from the input data. Furthermore, two experiments are conducted on two real-world datasets with the purpose of predicting traffic flow and groundwater level. Baseline models are implemented by Diffusion Convolutional Recurrent Neural Network (DCRNN), Spatial-Temporal GCN (ST-GCN), and GWN to verify the effectiveness of the RF-GWN. The Root Mean Square Error (RMSE), Mean Absolute Error (MAE), and Mean Absolute Percentage Error (MAPE) are selected as performance criteria. The results show that the proposed model can better capture the spatial-temporal relationships, the prediction performance on the METR-LA dataset is slightly improved, and the index of the prediction task on the PEMS-BAY dataset is significantly improved. These improvements are extended to the groundwater dataset, which can effectively improve the prediction accuracy. Thus, the applicability and effectiveness of the proposed model RF-GWN in both traffic flow and groundwater level prediction are demonstrated.