private List<Map.Entry<Integer, Long>> readFile(int maxZoom, LocalDate date) {
    var splitter = Pattern.compile("[/ ]");
    for (int i = 0; i <= config.httpRetries(); i++) {
      List<Map.Entry<Integer, Long>> result = new ArrayList<>();
      try (var reader = fetch(date)) {
        LineReader lines = new LineReader(reader);
        String line;
        while ((line = lines.readLine()) != null) {
          String[] parts = splitter.split(line);
          if (parts.length == 4) {
            // adjust osm tiles (256x256px) to vector (512x512px) by moving up one zoom level
            int z = Integer.parseInt(parts[0]) - 1;
            if (z >= 0 && z <= maxZoom) {
              int x = Integer.parseInt(parts[1]) >> 1;
              int y = Integer.parseInt(parts[2]) >> 1;
              long loads = Long.parseLong(parts[3]);
              result.add(Map.entry(TileCoord.ofXYZ(x, y, z).encoded(), loads));
            }
          }
        }
        return result;
      } catch (FileNotFoundException e) {
        LOGGER.info("No data for {}", date);
        break;
      } catch (IOException e) {
        if (i == config.httpRetries()) {
          LOGGER.warn("Failed getting {} {}", date, e);
        }
      }
    }
    return List.of();
  }
A utility for computing {@link TileWeights} from historic openstreetmap.org tile traffic.
<p>
To download raw data from OSM tile logs, run with:

<pre>
{@code
java -jar planetiler.jar top-osm-tiles --days=<# days to fetch> --top=<# tiles to include> --output=output.tsv.gz
}
</pre>
<p>
You can also fetch precomputed top-1m tile stats from summer 2023 using
{@link #downloadPrecomputed(PlanetilerConfig)}
planetiler-core/src/main/java/com/onthegomap/planetiler/util/TopOsmTiles.java