Our great sponsors
-
Jspreadsheet CE
Jspreadsheet is a lightweight vanilla javascript plugin to create amazing web-based interactive tables and spreadsheets compatible with other spreadsheet software.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
When building the bulk location import feature for Mapzy, our open-source and self-hostable store finder, we wanted to provide a better import experience for our users. We wanted to spare them the pain of dealing with exporting files and choosing delimiters, and we wanted to make it simple for them to fix any import errors.
For the spreadsheet, we use the excellent Jspreadsheet library. If there are no errors, the import happens in two steps because importing a lot of locations requires a lot of calls to the Mapbox geocoding API (geocoding is converting an address to longitude and latitude), which is rate limited.
In the first step, we only validate if the information is all there and correctly formatted. For example, if a location name is missing, we highlight that error in the spreadsheet. If everything looks good, we save the locations to the database using the awesome Activerecord-Import library, but skip calling the geocoding API. Rather, we mark these locations as "to be geocoded".
Related posts
- Libre Endowment Fund: Sustainable Development of Free Software
- How to show excel file in front end with edit and save functionality?
- Tabulator – JavaScript Tables and Data Grids
- Tabulator: Tables, datagrids and tree grids for Vanilla JavaScript
- Tabulator: Interactive Data Grid for JavaScript (No React, No Vue)