This guide will help you set up and run the project from scratch.
First, you need to install Node.js on your system:
- Visit Node.js official website
- Download and install the LTS (Long Term Support) version
- Verify installation by opening a terminal/command prompt and running:
node --version npm --version
After installing Node.js, install Yarn package manager:
npm install -g yarnVerify Yarn installation:
yarn --versiongit clone https://github.com/[username]/keplergl-example.git
cd keplergl-exampleRun the following command in the project root directory:
yarn installTo start the development server:
yarn devThe application will be running at http://localhost:8000 by default.
keplergl-example/
├── src/
│ ├── app.tsx # Main application component
│ └── index.html # HTML template
├── esbuild.config.mjs # Build configuration
├── tsconfig.json # TypeScript configuration
├── .yarnrc.yml # Yarn configuration
└── package.json # Project dependencies and scripts
yarn dev- Starts the development serveryarn build- Creates a production buildyarn start- Runs the production build
If you encounter any issues:
- Make sure all prerequisites are installed correctly
- Try removing these directories/files and reinstalling:
rm -rf node_modules rm yarn.lock yarn install
- Ensure you're using a compatible Node.js version
- Clear your browser cache if you see stale content
- Node.js 16.x or higher
- Yarn 1.22.x or higher
- Modern web browser (Chrome, Firefox, Safari, Edge)
- This project uses TypeScript for type safety
- Built with esbuild for fast development experience
- Uses Kepler.gl for geospatial data visualization
This repository includes pre-downloaded sample data in the ./data directory that you can use immediately:
keplergl-example/
├── data/
│ ├── nyctrips/
│ │ ├── data.csv # NYC Taxi trip records (pickup/dropoff locations)
│ │ └── config.json # Pre-configured Kepler.gl visualization settings
│ ├── county_unemployment/
│ │ ├── config.json # Pre-configured unemployment visualization settings
│ │ └── data.geojson # County unemployment GeoJSON data
The included datasets demonstrate different visualization capabilities:
- NYC Taxi Trips: Shows point and arc layers for taxi pickup and dropoff locations
- County Unemployment: Demonstrates choropleth mapping of unemployment rates
You can load these local files directly into the application using the "Add Data" button.
For more sample datasets, you can visit the kepler.gl-data repository. Available datasets include:
- World Flights (CSV) - 18,000 flights with country of origin data
- California Earthquakes (CSV) - 2.5+ magnitude earthquakes data from USGS
- NYC Taxi Trips (CSV) - Yellow and green taxi trip records
- San Francisco Street Trees (JSON) - Street tree locations and details
- NYC Census Data (JSON) - 2010 Census tract map with population data
- And many more...
To use additional sample data:
- Visit kepler.gl-data
- Navigate to your desired dataset folder
- Download the CSV or JSON files
- Load the files into the application using the "Add Data" button
Some popular datasets to start with:
# Direct links to sample datasets
https://raw.githubusercontent.com/keplergl/kepler.gl-data/master/earthquakes/earthquakes.csv
https://raw.githubusercontent.com/keplergl/kepler.gl-data/master/nyctrips/nyc_trips.csv
https://raw.githubusercontent.com/keplergl/kepler.gl-data/master/sftrees/sf_trees.jsonMIT License