FIRMS API Tutorial – pd.read_json Not Working as Expected

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
mahnoorn1617
Posts: 1
Joined: Mon May 26, 2025 6:02 pm America/New_York
Answers: 0

FIRMS API Tutorial – pd.read_json Not Working as Expected

by mahnoorn1617 » Mon May 26, 2025 6:05 pm America/New_York

Hello,

I’m currently working through the FIRMS API tutorial provided at:
https://firms.modaps.eosdis.nasa.gov/content/academy/data_api/firms_api_use.html

I encountered an issue when using the line:
df = pd.read_json(url, typ='series')

This resulted in an error and did not return the expected output. After some debugging, I tried retrieving the same URL using the requests library and got the following raw response:

{
"transaction_limit": 5000,
"current_transactions": 0,
"transaction_interval": "10 minutes"
}

It seems like the API is returning a valid JSON object, but the format may not be compatible with the pd.read_json(..., typ='series') method as currently shown in the tutorial.

Replacing it with this worked as expected:
import requests
response = requests.get(url)
data = response.json()
df = pd.Series(data)

I wanted to flag this in case others run into the same problem. Would you recommend updating the tutorial or adding a note for users encountering this issue?

Thank you.

Filters:

FIRMS - dylan.mendes
Subject Matter Expert
Subject Matter Expert
Posts: 14
Joined: Tue May 13, 2025 2:45 pm America/New_York
Answers: 0

Re: FIRMS API Tutorial – pd.read_json Not Working as Expected

by FIRMS - dylan.mendes » Fri Jun 06, 2025 12:57 pm America/New_York

Hello,

Thank you for your interest in FIRMS.

We will make the changes that make the Python notebook work seemlessly again.

Thanks,
Dylan

Post Reply