Obtaining PurpleAir location data (lat/long) for California

@sophiematuch
To get the locations, you’ll start by using a Get Sensors Data API call. This will allow you to create a geographic bounding box and retrieve data from the sensors in that bounding box. The data will be from the most recent report from each of the sensors, so the historical data cannot be gathered using this call. Rather, the purpose of this API call is to retrieve station information about the sensors. You will receive the sensor index for all sensors in the bounding box by default, and you can also request other fields, such as latitude, longitude, altitude, name, model, location_type, and other information about each sensor that doesn’t change frequently.

Once you have your list of sensor indexes, you can use the Get Sensor History (or CSV version) to get the historical data. Alternatively, you can use the PurpleAir Data Download Tool, which accesses the History API in the same way, but is a more user-friendly way to do so.