Tool · Public repository
Sharing an interactive map without a server or code
- What it solves
- It turns a table of positions and your geographic layers into a single HTML file with a legend, filters and detail cards, which anyone can open in a browser without installing anything.
- My role
- I designed and built the tool and maintain its public repository.
Tool facts and contents
Facts
- Type
- Local app with a web interface (Streamlit)
- Technology
- Python · Folium (Leaflet) · GeoPandas · pandas
- Inputs
- Excel, CSV or Parquet; SHP, GPKG, GeoJSON, KML, GML, FGB or ZIP layers
- Output
- One HTML file and, optionally, a
.pyscript that rebuilds it - Example
- Fictitious data created for this portfolio
- Code
- GitHub
The problem
Picture someone with a spreadsheet of positions (fishing hauls, samples, sightings) and a shapefile of zones, who needs someone else to explore them: filter by vessel, see what falls inside a zone, check the details of a point.
- A screenshot is easy to share, but you cannot filter or query anything.
- A GIS project needs the software installed and the same data paths on the other computer.
- A web viewer means publishing the data on a server.
The generator fills the gap between those options: you load the data into a local app, choose colours, labels and filters without writing code, and get a single HTML file you can send or drop in a shared folder.
How it combines data and layers
The app is organised in three tabs that follow the natural order of the work:
Positions
Upload one or more position files (Excel, CSV, Parquet, or points in GPKG, SHP or GeoJSON). The app suggests the latitude, longitude and date columns. For each set you choose how to colour the points (one colour, by category or by numeric ranges), which fields the label and the detail card show, and which filters the map will have.
Layers
Add your own polygon, line or point layers (SHP, GPKG, GeoJSON, KML, GML, FGB or ZIP). When you pick a
.shp, its companion files are collected automatically. Optionally, you can switch on reference layers (GSA, EEZ, FAO areas and countries) that the app reads from a configurable folder; those layers are not part of the repository.Title and map
Add a title, subtitle and logo, and generate the map. The app reports how many rows were drawn and how many were dropped, for example because of empty coordinates. Then you download the HTML and, if you want, a
.pyscript that rebuilds the same map.
Under the hood, the interface (app.py) only collects decisions. The engine (mapas/motor.py) reads the data with pandas and GeoPandas, converts it to WGS 84 geographic coordinates and builds the map with Folium. The same engine runs from the command line with a configuration file, so a map can be rebuilt with new data of the same structure.
What you get when you export
- A single HTML file with the data inside. Points travel in the file itself and are drawn on a canvas, so the map stays smooth with many positions.
- Legend and layer control. Each category is a layer you can switch on or off, with its number of features.
- Filters inside the map. Searchable multi-select dropdowns and a date range filter.
- Label and detail card. Hovering over a point shows a short label; clicking it opens the card with the chosen fields.
- Reading tools. Minimap, scale, cursor coordinates, zoom to an area and back to the initial view, with three base maps to choose from.
The file opens with a double click in any browser. “Self-contained” refers to the data and the map settings: the base map and the libraries (Leaflet, Bootstrap, jQuery) load from public servers, so an internet connection is needed to see the background.
Reproducible example
For this portfolio I generated an example with the repository’s engine and made-up data: 150 catch records with date, vessel, port, species, gear, weight and position, three of them deliberately without coordinates, plus two fictitious zones in GeoJSON. The data come from a script with a fixed seed, so the result is exactly repeatable.

Opens as a separate page. It uses fictitious data; the base map and libraries need a connection.
The whole composition comes from a configuration file like this one. Each block says which file to read, how to colour it and which filters and labels to offer:
"positions": [{
"path": "datos/capturas_ficticias.csv",
"lat": "Latitud", "lon": "Longitud", "date": "Fecha",
"style": { "mode": "category", "column": "Especie" },
"tooltip": ["Barco", "Especie", "Captura_kg"],
"slicers": ["Barco", "Puerto"], "date_slicer": true
}],
"layers": [{
"path": "datos/zonas_ficticias.geojson",
"style": { "mode": "category", "column": "tipo" },
"dashed": true, "fill_opacity": 0.25
}]The engine drops the three rows without coordinates, logs it and draws 147 points.
Limitations
- The HTML contains every point: with many positions, the file gets heavier and slower to open. The app warns about it and can subsample.
- The base map and the libraries need an internet connection.
- Reference layers depend on an external folder; if it is not reachable, they are skipped with a warning.
- According to the repository itself, packaging, pinned dependency versions and automated tests are still pending.
Authorship and third-party resources
Third-party resources
- Open-source libraries: Streamlit for the interface; Folium and Leaflet, with their minimap and coordinates plugins, for the map; pandas and GeoPandas for the data.
- Base maps from Esri (World Ocean Base and World Imagery) and OpenStreetMap. Each one shows its attribution on the map itself.
My work
- Design and development of the app: the three-tab interface, the engine that builds the map, the filters, the legend and the reusable configuration.
- Documentation and maintenance of the public repository (GitHub).
- The example on this page: the fictitious data, the configuration and the screenshot.