Place Totals

The following API endpoints are pulling data from the LA Times Place Totals dataset. You can find and download the original data from github.com/datadesk/california-coronavirus-data/blob/master/latimes-place-totals.csv

GETapi/covid19/latimes/place-totals

Full URL: https://api.joeczubiak.com/api/covid19/latimes/place-totals

date optional

string

Filters the results to a specific date. Format yyyy-mm-dd. Example "2020-04-09"

county optional

string

Filters the results to the county provided.

fips optional

string

Filters the results to the fips provided.

place optional

string

Filters the results to the place provided.

confirmed_cases optional

integer

Filters the data to only those with confirmed_cases equaling the number provided.

page optional

integer

Default: 1

Set to the pagination page number you wish to receive.

per_page optional

integer

Default: 100

The number of results to be returned from the request.

order optional

string

Default: asc

Specifies the order to sort the results. Accepts "asc" or "desc."

order_by optional

string

Default: date

Orders the content by a particular field. Specify the field.

The following is a sample response in the format you will receive from making a request.

                
{
  "data": [
      {
          "date": "2020-04-07",
          "county": "Los Angeles",
          "fips": "037",
          "place": "Unincorporated - Santa Catalina Island",
          "confirmed_cases": 1,
          "note": "Between 1 and 4",
          "x": "-118.437421294674",
          "y": "33.384063827239466"
      }
  ],
  "links": {
      "first": "https://api.joeczubiak.com/api/covid19/latimes/place-totals?page=100",
      "last": "https://api.joeczubiak.com/api/covid19/latimes/place-totals?page=61",
      "prev": null,
      "next": "https://api.joeczubiak.com/api/covid19/latimes/place-totals?page=2"
  },
  "attribution": {
      "required": true,
      "message": "You must provide attribution when using this data.",
      "sample_attribution_text": "This data is being provided free from the LA Times.",
      "commercial_uses_allowed": false
  },
  "meta": {
      "current_page": 1,
      "from": 1,
      "last_page": 61,
      "path": "https://api.joeczubiak.com/api/covid19/latimes/place-totals",
      "per_page": "100",
      "to": 1,
      "total": 6013
  }
}
            
          
            
  const fetch = require('node-fetch');

  fetch('https://api.joeczubiak.com/api/covid19/latimes/place-totals', {
    method: 'GET',
    headers: {
      'Accept': 'application/json'
    }
  })
  .then(response => {
    console.log(
      `Response: ${response.status}`
    );
    return response.json();
  })
  .then(json => console.log(json))
  .catch(err => console.error(err));