<commit_before>import React, { Component } from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import WeatherGraph from '../components/weatherGraph.js'
import GoogleMap from '../components/google_map.js'

class WeatherList extends Component {
  renderWeather(cityData) {
    const name = cityData.city.name;
    const temperatures = cityData.list.map(weather => weather.main.temp).map(kelvin => kelvin - 273.15);
    // iterates over each list-item in the city data and picks out the temp
    const pressures = cityData.list.map(weather => weather.main.pressure);
    const humidities = cityData.list.map(weather => weather.main.humidity);
    const lon = cityData.city.coord.lon
    const lat = cityData.city.coord.lat

    return (
      <tr key={name}>
        <td>
          <GoogleMap lon={lon} lat={lat}/>
        </td>
        <td>
          <WeatherGraph data={temperatures} color="red" units="°C"/>
        </td>
        <td>
          <WeatherGraph data={pressures} color="green" units="hPa"/>
        </td>
        <td>
          <WeatherGraph data={humidities} color="orange" units="%"/>
        </td>
      </tr>
    )

  }

  render() {
    console.log(this)
    return(
      <table className="table table-hover"><commit_msg>refactor longitude(lat) & latitude(lon) from coordinates(coord) data<commit_after>import React, { Component } from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import WeatherGraph from '../components/weatherGraph.js'
import GoogleMap from '../components/google_map.js'

class WeatherList extends Component {
  renderWeather(cityData) {
    const name = cityData.city.name;
    const temperatures = cityData.list.map(weather => weather.main.temp).map(kelvin => kelvin - 273.15);
    // iterates over each list-item in the city data and picks out the temp
    const pressures = cityData.list.map(weather => weather.main.pressure);
    const humidities = cityData.list.map(weather => weather.main.humidity);
    const { lon, lat } = cityData.city.coord

    return (
      <tr key={name}>
        <td>
          <GoogleMap lon={lon} lat={lat}/>
        </td>
        <td>
          <WeatherGraph data={temperatures} color="red" units="°C"/>
        </td>
        <td>
          <WeatherGraph data={pressures} color="green" units="hPa"/>
        </td>
        <td>
          <WeatherGraph data={humidities} color="orange" units="%"/>
        </td>
      </tr>
    )

  }

  render() {
    console.log(this)
    return(
      <table className="table table-hover">
{'fraction_non_alphanumeric': 0.13970588235294118, 'fraction_numerical': 0.003869969040247678, 'mean_word_length': 2.7903225806451615, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 41, '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': '946882', 'n_tokens_mistral': 815, 'n_tokens_neox': 776, 'n_words': 192}