I've used a web API to import data from a specific website. I was able to import the data in JSON format. I am very new to python, hence finding hard to transform it to a tabular format which I can use it for my data analysis. Here's my sample code;
import json
import ast
import pandas as pd
import requests
from pandas import json_normalize
result = requests.get('https://discover.data.vic.gov.au/api/3/action/datastore_search?resource_id=dfgdfgdfgdsfgdfgd&limit=200') << #Open Source
data = result.json()
Sample JSOn output;
{'help': 'https://discover.data.vic.gov.au/api/3/action/help_show?name=datastore_search',
'success': True,
'result': {'include_total': True,
'resource_id': 'bc71e010-253a-482a-bdbc-d65d1befe526',
'fields': [{'type': 'int', 'id': '_id'},
{'type': 'text', 'id': 'LGA'},
{'type': 'text', 'id': 'lga_pid'},
{'type': 'text', 'id': 'population'},
{'type': 'text', 'id': 'active'},
{'type': 'text', 'id': 'cases'},
{'type': 'text', 'id': 'rate'},
{'type': 'text', 'id': 'new'},
{'type': 'text', 'id': 'band'},
{'type': 'text', 'id': 'LGADisplay'},
{'type': 'text', 'id': 'data_date'},
{'type': 'text', 'id': 'file_processed_date'}],
'records_format': 'objects',
'records': [{'_id': 1,
'LGA': 'Alpine (S)',
'lga_pid': 'VIC242',
'population': '12814',
'active': '0',
'cases': '1',
'rate': '0',
'new': '0',
'band': '0',
'LGADisplay': 'Alpine',
'data_date': '14/06/2021',
'file_processed_date': '15/06/2021'},
Actual output has number of _id = "81"
Tried using this function;
pd.json_normalize(data, record_path=['result'])
Unable to convert them to tabular format, Desired output;
Any help would be appreciated!!

resource_id.