Hi all,
I'd like to share a project that I am developing that it may be useful for anyone who wants to create datasets from mobile location networks. Specifically, I developed a wrapper in Python for accessing the Foursquare API called PyFoursquare
For anyone who doesn't know what is Foursquare, it is a popular mobile social-location network with more 10.000.000 of users around the world. The idea is that you can share your current location with your friends and as result discover new places, find where your friends are and even check some tips and recommendations about a place and what to do when you arrive there. It is an amazing project with lots of data available for anyone who wants to develop new apps for connect or mine (data mining) its data!
Foursquare Mobile Application |
This Python API is one of the results of my master degree project where I proposed a new architecture for mobile recommenders that fetches reviews from social networks to improve the explanation and the quality of the given recommendations. I used this library to collect tips (text reviews) from Foursquare from places at my neighborhood Recife, Brazil. This API was a little messy, so I decided to clean it up, organize and documment it for publish for the open-source community.
One of advantages of this API is that you can handle each entity from the Foursquare data as Model object. So instead of handling with json dictionaries, I encapsulate the results in the respective models (Venue, Tips, User, etc.) and access its attributes as common object in Python!
I inspired myself at the work of Joshua at Tweepy, which is a Python library for Twitter. In this version released 0.0.1 I only implemented some API's such as search/venues, venue_details and venue_tips. In future releases I pretend to add more models and support for more API methods available at Foursquare.
How can you use it at your project ?
It is simple! Just install it by downloading at the Github's home project, extract the source from the tar.gz and at the directory of the project run the command below:
$ python setup.py install
or the easier way is to install by the command easy_install:
$ easy_install pyfoursquare
After that, you can simple test by running the command below at your Python Shell
>>> import pyfoursquare
Now let's see how you can get started with the PyFoursquare:
First you need to create an application at Foursquare. The link is this. There you can also get further information about the API, another libraries and several applications using the Foursquarw API's.
![]() |
The Foursquare Developer's Settings |
After creating your application, you must get the client_id and your client_secret. Those keys will be important to connect the app to the users' accounts. Foursquare uses the secure authentication based on OAuth2. In PyFoursquareAPI, you won't need to handle with all steps provided by OAuth2. It already encapsulates all the steps and handshakes between your app and Foursquare servers. \m/
Below the code you must write for authenticate an user to connect to your app:
After the user authorized, you now can instantiate the PyFoursquare API. It will give you access to the Foursquare API methods. I implemented several methods, but feel free to add new ones! Don't forget to submit the final results as pull requests at the project's repository at Github.
In this example I fetched a venue by giving as input the latitude and longitude and querying for the place with the name 'Burburinho'. Burburinho is a popular bar nearby where I work!
Source code
Source code
Now you can access the result and access the Venue as a Python Object. All elements of the Venue are represented as attributes of the object Venue at PyFoursquare. The goal is to make easier the life of the developer when he access the Foursquare API by parsing all the JSON (the result) and placing in the correct model for him.
I expect you enjoyed this API. Feel free to use it at your applications or research! I'd like to thank the Foursquare team for expose their data by providing those API's! For data mining researchers instered in mobile location data, it is a mine of gold!
Further information about PyFoursquare, you can find here.
Feel free to give sugestions, improvements and comments,
Regards,
Marcel Caraciolo
Awesome work Marcel!
ReplyDeleteThanks for sharing it!
Regards,
Crescencio
Marcel i had trouble with the installation:
ReplyDelete"Traceback (most recent call last):
File "setup.py", line 20, in
from setuptools import setup, find_packages"
Seems that some models are missing. Or i did something wrong?
It was a trouble with my setup;
ReplyDeleteSolved downloading a x64 version on:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#setuptools
I will check at another computer and give a feedback! THanks for the reply!
ReplyDeleteHaving problem with import. Did easy_install and still getting
ReplyDeleteFile "FoursquareOauth.py", line 1, in
import foursquare
ImportError: No module named foursquare
Thanks for your work!
ReplyDeleteWelcome to Wiztech Automation - Embedded System Training in Chennai. We have knowledgeable Team for Embedded Courses handling and we also are after Job Placements offer provide once your Successful Completion of Course. We are Providing on Microcontrollers such as 8051, PIC, AVR, ARM7, ARM9, ARM11 and RTOS. Free Accommodation, Individual Focus, Best Lab facilities, 100% Practical Training and Job opportunities.
ReplyDelete✔ Embedded System Training in chennai
✔ Embedded System Training Institute in chennai
✔ Embedded Training in chennai
✔ Embedded Course in chennai
✔ Best Embedded System Training in chennai
✔ Best Embedded System Training Institute in chennai
✔ Best Embedded System Training Institutes in chennai
✔ Embedded Training Institute in chennai
✔ Embedded System Course in chennai
✔ Best Embedded System Training in chennai
WIZTECH Automation, Anna Nagar, Chennai, has earned reputation offering the best automation training in Chennai in the field of industrial automation. Flexible timings, hands-on-experience, 100% practical. The candidates are given enhanced job oriented practical training in all major brands of PLCs (AB, Keyence, ABB, GE-FANUC, OMRON, DELTA, SIEMENS, MITSUBISHI, SCHNEIDER, and MESSUNG)
ReplyDeletePLC training in chennai
Automation training in chennai
Best plc training in chennai
PLC SCADA training in chennai
Process automation training in chennai
Final year eee projects in chennai
VLSI training in chennai
Embedded system training: Wiztech Automation Provides Excellent training in embedded system training in Chennai - IEEE Projects - Mechanical projects in Chennai. Wiztech provide 100% practical training, Individual focus, Free Accommodation, Placement for top companies. The study also includes standard microcontrollers such as Intel 8051, PIC, AVR, ARM, ARMCotex, Arduino, etc.
ReplyDeleteEmbedded system training in chennai
Embedded Course training in chennai
Matlab training in chennai
Android training in chennai
LabVIEW training in chennai
Robotics training in chennai
Oracle training in chennai
Final year projects in chennai
Mechanical projects in chennai
ece projects in chennai
WIZTECH Automation, Anna Nagar, Chennai, has earned reputation offering the best automation training in Chennai in the field of industrial automation. Flexible timings, hands-on-experience, 100% practical. The candidates are given enhanced job oriented practical training in all major brands of PLCs (AB, Keyence, ABB, GE-FANUC, OMRON, DELTA, SIEMENS, MITSUBISHI, SCHNEIDER, and MESSUNG)
ReplyDeletePLC training in chennai
Automation training in chennai
Best plc training in chennai
PLC SCADA training in chennai
Process automation training in chennai
Final year eee projects in chennai
VLSI training in chennai
Thanks for sharing this precious information. I like your concern in the post which is very useful for me.
ReplyDeleteI like your information which is very useful for me. Thanks.
Embedded systems chandigarh
Wiztech Automation Solutions is that the best PLC SCADA Marketing Communication Management: A Holistic Approach for Increased Profitability Training institute in Chennai and it's generating variety of PLC Engineers through its robust pillars like quality education, effective coaching, intimate with staffs to guide each student, spacious laboratories, Un-limited sensible sessions to boost their data as per the conditions of Automation trade.
ReplyDeletePLC, SCADA training in chennai
PLC training in chennai
Automation training in chennai
Wiztech Automation Research and Development Unit, is one of front line training organizations in Kerala. Started in the year 2006, Wiztech is on the verge of completing one decade in the field of training in industrial automation. Wiztech Automation is focused on imparting quality training to the newly graduated engineers and also those employed in industrial units, who look for skill up-gradation. Being an IAO and ISO certified organization; the company's directors have been focusing on the mission to engage their time and energies to develop facilities for providing quality training to inculcate employable engineering skills.
ReplyDeletePLC training in Cochin, Kerala
Automation training in Cochin, Kerala
Embedded System training in Cochin, Kerala
VLSI training in Cochin, Kerala
PLC training institute in Cochin, Kerala
Embedded training in Cochin, Kerala
Best plc training in Cochin, Kerala
This Api is Very Usefull .Thank You For Sharing python Online Training Bangalore
ReplyDeletenice blog
ReplyDeleteandroid training in bangalore
ios training in bangalore
useful blog
ReplyDeletepython interview questions
cognos interview questions
perl interview questions
vlsi interview questions
web api interview questions
msbi interview questions laravel interview questions
aem interview questions
ReplyDeletesalesforce interview questions oops abab interview questions
itil interview questions
informatica interview questions extjs interview questions
sap bi interview questions
ReplyDeletehive interview questions
seo interview questions
as400 interview questions
wordpress interview questions
accounting interview questions
basic accounting and financial interview questions
Nice blogs about Mastering Linux Shell Scripting at The
ReplyDeleteMastering Linux Shell Scripting training in bangalore
Nice blogs about Mastering Python With Mobile Testing at The
ReplyDeleteMastering Python With Mobile Testing training in bangalore
Thanks for providing good information,Thanks for your sharing python Online Training
ReplyDeleteBig Data and Hadoop is an ecosystem of open source components that fundamentally changes the way enterprises store, process, and analyze data.
ReplyDeletepython training in bangalore
aws training in bangalore
artificial intelligence training in bangalore
data science training in bangalore
machine learning training in bangalore
hadoop training in bangalore
devops training in bangalore
corporate training companies
ReplyDeletecorporate training companies in mumbai
corporate training companies in pune
corporate training companies in delhi
corporate training companies in chennai
corporate training companies in hyderabad
corporate training companies in bangalore
Gaining Python certifications will validate your skills and advance your career.
ReplyDeletepython certification
This comment has been removed by the author.
ReplyDeletemyTectra the Market Leader in Artificial intelligence training in Bangalore
ReplyDeletemyTectra offers Artificial intelligence training in Bangalore using Class Room. myTectra offers Live Online Design Patterns Training Globally.Read More
I have read this blog it amazing blog; it’s providing more information about "Playing with Foursquare API with Python" topic. Thanks for sharing, Keep share more post.
ReplyDeletePHP industrial training mohali
web designing training mohali
SEO training in mohali
6/Six months PHP industrial training in mohali
Amazing content.
ReplyDeleteData Mining Service Providers in Bangalore
very useful and informative blog . Thank you for your information.If you are searching for Python training institute in kochi visti us
ReplyDeletepython training in kochi ,
python course in kochi
Thanks for sharingData Mining software service providers
ReplyDeleteIt’s hard to come by experienced people about this subject, but you seem like you know what you’re talking about! Thanks.
ReplyDeleteJava Training in Bangalore
Python Training In Bangalore
I enjoyed your blog Thanks for sharing such an informative post. We are also providing the best services click on below links to visit our website.
ReplyDeletedigital marketing company in nagercoil
digital marketing services in nagercoil
digital marketing agency in nagercoil
SEO company in nagercoil
SEO services in nagercoil
social media marketing in nagercoil
social media company in nagercoil
PPC services in nagercoil
digital marketing company in velachery
digital marketing company in velachery
digital marketing services in velachery
digital marketing agency in velachery
SEO company in velachery
SEO services in velachery
social media marketing in velachery
social media company in velachery
PPC services in velachery
online advertisement services in velachery
online advertisement services in nagercoil
web design company in nagercoil
web development company in nagercoil
website design company in nagercoil
website development company in nagercoil
web designing company in nagercoil
website designing company in nagercoil
best web design company in nagercoil
web design company in velachery
web development company in velachery
website design company in velachery
website development company in velachery
web designing company in velachery
website designing company in velachery
best web design company in velachery
Thanks for Sharing - ( Groarz branding solutions )
Usually I never comment on blogs but your article is so convincing that I never stop myself to say something about it. You’re doing a great job Man learn Python Online Course
ReplyDeletepython training in bangalore | python online taining
ReplyDeleteaws training in bangalore | aws online training
artificial intelligence training in bangalore | artificial intelligence online training
machine learning training in bangalore | machine learning online training
data science training in bangalore | data science online training
Great information to say the least. I really do appreciate everything so much from this great website.
ReplyDeleteIELTS Coaching in chennai
German Classes in Chennai
GRE Coaching Classes in Chennai
TOEFL Coaching in Chennai
spoken english classes in chennai | Communication training
Hey there, You have done a fantastic job. I’ll definitely digg it and personally suggest to my friends. I am confident they will be benefited from this web site.This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me.Really you have done great job,There are may person searching about that now they will find enough resources by your post.
ReplyDeleteDevOps Training in Chennai
DevOps Online Training in Chennai
DevOps Training in Bangalore
DevOps Training in Hyderabad
DevOps Training in Coimbatore
DevOps Training
DevOps Online Training
Really it is very useful for us..... the information that you have shared is really useful for everyone.Nice article i have ever read information's like this.it's really awesome the way you have delivered your ideas.i hope you will add more content in your blog.PHP Training in Chennai
ReplyDeletePHP Online Training in Chennai
Machine Learning Training in Chennai
iOT Training in Chennai
Blockchain Training in Chennai
Open Stack Training in Chennai
Great Article
ReplyDeleteArtificial Intelligence Projects
Project Center in Chennai
JavaScript Training in Chennai
JavaScript Training in Chennai
Thanks for sharing this precious information. I like your concern in the post which is very useful for me.
ReplyDeleteI like your information which is very useful for me. Thanks.
angular js training in chennai
angular training in chennai
angular js online training in chennai
angular js training in bangalore
angular js training in hyderabad
angular js training in coimbatore
angular js training
angular js online training
Really it was an awesome article...very interesting to read..You have provided an nice article....Thanks for sharing..
ReplyDeleteWeb Designing Training in Chennai
Web Designing Course in Chennai
Web Designing Training in Bangalore
Web Designing Course in Bangalore
Web Designing Training in Hyderabad
Web Designing Course in Hyderabad
Web Designing Training in Coimbatore
Web Designing Training
Web Designing Online Training
Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article inspried me to read more. keep it up.
ReplyDeleteAWS training in Chennai
AWS Online Training in Chennai
AWS training in Bangalore
AWS training in Hyderabad
AWS training in Coimbatore
AWS training
Thanks for sharing an informative blog keep rocking bring more details.I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I am quite sure I will learn much new stuff right here! Good luck for the next!
ReplyDeleteArtificial Intelligence Training in Chennai
Ai Training in Chennai
Artificial Intelligence training in Bangalore
Ai Training in Bangalore
Artificial Intelligence Training in Hyderabad | Certification | ai training in hyderabad
Artificial Intelligence Online Training
Ai Online Training
Blue Prism Training in Chennai
While there are many developers with a host of experience working with the second most popular coding language, Java developer remains one of the most difficult jobs to fill.
ReplyDeleteJava training in Chennai
Java Online training in Chennai
Java Course in Chennai
Best JAVA Training Institutes in Chennai
Java training in Bangalore
Java training in Hyderabad
Java Training in Coimbatore
Java Training
Java Online Training
Java is not easy or hard. ... Many beginners had problem in concepts of java but once you start programming and playing with it's GUI features you will love java. Java is a strong language which run fast and supports almost all platforms like windows, Linux, mac. You just have to install JVM (java virtual machine).
ReplyDeleteJava training in Chennai
Java Online training in Chennai
Java Course in Chennai
Best JAVA Training Institutes in Chennai
Java training in Bangalore
Java training in Hyderabad
Java Training in Coimbatore
Java Training
Java Online Training
Nice post. Thanks for sharing! I want people to know just how good this information is in your article. It’s interesting content and Great work. nice to read.
ReplyDeleteselenium training in chennai
selenium training in chennai
selenium online training in chennai
selenium training in bangalore
selenium training in hyderabad
selenium training in coimbatore
selenium online training
selenium training
I am feeling grateful to read this.you gave a nice info for us.please update more.
ReplyDeleteDigital Marketing Training in Chennai
Digital Marketing Course in Chennai
SEO Training in Chennai
Digital Marketing Training in Bangalore
Digital Marketing Training in Hyderabad
Digital Marketing Training in Coimbatore
Digital Marketing Training
Digital Marketing Course
Digital Marketing Online Training
nice post
ReplyDeleteSoftware Testing Training in Chennai | Certification | Online
Courses
Software Testing Training in Chennai
Software Testing Online Training in Chennai
Software Testing Courses in Chennai
Software Testing Training in Bangalore
Software Testing Training in Hyderabad
Software Testing Training in Coimbatore
Software Testing Training
Software Testing Online Training
I am feeling grateful to read this.you gave a nice info for us.please update more.keep up!!
ReplyDeleteAndroid Training in Chennai
Android Online Training in Chennai
Android Training in Bangalore
Android Training in Hyderabad
Android Training in Coimbatore
Android Training
Android Online Training
Thanks for one marvelous posting! I enjoyed reading it; you are a great author. I will make sure to bookmark your blog and may come back someday. I want to encourage that you continue your great posts.
ReplyDeleteoracle training in chennai
oracle training institute in chennai
oracle training in bangalore
oracle training in hyderabad
oracle training
oracle online training
hadoop training in chennai
hadoop training in bangalore
Thanks for sharing this precious information. I like your concern in the post which is very useful for me.
ReplyDeleteI like your information which is very useful for me. Thanks.
acte chennai
acte complaints
acte reviews
acte trainer complaints
acte trainer reviews
acte velachery reviews complaints
acte tambaram reviews complaints
acte anna nagar reviews complaints
acte porur reviews complaints
acte omr reviews complaints
This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource
ReplyDeletepython training in chennai
python course in chennai
python online training in chennai
python training in bangalore
python training in hyderabad
python online training
python training
python flask training
python flask online training
python training in coimbatore
This is one of the best resources I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing.
ReplyDeleteCyber Security Training Course in Chennai | Certification | Cyber Security Online Training Course | Ethical Hacking Training Course in Chennai | Certification | Ethical Hacking Online Training Course |
CCNA Training Course in Chennai | Certification | CCNA Online Training Course | RPA Robotic Process Automation Training Course in Chennai | Certification | RPA Training Course Chennai | SEO Training in Chennai | Certification | SEO Online Training Course
This professional hacker is absolutely reliable and I strongly recommend him for any type of hack you require. I know this because I have hired him severally for various hacks and he has never disappointed me nor any of my friends who have hired him too, he can help you with any of the following hacks:
ReplyDelete-Phone hacks (remotely)
-Credit repair
-Bitcoin recovery (any cryptocurrency)
-Make money from home (USA only)
-Social media hacks
-Website hacks
-Erase criminal records (USA & Canada only)
-Grade change
-funds recovery
Email: onlineghosthacker247@ gmail .com
We've been working in the field of creating counterfeit archives and cash for quite a while. That is the reason we realize every one of the traps and how to keep away from them. We give cautious consideration to our clients' requirements and give a valiant effort to furnish them with the ideal phony cash safely. We take every one of the vital measures to keep your character classified, so you ought not concern that somebody will realize that you purchased our items
ReplyDeletecounterfeit notes for sale
The vast majority of us have an enthusiasm for driving. Nonetheless, with tight guidelines set up, it is regularly considered as an advantage. deiver's license Since you own the vehicle doesn't mean you can take off. Regardless of whether you have a SUV, hatchback, or car, you need a driving permit to work an engine vehicle.
ReplyDeleteThe vast majority of us have an enthusiasm for driving. Nonetheless, with tight guidelines set up, it is regularly considered as an advantage. deiver's license Since you own the vehicle doesn't mean you can take off. Regardless of whether you have a SUV, hatchback, or car, you need a driving permit to work an engine vehicle.
ReplyDeleteNice Post. Thanks for sharing. Keep updating
ReplyDeletebest mba college
one sitting Degree
It is so nice article thank you for sharing this valuable content.
ReplyDeleteworkday integration course india
workday online integration course
workday online integration course in india
Actually your blog is very interesting; it contains extraordinary and remarkable data. I appreciated visiting your blog…
ReplyDeleteAWS Training in Hyderabad
It is so nice blog. I was really satisfied by seeing this blog.
ReplyDeleteworkday studio online training india
workday studio training india
Nice informative content. Thanks for sharing the valuable information.
ReplyDeleteArtificial Intelligence Course in Chennai
Best AI Courses Online
Artificial Intelligence Course In Bangalore
It is so nice blog. I was really satisfied by seeing this blog.
ReplyDeleteworkday course
workday online course
Studyprovider has experts team are giving the homework help, assignment help, report, thesis, research writing services and psychology homework help available 24/7 seven days a week contact now.
ReplyDeleteVery nice blog and articles.
ReplyDeleteInternship providing companies in chennai | Where to do internship | internship opportunities in Chennai | internship offer letter | What internship should i do | How internship works | how many internships should i do ? | internship and inplant training difference | internship guidelines for students | why internship is necessary
Superb blog! I did not know that freelancing could help me out in such miraculous ways. Satisfactory success is slow as far as the career in a job as a blockchain developer is concerned. The Blockchain developer salary greatly varies from one to another, but freelancing overcomes these in-house hiring limitations.
ReplyDeletePlease share some valuable platforms to work with good freelancing income.
You’re so interesting! I don’t believe I’ve truly read something like this before. So great to find someone with genuine thoughts on this issue. Really.. many thanks for starting this up. This website is something that’s needed on the internet, someone with some originality!
ReplyDeleteCBSE Schools In Khanna
CBSE Schools In Mansa
CBSE Schools In Moga
CBSE Schools In Mohali
CBSE Schools In Muktsar
CBSE Schools In Nawanshahr
CBSE Schools In Agra
CBSE Schools In Aligarh
CBSE Schools In Amethi
CBSE Schools In Auraiya
심심출장샵
ReplyDelete제주콜걸
제주콜걸
제주콜걸
제주콜걸
제주콜걸
총판출장샵
When you have a lot of debt, it can seem like there’s no end in sight. If you’re struggling to keep up with your loan payments, a debt management licensing plan may be the answer. A debt management plan helps you manage your financial obligations by consolidating your loans into one payment and reducing the amount you owe on each loan.
ReplyDelete