addypy / datagovindia Goto Github PK
View Code? Open in Web Editor NEWPython Client for India’s - Open Government Data (OGD) (https://data.gov.in/) platform APIs
License: MIT License
Python Client for India’s - Open Government Data (OGD) (https://data.gov.in/) platform APIs
License: MIT License
DataGovIndia("API-KEY")
Step (1/2) : API key is VALID
You don't need to enter it again
Traceback (most recent call last):PI meta-data. This may take a few seconds........
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/datagovindia/init.py", line 531, in init
self.assets = util.git_assets()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/datagovindia/util.py", line 91, in init
asset_data = fetch_assets_from_github(asset_url_seq)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/datagovindia/util.py", line 17, in fetch_assets_from_github
with concurrent.futures.ThreadPoolExecutor() as executor:
AttributeError: module 'concurrent' has no attribute 'futures'
Python version is 3.9.4
OS: MacOS
I am trying the following code and it shows up an error.
pip install datagovindia
from datagovindia import DataGovIndia
import os
os.environ["DATAGOVINDIA_API_KEY"] = "MY_API_KEY"
data_gov = DataGovIndia()
data_gov.sync_metadata()
ERROR:
ConnectTimeout: HTTPSConnectionPool(host='api.data.gov.in', port=443): Max retries exceeded with url: /lists?format=json¬filters%5Bsource%5D=visualize.data.gov.in&filters%5Bactive%5D=1&offset=0&limit=0 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7a1f96e30070>, 'Connection to api.data.gov.in timed out. (connect timeout=5)'))
Even when I try fetching the data using the following code, the same error shows up:
resource_id = "1d4d1c5a-feea-423b-be4f-c3636fdd1d82"
api_endpoint = f"https://api.data.gov.in/resource/{resource_id}?api-key={os.environ['DATAGOVINDIA_API_KEY']}&format=json&offset=0&limit=0&filters%5BcurrentStateName.keyword%5D=DELHI&filters%5Bgender.keyword%5D=FEMALE&filters%5Bage%5D=16"
import requests
response = requests.get(api_endpoint)
ERROR:
ConnectTimeout: HTTPSConnectionPool(host='api.data.gov.in', port=443): Max retries exceeded with url: /resource/1d4d1c5a-feea-423b-be4f-c3636fdd1d82?api-key=579b464db66ec23bdd000001ee3ad19e23d947ea77c4ec9d5c1a9de1&format=json&offset=0&limit=0&filters%5BcurrentStateName.keyword%5D=DELHI&filters%5Bgender.keyword%5D=FEMALE&filters%5Bage%5D=16 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7a1f96e318d0>, 'Connection to api.data.gov.in timed out. (connect timeout=None)'))
I am not sure whats going wrong, please help
The script gets stuck on the step when I try to initialize using DataGovIndia(API_KEY)
on second step, "Latest API meta-data loaded! You may begin."
from datagovindia import DataGovIndia
import streamlit as st
@st.cache(suppress_st_warning=True)
def getDataGovAdaptor():
return DataGovIndia(API_KEY)
datagovin = getDataGovAdaptor()
result = datagovin.search(description="Wheat",max_results=1,print_results=True)
Hi, thanks for publishing the library. I wanted to contribute to this repo, however, cloning takes an absurd amount of time on a general internet connection, making it impractical to clone without using --depth
. I think this will only get worse as more "Automatic Meta-Update" commits are added to the repo. Github also doesn't recommend such usage.
So, I was wondering, if we can can stop committing this data directly to the repo, and instead, provide a simple script to download it from a source (govt site or github releases or custom CDN) on individual machines.
Also, I think it'd be best to hard reset this repo to 33ab07a, so that it becomes easy to clone and contribute.
git reset --hard 33ab07ab65583c76f11c684aab3213152099acf1
git push --force
I know the date filter can be applied on OGD API. can you show one example. I have been trying it multiple times for APMC mandi data. Please help me out
Thanks in advance
Regards,
Sangamesh KS
Dataframe.append has been removed for pandas 2.0 and gives an error. Previous versions also give warnings:
FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. self.data = self.data.append(df, ignore_index=True)
Can this be updated?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.