API EV Charging

!pip install requests
import requests
import json
import pandas as pd

response = requests.get("https://developer.nrel.gov/api/alt-fuel-stations/v1.json?&api_key=[API KEY]")
data = json.loads(response.text)

data.keys()

df = pd.DataFrame(data['fuel_stations'])
df.to_csv('evcharging.csv')