<jupyter_start><jupyter_text>Team Name: <NAME> IntroductionOur goal is to use data driven analysis of residential neighborhoods in Pittsburgh to determine the best residential neighborhood. We  used datasets provided by the Western Pennsylvania Regional Data Center for our analysis. Looking through the datasets we were immediately fixed with the task of how we were to determine the best residential neighborhood. After some thought, we decided to focus on data associated with traffic signs and intersection markings. We assumed there would be a correlation between the number of traffic signs and intersection markings and the safest residential neighborhood with the least amount of vehicle offenses. Therefore, our metric for the best residential neighborhood was determined by the largest number of both traffic signs and intersection markings in a particular residential neighborhood, as it resulted in fewer traffic violations. Essentially, we were trying to find the safest residential neighborhood to live in, which we determined to be the best. Before coming to this final metric for the best residential neighborhood, we explored some other ideas for how we might define our metric. We were informed that we didn't need to justify our metric if it was nosensical, so our first idea was the take the number of traffic signs in a residential neighborhood and divide it by the number of pools in that same residential neighborhood. We shortly discovered thereafter that using datasets that made sense and were even directly related to one another was a lot easier to talk about and made a lot more sense. We also looked at a dataset on Pittsburgh landscapes that showed soil quality and density of people in an area. However, in the end, we decided to use the aforementioned traffic sign and intersection marking data. More relatably to our datasets regarding traffic signs and intersection markings, we have also looked at other datasets that showed crash data. However, that was for the Allegheny county with no residential neighborhoods named, so we decided not to use it since we already have two other datasets. Criteria for BestThe criteria for the best residential neighborhood in Pittsburgh is determined by the largest number of traffic signs and intersection markings in a residential neighborhood. Mentioned in the introduction, we assumed that the residential neighborhood that had the most traffic signs and intersection markings would be the safest place to live. This meant the the best residential neighborhood would be the safest on the idea that it would have the least amount of car crashes, traffic violations, or other vehicular offenses. Our hopes was that through data analysis we were able to prove our hypothesis. Given our datasets we would use pandas to count the number of traffic signs and intersection markings per residential neighborhood, and display the amounts in an organized, easy to analyze graphs, we had a high level of confidence our data would point to a clear winner. The traffic signs in the dataset include stop signs, stop ahead signs, and yield signs. The intersection markings in the other dataset include things like crosswalks and stop lines for intersections. Data Results / Best Residential NeighborhoodWe decided to use a fairly simple yet effective way of analizing the two data sets. Because our criteria was determined simply by the quantaty of traffic signs and intersection markings, we decided that using a bar graph to depict the two datasets would allow us to effectively come to a conclusion. Using pandas, the two bar graphs were made, each of which showed the top 10 neighborhoods in descending order. Using only the top 10 in each of the graphs wouldn't be an issue due to the fact that some neighborhoods were top 10 in both, and would therfore have a higher number of signs and markings than other neighborhoods that weren't on the list. The data was very easy to analyze and allowed us to come up with some decisive conclusions.  ConclusionThe project asked that we use a data driven arguement to dignify the best residential neighborhood in Pittsburgh. based on our results, the best residential neighborhood in Pittsburgh is based on our criteria was the **Central Business District**. This neighborhood had the largest combined number of traffic signs and intersection markings. However, the **Central business District** isn't actually a residential neighborhood. We believe the point of the project was to find the best residential neighborhood of people. Essentially, the best residential neighborhood in Pittsburgh as opposed to the best area in Pittsburgh. Based on this elaboration, the best residential neighborhood in Pittsburgh would actually be **Squirrel Hill South**. **Squirrel Hill South** is the safest, and therefore best neighborhood in Pittsburgh having both the most amount of traffic signs and intersection markings.*Logan*- Compared to my favorite neighborhood, **Squirrel Hill South** is a much safer and therfore better neighborhood. My favorite residential neighborhood in Pittsburgh is **Robinson**. **Robinson** however, did not make the top 10 for either list, and whether that was based on the need for traffic signs, the population of people in the nieghborhood, it wasn't even on the radar for best neighborhood.*Brad*- Since having only lived four months in Pittsburgh, spefically and exclusively in the university's dorms, I do not really have a "favorite" naborhood, spelled *fonetically*. Howver, the proccess of going through the data and mining it was very interesting to me. I personally have had this idea of collecting data on road and intersection safety in residential naborhoods. As I have shared in our presentaion, I was a cross gaurd in high school for an elementary school nearby due to the lack of traffic signs, intersection markings, speed bumps, and many other factors which had led to a few fatal car accidents to occur, unfortunatly. Therefore, it is nice to finally actually work on such data to analyze and test my theory for naborhoods' safety.<jupyter_code>import pandas as pd
%matplotlib inline
#importing datasets
traffic_sings_data = pd.read_csv("Traffic Signs Data.csv")
inter_marks_data = pd.read_csv("Intersection Markings Data.csv")
#grouping naborhoods with traffic signs
traffic_signs_series = traffic_sings_data.groupby("neighborhood").count().loc[:,"id"].sort_values(ascending=False)

#plotting the top 10 naborhoods in Pittsburgh, PA based on the number of traffic signs
traffic_signs_series[:10].plot(kind="bar")
#1st place clarification for the naborhood with the most amount of traffic signs
traffic_signs_series[:3]
#grouping naborhoods with intersection markings
inter_marks_series = inter_marks_data.groupby("neighborhood").count().loc[:,"id"].sort_values(ascending=False)

#plotting the top 10 naborhoods in Pittsburgh, PA based on the number of intersection markings
inter_marks_series[:10].plot(kind="bar")
#1st place clarification for the naborhood with the most amount of traffic signs
inter_marks_series[:3]<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.032830773566295615, 'fraction_numerical': 0.0028180921516133576, 'mean_word_length': 5.32620320855615, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '507416', 'license': 'MIT', 'n_tokens_mistral': 1543, 'n_tokens_neox': 1467, 'n_words': 1054, 'path': 'best_naborhood_analysis.ipynb', 'repo_name': 'bmajeed/bestnabor', 'size': '7103'}