Saravanan666/pypi-org huggingface dataset:
Package: geoguessr-async
This is a Geoguessr API client written in Python. It allows you to interact with the Geoguessr API, such as getting information about users, challenges, maps, and scores.To install the package, run the following command:pip install geoguessr-asyncOnce the package is installed, you can create a client object by passing your NCFA cookie to the constructor:importasynciofromgeoguessr_asyncimportGeoguessrclient=Geoguessr("your_ncfa_cookie")To get your NCFA cookie, login to geoguessr, open your dev tools (Ctrl+Shift+I), go to Application/Storage/Cookies and copy the value of_ncfa.You can then use the client object to get information about users, challenges, maps, and scores. For example, to get information about an user with his ID, you can use the following code:user=awaitclient.get_user_infos(userId)TheProfileobject will contain information such as your username, country, and number of games played.To get information about a challenge, you can use the following code:challenge=awaitclient.get_challenge_infos("https://geoguessr.com/challenge/xxxx")TheChallengeobject will contain information such as the challenge name, description, and time limit.To get information about a map, you can use the following code:map=awaitclient.get_map_infos("https://geoguessr.com/maps/xxxx")TheMapobject will contain information such as the map name, size, and location.To get information about a score, you can use the following code:score=awaitclient.get_challenge_score("https://geoguessr.com/challenge/xxxx")TheScoreobject will contain information such as the players' name, score, and time.When getting the score of a challenge, it automatically plays it, pinging (0, 0) each round.Example: Get results of a challenge as a list of dictionnariesscore=awaitclient.get_challenge_score("https://geoguessr.com/challenge/xxxx")scores=[]forsinscore:d_player={"userId":s.userId,"userName":s.playerName,"total":s.totalScore,"roundPoints":s.gamePlayerGuessesRoundScoreInPoints,"roundTimes":s.gamePlayerGuessesTime}scores.append(d_player)print(scores)I hope you find this package useful! Please let me know if you have any questions or feedback.
Package: geoh5py
Thegeoh5pylibrary has been created for the manipulation and storage of a wide range of
geoscientific data (points, curve, surface, 2D and 3D grids) ingeoh5 file format.
Users will be able to directly leverage the powerful visualization
capabilities ofGeoscience ANALYSTalong with open-source code from the Python ecosystem.Installationgeoh5pyis currently written for Python 3.7 or higher, and depends onNumPyandh5py.NoteUsers will likely want to take advantage of other packages available in the Python ecosystem.
We therefore recommend usingAnacondato manage the installation.Installgeoh5pyfrom PyPI:$ pip install geoh5pyFeedbackHave comments or suggestions? Submit feedback.
All the content can be found on thegithubrepository.VisitMira Geoscience websiteto learn more about our products
and services.Licensegeoh5py is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.geoh5py is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.You should have received a copy of the GNU Lesser General Public License
along with geoh5py.  If not, see <https://www.gnu.org/licenses/>.CopyrightCopyright (c) 2024 Mira Geoscience Ltd.
Package: geohashcx
GeohashEncode/decode Geohasheshttp://geohash.orgWraps Derek Smithlibgeohash. Seehttps://github.com/simplegeo/libgeohashfor implementation.Free software: GNU General Public License v3Documentation:https://geohashcx.readthedocs.io.FeaturesEncodefromgeohashimportgeohash_encodeprint(geohash_encode(35.689487,139.691706))# xn774c <- hash for Tokyo, JapanDecodefromgeohashimportgeohash_decodeparis=geohash_decode('u09tvw')print(paris.latitude,paris.longitude)# 48.856614, 2.352222CreditsGeohash implementation is by Derek Smith’slibgeohash. Seehttps://github.com/simplegeo/libgeohashThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.3 (2019-06-01)Export function from module levelFix pypi badge0.1.2 (2019-06-01)Make precision optional0.1.1 (2019-06-01)Update installation docs0.1.0 (2019-05-31)First release on PyPI.
Package: geohash-generator
Geohash GeneratorGeohash Generator is a python module that provides function for converting geojson and shapefile to geohash.FeatureConvert from Geojson to GeohashConvert from Shapefile to GeohashConvert from Geohash to GeojsonDo you have any idea for other feature?ReqruiementsPython: 2.x, 3.xInstallationpip install geohash-generatorUsageConvert from Geojson to Geohashfrom geohash_generator.geohash_generator import generate
import os

# Init Variable
this_script_dir = os.path.dirname(os.path.realpath(__file__))
source_path = os.path.join(
    this_script_dir,
    'example.geojson'
)
min_level_precision=2
max_level_precision=7
file_type="geojson"

# Convert Geojson to Geohash
convert_geojson_to_geohash = generate(
    source_path=source_path,
    min_level_precision=min_level_precision,
    max_level_precision=max_level_precision,
    file_type=file_type,
)

# Print result
print(f"convert_geojson_to_geohash: {convert_geojson_to_geohash}")Convert from Shapefile to Geohashfrom geohash_generator.geohash_generator import generate
import os

# Init Variable
this_script_dir = os.path.dirname(os.path.realpath(__file__))
source_path = os.path.join(
    this_script_dir,
    'example.shp'
)
min_level_precision=2
max_level_precision=7
file_type="shapefile"

# Convert Shapefile to Geohash
convert_shapefile_to_geohash = generate(
    source_path=source_path,
    min_level_precision=min_level_precision,
    max_level_precision=max_level_precision,
    file_type=file_type,
)

# Print result
print(f"convert_shapefile_to_geohash: {convert_shapefile_to_geohash}")Convert from Geohash to Geojsonfrom geohash_generator.geohash_generator import geohash_to_geojson
import os

# Init Variable
this_script_dir = os.path.dirname(os.path.realpath(__file__))
source_path = os.path.join(
    this_script_dir,
    'geohash_example.txt'
)

# Convert Geohash to Geojson
convert_geohash_to_geojson = geohash_to_geojson(source_path=source_path)

# Print Result
print(f"convert_geohash_to_geojson: {convert_geohash_to_geojson}")
Package: geohashlite
Geohash LiteGeohashLite is a Python package for dealing with GeoHash code. It support also conversion between GeoJSON
and a list of GeoHash.InstallationClone this repositorygit clone https://github.com/qxzzxq/python-geohash.gitThen install with pythoncd python-geohash
python setup.py installDependenciesShapelyUsageCoordinates encodingimportgeohashlitegeohashlite.encode(48.86913,2.32275,7)Geohash decodinggeohashlite.decode('u09whb7')Conversion between GeoJSON and GeoHash# GeoHash to GeoJSONconverter_1=geohashlite.GeoJsonHasher()x=['u09k','u095','u08g','u09h','u09e','u097']converter_1.geohash_codes=xconverter_1.decode_geohash(multipolygon=True)print(converter_1.geojson)# GeoJSON to GeoHashconverter_2=geohashlite.GeoJsonHasher()fc={"type":"FeatureCollection","features":["GeoJSON_Feature",]}converter_2.geojson=fcconverter_2.encode_geojson(precision=4)print(converter_2.geohash_codes)Convert a geohash list to geojson (deprecated)geohashlite.geohash_2_geojson(['u09whb7'])Convert geojson to a geohash list (deprecated)fc={"type":"FeatureCollection","features":["a_GeoJSON_Feature"]}geohashlite.geojson_2_geohash(fc,precision=7)AcknowledgementThanksHiroaki KawaiandJerry Xu.
Package: geohashr
GeohashrJust another Python geohashing library.In a nutshellimportgeohashrgeohashr.encode(45.464664,9.188540)# 'u0nd9hdfue8h'geohashr.decode('u0nd9hdfue8h')# (45.46466396190226, 9.188540149480104)geohashr.decode_exact('u0nd9hd')# (45.46485900878906, 9.188003540039062, 0.0006866455078125, 0.0006866455078125)geohashr.bbox('u0nd9hdfue8h')# {#     'e': 9.188540317118168,#     's': 45.46466387808323,#     'w': 9.188539981842041,#     'n': 45.46466404572129# }geohashr.neighbors('u0nd9hdfue8h')# {#     'e': 'u0nd9hdfue8k',#     'n': 'u0nd9hdfue8j',#     'ne': 'u0nd9hdfue8m',#     'nw': 'u0nd9hdfu7xv',#     's': 'u0nd9hdfue85',#     'se': 'u0nd9hdfue87',#     'sw': 'u0nd9hdfu7xg',#     'w': 'u0nd9hdfu7xu'# }geohashr.neighbor('u0nd9hdfue8h','e')# 'u0nd9hdfue8k'LicenseGeohashr is released under the BSD License.
Package: geohashrs
geohashrsThis project provides geohash (https://en.wikipedia.org/wiki/Geohash) encoding and decoding based on geohash-rust (https://github.com/georust/geohash). You can usegeohash_encode(latitude, longitude, zoom_level)to decode andgeohash_decode(geohashstring)to decode.Actually, this version is very early version, it is usable and more functionality will come.Installationpip install geohashrsUsageExample:>>> from geohashrs import geohash_encode, geohash_decode
>>> geohash_encode(5.4, 43.3, 10)
'spey6fs0v1'
>>> geohash_decode('spey6fs0v1')
[5.4, 43.3]
Package: geohash-to-geojson
Geohash to geojson:This package convert a set of geohashes into a geojson file with the corresponding boundariesHow it works:Intall the package with the following code:pipinstallgoohash-to-geojsonImport the function geohash_to_geojson with the following code:importgeohash_to_geojsonCall the function with a list of the geohashes for example:geohash_to_geojson.geohash_to_geojson(['snd1j0','snd1jk'])You ll get the geojson code like that:'{"type": "FeatureCollection", "features": [{"id": "0", "type": "Feature", "properties": {}, "geometry": {"type": "Polygon", "coordinates": [[[3.0322265625, 36.73828125], [3.043212890625, 36.73828125], [3.043212890625, 36.7437744140625], [3.0322265625, 36.7437744140625], [3.0322265625, 36.73828125]]]}, "bbox": [3.0322265625, 36.73828125, 3.043212890625, 36.7437744140625]}, {"type": "Feature", "properties": {"id": "snd1jk"}, "geometry": {"type": "Polygon", "coordinates": [[[3.043212890625, 36.76025390625], [3.05419921875, 36.76025390625], [3.05419921875, 36.7657470703125], [3.043212890625, 36.7657470703125], [3.043212890625, 36.76025390625]]]}}], "bbox": [3.0322265625, 36.73828125, 3.043212890625, 36.7437744140625]}'Modify the id :0 in the first feature with the first geohash in your list then copie the text without the first and last ballestics " '' " into a file and save as with a geojson extension and that's itRequirements:json packagepolygon_geohashergeopandasshapelyThank you !
Package: geoid
geoidClasses for working with census geoidsThis module provides dynamically generated classes for parsing and creating each of the approximately 85 Census
summary levels. It can parse the forms of genoides that appear in the Decenial Census, the ACS, and Tiger files.
Additionally, it can read and write a more compact format, civick,  that use base62 representation for the numbers.UseThe geoid module in file geoid/init.py,  has a list of the geoid classes that you can instantiate. Or, to print
the list:$ python -c 'import geoid; print geoid.names'The first dozen are the ones you'll use most frequently:'us':10,'region':20,'division':30,'state':40,'county':50,'cosub':60,'place':160,'ua':400,'tract':140,'blockgroup':150,'block':101,'sdelm':950,'sdsec':960,'sduni':970,'zcta':860The classes are all dynamically generated, so you won't be able to find a class file.fromgeoidimportacsg=acs.Blockgroup(53,33,1800,3)printg.state,g.county.g.tract.g.blockgroupgs=str(g)g=acs.AcsGeoid.parse(gs)CreatingTBDParsingTBDParse Generally, or parse to a specific class.Access MembersPromotion, Conversion, Summarization, AllValsPromote: create a higher level geoid from a lower level one
Convert: Change the type, for instance from a Census geoid to an ACS geoid
Summarize: Create a value to represent a summary level
AllVal: Create a value to represent coverage of an entire regionCaveatsThe geoids don't preserve the component, so, for instance,  '03001US1' will get changed to '03000US1'Running testsgitclonegit@github.com:CivicKnowledge/geoid.gitcdgeoid
pythonsetup.pytest
Package: geoid-toolkit
Python tools for obtaining and working with static gravity field coefficients
and calculating geoid heightsGFZ International Centre for Global Earth Models (ICGEM)Dependenciescartopy: Python package designed for geospatial data processinggdal: Pythonic interface to the Geospatial Data Abstraction Library (GDAL)h5py: Python interface for Hierarchal Data Format 5 (HDF5)lxml: processing XML and HTML in Pythonmatplotlib: Python 2D plotting librarynetCDF4: Python interface to the netCDF C librarynumpy: Scientific Computing Tools For Pythonpyproj: Python interface to PROJ librarypython-dateutil: powerful extensions to datetimeReferencesDrewes, Kuglitsch, Adám and Rózsa “The Geodesist’s Handbook 2016”,
Journal of Geodesy, 90, 907-1205 (2016).doi:10.1007/s00190-016-0948-zHofmann-Wellenhof and Moritz, “Physical Geodesy” (2005).doi:10.1007/978-3-211-33545-1Holmes and Featherstone, “A Unified Approach to the Clenshaw Summation and
the Recursive Computation of Very High Degree and Order Normalised
Associated Legendre Functions”, Journal of Geodesy (2002).doi:10.1007/s00190-002-0216-2Ince, Barthelmes, Reißland, Elger, Förste, Flechtner, and Schuh,
“ICGEM – 15 years of successful collection and distribution of global
gravitational models, associated services, and future plans”
Earth System Science Data, 11, 647–674 (2019).doi:10.5194/essd-11-647-2019Jekeli, “Alternative Methods to Smooth the Earth’s Gravity Field”, (1981).Moazezi and Zomorrodian, “GGMCalc a software for calculation of the geoid
undulation and the height anomaly using the iteration method, and
classical gravity anomaly”, Earth Science Informatics (2012).doi:10.1007/s12145-012-0102-2Tscherning and Poder, “Some Geodetic Applications of Clenshaw Summation”,
Bollettino di Geodesia e Scienze, (1982)Wahr, Molenaar and Frank, “Time variability of the Earth’s gravity field:
Hydrological and oceanic effects and their possible detection using
GRACE”, Journal of Geophysical Research: Solid Earth, 103(B12),
30205-30229,doi:10.1029/98JB02844DownloadThe program homepage is:https://github.com/tsutterley/geoid-toolkitA zip archive of the latest version is available directly at:https://github.com/tsutterley/geoid-toolkit/archive/main.zipDisclaimerThis project contains work and contributions from thescientific community.
This program is not sponsored or maintained by the Universities Space Research Association (USRA),
the Center for Space Research at the University of Texas (UTCSR), the Jet Propulsion Laboratory (JPL),
the German Research Centre for Geosciences (GeoForschungsZentrum, GFZ) or NASA.
It is provided here for your convenience butwith no guarantees whatsoever.LicenseThe content of this project is licensed under theCreative Commons Attribution 4.0 Attribution licenseand the source code is licensed under theMIT license.
Package: geoimage
geoimage associates an image with latitude and longitude coordinates.most useful application of this utility is to crop images at requested latitude-longitude bounding boxnterlon,centerlat,deltalat=latdeltavalue,deltalon=londeltavalue):from geoimage import GeoLocateImage
geoimg=GeoLocateImage(urlorfile,leftlon=0,rightlon=360,toplat=90,bottomlat=-90)
geoimg.image #contains the imagea useful methods aregeoimg.crop_at_llbox(leftlon,rightlon,toplat,bottomlat)
geoimg.crop_at_llpoint(centerlon,centerlat,deltalatlon)
or alternatively
geoimg.crop_at_llpoint(centerlon,centerlat,deltalat=latdeltavalue,deltalon=londeltavalue)
#import geoimage also extends PIL.Image methods and IPython.core.display.Image methods
import geoimage
from PIL import Image
Image.geolocate(urlorfile,leftlon=0,rightlon=360,toplat=90,bottomlat=-90)
Image.crop_at_llbox(…….)
Package: geoindex
Simple library for perform quick nearby search for geo spatial data.Requirementspython-geohashIt was written and tested on Python 2.7.InstallationGet it frompypi:pip install geoindexorgithub:pip install -e git://github.com/gusdan/geoindex.git#egg=geoindexSimple useIf we have 100000 geo coordinates and we have to find some nearby location
to given point and with given radius we can do something like this:from geoindex import GeoGridIndex, GeoPoint

geo_index = GeoGridIndex()
for _ in range(10000):
    lat = random.random()*180 - 90
    lng = random.random()*360 - 180
    index.add_point(GeoPoint(lat, lng))

center_point = GeoPoint(37.7772448, -122.3955118)
for distance, point in index.get_nearest_points(center_point, 10, 'km'):
    print("We found {0} in {1} km".format(point, distance))Search with associated dataWhen we fill index we can pass ref to GeoPoint as reference to some object
and use it after:from geoindex import GeoGridIndex, GeoPoint

index = GeoGridIndex()
for airport in get_all_airports():
    index.add_point(GeoPoint(lat, lng, ref=airport))

center_point = GeoPoint(37.7772448, -122.3955118)
for distance, point in index.get_nearest_points(center_point, 10, 'km'):
    print("We airport {0} in {1} km".format(point.ref, distance))PerformanceCreating index with 10000 random points and nearby search for each point took
about 400ms. See tests/test_performance.py for more details.How does it workFor perform quick search GeoGridIndex usesGeohashfor each point and store it
in internal dictionary. When we initialize GeoGridIndex we pass precision to
constructor, based on it we divide all spaces with grid and store each point
inside that grid.
When we search nearest points we define cell with center point and 8 neighbors
and check all points from these cells for distance to center.Each cell has size dependent on precision, bellow you can find grid’s cell size
and precision.PrecisionCell size1500021260315644054.861.2270.15280.038If you have created GeoGridIndex with precision = 4 it means what all points
will be assign to grid with cell size = 40 km. And we can run search with
radius less than 40/2km. If we’d like to make bigger radius we should create
index with less precision 3.But in other side if we create index with smallest precision (1) and will run
search (get_nearest_points) with small radius (1km for example) it will works
fine, but it will check all points inside 9 grid cells with size 5000km and it
can be not so fast.
Package: geoinsight
GeoInsight API python packageTo get started with the GeoInsight API head over togeoinsight.aiand create an account. You will get anGeoInsight Personal Token (GPT)and anAPI Private Key (APK).InstallTo install the package just run a regularpip installpip install geoinsightThen import the package like this.import geoinsightThe GeoInsight package come with anapiclass to access the endpoints and autilclass with additional useful functions. You can initialize both like this:api=geoinsight.api()
util=geoinsight.util()Theapiclass wraps all API endpoints in python functions andutilis a collection of methods that are useful to end-users, such as getting fromrto a geopandas dataframegdf, or to get the customcrsspherical  map projection for any givengdf. Theapiclass does not do any diagnostics, it is up to you and the context of your code to check ifrcomes back with a valid200http status code. Better write anifstatement or atry-catchblock if needed to check forr.status.UsageNow use theGeoInsight Personal Token (GPT)andAPI Private Key (APK).api.set_access_token(_gpt='GPT',_apk='APK')
Package: geoint
geoint-pyA bunch of geospatial intelligence workflows implemented using Python.FeaturesCreate a rectangular spatial grid for binning© GDI-TH, Esri, HERE, Garmin, FAO, NOAA, USGS - Powered by EsriVisualize broadcasted news related to protests/demonstrations using the geoprotests APIVisualize armed conflict events using the geoconflicts APIUsageTake a look at the following jupyter notebooks:Sample binningSample geoprotests/geoconflicts APIReferencesArcGIS API for Pythongeoprotests APIgeoconflicts APIGeospatial Intelligence PublicationsGetting insights from political violence and protests around the worldGeospatial Intelligence @ Medium
Package: geoip2nation
===========
Geo IPProvides a fast, seamless in memory ip to country functionality based on the ip2nation db.No dependenciesCompletely freeCountry resolution onlyQueries / sec > 13.5k per coreData file can be refreshed without a restartMemory footprint < 40 MBCommand lineStream / pipe ips and get comma delimited [ip,2 letter country code] e.g. 12.12.12.12,USChange log:If you upgrade please note that there is a BREAKING CHANGE geoip module was renamed to xgeoipSupports Python 2.7 / 3.xip2nation file updated to May 2020 version#Python 2.7 / Python 3.xfromgeoipimportxgeoipr=xgeoip.GeoIp()r.load_memory()r.resolve("12.12.12.12").country_code#This prints : 'US'print(r.resolve("123.44.57.4"))#This prints : {'country': 'Korea (South)', 'host_name': '', 'country_code': 'KR'}r.resolve2("133.12.12.12")#This prints : 'JP'Command linepackage usage: python geoip/xgeoip.py resolve 1.1.1.1
{'country_code': 'AU', 'country': 'Australia', 'host_name': ''}source usage: python xgeoip.py [-h] [-v] {download,resolve} ...positional arguments:
{download,resolve}optional arguments:
-h, --help          show this help message and exit
-v, --verbose       increase output verbosityusage: geoip.py resolve [-h] [-ho] [-s] [--stream] ippositional arguments:
ip           The ip address to get the country foroptional arguments:
-h, --help   show this help message and exit
-ho, --host  When set to true the code will try to get the host name
-s, --short  When set to true the code will return a 2 letter country code
only
--stream     When set to true the code expect a stream of ipsusage: geoip.py download [-h]optional arguments:
-h, --help  show this help message and exitInstallationpip install geoip2nationPyPI:https://pypi.python.org/pypi/geoip2nation/Github:https://github.com/avindak/python-geo-ipip2nationData can be downloaded using the download methodThe load_memory method loads the ip2nation sql data file from disk into an in memory sqlite3 dblicenseMITLinksip2nation home:http://ip2nation.com/ip2nation data file:http://www.ip2nation.com/ip2nation.zip
Package: geoip2nation3
===========Geo IP===========Note: This is a friendly Python 3 port of [python-geo-ip](https://github.com/avindak/python-geo-ip) by Avi Asher. We look forward to the original package supporting Python 3.Provides a fast, seamless in memory ip to country functionality based on the ip2nation db.- No dependencies- Completely free- Country resolution only- Queries / sec > 13.5k per core- Data file can be refreshed without a restart- Memory footprint < 40 MB- Command line- Stream / pipe ips and get comma delimited [ip,2 letter country code] e.g. 12.12.12.12,US```pythonfrom geoip import geoipr = geoip.GeoIp()r.load_memory()r.resolve("12.12.12.12").country_code#This prints : 'US'print r.resolve("123.44.57.4")#This prints : {'country': 'Korea (South)', 'host_name': '', 'country_code': 'KR'}r.resolve2("133.12.12.12")#This prints : 'JP'```# Command lineusage: geoip.py [-h][-v] {download,resolve} ...positional arguments:{download,resolve}optional arguments:-h, --help show this help message and exit-v, --verbose increase output verbosityusage: geoip.py resolve [-h][-ho] [-s][--stream] ippositional arguments:ip The ip address to get the country foroptional arguments:-h, --help show this help message and exit-ho, --host When set to true the code will try to get the host name-s, --short When set to true the code will return a 2 letter country codeonly--stream When set to true the code expect a stream of ipsusage: geoip.py download [-h]optional arguments:-h, --help show this help message and exit# Installationpip install geoip2nationPyPI: https://pypi.python.org/pypi/geoip2nation/Github: https://github.com/avindak/python-geo-ip# ip2nation- Data can be downloaded using the download method- The load_memory method loads the ip2nation sql data file from disk into an in memory sqlite3 db# licenseMIT# Links- ip2nation home: http://ip2nation.com/- ip2nation data file: http://www.ip2nation.com/ip2nation.zip