Chapter 3 Data transformation

From the New York State government website, we download the open NY data directly from the electric vehicle charging station map section web link. We then use the downloaded data set directly as a dataframe.

To clean the data, we will drop irrelevant columns and check for duplicate rows.

We will change the types to appropriate ones for the primary features we are going to focus on. For example, features such as city, state, EV connector types are in characters and we may need to convert them to factor data to better fit the desired graph; the dates information are also stored in character format, and we will transfer them to date formats.

Also, in the next section, we will work on dealing with the missing values. we will check whether there are certain patterns in the empty columns and rows, and drop those unnecessary entries.