Extract data from map format into excel

94 Views Asked by At

For a research in college I need a dataset of charging stations in a region. I have found a website with the details. How do I extract these details in excel format https://afdc.energy.gov/fuels/electricity_locations.html#/station/229158

Is there a way I could web scrape and extract the data from map format?

2

There are 2 best solutions below

0
LetsScrapeData On

First get the station list and get deatails of station one by one. For college rearch, maybe I can design a template for free and you neeed to scrape the data yourself.

Or you can try to get all "Electric vehicle charging station"s in a region (such as Ontario or New York City) with some free tools: enter image description here

0
Bhaskar On

In this website we are getting the data from backend API so if we need to identify the API and make requests like below.

First you need to get all the different cities which you want and then you can form a URL like this

curl 'https://developer.nrel.gov/api/alt-fuel-stations/v1/nearest.json?api_key=w30dJhEvcdCHxEHImCSL0GIAXETjLIJ41lgoN0Jr&country=all&maximum_vehicle_class=all&owner_type=all&cards_accepted=all&offset=0&fuel_type=all&access=public&status=E&cng_fill_type=all&cng_has_rng=all&cng_psi=all&ev_charging_level=2,dc_fast&ev_connector_type=all&ev_network=all&e85_has_blender_pump=false&lng_has_rng=all&hy_is_retail=true&lpg_include_secondary=false&location=montana&radius=infinite&limit=10' -H 'authority: developer.nrel.gov' -H 'accept: application/json, text/plain, /' -H 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' -H 'origin: https://afdc.energy.gov' -H 'referer: https://afdc.energy.gov/' -H 'sec-ch-ua: "Chromium";v="121", "Not A(Brand";v="99"' -H 'sec-ch-ua-mobile: ?0' -H 'sec-ch-ua-platform: "Linux"' -H 'sec-fetch-dest: empty' -H 'sec-fetch-mode: cors' -H 'sec-fetch-site: cross-site' -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36' --compressed

Here we need to replace the location with different cities which we want, we can change the limit also like 50,100, etc.

If the request is not working try to identify the new request by enabling network debugging and search nearest.json and take the request as copy as curl request.