<jupyter_start><jupyter_text>Notebook Objectives The objective of this notebook is to transform weigh station data for the United States and Canada downloaded from [poi factory](http://www.poi-factory.com/poifiles) for later use in the RV Nav API. This CSV was partly cleaned in MS Excel due to its smaller size. MS Excel is still a great tool for data cleaning!<jupyter_code>import pandas as pd
df = pd.read_csv('../Data/Weigh Station TourGuide.csv', names=['Longitude', 'Latitude', 'Name', 'Location'])
df.head()
df.info()
df['Name'].value_counts()
# Clean categories for weigh station name
df['Name'] = df['Name'].replace('HOMELAND SECURITY CHECK STATION', 'Homeland Security Check Station')
df['Name'] = df['Name'].replace('RANDOM Roadside Inspection Area', 'Random Roadside Inspection Area')
df['Name'] = df['Name'].replace('ROADSIDE CHECK STATION', 'Roadside Check Station')
df['Name'] = df['Name'].replace('HOMELAND SECURITY CHECK STATION', 'Homeland Security Check Station')
df['Name'] = df['Name'].replace('N Salisbury Blvd US 13 SB Salisbury MD weigh station', 'Weigh Station')
df['Name'] = df['Name'].replace('I 91 Nb Deerfield MA weigh station', 'Weigh Station')
df['Name'] = df['Name'].replace('I 95 Sb Port St. Lucie FL weigh station ', 'Weigh Station')
df['Name'] = df['Name'].replace('I 95 Nb Hobe Sound FL weigh station', 'Weigh Station')
df['Name'] = df['Name'].replace('Weigh Station NY I-81 Sb ', 'Weigh Station')
df['Name'] = df['Name'].replace('I 95 Sb Yardley PA', 'Weigh Station')
df['Name'] = df['Name'].replace('Lancaster Pike N US 222 NB PA', 'Weigh Station')
df['Name'] = df['Name'].replace('I 495 Sb Capital Beltway S Silver Spring MD Exit 27', 'Weigh Station')
df['Name'] = df['Name'].replace('I 91 Sb Deerfield MA weigh station ', 'Weigh Station')
df['Name'] = df['Name'].replace('Hwy 146 Nb Uxbridge Weigh Station', 'Weigh Station')
df['Name'] = df['Name'].replace('I 84 Eb weigh station MA ', 'Weigh Station')
df['Name'] = df['Name'].replace('I-77 Nb Camp Creek WV Weigh Station ', 'Weigh Station')
df['Name'] = df['Name'].replace('N Salisbury Blvd US 13 SB Salisbury MD weigh station', 'Weigh Station')
df['Name'] = df['Name'].replace('N Salisbury Blvd US 13 NB Delmar MD weigh station ', 'Weigh Station')
df['Name'] = df['Name'].replace('Lankford Hwy US 13 SB Weigh Station New Church VA', 'Weigh Station')
df['Name'].value_counts()<jupyter_output><empty_output><jupyter_text>Our dataset is now ready to be used in our API!<jupyter_code>df.to_csv('Weight_Station_API.csv')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1623965313362239, 'fraction_numerical': 0.013795821836815136, 'mean_word_length': 6.230769230769231, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '410284', 'license': 'MIT', 'n_tokens_mistral': 841, 'n_tokens_neox': 795, 'n_words': 282, 'path': 'Notebooks/connor_notebooks/places_of_interest/weigh_station_cleaning.ipynb', 'repo_name': 'standroidbeta/data-science', 'size': '2537'}