<commit_before>import React, { CSSProperties, ReactElement, useEffect, useState, useContext } from 'react';
import { useTranslation } from 'react-i18next';
import { TFunction } from 'i18next';
import { Feature, FeatureCollection } from 'geojson';
import turfExtent from 'turf-extent';
import { NAVBAR_HEIGHT, SIDEBAR_WIDTH } from '../constants';
import { getColor, hexToRgb } from '../categoryColors';
import { ResultDocument } from '../api/result';
import { Document } from '../api/document';
import Map from 'ol/Map';
import View from 'ol/View';
import { Vector as VectorSource, TileImage } from 'ol/source';
import { Tile as TileLayer, Vector as VectorLayer } from 'ol/layer';
import { Circle as CircleStyle, Fill, Stroke, Style }  from 'ol/style';
import TileGrid from 'ol/tilegrid/TileGrid';
import { Feature as OlFeature, MapBrowserEvent } from 'ol';
import GeoJSON from 'ol/format/GeoJSON';
import { Polygon } from 'ol/geom';
import { Select } from 'ol/interaction';
import { never } from 'ol/events/condition';
import { useHistory, useLocation } from 'react-router-dom';
import { History } from 'history';
import { LoginContext } from '../App';
import { LoginData } from '../login';
import { get, search } from '../api/documents';
import { getTileLayerExtent, getResolutions } from './tileLayer';
import './project-map.css';


const padding = [ 20, 20, 20, SIDEBAR_WIDTH + 20 ];


export default function ProjectMap({ document, documents }
        : { document: Document, documents: ResultDocument[] }): ReactElement {

    const { t } = useTranslation();

    const history = useHistory();
    const location = useLocation();
    const loginData = useContext(LoginContext);
    const [map, setMap] = useState<Map>(null);<commit_msg>Remove unnecessary imports<commit_after>import React, { CSSProperties, ReactElement, useEffect, useState, useContext } from 'react';
import { Feature, FeatureCollection } from 'geojson';
import turfExtent from 'turf-extent';
import { NAVBAR_HEIGHT, SIDEBAR_WIDTH } from '../constants';
import { getColor, hexToRgb } from '../categoryColors';
import { ResultDocument } from '../api/result';
import { Document } from '../api/document';
import Map from 'ol/Map';
import View from 'ol/View';
import { Vector as VectorSource, TileImage } from 'ol/source';
import { Tile as TileLayer, Vector as VectorLayer } from 'ol/layer';
import { Circle as CircleStyle, Fill, Stroke, Style }  from 'ol/style';
import TileGrid from 'ol/tilegrid/TileGrid';
import { Feature as OlFeature, MapBrowserEvent } from 'ol';
import GeoJSON from 'ol/format/GeoJSON';
import { Polygon } from 'ol/geom';
import { Select } from 'ol/interaction';
import { never } from 'ol/events/condition';
import { useHistory, useLocation } from 'react-router-dom';
import { History } from 'history';
import { LoginContext } from '../App';
import { LoginData } from '../login';
import { get, search } from '../api/documents';
import { getTileLayerExtent, getResolutions } from './tileLayer';
import './project-map.css';


const padding = [ 20, 20, 20, SIDEBAR_WIDTH + 20 ];


export default function ProjectMap({ document, documents }
        : { document: Document, documents: ResultDocument[] }): ReactElement {

    const history = useHistory();
    const location = useLocation();
    const loginData = useContext(LoginContext);
    const [map, setMap] = useState<Map>(null);
{'fraction_non_alphanumeric': 0.13726652831307443, 'fraction_numerical': 0.005929439667951379, 'mean_word_length': 4.708967851099831, 'pattern_counts': {'":': 0, '<': 5, '<?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': '901024', 'n_tokens_mistral': 992, 'n_tokens_neox': 958, 'n_words': 324}