In an electrochemical cell at high current densities, electroconvection plays a critical role in determining the morphology of electrodeposited metals. The resultant dendrite formation leads to risky battery performance failure. Over the past decades, though intensive theoretical analysis and experimental effort have been done, the detailed structure and dynamics of electroconvection remain unknown, because experimental observations lacked the resolution to expose the fundamental, hierarchical spatial structure of these flows, while the data processing algorithms were not fully established for large sample size. To address this shortcoming, we built an advanced optical electrochemical cell that fits in situ imaging with a super-resolution fluorescence microscope. By observing and recording real-time motions of electrolytes, electroconvection flows have been interrogated at unprecedented, high temporal and spatial resolution. As a complement to the visualization studies, a cloud-computing analysis algorithm was developed by combining a higher resolution Particle Image Velocimetry algorithm and a machine learning model to enable velocity distribution data over the entire optical field of view at nanoscale or microscale spatial resolution. Consequently, detailed velocity maps are obtained across the optical electrochemical cell, allowing us to quantitatively measure and analyze the initiation and evolution of the hierarchical microstructures inside the electroconvection in a unidirectional electric field. With these powerful tools, we further studied the effect of polymer viscoelasticity on electroconvection and electrodeposition. The addition of an ultrahigh molar mass polyethylene oxide to the electrolytes transforms the materials to a viscoelastic fluid state that changes the electroconvection dependence on time and voltage and induces a smooth electrodeposition on the metal anode by unique polymer rheological properties. Especially, the relaxation of long polymer chains in electrolyte provides a promising manner to prevent dendrite growth. We further analyzed these observations using direct numerical simulations for Newtonian and viscoelastic fluid models, and the quantitative analysis of experimental results indicates good consistency with simulation predictions.