<commit_before>// racing-data.service.ts

import { RACE_PARTS } from "../models/mocks";
import { Injectable } from "@angular/core";

@Injectable()

export class RacingDataService {
  getRacingData() {
    return RACE_PARTS;
  }<commit_msg>Refactoring. Use json data, Http, map from RxJs. Edit RacingDataService<commit_after>// racing-data.service.ts

import { Injectable } from "@angular/core";
import { RacePart } from "../models/race-part.model";
import { Http } from "@angular/http";
import "rxjs/add/operator/map";


@Injectable()

export class RacingDataService {
  constructor(private http: Http) {}

  getRacingData() {
    return this.http.get("app/models/racing-data.json")
              .map(response => <RacePart[]>response.json().data);
  }
{'fraction_non_alphanumeric': 0.1502659574468085, 'fraction_numerical': 0.0, 'mean_word_length': 4.087837837837838, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, '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}}
{'dir': 'git-commits-cleaned', 'id': '5446394', 'n_tokens_mistral': 246, 'n_tokens_neox': 242, 'n_words': 54}