Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


lowigz

27 posts

Geek
+1 received by user: 28


#319915 13-Jun-2025 21:10
Send private message

Kia ora,

 

Has anyone been able to get access to government api to access their data?

 

I'm making a project for uni and I'm trying to get voting data, trying to make stats on my webpage to show how many votes and who voted for what.

 

I signed up and have requested access.. but if I'm being honest, their site is confusing and I'm not sure how to navigate it to access the data I need.

 

Anyone able to help?

 

chur

 

 

 

Update: I made a python app that scrapes the data from the public webpage, but I'd rather get an API to get live raw data to json..


Create new topic
BlakJak
1330 posts

Uber Geek
+1 received by user: 735

Trusted

  #3386389 23-Jun-2025 13:28
Send private message

Delayed response, sorry. Initially I would ask... how do you know they even have an API?

 

There's an awful lot of different systems used to hold 'government data' and reports published on public websites aren't necessarily the product of a single interface. If they're manually pulling data from multiple places, there literally may not be an API to call on - at least not without a bucketload of work, which they may not be resourced to provide.

 

Even if they have an API, how do you know that the system concerned is fit for being on-the-internet and doesn't have sensitive information layered into it that would have to be filtered or abstracted?   Making an API publicly available is something that needs a lot of consideration.

 

Not my area of expertise but it seems that 'i've asked, now it's their job to provide' isn't exactly how it'll work?

 

 





No signature to see here, move along...



wellygary
8810 posts

Uber Geek
+1 received by user: 5287


  #3386391 23-Jun-2025 13:42
Send private message

"I'm making a project for uni and I'm trying to get voting data, trying to make stats on my webpage to show how many votes and who voted for what"

 

 

 

Which Votes?, the general election?,  although it only is "live" data on election nights, otherwise its pretty static..

 

 


cddt
1965 posts

Uber Geek
+1 received by user: 1904


  #3386401 23-Jun-2025 14:35
Send private message

It's really unclear what data you're trying to access, where from, etc. You could provide some links? 





My referral links: BigPipeMercury




caffynz
317 posts

Ultimate Geek
+1 received by user: 139

ID Verified
Subscriber

  #3386481 23-Jun-2025 22:05
Send private message

Does figure.nz have what you're looking for?


snj

snj
305 posts

Ultimate Geek
+1 received by user: 221


  #3386486 23-Jun-2025 22:23
Send private message

There is no single API service for Government data, each department has their own processes. Generally, what's available publicly already is most of the data that's in easily accessible forms anyway (it's OIAable anyway, so it's easier to regularly publish the data under the principles of Open Data, than having to deal with OIA requests).

 

There are restricted Stats NZ datasets, but they require specified research projects and plans before you're given access and the application process is rigorous (speaking from experience), and the datasets that have the highest risk of identifying individuals (microdata) are restricted to IDI Datalabs.

 

Anyway... since you mention elections, https://archive.electionresults.govt.nz/electionresults_2023/statistics/index.html - this sounds like what you need right? No API needed. Similar pages exist for prior elections too.


lowigz

27 posts

Geek
+1 received by user: 28


  #3386941 25-Jun-2025 11:00
Send private message

From what I've read there is api access for public availabe data, what I was wanting to gain access to is a few things.

 

data about mps.. what they've voted for, who they are, contact details, their party details.. if possible their declared information. also all party details, who their donors are.

 

I have a paper at uni on databases, and accessing data and manipulating it in Javascript and Python.. I thought about how I could do it with public data from government, that then ties in with my GUI paper also :)


 
 
 
 

Shop now on Samsung phones, tablets, TVs and more (affiliate link).
BlakJak
1330 posts

Uber Geek
+1 received by user: 735

Trusted

  #3386947 25-Jun-2025 11:13
Send private message

Feels a little bit like the handwavium approach to information. "There is API access for publicly available data" is incredibly generic and it's never that simple.





No signature to see here, move along...

wellygary
8810 posts

Uber Geek
+1 received by user: 5287


  #3386950 25-Jun-2025 11:28
Send private message

lowigz:

 

From what I've read there is api access for public availabe data, what I was wanting to gain access to is a few things.

 

data about mps.. what they've voted for, who they are, contact details, their party details.. if possible their declared information. also all party details, who their donors are.

 

I have a paper at uni on databases, and accessing data and manipulating it in Javascript and Python.. I thought about how I could do it with public data from government, that then ties in with my GUI paper also :)

 

 

Small point of correction, MPs and Parliament are NOT government, 

 

Also it appears parliament has been looking at this for years and has achieved very little, 

 

https://data.govt.nz/datasetrequest/show/189

 

 


lowigz

27 posts

Geek
+1 received by user: 28


  #3386967 25-Jun-2025 12:46
Send private message

Thanks, I've sent an email asking what and where and if possible.

 

There is some data I have found that is going to help, just trying to find as many sources as I can.

 

donor information is pretty interesting when you see who's giving to who.


cddt
1965 posts

Uber Geek
+1 received by user: 1904


  #3386969 25-Jun-2025 12:50
Send private message

lowigz:

 

I have a paper at uni on databases, and accessing data and manipulating it in Javascript and Python.. I thought about how I could do it with public data from government, that then ties in with my GUI paper also :)

 

 

As you'll learn as you get more experience, the technical side of accessing data and manipulating it is only a small fraction of the job. The bigger part is finding the source of the data, getting permission to access it, understanding it, cleaning it, etc. This goes for both external and internal data... 





My referral links: BigPipeMercury


lowigz

27 posts

Geek
+1 received by user: 28


  #3386970 25-Jun-2025 13:05
Send private message

yeah starting to become a lot clearer, it's all well and good having the idea.. lol


Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.