forked from datacommonsorg/api-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
44 lines (37 loc) · 2 KB
/
__init__.py
File metadata and controls
44 lines (37 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Copyright 2020 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# isort: skip_file
import warnings
warnings.warn(
"\n\n'datacommons_pandas' is deprecated and will no longer be updated.\n"
"Please migrate to the 'datacommons_client' package.\n"
"Migration guide: https://docs.datacommons.org/api/python/v2/migration.html\n"
"Contact support@datacommons.org with any questions.\n",
category=DeprecationWarning,
stacklevel=2)
from datacommons_pandas.df_builder import build_time_series, build_time_series_dataframe, build_multivariate_dataframe
################################ SYMLINK FILES ################################
# We include symlinks to all user-facing functions from the datacommons pkg. #
# This is so that users do not need to import both libraries for pd support. #
# Please keep the below in sync with the __init__.py in the datacommons/ dir #
# TODO: enforce this. https://github.com/datacommonsorg/api-python/issues/149 #
##############################################@################################
# Data Commons SPARQL query support
from datacommons_pandas.sparql import query
# Data Commons Python API
from datacommons_pandas.core import get_property_labels, get_property_values, get_triples
from datacommons_pandas.places import get_places_in, get_related_places, get_stats
from datacommons_pandas.stat_vars import get_stat_value, get_stat_series, get_stat_all
from datacommons_pandas.key import set_api_key
from datacommons_pandas.node import properties, property_values, triples